diff --git a/Changes b/Changes index d593a3074..64f4be8f0 100644 --- a/Changes +++ b/Changes @@ -19,7 +19,7 @@ Verilator 5.001 devel clocks are now simulated correctly (#3278, #3384). [Geza Lore, Shunyao CAD] * Support timing controls (delays, event controls in any location, wait statements) and forks. See docs for details. [Krzysztof Bieganski, Antmicro Ltd] -* Add --binary option as alias of --main --exe --build (#3625). +* Add --binary option as alias of --main --exe --build --timing (#3625). Verilator 4.227 devel diff --git a/docs/guide/exe_verilator.rst b/docs/guide/exe_verilator.rst index 7ced835e3..e7a742363 100644 --- a/docs/guide/exe_verilator.rst +++ b/docs/guide/exe_verilator.rst @@ -118,7 +118,7 @@ Summary: .. option:: --binary Create a Verilated simulator binary. Alias for :vlopt:`--main` - :vlopt:`--exe` :vlopt:`--build`. + :vlopt:`--exe` :vlopt:`--build` :vlopt:`--timing`. See also :vlopt:`-j`. diff --git a/src/V3Options.cpp b/src/V3Options.cpp index a3486a397..c6d5c6c63 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -1020,6 +1020,7 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char m_build = true; m_exe = true; m_main = true; + if (m_timing.isDefault()) m_timing = VOptionBool::OPT_TRUE; }); DECL_OPTION("-build", Set, &m_build); DECL_OPTION("-build-dep-bin", Set, &m_buildDepBin); diff --git a/test_regress/t/t_flag_binary.pl b/test_regress/t/t_flag_binary.pl index e13118b38..c8f265aa1 100755 --- a/test_regress/t/t_flag_binary.pl +++ b/test_regress/t/t_flag_binary.pl @@ -8,23 +8,28 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 -top_filename("t/t_flag_main.v"); - scenarios(simulator => 1); -compile( - verilator_flags => [# Custom as don't want -cc - "-Mdir $Self->{obj_dir}", - "--debug-check", ], - verilator_flags2 => ['--binary'], - verilator_make_cmake => 0, - verilator_make_gmake => 0, - make_main => 0, - ); +top_filename("t/t_flag_main.v"); -execute( - check_finished => 1, - ); +if (!$Self->have_coroutines) { + skip("No coroutine support"); +} +else { + compile( + verilator_flags => [# Custom as don't want -cc + "-Mdir $Self->{obj_dir}", + "--debug-check", ], + verilator_flags2 => ['--binary'], + verilator_make_cmake => 0, + verilator_make_gmake => 0, + make_main => 0, + ); + + execute( + check_finished => 1, + ); +} ok(1); 1;