diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 6bf8240c8..9a9440b1b 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -153,6 +153,9 @@ if ($#opt_tests < 0) { # Run everything @opt_tests = _calc_hashset(@opt_tests) if $opt_hashset; if ($#opt_tests >= 2 && $opt_jobs >= 2) { + # Read supported into master process, so don't call every subprocess + _have_coroutines(); + _have_sc(); # Without this tests such as t_debug_sigsegv_bt_bad.pl will occasionally # block on input and cause a SIGSTOP, then a "fg" was needed to resume testing. if (!$::Have_Forker) { @@ -289,6 +292,35 @@ sub _calc_hashset { return @new; } +####################################################################### +# Verilator utilities + +our %_Verilator_Supported; +sub _verilator_get_supported { + my $feature = shift; + # Returns if given feature is supported + if (!defined $_Verilator_Supported{$feature}) { + my @args = ("perl", "$ENV{VERILATOR_ROOT}/bin/verilator", "-get-supported", $feature); + my $args = join(' ', @args); + my $out = `$args`; + $out or die "couldn't run: $! " . join(' ', @args); + chomp $out; + $_Verilator_Supported{$feature} = ($out =~ /1/ ? 1 : 0); + } + return $_Verilator_Supported{$feature}; +} + +sub _have_coroutines { + return 1 if _verilator_get_supported('COROUTINES'); + return 0; +} + +sub _have_sc { + return 1 if (defined $ENV{SYSTEMC} || defined $ENV{SYSTEMC_INCLUDE} || $ENV{CFG_HAVE_SYSTEMC}); + return 1 if _verilator_get_supported('SYSTEMC'); + return 0; +} + ####################################################################### ####################################################################### ####################################################################### @@ -889,21 +921,22 @@ sub compile_vlt_flags { my %param = (%{$self}, @_); # Default arguments are from $self return 1 if $self->errors || $self->skips; - my $checkflags = join(' ', @{$param{v_flags}}, - @{$param{v_flags2}}, - @{$param{verilator_flags}}, - @{$param{verilator_flags2}}, - @{$param{verilator_flags3}}); + my $checkflags = ' '.join(' ', @{$param{v_flags}}, + @{$param{v_flags2}}, + @{$param{verilator_flags}}, + @{$param{verilator_flags2}}, + @{$param{verilator_flags3}}); die "%Error: specify threads via 'threads =>' argument, not as a command line option" unless ($checkflags !~ /(^|\s)-?-threads\s/); + $self->{coverage} = 1 if ($checkflags =~ /-coverage\b/); + $self->{savable} = 1 if ($checkflags =~ /-savable\b/); $self->{sc} = 1 if ($checkflags =~ /-sc\b/); + $self->{timing} = 1 if ($checkflags =~ /\b-?-timing\b/ || $checkflags =~ /\b-?-binary\b/ ); $self->{trace} = ($opt_trace || $checkflags =~ /-trace\b/ || $checkflags =~ /-trace-fst\b/); $self->{trace_format} = (($checkflags =~ /-trace-fst/ && $self->{sc} && 'fst-sc') || ($checkflags =~ /-trace-fst/ && !$self->{sc} && 'fst-c') || ($self->{sc} && 'vcd-sc') || (!$self->{sc} && 'vcd-c')); - $self->{savable} = 1 if ($checkflags =~ /-savable\b/); - $self->{coverage} = 1 if ($checkflags =~ /-coverage\b/); $self->{sanitize} = $opt_sanitize unless exists($self->{sanitize}); $self->{benchmarksim} = 1 if ($param{benchmarksim}); @@ -1113,7 +1146,10 @@ sub compile { $self->skip("Test requires SystemC; ignore error since not installed\n"); return 1; } - + if ($self->{timing} && !$self->have_coroutines) { + $self->skip("Test requires Coroutines; ignore error since not available\n"); + return 1; + } if ($param{verilator_make_cmake} && !$self->have_cmake) { $self->skip("Test requires CMake; ignore error since not available or version too old\n"); return 1; @@ -1464,16 +1500,11 @@ sub sc { } sub have_sc { - my $self = (ref $_[0] ? shift : $Self); - return 1 if (defined $ENV{SYSTEMC} || defined $ENV{SYSTEMC_INCLUDE} || $ENV{CFG_HAVE_SYSTEMC}); - return 1 if $self->verilator_get_supported('SYSTEMC'); - return 0; + return ::_have_sc(); } sub have_coroutines { - my $self = (ref $_[0] ? shift : $Self); - return 1 if $self->verilator_get_supported('COROUTINES'); - return 0; + return ::_have_coroutines(); } sub make_version { @@ -2155,25 +2186,6 @@ sub _read_inputs_vhdl { $fh->close(); } -####################################################################### -# Verilator utilities - -our %_Verilator_Supported; -sub verilator_get_supported { - my $self = (ref $_[0] ? shift : $Self); - my $feature = shift; - # Returns if given feature is supported - if (!defined $_Verilator_Supported{$feature}) { - my @args = ("perl", "$ENV{VERILATOR_ROOT}/bin/verilator", "-get-supported", $feature); - my $args = join(' ', @args); - my $out = `$args`; - $out or die "couldn't run: $! " . join(' ', @args); - chomp $out; - $_Verilator_Supported{$feature} = ($out =~ /1/ ? 1 : 0); - } - return $_Verilator_Supported{$feature}; -} - ####################################################################### # File utilities diff --git a/test_regress/t/t_clocking_sched_timing.pl b/test_regress/t/t_clocking_sched_timing.pl index 7fe0b1dee..1d537460a 100755 --- a/test_regress/t/t_clocking_sched_timing.pl +++ b/test_regress/t/t_clocking_sched_timing.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,22 +10,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_clocking_sched.v"); +top_filename("t/t_clocking_sched.v"); - compile( - timing_loop => 1, - verilator_flags2 => ["--timing"], - ); +compile( + timing_loop => 1, + verilator_flags2 => ["--timing"], + ); - execute( - check_finished => 1, - expect_filename => $Self->{golden_filename} - ); -} +execute( + check_finished => 1, + expect_filename => $Self->{golden_filename} + ); ok(1); 1; diff --git a/test_regress/t/t_clocking_timing1.pl b/test_regress/t/t_clocking_timing1.pl index ca8f6fa4e..671334c7d 100755 --- a/test_regress/t/t_clocking_timing1.pl +++ b/test_regress/t/t_clocking_timing1.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,21 +10,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_clocking_timing.v"); +top_filename("t/t_clocking_timing.v"); - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_clocking_timing2.pl b/test_regress/t/t_clocking_timing2.pl index 6dff6484b..ad6f5308f 100755 --- a/test_regress/t/t_clocking_timing2.pl +++ b/test_regress/t/t_clocking_timing2.pl @@ -10,21 +10,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_clocking_timing.v"); +top_filename("t/t_clocking_timing.v"); - compile( - verilator_flags2 => ["--exe --main --timing -DTEST_INPUT_SKEW=12 -DTEST_OUTPUT_SKEW=16"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing -DTEST_INPUT_SKEW=12 -DTEST_OUTPUT_SKEW=16"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_cxx_equal_to.pl b/test_regress/t/t_cxx_equal_to.pl index 5ac57f398..adba530eb 100755 --- a/test_regress/t/t_cxx_equal_to.pl +++ b/test_regress/t/t_cxx_equal_to.pl @@ -10,23 +10,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_cxx_equal_to.v"); +top_filename("t/t_cxx_equal_to.v"); - compile( - verilator_flags2 => ['--binary --timing --trace'], - verilator_make_cmake => 0, - verilator_make_gmake => 0, - make_main => 0, - ); +compile( + verilator_flags2 => ['--exe --main --timing --timing --trace'], + verilator_make_cmake => 0, + verilator_make_gmake => 0, + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_delay_incr_timing.pl b/test_regress/t/t_delay_incr_timing.pl index 6b78f49a3..7bc99d468 100755 --- a/test_regress/t/t_delay_incr_timing.pl +++ b/test_regress/t/t_delay_incr_timing.pl @@ -12,21 +12,16 @@ scenarios(simulator => 1); $Self->{main_time_multiplier} = 10e-7 / 10e-9; -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_delay_incr.v"); +top_filename("t/t_delay_incr.v"); - compile( - timing_loop => 1, - verilator_flags2 => ['--timing -Wno-ZERODLY'], - ); +compile( + timing_loop => 1, + verilator_flags2 => ['--timing -Wno-ZERODLY'], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_delay_timing.pl b/test_regress/t/t_delay_timing.pl index 505ebf865..9514aafb4 100755 --- a/test_regress/t/t_delay_timing.pl +++ b/test_regress/t/t_delay_timing.pl @@ -12,21 +12,16 @@ scenarios(simulator => 1); $Self->{main_time_multiplier} = 10e-7 / 10e-9; -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_delay.v"); +top_filename("t/t_delay.v"); - compile( - timing_loop => 1, - verilator_flags2 => ['--timing -Wno-ZERODLY'], - ); +compile( + timing_loop => 1, + verilator_flags2 => ['--timing -Wno-ZERODLY'], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_delay_var.pl b/test_regress/t/t_delay_var.pl index c0d64fbeb..68a8b13cd 100755 --- a/test_regress/t/t_delay_var.pl +++ b/test_regress/t/t_delay_var.pl @@ -10,21 +10,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - fails => $Self->{vlt}, - expect_filename => $Self->{golden_filename}, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + fails => $Self->{vlt}, + expect_filename => $Self->{golden_filename}, + ); - execute( - check_finished => 1, - ) if !$Self->{vlt}; -} +execute( + check_finished => 1, + ) if !$Self->{vlt}; ok(1); 1; diff --git a/test_regress/t/t_event_control_timing.pl b/test_regress/t/t_event_control_timing.pl index 6a4829740..750ff60c9 100755 --- a/test_regress/t/t_event_control_timing.pl +++ b/test_regress/t/t_event_control_timing.pl @@ -10,21 +10,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_event_control.v"); +top_filename("t/t_event_control.v"); - compile( - verilator_flags2 => ["--timing"], - ); +compile( + verilator_flags2 => ["--timing"], + ); - execute( - check_finished => 1, - expect_filename => $Self->{golden_filename}, - ); -} +execute( + check_finished => 1, + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_flag_binary.pl b/test_regress/t/t_flag_binary.pl index c8f265aa1..e810b1eb6 100755 --- a/test_regress/t/t_flag_binary.pl +++ b/test_regress/t/t_flag_binary.pl @@ -12,24 +12,19 @@ scenarios(simulator => 1); top_filename("t/t_flag_main.v"); -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, - ); +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, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_fork_label_timing.pl b/test_regress/t/t_fork_label_timing.pl index 8d67932b9..da97b37e2 100755 --- a/test_regress/t/t_fork_label_timing.pl +++ b/test_regress/t/t_fork_label_timing.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,21 +10,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_fork_label.v"); +top_filename("t/t_fork_label.v"); - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_fork_timing.pl b/test_regress/t/t_fork_timing.pl index f31aef7c3..db741a7d5 100755 --- a/test_regress/t/t_fork_timing.pl +++ b/test_regress/t/t_fork_timing.pl @@ -10,20 +10,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_fork.v"); +top_filename("t/t_fork.v"); - compile( - verilator_flags2 => ["--timing"], - ); +compile( + verilator_flags2 => ["--timing"], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_lib_sub_timing.pl b/test_regress/t/t_func_lib_sub_timing.pl index 0acb617a6..7498c6694 100755 --- a/test_regress/t/t_func_lib_sub_timing.pl +++ b/test_regress/t/t_func_lib_sub_timing.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,16 +10,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); # UNOPTTHREADS in vltmt -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_func_lib_sub.v"); +top_filename("t/t_func_lib_sub.v"); + +compile( + verilator_flags2 => ["--timing"], + ); - compile( - verilator_flags2 => ["--timing"], - ); -} # No execute ok(1); 1; diff --git a/test_regress/t/t_gate_basic_timing.pl b/test_regress/t/t_gate_basic_timing.pl index 713929427..efbe15374 100755 --- a/test_regress/t/t_gate_basic_timing.pl +++ b/test_regress/t/t_gate_basic_timing.pl @@ -12,21 +12,16 @@ scenarios(simulator => 1); $Self->{main_time_multiplier} = 10e-7 / 10e-9; -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_gate_basic.v"); +top_filename("t/t_gate_basic.v"); - compile( - timing_loop => 1, - verilator_flags2 => ["--timing --timescale 10ns/1ns -Wno-RISEFALLDLY"], - ); +compile( + timing_loop => 1, + verilator_flags2 => ["--timing --timescale 10ns/1ns -Wno-RISEFALLDLY"], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mailbox.pl b/test_regress/t/t_mailbox.pl index d7ae01e91..30306c8ce 100755 --- a/test_regress/t/t_mailbox.pl +++ b/test_regress/t/t_mailbox.pl @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing -Wall"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing -Wall"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mailbox_class.pl b/test_regress/t/t_mailbox_class.pl index 3329d516e..6e30bd25d 100755 --- a/test_regress/t/t_mailbox_class.pl +++ b/test_regress/t/t_mailbox_class.pl @@ -10,14 +10,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--timing"], - ); -} +compile( + verilator_flags2 => ["--timing"], + ); ok(1); 1; diff --git a/test_regress/t/t_mailbox_std.pl b/test_regress/t/t_mailbox_std.pl index 1229e6524..31b9a5203 100755 --- a/test_regress/t/t_mailbox_std.pl +++ b/test_regress/t/t_mailbox_std.pl @@ -10,21 +10,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_mailbox.v"); +top_filename("t/t_mailbox.v"); - compile( - verilator_flags2 => ["--exe --main --timing -Wall --Wpedantic -DMAILBOX_T=std::mailbox"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing -Wall --Wpedantic -DMAILBOX_T=std::mailbox"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_signed5_timing.pl b/test_regress/t/t_math_signed5_timing.pl index 2365fef9a..34482e187 100755 --- a/test_regress/t/t_math_signed5_timing.pl +++ b/test_regress/t/t_math_signed5_timing.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,21 +10,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_math_signed5.v"); +top_filename("t/t_math_signed5.v"); - compile( - verilator_flags2 => ['--timing'], - timing_loop => 1, - ); +compile( + verilator_flags2 => ['--timing'], + timing_loop => 1, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_net_delay_timing.pl b/test_regress/t/t_net_delay_timing.pl index 63a94fdbd..0ebdb8a45 100755 --- a/test_regress/t/t_net_delay_timing.pl +++ b/test_regress/t/t_net_delay_timing.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,21 +10,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_net_delay.v"); +top_filename("t/t_net_delay.v"); - compile( - timing_loop => 1, - verilator_flags2 => ["--timing"], - ); +compile( + timing_loop => 1, + verilator_flags2 => ["--timing"], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_net_delay_timing_sc.pl b/test_regress/t/t_net_delay_timing_sc.pl index 1fd75cffb..3dd55e6e1 100755 --- a/test_regress/t/t_net_delay_timing_sc.pl +++ b/test_regress/t/t_net_delay_timing_sc.pl @@ -12,23 +12,15 @@ scenarios(simulator => 1); $Self->{main_time_multiplier} = 2; -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -elsif (!$Self->have_sc) { - skip("No SystemC installed"); -} -else { - top_filename("t/t_net_delay.v"); +top_filename("t/t_net_delay.v"); - compile( - verilator_flags2 => ["--sc --exe --timing --timescale 10ps/1ps"], - ); +compile( + verilator_flags2 => ["--sc --exe --timing --timescale 10ps/1ps"], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_order_timing.pl b/test_regress/t/t_order_timing.pl index ee807ce82..d00f26d4a 100755 --- a/test_regress/t/t_order_timing.pl +++ b/test_regress/t/t_order_timing.pl @@ -12,21 +12,16 @@ scenarios(simulator => 1); $Self->{main_time_multiplier} = 1e-8 / 1e-9; -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_order.v"); +top_filename("t/t_order.v"); - compile( - timing_loop => 1, - verilator_flags2 => ["--timescale 10ns/1ns --timing"], - ); +compile( + timing_loop => 1, + verilator_flags2 => ["--timescale 10ns/1ns --timing"], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_package_ddecl_timing.pl b/test_regress/t/t_package_ddecl_timing.pl index d471a7adb..f7858dcb8 100755 --- a/test_regress/t/t_package_ddecl_timing.pl +++ b/test_regress/t/t_package_ddecl_timing.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,21 +10,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_package_ddecl.v"); +top_filename("t/t_package_ddecl.v"); - compile( - verilator_flags2 => ['--timing'], - timing_loop => 1, - ); +compile( + verilator_flags2 => ['--timing'], + timing_loop => 1, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_parse_delay_timing.pl b/test_regress/t/t_parse_delay_timing.pl index f4847bf8c..d466d38c7 100755 --- a/test_regress/t/t_parse_delay_timing.pl +++ b/test_regress/t/t_parse_delay_timing.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,16 +10,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_parse_delay.v"); +top_filename("t/t_parse_delay.v"); - compile( - verilator_flags2 => ['--timing'], - ); -} +compile( + verilator_flags2 => ['--timing'], + ); ok(1); 1; diff --git a/test_regress/t/t_process.pl b/test_regress/t/t_process.pl index b477231cf..7eac3054e 100755 --- a/test_regress/t/t_process.pl +++ b/test_regress/t/t_process.pl @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - v_flags2 => ["--timing"], - ); +compile( + v_flags2 => ["--timing"], + ); - execute( - check_finished => 1, - expect_filename => $Self->{golden_filename}, - ); -} +execute( + check_finished => 1, + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_process_finished.pl b/test_regress/t/t_process_finished.pl index 1db13024b..b267631e9 100755 --- a/test_regress/t/t_process_finished.pl +++ b/test_regress/t/t_process_finished.pl @@ -10,18 +10,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--timing"], - ); +compile( + verilator_flags2 => ["--timing"], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_process_fork.pl b/test_regress/t/t_process_fork.pl index 1af68b062..604f632d4 100755 --- a/test_regress/t/t_process_fork.pl +++ b/test_regress/t/t_process_fork.pl @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--timing"], - ); +compile( + verilator_flags2 => ["--timing"], + ); - execute( - check_finished => 1, - expect_filename => $Self->{golden_filename}, - ); -} +execute( + check_finished => 1, + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_process_kill.pl b/test_regress/t/t_process_kill.pl index 1db13024b..b267631e9 100755 --- a/test_regress/t/t_process_kill.pl +++ b/test_regress/t/t_process_kill.pl @@ -10,18 +10,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--timing"], - ); +compile( + verilator_flags2 => ["--timing"], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_process_rand.pl b/test_regress/t/t_process_rand.pl index 95e68c03f..4152e3d9b 100755 --- a/test_regress/t/t_process_rand.pl +++ b/test_regress/t/t_process_rand.pl @@ -10,18 +10,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - v_flags2 => ["--timing"], - ); +compile( + v_flags2 => ["--timing"], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_process_std.pl b/test_regress/t/t_process_std.pl index d270c22a7..c9318acf2 100755 --- a/test_regress/t/t_process_std.pl +++ b/test_regress/t/t_process_std.pl @@ -12,18 +12,13 @@ scenarios(simulator => 1); top_filename("t/t_process.v"); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - v_flags2 => ["+define+T_PROCESS+std::process", "--timing"], - ); +compile( + v_flags2 => ["+define+T_PROCESS+std::process", "--timing"], + ); - execute( - check_finished => 1, - ) if !$Self->{vlt_all}; -} +execute( + check_finished => 1, + ) if !$Self->{vlt_all}; ok(1); 1; diff --git a/test_regress/t/t_semaphore.pl b/test_regress/t/t_semaphore.pl index d7ae01e91..30306c8ce 100755 --- a/test_regress/t/t_semaphore.pl +++ b/test_regress/t/t_semaphore.pl @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing -Wall"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing -Wall"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_semaphore_always.pl b/test_regress/t/t_semaphore_always.pl index 1db13024b..b267631e9 100755 --- a/test_regress/t/t_semaphore_always.pl +++ b/test_regress/t/t_semaphore_always.pl @@ -10,18 +10,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--timing"], - ); +compile( + verilator_flags2 => ["--timing"], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_semaphore_class.pl b/test_regress/t/t_semaphore_class.pl index 3329d516e..6e30bd25d 100755 --- a/test_regress/t/t_semaphore_class.pl +++ b/test_regress/t/t_semaphore_class.pl @@ -10,14 +10,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--timing"], - ); -} +compile( + verilator_flags2 => ["--timing"], + ); ok(1); 1; diff --git a/test_regress/t/t_semaphore_std.pl b/test_regress/t/t_semaphore_std.pl index 7fcb5b404..47041497b 100755 --- a/test_regress/t/t_semaphore_std.pl +++ b/test_regress/t/t_semaphore_std.pl @@ -10,21 +10,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_semaphore.v"); +top_filename("t/t_semaphore.v"); - compile( - verilator_flags2 => ["--exe --main --timing -Wall -DSEMAPHORE_T=std::semaphore"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing -Wall -DSEMAPHORE_T=std::semaphore"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_suspendable_deep.pl b/test_regress/t/t_suspendable_deep.pl index 422d61e57..e7824bce9 100755 --- a/test_regress/t/t_suspendable_deep.pl +++ b/test_regress/t/t_suspendable_deep.pl @@ -10,14 +10,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--timing"], - ); -} +compile( + verilator_flags2 => ["--timing"], + ); ok(1); 1; diff --git a/test_regress/t/t_timing_always.pl b/test_regress/t/t_timing_always.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_always.pl +++ b/test_regress/t/t_timing_always.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_class.pl b/test_regress/t/t_timing_class.pl index c469d3de3..002312d88 100755 --- a/test_regress/t/t_timing_class.pl +++ b/test_regress/t/t_timing_class.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_clkgen1.pl b/test_regress/t/t_timing_clkgen1.pl index aa7288ef4..edbe747b4 100755 --- a/test_regress/t/t_timing_clkgen1.pl +++ b/test_regress/t/t_timing_clkgen1.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing -Wno-MINTYPMAXDLY"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing -Wno-MINTYPMAXDLY"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_clkgen2.pl b/test_regress/t/t_timing_clkgen2.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_clkgen2.pl +++ b/test_regress/t/t_timing_clkgen2.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_clkgen3.pl b/test_regress/t/t_timing_clkgen3.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_clkgen3.pl +++ b/test_regress/t/t_timing_clkgen3.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_clkgen_sc.pl b/test_regress/t/t_timing_clkgen_sc.pl index a5fe43850..728e33f11 100755 --- a/test_regress/t/t_timing_clkgen_sc.pl +++ b/test_regress/t/t_timing_clkgen_sc.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,23 +10,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -elsif (!$Self->have_sc) { - skip("No SystemC installed"); -} -else { - top_filename("t/t_timing_clkgen2.v"); +top_filename("t/t_timing_clkgen2.v"); - compile( - verilator_flags2 => ["--sc --exe --timing --timescale 10ps/1ps"], - ); +compile( + verilator_flags2 => ["--sc --exe --timing --timescale 10ps/1ps"], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_debug1.pl b/test_regress/t/t_timing_debug1.pl index 0d4523725..06be36082 100755 --- a/test_regress/t/t_timing_debug1.pl +++ b/test_regress/t/t_timing_debug1.pl @@ -10,25 +10,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt_all => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_timing_sched.v"); +top_filename("t/t_timing_sched.v"); - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - all_run_flags => ["+verilator+debug"], - check_finished => 1, - ); +execute( + all_run_flags => ["+verilator+debug"], + check_finished => 1, + ); - if (!$Self->{vltmt}) { # vltmt output may vary between thread exec order - files_identical("$Self->{obj_dir}/vlt_sim.log", $Self->{golden_filename}, "logfile"); - } +if (!$Self->{vltmt}) { # vltmt output may vary between thread exec order + files_identical("$Self->{obj_dir}/vlt_sim.log", $Self->{golden_filename}, "logfile"); } ok(1); diff --git a/test_regress/t/t_timing_debug2.pl b/test_regress/t/t_timing_debug2.pl index 56ef19876..4ff0b44ea 100755 --- a/test_regress/t/t_timing_debug2.pl +++ b/test_regress/t/t_timing_debug2.pl @@ -10,25 +10,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt_all => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_timing_class.v"); +top_filename("t/t_timing_class.v"); - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - all_run_flags => ["+verilator+debug"], - check_finished => 1, - ); +execute( + all_run_flags => ["+verilator+debug"], + check_finished => 1, + ); - if (!$Self->{vltmt}) { # vltmt output may vary between thread exec order - files_identical("$Self->{obj_dir}/vlt_sim.log", $Self->{golden_filename}, "logfile"); - } +if (!$Self->{vltmt}) { # vltmt output may vary between thread exec order + files_identical("$Self->{obj_dir}/vlt_sim.log", $Self->{golden_filename}, "logfile"); } ok(1); diff --git a/test_regress/t/t_timing_delay_callstack.pl b/test_regress/t/t_timing_delay_callstack.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_delay_callstack.pl +++ b/test_regress/t/t_timing_delay_callstack.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_dlyassign.pl b/test_regress/t/t_timing_dlyassign.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_dlyassign.pl +++ b/test_regress/t/t_timing_dlyassign.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_events.pl b/test_regress/t/t_timing_events.pl index c469d3de3..002312d88 100755 --- a/test_regress/t/t_timing_events.pl +++ b/test_regress/t/t_timing_events.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_fork_comb.pl b/test_regress/t/t_timing_fork_comb.pl index d96687ccb..ac0e116ba 100755 --- a/test_regress/t/t_timing_fork_comb.pl +++ b/test_regress/t/t_timing_fork_comb.pl @@ -10,27 +10,22 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - # Should convert the first always into combo and detect cycle - compile( - fails => 1, - verilator_flags2 => ["--timing"], - expect => - '%Warning-UNOPTFLAT: t/t_timing_fork_comb.v:\d+:\d+: Signal unoptimizable: Circular combinational logic:' - ); +# Should convert the first always into combo and detect cycle +compile( + fails => 1, + verilator_flags2 => ["--timing"], + expect => + '%Warning-UNOPTFLAT: t/t_timing_fork_comb.v:\d+:\d+: Signal unoptimizable: Circular combinational logic:' + ); - compile( - verilator_flags2 => ["--exe --main --timing -Wno-UNOPTFLAT"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing -Wno-UNOPTFLAT"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_fork_join.pl b/test_regress/t/t_timing_fork_join.pl index 4ab3c9652..3feb337e3 100755 --- a/test_regress/t/t_timing_fork_join.pl +++ b/test_regress/t/t_timing_fork_join.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,20 +10,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - expect_filename => $Self->{golden_filename}, - ); -} +execute( + check_finished => 1, + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_fork_many.pl b/test_regress/t/t_timing_fork_many.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_fork_many.pl +++ b/test_regress/t/t_timing_fork_many.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_fork_nba.pl b/test_regress/t/t_timing_fork_nba.pl index 372246cb3..e23c975f9 100755 --- a/test_regress/t/t_timing_fork_nba.pl +++ b/test_regress/t/t_timing_fork_nba.pl @@ -10,14 +10,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --timing"], - ); -} +compile( + verilator_flags2 => ["--exe --timing"], + ); ok(1); 1; diff --git a/test_regress/t/t_timing_fork_no_timing_ctrl.pl b/test_regress/t/t_timing_fork_no_timing_ctrl.pl index 439181d0a..b8493bd06 100755 --- a/test_regress/t/t_timing_fork_no_timing_ctrl.pl +++ b/test_regress/t/t_timing_fork_no_timing_ctrl.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2023 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_fork_taskcall.pl b/test_regress/t/t_timing_fork_taskcall.pl index 439181d0a..b8493bd06 100755 --- a/test_regress/t/t_timing_fork_taskcall.pl +++ b/test_regress/t/t_timing_fork_taskcall.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2023 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_intra_assign.pl b/test_regress/t/t_timing_intra_assign.pl index 6852f73f7..fabe5ebc4 100755 --- a/test_regress/t/t_timing_intra_assign.pl +++ b/test_regress/t/t_timing_intra_assign.pl @@ -10,31 +10,25 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing -Wno-UNOPTFLAT"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing -Wno-UNOPTFLAT"], + make_main => 0, + ); - execute( - check_finished => 1, - expect_filename => $Self->{golden_filename}, - ); +execute( + check_finished => 1, + expect_filename => $Self->{golden_filename}, + ); - compile( - verilator_flags2 => ["--exe --main --timing -Wno-UNOPTFLAT -fno-localize"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing -Wno-UNOPTFLAT -fno-localize"], + make_main => 0, + ); - execute( - check_finished => 1, - expect_filename => $Self->{golden_filename}, - ); - -} +execute( + check_finished => 1, + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_long.pl b/test_regress/t/t_timing_long.pl index 3efef3dff..834a8c4f5 100755 --- a/test_regress/t/t_timing_long.pl +++ b/test_regress/t/t_timing_long.pl @@ -56,7 +56,7 @@ gen($Self->{top_filename}); if ($Self->have_coroutines) { compile( - verilator_flags2 => ["--exe --build --main --timing"], + verilator_flags2 => ["--exe --build --main --tim" . "ing"], verilator_make_cmake => 0, verilator_make_gmake => 0, make_main => 0, diff --git a/test_regress/t/t_timing_nba.pl b/test_regress/t/t_timing_nba.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_nba.pl +++ b/test_regress/t/t_timing_nba.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_off.pl b/test_regress/t/t_timing_off.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_off.pl +++ b/test_regress/t/t_timing_off.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_pong.pl b/test_regress/t/t_timing_pong.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_pong.pl +++ b/test_regress/t/t_timing_pong.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_protect.pl b/test_regress/t/t_timing_protect.pl index bd2ed322d..0c17f2348 100755 --- a/test_regress/t/t_timing_protect.pl +++ b/test_regress/t/t_timing_protect.pl @@ -10,34 +10,27 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_timing_fork_join.v"); # Contains all relevant constructs +top_filename("t/t_timing_fork_join.v"); # Contains all relevant constructs - compile( - verilator_flags2 => ["--exe --main --timing --protect-ids", - "--protect-key SECRET_KEY"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing --protect-ids", + "--protect-key SECRET_KEY"], + make_main => 0, + ); - execute( - check_finished => 1, - ); +execute( + check_finished => 1, + ); - if ($Self->{vlt_all}) { - # Check for secret in any outputs - my $any; - foreach my $filename (glob $Self->{obj_dir} . "/*.[ch]*") { - file_grep_not($filename, qr/event[123]/i); - file_grep_not($filename, qr/t_timing_fork_join/i); - $any = 1; +if ($Self->{vlt_all}) { + # Check for secret in any outputs + my $any; + foreach my $filename (glob $Self->{obj_dir} . "/*.[ch]*") { + file_grep_not($filename, qr/event[123]/i); + file_grep_not($filename, qr/t_timing_fork_join/i); + $any = 1; } $any or $Self->error("No outputs found"); - -} - } ok(1); diff --git a/test_regress/t/t_timing_reentry.pl b/test_regress/t/t_timing_reentry.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_reentry.pl +++ b/test_regress/t/t_timing_reentry.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_sched.pl b/test_regress/t/t_timing_sched.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_sched.pl +++ b/test_regress/t/t_timing_sched.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_sched_if.pl b/test_regress/t/t_timing_sched_if.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_sched_if.pl +++ b/test_regress/t/t_timing_sched_if.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_sched_nba.pl b/test_regress/t/t_timing_sched_nba.pl index f86c4b944..b8493bd06 100755 --- a/test_regress/t/t_timing_sched_nba.pl +++ b/test_regress/t/t_timing_sched_nba.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_strobe.pl b/test_regress/t/t_timing_strobe.pl index 4ab3c9652..3feb337e3 100755 --- a/test_regress/t/t_timing_strobe.pl +++ b/test_regress/t/t_timing_strobe.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,20 +10,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - expect_filename => $Self->{golden_filename}, - ); -} +execute( + check_finished => 1, + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_trace.pl b/test_regress/t/t_timing_trace.pl index 6a98bee9d..73c643cee 100755 --- a/test_regress/t/t_timing_trace.pl +++ b/test_regress/t/t_timing_trace.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,21 +10,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing --trace -Wno-MINTYPMAXDLY"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing --trace -Wno-MINTYPMAXDLY"], + make_main => 0, + ); - execute( - check_finished => 1, - ); +execute( + check_finished => 1, + ); - vcd_identical($Self->trace_filename, $Self->{golden_filename}); -} +vcd_identical($Self->trace_filename, $Self->{golden_filename}); ok(1); 1; diff --git a/test_regress/t/t_timing_trace_fst.pl b/test_regress/t/t_timing_trace_fst.pl index 0ac004740..261ee5e84 100755 --- a/test_regress/t/t_timing_trace_fst.pl +++ b/test_regress/t/t_timing_trace_fst.pl @@ -12,21 +12,16 @@ scenarios(simulator => 1); top_filename("t/t_timing_trace.v"); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing --trace-fst -Wno-MINTYPMAXDLY"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing --trace-fst -Wno-MINTYPMAXDLY"], + make_main => 0, + ); - execute( - check_finished => 1, - ); +execute( + check_finished => 1, + ); - fst_identical($Self->trace_filename, $Self->{golden_filename}); -} +fst_identical($Self->trace_filename, $Self->{golden_filename}); ok(1); 1; diff --git a/test_regress/t/t_timing_wait1.pl b/test_regress/t/t_timing_wait1.pl index ecf974b24..3508f0a14 100755 --- a/test_regress/t/t_timing_wait1.pl +++ b/test_regress/t/t_timing_wait1.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing -Wno-WAITCONST"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing -Wno-WAITCONST"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_wait2.pl b/test_regress/t/t_timing_wait2.pl index 3860b2943..3feb337e3 100755 --- a/test_regress/t/t_timing_wait2.pl +++ b/test_regress/t/t_timing_wait2.pl @@ -10,20 +10,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --timing --main"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); - execute( - check_finished => 1, - expect_filename => $Self->{golden_filename}, - ); -} +execute( + check_finished => 1, + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_timing_wait_long.pl b/test_regress/t/t_timing_wait_long.pl index 549b8ba35..3feb337e3 100755 --- a/test_regress/t/t_timing_wait_long.pl +++ b/test_regress/t/t_timing_wait_long.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Wilson Snyder. This program is free software; you +# Copyright 2023 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. @@ -10,19 +10,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing"], + make_main => 0, + ); + +execute( + check_finished => 1, + expect_filename => $Self->{golden_filename}, + ); - execute( - check_finished => 1, - expect_filename => $Self->{golden_filename}, - ); -} ok(1); 1; diff --git a/test_regress/t/t_trace_binary.pl b/test_regress/t/t_trace_binary.pl index 03fd8a3c5..8304613d5 100755 --- a/test_regress/t/t_trace_binary.pl +++ b/test_regress/t/t_trace_binary.pl @@ -10,26 +10,21 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 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 --trace'], - verilator_make_cmake => 0, - verilator_make_gmake => 0, - make_main => 0, - ); +compile( + verilator_flags => [# Custom as don't want -cc + "-Mdir $Self->{obj_dir}", + "--debug-check", ], + verilator_flags2 => ['--binary --trace'], + verilator_make_cmake => 0, + verilator_make_gmake => 0, + make_main => 0, + ); - execute( - check_finished => 1, - ); +execute( + check_finished => 1, + ); - vcd_identical("$Self->{obj_dir}/simx.vcd", $Self->{golden_filename}); -} +vcd_identical("$Self->{obj_dir}/simx.vcd", $Self->{golden_filename}); ok(1); 1; diff --git a/test_regress/t/t_trace_binary_flag_off.pl b/test_regress/t/t_trace_binary_flag_off.pl index eaa6a3518..6de81c2ca 100755 --- a/test_regress/t/t_trace_binary_flag_off.pl +++ b/test_regress/t/t_trace_binary_flag_off.pl @@ -12,24 +12,19 @@ scenarios(vlt => 1); top_filename("t/t_trace_binary.v"); -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, - ); +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( - expect_filename => $Self->{golden_filename}, - ); -} +execute( + expect_filename => $Self->{golden_filename}, + ); ok(1); 1; diff --git a/test_regress/t/t_trace_timing1.pl b/test_regress/t/t_trace_timing1.pl index 2ae74250a..a0528ef80 100755 --- a/test_regress/t/t_trace_timing1.pl +++ b/test_regress/t/t_trace_timing1.pl @@ -10,24 +10,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 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 --trace'], - verilator_make_cmake => 0, - verilator_make_gmake => 0, - make_main => 0, - ); +compile( + verilator_flags => [# Custom as don't want -cc + "-Mdir $Self->{obj_dir}", + "--debug-check", ], + verilator_flags2 => ['--binary --trace'], + verilator_make_cmake => 0, + verilator_make_gmake => 0, + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); vcd_identical("$Self->{obj_dir}/simx.vcd", $Self->{golden_filename}); diff --git a/test_regress/t/t_trace_ub_misaligned_address.pl b/test_regress/t/t_trace_ub_misaligned_address.pl index 6a37a1511..83dcf0fb4 100755 --- a/test_regress/t/t_trace_ub_misaligned_address.pl +++ b/test_regress/t/t_trace_ub_misaligned_address.pl @@ -10,29 +10,24 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_trace_ub_misaligned_address.v"); +top_filename("t/t_trace_ub_misaligned_address.v"); - compile( - verilator_flags2 => ["--binary --timing --trace", - "-CFLAGS -fsanitize=address,undefined", - "-LDFLAGS -fsanitize=address,undefined"], - verilator_make_cmake => 0, - verilator_make_gmake => 0, - make_main => 0, - ); +compile( + verilator_flags2 => ["--binary --trace", + "-CFLAGS -fsanitize=address,undefined", + "-LDFLAGS -fsanitize=address,undefined"], + verilator_make_cmake => 0, + verilator_make_gmake => 0, + make_main => 0, + ); - execute( - check_finished => 1, - ); +execute( + check_finished => 1, + ); # Make sure that there are no additional messages (such as runtime messages # regarding undefined behavior). - files_identical("$Self->{obj_dir}/vlt_sim.log", $Self->{golden_filename}, "logfile"); -} +files_identical("$Self->{obj_dir}/vlt_sim.log", $Self->{golden_filename}, "logfile"); ok(1); 1; diff --git a/test_regress/t/t_vlt_timing.pl b/test_regress/t/t_vlt_timing.pl index 0b172f726..d816239d3 100755 --- a/test_regress/t/t_vlt_timing.pl +++ b/test_regress/t/t_vlt_timing.pl @@ -2,7 +2,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2022 by Antmicro Ltd. This program is free software; you +# Copyright 2023 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. @@ -12,19 +12,14 @@ scenarios(simulator => 1); top_filename("t/t_timing_off.v"); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - verilator_flags2 => ["--exe --main --timing t/t_vlt_timing.vlt"], - make_main => 0, - ); +compile( + verilator_flags2 => ["--exe --main --timing t/t_vlt_timing.vlt"], + make_main => 0, + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_wait_timing.pl b/test_regress/t/t_wait_timing.pl index 8c852569f..41fd8a2dd 100755 --- a/test_regress/t/t_wait_timing.pl +++ b/test_regress/t/t_wait_timing.pl @@ -10,21 +10,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - top_filename("t/t_wait.v"); +top_filename("t/t_wait.v"); - compile( - timing_loop => 1, - verilator_flags2 => ["--timing -Wno-WAITCONST"], - ); +compile( + timing_loop => 1, + verilator_flags2 => ["--timing -Wno-WAITCONST"], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_while_timing_control.pl b/test_regress/t/t_while_timing_control.pl index 5f740b172..b6091c571 100755 --- a/test_regress/t/t_while_timing_control.pl +++ b/test_regress/t/t_while_timing_control.pl @@ -12,19 +12,14 @@ scenarios(simulator => 1); $Self->{main_time_multiplier} = 10e-7 / 10e-9; -if (!$Self->have_coroutines) { - skip("No coroutine support"); -} -else { - compile( - timing_loop => 1, - verilator_flags2 => ['--timing -Wno-ZERODLY'], - ); +compile( + timing_loop => 1, + verilator_flags2 => ['--timing -Wno-ZERODLY'], + ); - execute( - check_finished => 1, - ); -} +execute( + check_finished => 1, + ); ok(1); 1;