Skip to content

Commit 851aaf8

Browse files
JHertz5LarsAsplund
authored andcommitted
#1132 Added warning when attempting to set NVC --exit-severity via nvc.sim_flags
1 parent f4d75c3 commit 851aaf8

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

vunit/sim_if/nvc.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,17 @@ def simulate(
288288
if self._supports_jit:
289289
cmd += ["--jit"]
290290
cmd += ["-r"]
291-
cmd += config.sim_options.get("nvc.sim_flags", [])
291+
292+
config_sim_options = config.sim_options.get("nvc.sim_flags", [])
293+
if "--exit-severity" in "".join(config_sim_options):
294+
LOGGER.warning(
295+
"The --exit-severity setting has been passed via %s.sim_flags. This is overruled by the VUnit"
296+
" option vhdl_assert_stop_level, which is set to '%s'. See"
297+
" https://vunit.github.io/py/opts.html#simulation-options for further details",
298+
self.name,
299+
config.vhdl_assert_stop_level
300+
)
301+
cmd += config_sim_options
292302
cmd += [f"--exit-severity={config.vhdl_assert_stop_level}"]
293303

294304
if not self._ieee_warnings_global and config.sim_options.get("disable_ieee_warnings", False):

0 commit comments

Comments
 (0)