Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to generate FST file from NVC, without spawning GTKWave #1042

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion vunit/sim_if/nvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ class NVCInterface(SimulatorInterface): # pylint: disable=too-many-instance-att
StringOption("nvc.gtkwave_script.gui"),
]

@staticmethod
def add_arguments(parser):
"""
Add command line arguments
"""
group = parser.add_argument_group("nvc", description="NVC specific flags")
group.add_argument(
"--nvc-fst",
action="store_true",
default=False,
help=("Generate wave file in FST format."),
)

@classmethod
def from_args(cls, args, output_path, **kwargs):
"""
Expand All @@ -58,6 +71,7 @@ def from_args(cls, args, output_path, **kwargs):
prefix=prefix,
gui=args.gui,
num_threads=args.num_threads,
nvc_fst=args.nvc_fst,
)

@classmethod
Expand All @@ -73,6 +87,7 @@ def __init__( # pylint: disable=too-many-arguments
prefix,
num_threads,
gui=False,
nvc_fst=False,
gtkwave_args="",
):
SimulatorInterface.__init__(self, output_path, gui)
Expand All @@ -84,6 +99,7 @@ def __init__( # pylint: disable=too-many-arguments

self._gui = gui
self._gtkwave_args = gtkwave_args
self._nvc_fst = nvc_fst
self._vhdl_standard = None
self._coverage_test_dirs = set()

Expand Down Expand Up @@ -251,7 +267,7 @@ def simulate(self, output_path, test_suite_name, config, elaborate_only): # pyl
if not script_path.exists():
makedirs(script_path)

if self._gui:
if self._gui or self._nvc_fst:
wave_file = script_path / (f"{config.entity_name}.fst")
if wave_file.exists():
remove(wave_file)
Expand Down