Skip to content

Commit acf7e7f

Browse files
nickgLarsAsplund
authored andcommitted
Adjust disable_ieee_warnings for NVC >= 1.16
For the next release of NVC this should be passed as a global option rather than a "run" option (because warnings can be produced during elaboration too). Passing to the run command is still supported so old versions of VUnit will continue to work, but the option may not take effect in some situations.
1 parent 74dc4ba commit acf7e7f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

vunit/sim_if/nvc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def __init__( # pylint: disable=too-many-arguments
8989
self._coverage_test_dirs = set()
9090
(major, minor) = self.determine_version(prefix)
9191
self._supports_jit = major > 1 or (major == 1 and minor >= 9)
92+
self._ieee_warnings_global = major > 1 or (major == 1 and minor >= 16)
9293

9394
if self.use_color:
9495
environ["NVC_COLORS"] = "always"
@@ -263,6 +264,9 @@ def simulate(
263264
else:
264265
wave_file = None
265266

267+
if self._ieee_warnings_global and config.sim_options.get("disable_ieee_warnings", False):
268+
cmd += ["--ieee-warnings=off"]
269+
266270
cmd += ["-H", config.sim_options.get("nvc.heap_size", "64m")]
267271
cmd += config.sim_options.get("nvc.global_flags", [])
268272

@@ -285,7 +289,7 @@ def simulate(
285289
cmd += config.sim_options.get("nvc.sim_flags", [])
286290
cmd += [f"--exit-severity={config.vhdl_assert_stop_level}"]
287291

288-
if config.sim_options.get("disable_ieee_warnings", False):
292+
if not self._ieee_warnings_global and config.sim_options.get("disable_ieee_warnings", False):
289293
cmd += ["--ieee-warnings=off"]
290294

291295
if wave_file:

0 commit comments

Comments
 (0)