diff --git a/Changes b/Changes index 832991ed6..df06d491b 100644 --- a/Changes +++ b/Changes @@ -31,6 +31,7 @@ Verilator 5.031 devel * Add error on `wait` with missing `.triggered` (#4457). * Add error when improperly storing to parameter (#5147). [Gökçe Aydos] * Add error on illegal `--prefix` etc. values (#5507). [Fabian Keßler] +* Add error on `--savable --timing` (#5690). [Narcis Rodas] * Add coverage point hierarchy to coverage reports (#5575) (#5576). [Andrew Nolte] * Add warning on global constraints (#5625). [Ryszard Rozak, Antmicro Ltd.] * Add default CMAKE_BUILD_TYPE (#5691) (#5692). [Anthony Moore] diff --git a/src/V3Options.cpp b/src/V3Options.cpp index 8131f3c6e..717328b6d 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -949,6 +949,9 @@ void V3Options::notify() VL_MT_DISABLED { if (coverage() && savable()) { cmdfl->v3error("Unsupported: --coverage and --savable not supported together"); } + if (v3Global.opt.timing().isSetTrue() && savable()) { + cmdfl->v3error("Unsupported: --timing and --savable not supported together"); + } // Mark options as available m_available = true; diff --git a/test_regress/t/t_savable_timing_bad.out b/test_regress/t/t_savable_timing_bad.out new file mode 100644 index 000000000..cef0f1ea3 --- /dev/null +++ b/test_regress/t/t_savable_timing_bad.out @@ -0,0 +1,2 @@ +%Error: Unsupported: --timing and --savable not supported together +%Error: Exiting due to diff --git a/test_regress/t/t_savable_timing_bad.py b/test_regress/t/t_savable_timing_bad.py new file mode 100755 index 000000000..31065f1eb --- /dev/null +++ b/test_regress/t/t_savable_timing_bad.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2024 by Wilson Snyder. This program is free software; you +# can redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. +# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 + +import vltest_bootstrap + +test.scenarios('vlt') +test.top_filename = "t/t_savable_coverage_bad.v" + +test.compile(v_flags2=["--savable --timing"], + save_time=500, + fails=True, + expect_filename=test.golden_filename) + +test.passes()