-
Notifications
You must be signed in to change notification settings - Fork 284
Open
Description
It seems that when using nvc as simulator, the waveforms set with --viewer-fmt format are only generated when using the --gui option of the Python runner. With ghdl, this isn't the case, waveforms are generated regardless of the --gui option.
I think, the problem is in nvc.py simulate() method:
First, wave_file is only set to a value if _gui is set:
Lines 260 to 265 in acf7e7f
| if self._gui: | |
| wave_file = script_path / (f"{config.entity_name}.{self._viewer_fmt or 'fst'}") | |
| if wave_file.exists(): | |
| remove(wave_file) | |
| else: | |
| wave_file = None |
Later if wave_file is set, the nvc --wave is added to the command line:
Lines 295 to 296 in acf7e7f
| if wave_file: | |
| cmd += [f"--wave={wave_file}"] |
In ghdl.py, creation of the waveform export command line option is only dependent on _viewer_fmt, but not on _gui:
Lines 368 to 375 in acf7e7f
| if self._viewer_fmt is not None: | |
| data_file_name = str(Path(script_path) / f"wave.{self._viewer_fmt!s}") | |
| if Path(data_file_name).exists(): | |
| remove(data_file_name) | |
| else: | |
| data_file_name = None | |
| cmd = self._get_command(config, script_path, elaborate_only, ghdl_e, test_suite_name, data_file_name) |
Lines 327 to 333 in acf7e7f
| if wave_file: | |
| if self._viewer_fmt == "ghw": | |
| sim += [f"--wave={wave_file!s}"] | |
| elif self._viewer_fmt == "vcd": | |
| sim += [f"--vcd={wave_file!s}"] | |
| elif self._viewer_fmt == "fst": | |
| sim += [f"--fst={wave_file!s}"] |
Metadata
Metadata
Assignees
Labels
No labels