From f1b8b1d99b5f1dccfc82fc13e3c83af87ee56a8c Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 8 Sep 2021 18:45:25 -0400 Subject: [PATCH] Format: perltidy spacing cleanup. No functional change. --- bin/verilator | 23 ++++--- test_regress/driver.pl | 65 ++++++++++--------- test_regress/t/t_a4_examples.pl | 2 +- test_regress/t/t_assert_cover.pl | 2 +- test_regress/t/t_benchmarksim.pl | 11 ++-- test_regress/t/t_ccache_report.pl | 4 +- test_regress/t/t_cellarray.pl | 2 +- test_regress/t/t_class_extends_protect_ids.pl | 4 +- .../t/t_class_extends_this_protect_ids.pl | 4 +- test_regress/t/t_class_local_protect_ids.pl | 4 +- .../t/t_class_static_method_protect_ids.pl | 4 +- test_regress/t/t_class_virtual_protect_ids.pl | 4 +- test_regress/t/t_clk_2in.pl | 2 +- test_regress/t/t_cover_lib.pl | 2 +- test_regress/t/t_cover_lib_legacy.pl | 2 +- test_regress/t/t_cover_sva_notflat.pl | 2 +- test_regress/t/t_dedupe_clk_gate.pl | 1 - test_regress/t/t_difftree.pl | 2 +- test_regress/t/t_dist_contributors.pl | 6 +- test_regress/t/t_dist_error_format.pl | 2 +- test_regress/t/t_dist_install.pl | 2 +- test_regress/t/t_dpi_accessors.pl | 4 +- test_regress/t/t_dpi_vams.pl | 2 +- test_regress/t/t_driver_random.pl | 2 +- test_regress/t/t_embed1.pl | 6 +- test_regress/t/t_emit_memb_limit.pl | 10 +-- test_regress/t/t_flag_build.pl | 1 - test_regress/t/t_flag_csplit.pl | 14 ++-- test_regress/t/t_flag_csplit_eval.pl | 1 - test_regress/t/t_flag_csplit_off.pl | 6 +- test_regress/t/t_flag_ldflags.pl | 18 ++--- test_regress/t/t_flag_make_cmake.pl | 3 +- test_regress/t/t_flag_make_gmake.pl | 1 - test_regress/t/t_flag_skipidentical.pl | 6 +- test_regress/t/t_flag_verilate.pl | 4 +- test_regress/t/t_foreach.pl | 4 +- test_regress/t/t_gantt_io.pl | 2 +- test_regress/t/t_gate_tree.pl | 36 +++++----- test_regress/t/t_hier_block_cmake.pl | 2 +- test_regress/t/t_inst_misarray2_bad.pl | 1 - test_regress/t/t_inst_misarray_bad.pl | 1 - test_regress/t/t_inst_notunsized.pl | 2 +- test_regress/t/t_inst_tree_inl0_pub1.pl | 6 +- test_regress/t/t_optm_if_array.pl | 2 +- test_regress/t/t_optm_redor.pl | 2 +- test_regress/t/t_order_dpi_export_1.pl | 2 +- test_regress/t/t_order_dpi_export_2.pl | 2 +- test_regress/t/t_order_dpi_export_3.pl | 2 +- test_regress/t/t_order_dpi_export_4.pl | 2 +- test_regress/t/t_order_dpi_export_5.pl | 2 +- test_regress/t/t_order_quad.pl | 2 +- test_regress/t/t_pipe_filter.pf | 2 +- test_regress/t/t_protect_ids.pl | 8 +-- test_regress/t/t_sys_fread.pl | 4 +- test_regress/t/t_sys_sformat_noopt.pl | 2 +- test_regress/t/t_threads_crazy.pl | 2 +- test_regress/t/t_timing_long.pl | 2 +- test_regress/t/t_trace_cat.pl | 2 +- test_regress/t/t_trace_complex.pl | 20 +++--- test_regress/t/t_trace_complex_old_api.pl | 18 ++--- test_regress/t/t_trace_complex_portable.pl | 18 ++--- test_regress/t/t_trace_complex_structs.pl | 20 +++--- test_regress/t/t_trace_complex_threads_1.pl | 20 +++--- test_regress/t/t_trace_ena_cc.pl | 8 +-- test_regress/t/t_trace_ena_sc.pl | 2 +- test_regress/t/t_unicode.pl | 8 +-- test_regress/t/t_var_escape.pl | 11 ++-- test_regress/t/t_verilated_all.pl | 2 +- test_regress/t/t_vpi_get_public_rw_switch.pl | 4 +- test_regress/t/t_wire_beh1364_bad.pl | 2 +- test_regress/t/t_x_assign_0.pl | 4 +- test_regress/t/t_x_assign_1.pl | 4 +- test_regress/t/t_x_assign_unique_0.pl | 4 +- test_regress/t/t_x_assign_unique_1.pl | 4 +- test_regress/t/t_xml_debugcheck.pl | 6 +- 75 files changed, 236 insertions(+), 239 deletions(-) diff --git a/bin/verilator b/bin/verilator index c188ac3a2..4554648b1 100755 --- a/bin/verilator +++ b/bin/verilator @@ -46,7 +46,7 @@ foreach my $sw (@ARGV) { push @Opt_Verilator_Sw, $sw; } -Getopt::Long::config("no_auto_abbrev","pass_through"); +Getopt::Long::config("no_auto_abbrev", "pass_through"); if (! GetOptions( # Major operating modes "help" => \&usage, @@ -106,11 +106,10 @@ if ($opt_gdb) { . " -ex 'bt' -ex 'quit'"); } elsif ($Debug) { # Debug - run(aslr_off() - . verilator_bin() . " " . join(' ',@quoted_sw)); + run(aslr_off() . verilator_bin() . " " . join(' ', @quoted_sw)); } else { # Normal, non gdb - run(verilator_bin() . " " . join(' ',@quoted_sw)); + run(verilator_bin() . " " . join(' ', @quoted_sw)); } #---------------------------------------------------------------------- @@ -163,11 +162,11 @@ sub verilator_bin { sub gdb_works { $! = undef; # Cleanup -x system("gdb /bin/echo" - ." --batch-silent --quiet --return-child-result" - ." -ex 'run -n'" # `echo -n` - ." -ex 'set width 0'" - ." -ex 'bt'" - ." -ex 'quit'"); + . " --batch-silent --quiet --return-child-result" + . " -ex 'run -n'" # `echo -n` + . " -ex 'set width 0'" + . " -ex 'bt'" + . " -ex 'quit'"); my $status = $?; return $status == 0; } @@ -201,13 +200,13 @@ sub run { || ($status & 127) == 8 # SIGFPA || ($status & 127) == 11) { # SIGSEGV warn "%Error: Verilator internal fault, sorry. " - ."Suggest trying --debug --gdbbt\n" if !$Debug; + . "Suggest trying --debug --gdbbt\n" if !$Debug; } elsif (($status & 127) == 6) { # SIGABRT warn "%Error: Verilator aborted. " - ."Suggest trying --debug --gdbbt\n" if !$Debug; + . "Suggest trying --debug --gdbbt\n" if !$Debug; } else { warn "%Error: Verilator threw signal $status. " - ."Suggest trying --debug --gdbbt\n" if !$Debug; + . "Suggest trying --debug --gdbbt\n" if !$Debug; } } if (!$opt_quiet_exit && ($status != 256 || $Debug)) { # i.e. not normal exit(1) diff --git a/test_regress/driver.pl b/test_regress/driver.pl index bf8590571..991fda105 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -380,7 +380,7 @@ sub one_test { $self->{unsup_cnt}++; } else { $test->oprint("FAILED: $test->{errors}\n"); - my $j = ($opt_jobs>1?" -j":""); + my $j = ($opt_jobs > 1 ? " -j" : ""); my $makecmd = $ENV{VERILATOR_MAKE} || "$ENV{MAKE}$j &&"; my $upperdir = (Cwd::getcwd() =~ /test_regress/ ? 'test_regress/' : ''); @@ -590,9 +590,9 @@ sub new { .($self->{t_dir} !~ m!/test_regress! # Don't include standard dir, only site's ? " +incdir+$self->{t_dir} -y $self->{t_dir}" : "") . " " . $define_opt . "TEST_OBJ_DIR=$self->{obj_dir}" - .($opt_verbose ? " " . $define_opt . "TEST_VERBOSE=1":"") - .($opt_benchmark ? " " . $define_opt . "TEST_BENCHMARK=$opt_benchmark":"") - .($opt_trace ? " " . $define_opt . "WAVES=1":"") + .($opt_verbose ? " " . $define_opt . "TEST_VERBOSE=1" : "") + .($opt_benchmark ? " " . $define_opt . "TEST_BENCHMARK=$opt_benchmark" : "") + .($opt_trace ? " " . $define_opt . "WAVES=1" : "") ))], v_flags2 => [], # Overridden in some sim files v_other_filenames => [], # After the filename so we can spec multiple files @@ -601,14 +601,14 @@ sub new { . (($^O eq "darwin" ) ? " -Wl,-undefined,dynamic_lookup" : " -export-dynamic") - . ($opt_verbose ? " -DTEST_VERBOSE=1":"") + . ($opt_verbose ? " -DTEST_VERBOSE=1" : "") . (cfg_with_m32() ? " -m32" : "") . " -o $self->{obj_dir}/libvpi.so"], tool_c_flags => [], # ATSIM atsim => 0, atsim_define => 'ATSIM', - atsim_flags => [split(/\s+/,"-c +sv +define+ATSIM"), + atsim_flags => [split(/\s+/, "-c +sv +define+ATSIM"), "+sv_dir+$self->{obj_dir}/.athdl_compile"], atsim_flags2 => [], # Overridden in some sim files atsim_run_flags => [], @@ -616,44 +616,44 @@ sub new { ghdl => 0, ghdl_define => 'GHDL', ghdl_work_dir => "$self->{obj_dir}/ghdl_compile", - ghdl_flags => [($::Debug?"-v":""), + ghdl_flags => [($::Debug ? "-v" : ""), "--workdir=$self->{obj_dir}/ghdl_compile", ], ghdl_flags2 => [], # Overridden in some sim files ghdl_run_flags => [], # IV iv => 0, iv_define => 'IVERILOG', - iv_flags => [split(/\s+/,"+define+IVERILOG -g2012 -o $self->{obj_dir}/simiv")], + iv_flags => [split(/\s+/, "+define+IVERILOG -g2012 -o $self->{obj_dir}/simiv")], iv_flags2 => [], # Overridden in some sim files iv_pli => 0, # need to use pli iv_run_flags => [], # VCS vcs => 0, vcs_define => 'VCS', - vcs_flags => [split(/\s+/,"+vcs+lic+wait +cli -debug_access +define+VCS+1 -q -sverilog -CFLAGS '-DVCS' ")], + vcs_flags => [split(/\s+/, "+vcs+lic+wait +cli -debug_access +define+VCS+1 -q -sverilog -CFLAGS '-DVCS' ")], vcs_flags2 => [], # Overridden in some sim files - vcs_run_flags => [split(/\s+/,"+vcs+lic_wait")], + vcs_run_flags => [split(/\s+/, "+vcs+lic_wait")], # NC nc => 0, nc_define => 'NC', - nc_flags => [split(/\s+/,("+licqueue +nowarn+LIBNOU +define+NC=1 -q +assert +sv -c " - .($opt_trace ? " +access+r":"")))], + nc_flags => [split(/\s+/, ("+licqueue +nowarn+LIBNOU +define+NC=1 -q +assert +sv -c " + . ($opt_trace ? " +access+r" : "")))], nc_flags2 => [], # Overridden in some sim files - nc_run_flags => [split(/\s+/,"+licqueue -q +assert +sv -R")], + nc_run_flags => [split(/\s+/, "+licqueue -q +assert +sv -R")], # ModelSim ms => 0, ms_define => 'MS', ms_flags => [split(/\s+/, ("-sv -work $self->{obj_dir}/work +define+MS=1 -ccflags \"-DMS=1\""))], ms_flags2 => [], # Overridden in some sim files ms_pli => 1, # need to use pli - ms_run_flags => [split(/\s+/,"-lib $self->{obj_dir}/work -c -do 'run -all;quit' ")], + ms_run_flags => [split(/\s+/, "-lib $self->{obj_dir}/work -c -do 'run -all;quit' ")], # XSim xsim => 0, xsim_define => 'XSIM', - xsim_flags => [split(/\s+/,("--nolog --sv --define XSIM --work $self->{name}=$self->{obj_dir}/xsim"))], + xsim_flags => [split(/\s+/, ("--nolog --sv --define XSIM --work $self->{name}=$self->{obj_dir}/xsim"))], xsim_flags2 => [], # Overridden in some sim files - xsim_run_flags => [split(/\s+/,("--nolog --runall --lib $self->{name}=$self->{obj_dir}/xsim" - .($opt_trace ? " --debug all":"")))], + xsim_run_flags => [split(/\s+/, ("--nolog --runall --lib $self->{name}=$self->{obj_dir}/xsim" + .($opt_trace ? " --debug all" : "")))], xsim_run_flags2 => [], # Overridden in some sim files # Verilator vlt => 0, @@ -1040,7 +1040,7 @@ sub compile { cmd=>[($ENV{VERILATOR_VCS} || "vcs"), @{$param{vcs_flags}}, @{$param{vcs_flags2}}, - ($opt_verbose ? " -CFLAGS -DTEST_VERBOSE=1":""), + ($opt_verbose ? " -CFLAGS -DTEST_VERBOSE=1" : ""), @{$param{v_flags}}, @{$param{v_flags2}}, $param{top_filename}, @@ -1194,7 +1194,7 @@ sub compile { "VM_PREFIX=$self->{VM_PREFIX}", "TEST_OBJ_DIR=$self->{obj_dir}", "CPPFLAGS_DRIVER=-D" . uc($self->{name}), - ($self->{verbose} ? "CPPFLAGS_DRIVER2=-DTEST_VERBOSE=1":""), + ($self->{verbose} ? "CPPFLAGS_DRIVER2=-DTEST_VERBOSE=1" : ""), ($param{benchmark} ? "" : "OPT_FAST=-O0"), ($param{benchmark} ? "" : "OPT_GLOBAL=-O0"), "$self->{VM_PREFIX}", # bypass default rule, as we don't need archive @@ -1207,7 +1207,7 @@ sub compile { $self->_run(logfile => "$self->{obj_dir}/vlt_cmake_build.log", cmd => ["cmake", "--build", $self->{obj_dir}, - ($self->{verbose}?"--verbose":""), + ($self->{verbose} ? "--verbose" : ""), ]); } } @@ -1572,6 +1572,7 @@ sub run { my $self = (ref $_[0] ? shift : $Self); $self->_run(@_); } + sub _run { my $self = (ref $_[0] ? shift : $Self); my %param = (tee => 1, @@ -1803,7 +1804,7 @@ sub _make_main { print $fh "extern int sc_main(int argc, char** argv);\n"; print $fh "int sc_main(int argc, char** argv) {\n"; print $fh " sc_signal fastclk;\n" if $self->{inputs}{fastclk}; - print $fh " sc_signal clk;\n" if $self->{inputs}{clk}; + print $fh " sc_signal clk;\n" if $self->{inputs}{clk}; print $fh " sc_set_time_resolution(1, $Self->{sc_time_resolution});\n"; print $fh " sc_time sim_time($self->{sim_time}, $Self->{sc_time_resolution});\n"; } else { @@ -1846,6 +1847,7 @@ sub _make_main { $fh->print(" std::unique_ptr tfp{new VerilatedVcdSc};\n") if $self->{trace_format} eq 'vcd-sc'; $fh->print(" topp->trace(tfp.get(), 99);\n"); $fh->print(" tfp->open(\"" . $self->trace_filename . "\");\n"); + if ($self->{trace} && !$self->sc) { $fh->print(" if (tfp) tfp->dump(contextp->time());\n"); } @@ -2331,7 +2333,7 @@ sub _vcd_read { push @hier, $hier[$#hier]->{$1}; $lasthier = $hier[$#hier]; } elsif ($line =~ /(\$var \S+\s+\d+\s+)\S+\s+(\S+)/) { - $hier[$#hier]->{$1.$2} ||= {}; + $hier[$#hier]->{$1 . $2} ||= {}; $lasthier = $hier[$#hier]; } elsif ($line =~ /(\$attrbegin .* \$end)/) { if ($lasthier) { $lasthier->{$1} ||= 1; } @@ -2347,6 +2349,7 @@ sub _vcd_read { } our $_Cxx_Version; + sub cxx_version { $_Cxx_Version ||= `$ENV{MAKE} -C $ENV{VERILATOR_ROOT}/test_regress -f Makefile print-cxx-version`; return $_Cxx_Version; @@ -2357,12 +2360,14 @@ sub cfg_with_threaded { } our $_Cfg_with_ccache; + sub cfg_with_ccache { $_Cfg_with_ccache ||= `grep "OBJCACHE \?= ccache" "$ENV{VERILATOR_ROOT}/include/verilated.mk"` ne ""; return $_Cfg_with_ccache; } our $_Cfg_with_m32; + sub cfg_with_m32 { $_Cfg_with_m32 ||= `grep "CXX.*=.*-m32" "$ENV{VERILATOR_ROOT}/include/verilated.mk"` ne ""; return $_Cfg_with_m32; @@ -2506,7 +2511,7 @@ sub file_sed { sub extract { my $self = (ref $_[0] ? shift : $Self); - my %param = (#in =>, + my %param = ( #in =>, #out => regexp => qr/.*/, lineno_adjust => -9999, @@ -2552,6 +2557,7 @@ sub extract { $fhw->print(" :linenos:\n") if $lang && $#out > 0; $fhw->print(" :emphasize-lines: ${emph}\n") if $emph; $fhw->print("\n"); + foreach my $line (@out) { $fhw->print($line); } @@ -2592,6 +2598,7 @@ sub new { bless $self, $class; return $self; } + sub schedule { my $self = shift; my %params = (@_); @@ -2606,12 +2613,12 @@ sub schedule { $params{run_on_finish}->($self); return $self; } -sub max_proc {} -sub sig_child {} -sub kill_tree_all {} -sub wait_all {} -sub ready {} -sub running {} +sub max_proc { } +sub sig_child { } +sub kill_tree_all { } +sub wait_all { } +sub ready { } +sub running { } sub is_any_left { return 0; } ####################################################################### diff --git a/test_regress/t/t_a4_examples.pl b/test_regress/t/t_a4_examples.pl index 0859499b3..c2b374144 100755 --- a/test_regress/t/t_a4_examples.pl +++ b/test_regress/t/t_a4_examples.pl @@ -14,7 +14,7 @@ $Self->{clean_command} = 'rm -rf ../examples/*/build ../examples/*/obj*'; my @examples = sort(glob("../examples/*")); for my $example (@examples) { - run(cmd=>["$ENV{MAKE} -C $example"]); + run(cmd => ["$ENV{MAKE} -C $example"]); } ok(1); diff --git a/test_regress/t/t_assert_cover.pl b/test_regress/t/t_assert_cover.pl index e72a962af..0ea346fe6 100755 --- a/test_regress/t/t_assert_cover.pl +++ b/test_regress/t/t_assert_cover.pl @@ -33,7 +33,7 @@ if ($Self->{nc}) { } run(logfile => "$Self->{obj_dir}/${name}__nccover.log", tee => 0, - cmd => [($ENV{VERILATOR_ICCR}||'iccr'), + cmd => [($ENV{VERILATOR_ICCR} || 'iccr'), "-test ${name} ${cf}"]); } diff --git a/test_regress/t/t_benchmarksim.pl b/test_regress/t/t_benchmarksim.pl index d8a8bb18f..59fed2993 100755 --- a/test_regress/t/t_benchmarksim.pl +++ b/test_regress/t/t_benchmarksim.pl @@ -16,7 +16,7 @@ top_filename("t/t_gen_alw.v"); init_benchmarksim(); # As an example, compile and simulate the top file with varying optimization level -my @l_opt = (1,2,3); +my @l_opt = (1, 2, 3); foreach my $l_opt (@l_opt) { compile( @@ -29,7 +29,7 @@ foreach my $l_opt (@l_opt) { ); } -my $fh = IO::File->new("<".benchmarksim_filename()) or error("Benchmark data file not found"); +my $fh = IO::File->new("<" . benchmarksim_filename()) or error("Benchmark data file not found"); my $lines = 0; while (defined(my $line = $fh->getline)) { if ($line =~ /^#/) { next; } @@ -37,16 +37,17 @@ while (defined(my $line = $fh->getline)) { error("Expected header but found $line") if $line ne "evals, time[s]\n"; } else { my @data = grep {$_ != ""} ($line =~ /(\d*\.?\d*)/g); - error("Expected 2 tokens on line ".$lines." but got ".scalar(@data)) if scalar(@data) != 2; + error("Expected 2 tokens on line " . $lines . " but got " . scalar(@data)) if scalar(@data) != 2; my $cycles = $data[0]; my $time = $data[1]; - error("Invalid data on line ".$lines) if $cycles <= 0.0 || $time <= 0.0; + error("Invalid data on line " . $lines) if $cycles <= 0.0 || $time <= 0.0; } $lines += 1; } my $n_lines_expected = scalar(@l_opt) + 1; -error("Expected ".$n_lines_expected." lines but found ".$lines) if int($lines) != int($n_lines_expected); +error("Expected " . $n_lines_expected . " lines but found " . $lines) + if int($lines) != int($n_lines_expected); 1; ok(1); diff --git a/test_regress/t/t_ccache_report.pl b/test_regress/t/t_ccache_report.pl index d874fd27c..a17c2b02e 100755 --- a/test_regress/t/t_ccache_report.pl +++ b/test_regress/t/t_ccache_report.pl @@ -11,13 +11,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); if (!$Self->cfg_with_ccache) { - skip("Requires configuring with ccache"); + skip("Requires configuring with ccache"); } top_filename("t_a1_first_cc.v"); # This test requires rebuilding the object files to check the ccache log -foreach my $filename (glob ("$Self->{obj_dir}/*.o")) { +foreach my $filename (glob("$Self->{obj_dir}/*.o")) { print "rm $filename\n" if $Self->{verbose}; unlink $filename; } diff --git a/test_regress/t/t_cellarray.pl b/test_regress/t/t_cellarray.pl index 78f9ca462..710539001 100755 --- a/test_regress/t/t_cellarray.pl +++ b/test_regress/t/t_cellarray.pl @@ -20,7 +20,7 @@ execute( if ($Self->{vlt_all}) { file_grep($Self->{stats}, qr/Optimizations, Gate assign merged\s+(\d+)/i, 28); -}; +} ok(1); 1; diff --git a/test_regress/t/t_class_extends_protect_ids.pl b/test_regress/t/t_class_extends_protect_ids.pl index b48534f3c..883b58df0 100755 --- a/test_regress/t/t_class_extends_protect_ids.pl +++ b/test_regress/t/t_class_extends_protect_ids.pl @@ -12,8 +12,8 @@ scenarios(vlt_all => 1); # This test makes randomly named .cpp/.h files, which tend to collect, so remove them first foreach my $filename (glob ("$Self->{obj_dir}/*_PS*.cpp" - ." $Self->{obj_dir}/*_PS*.h" - ." $Self->{obj_dir}/*.d" )) { + . " $Self->{obj_dir}/*_PS*.h" + . " $Self->{obj_dir}/*.d" )) { print "rm $filename\n" if $Self->{verbose}; unlink $filename; } diff --git a/test_regress/t/t_class_extends_this_protect_ids.pl b/test_regress/t/t_class_extends_this_protect_ids.pl index 47bee151d..6e7e4d2b2 100755 --- a/test_regress/t/t_class_extends_this_protect_ids.pl +++ b/test_regress/t/t_class_extends_this_protect_ids.pl @@ -12,8 +12,8 @@ scenarios(vlt_all => 1); # This test makes randomly named .cpp/.h files, which tend to collect, so remove them first foreach my $filename (glob ("$Self->{obj_dir}/*_PS*.cpp" - ." $Self->{obj_dir}/*_PS*.h" - ." $Self->{obj_dir}/*.d" )) { + . " $Self->{obj_dir}/*_PS*.h" + . " $Self->{obj_dir}/*.d" )) { print "rm $filename\n" if $Self->{verbose}; unlink $filename; } diff --git a/test_regress/t/t_class_local_protect_ids.pl b/test_regress/t/t_class_local_protect_ids.pl index a1bab0242..724eb9525 100755 --- a/test_regress/t/t_class_local_protect_ids.pl +++ b/test_regress/t/t_class_local_protect_ids.pl @@ -12,8 +12,8 @@ scenarios(vlt_all => 1); # This test makes randomly named .cpp/.h files, which tend to collect, so remove them first foreach my $filename (glob ("$Self->{obj_dir}/*_PS*.cpp" - ." $Self->{obj_dir}/*_PS*.h" - ." $Self->{obj_dir}/*.d" )) { + . " $Self->{obj_dir}/*_PS*.h" + . " $Self->{obj_dir}/*.d")) { print "rm $filename\n" if $Self->{verbose}; unlink $filename; } diff --git a/test_regress/t/t_class_static_method_protect_ids.pl b/test_regress/t/t_class_static_method_protect_ids.pl index 876725638..208380b3b 100755 --- a/test_regress/t/t_class_static_method_protect_ids.pl +++ b/test_regress/t/t_class_static_method_protect_ids.pl @@ -12,8 +12,8 @@ scenarios(vlt_all => 1); # This test makes randomly named .cpp/.h files, which tend to collect, so remove them first foreach my $filename (glob ("$Self->{obj_dir}/*_PS*.cpp" - ." $Self->{obj_dir}/*_PS*.h" - ." $Self->{obj_dir}/*.d" )) { + . " $Self->{obj_dir}/*_PS*.h" + . " $Self->{obj_dir}/*.d")) { print "rm $filename\n" if $Self->{verbose}; unlink $filename; } diff --git a/test_regress/t/t_class_virtual_protect_ids.pl b/test_regress/t/t_class_virtual_protect_ids.pl index ff478e073..940170b06 100755 --- a/test_regress/t/t_class_virtual_protect_ids.pl +++ b/test_regress/t/t_class_virtual_protect_ids.pl @@ -12,8 +12,8 @@ scenarios(vlt_all => 1); # This test makes randomly named .cpp/.h files, which tend to collect, so remove them first foreach my $filename (glob ("$Self->{obj_dir}/*_PS*.cpp" - ." $Self->{obj_dir}/*_PS*.h" - ." $Self->{obj_dir}/*.d" )) { + . " $Self->{obj_dir}/*_PS*.h" + . " $Self->{obj_dir}/*.d")) { print "rm $filename\n" if $Self->{verbose}; unlink $filename; } diff --git a/test_regress/t/t_clk_2in.pl b/test_regress/t/t_clk_2in.pl index aa918c4cb..9f3664937 100755 --- a/test_regress/t/t_clk_2in.pl +++ b/test_regress/t/t_clk_2in.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); compile( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe","$Self->{t_dir}/$Self->{name}.cpp"], + verilator_flags2 => ["--exe", "$Self->{t_dir}/$Self->{name}.cpp"], vcs_flags2 => ['-assert'], ); diff --git a/test_regress/t/t_cover_lib.pl b/test_regress/t/t_cover_lib.pl index f54ac29df..986f0e572 100755 --- a/test_regress/t/t_cover_lib.pl +++ b/test_regress/t/t_cover_lib.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); compile( v_flags2 => ["--coverage t/t_cover_lib_c.cpp"], verilator_flags2 => ["--exe -Wall -Wno-DECLFILENAME"], - make_flags => 'CPPFLAGS_ADD=-DTEST_OBJ_DIR="'.$Self->{obj_dir}.'"', + make_flags => 'CPPFLAGS_ADD=-DTEST_OBJ_DIR="' . $Self->{obj_dir} . '"', make_top_shell => 0, make_main => 0, ); diff --git a/test_regress/t/t_cover_lib_legacy.pl b/test_regress/t/t_cover_lib_legacy.pl index 9d53f269e..d63014f09 100755 --- a/test_regress/t/t_cover_lib_legacy.pl +++ b/test_regress/t/t_cover_lib_legacy.pl @@ -15,7 +15,7 @@ top_filename("t/t_cover_lib.v"); compile( v_flags2 => ["--coverage t/t_cover_lib_c.cpp"], verilator_flags2 => ["--exe -Wall -Wno-DECLFILENAME"], - make_flags => 'CPPFLAGS_ADD=-DTEST_OBJ_DIR="'.$Self->{obj_dir}.'"', + make_flags => 'CPPFLAGS_ADD=-DTEST_OBJ_DIR="' . $Self->{obj_dir} . '"', make_top_shell => 0, make_main => 0, ); diff --git a/test_regress/t/t_cover_sva_notflat.pl b/test_regress/t/t_cover_sva_notflat.pl index 5effab8e8..e4839f963 100755 --- a/test_regress/t/t_cover_sva_notflat.pl +++ b/test_regress/t/t_cover_sva_notflat.pl @@ -24,7 +24,7 @@ execute( # Check that the hierarchy doesn't include __PVT__ # Otherwise our coverage reports would look really ugly if ($Self->{vlt_all}) { - file_grep($Self->{coverage_filename}, qr/(top\.t\.sub.*.cyc_eq_5)/) + file_grep($Self->{coverage_filename}, qr/(top\.t\.sub.*.cyc_eq_5)/); } ok(1); diff --git a/test_regress/t/t_dedupe_clk_gate.pl b/test_regress/t/t_dedupe_clk_gate.pl index 631bd3480..c4a09eb65 100755 --- a/test_regress/t/t_dedupe_clk_gate.pl +++ b/test_regress/t/t_dedupe_clk_gate.pl @@ -21,6 +21,5 @@ if ($Self->{vlt_all}) { file_grep($Self->{stats}, qr/Optimizations, Gate sigs deduped\s+(\d+)/i, 4); } - ok(1); 1; diff --git a/test_regress/t/t_difftree.pl b/test_regress/t/t_difftree.pl index b26bb4757..26d88577e 100755 --- a/test_regress/t/t_difftree.pl +++ b/test_regress/t/t_difftree.pl @@ -11,7 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(dist => 1); run(cmd => ["cd $Self->{obj_dir} && $ENV{VERILATOR_ROOT}/bin/verilator_difftree" - ." $Self->{t_dir}/t_difftree.a.tree $Self->{t_dir}/t_difftree.b.tree > diff.log"], + . " $Self->{t_dir}/t_difftree.a.tree $Self->{t_dir}/t_difftree.b.tree > diff.log"], check_finished => 0); files_identical("$Self->{obj_dir}/diff.log", $Self->{golden_filename}, 'logfile'); diff --git a/test_regress/t/t_dist_contributors.pl b/test_regress/t/t_dist_contributors.pl index 527d3e157..a4b4db5a4 100755 --- a/test_regress/t/t_dist_contributors.pl +++ b/test_regress/t/t_dist_contributors.pl @@ -38,9 +38,9 @@ sub check { print "Check: $author\n" if $Self->{verbose}; if (!$Contributors{$author}) { error("Certify your contribution by sorted-inserting '$author' into docs/CONTRIBUTORS.\n" - ." If '$author' is not your real name, please fix 'name=' in ~/.gitconfig\n" - ." Also check your https://github.com account's Settings->Profile->Name\n" - ." matches your ~/.gitconfig 'name='.\n"); + . " If '$author' is not your real name, please fix 'name=' in ~/.gitconfig\n" + . " Also check your https://github.com account's Settings->Profile->Name\n" + . " matches your ~/.gitconfig 'name='.\n"); } } } diff --git a/test_regress/t/t_dist_error_format.pl b/test_regress/t/t_dist_error_format.pl index bdacfb6ac..30f8cebd4 100755 --- a/test_regress/t/t_dist_error_format.pl +++ b/test_regress/t/t_dist_error_format.pl @@ -58,7 +58,7 @@ sub formats { } else { #print "FF $file $line\n"; - $warns{$file.":".$lineno} = + $warns{$file . ":" . $lineno} = "Non-standard warning/error: $file:$lineno: $line"; } } diff --git a/test_regress/t/t_dist_install.pl b/test_regress/t/t_dist_install.pl index abf277032..1c92e19ac 100755 --- a/test_regress/t/t_dist_install.pl +++ b/test_regress/t/t_dist_install.pl @@ -48,7 +48,7 @@ if (!-r "$root/.git") { push @files, $file; } if ($#files >= 0) { - error("Uninstall missed files: ", join(' ',@files)); + error("Uninstall missed files: ", join(' ', @files)); } } diff --git a/test_regress/t/t_dpi_accessors.pl b/test_regress/t/t_dpi_accessors.pl index c48a8a2ba..a21fb1c27 100755 --- a/test_regress/t/t_dpi_accessors.pl +++ b/test_regress/t/t_dpi_accessors.pl @@ -14,8 +14,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); compile( - make_top_shell => 0, - make_main => 0, + make_top_shell => 0, + make_main => 0, verilator_flags2 => ["-Wno-BLKANDNBLK -language 1800-2005 --exe $Self->{t_dir}/$Self->{name}.cpp"], ); execute( diff --git a/test_regress/t/t_dpi_vams.pl b/test_regress/t/t_dpi_vams.pl index 68cbf7858..68f1f0e47 100755 --- a/test_regress/t/t_dpi_vams.pl +++ b/test_regress/t/t_dpi_vams.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); compile( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe","$Self->{t_dir}/$Self->{name}.cpp"], + verilator_flags2 => ["--exe", "$Self->{t_dir}/$Self->{name}.cpp"], ); execute( diff --git a/test_regress/t/t_driver_random.pl b/test_regress/t/t_driver_random.pl index 29eeb00a9..6627cfe33 100755 --- a/test_regress/t/t_driver_random.pl +++ b/test_regress/t/t_driver_random.pl @@ -19,7 +19,7 @@ if (!$ENV{VERILATOR_TEST_RANDOM_FAILURE}) { # Randomly fail to test driver.pl my ($ign, $t) = Time::HiRes::gettimeofday(); if ($t % 2) { - error("random failure ".$t); + error("random failure " . $t); } else { ok(1); diff --git a/test_regress/t/t_embed1.pl b/test_regress/t/t_embed1.pl index 1b298a9be..a28adebe6 100755 --- a/test_regress/t/t_embed1.pl +++ b/test_regress/t/t_embed1.pl @@ -29,9 +29,9 @@ mkdir $child_dir; run(logfile => "${child_dir}/vlt_gcc.log", cmd => ["cd ${child_dir} && ", - $ENV{MAKE}, "-f".getcwd()."/Makefile_obj", - "CPPFLAGS_DRIVER=-D".uc($self->{name}), - ($opt_verbose ? "CPPFLAGS_DRIVER2=-DTEST_VERBOSE=1":""), + $ENV{MAKE}, "-f" . getcwd() . "/Makefile_obj", + "CPPFLAGS_DRIVER=-D" . uc($self->{name}), + ($opt_verbose ? "CPPFLAGS_DRIVER2=-DTEST_VERBOSE=1" : ""), "VM_PREFIX=$self->{VM_PREFIX}_child", "V$self->{name}_child__ALL.a", # bypass default rule, make archive ($param{make_flags}||""), diff --git a/test_regress/t/t_emit_memb_limit.pl b/test_regress/t/t_emit_memb_limit.pl index 7920f341a..21d001dd2 100755 --- a/test_regress/t/t_emit_memb_limit.pl +++ b/test_regress/t/t_emit_memb_limit.pl @@ -22,17 +22,17 @@ sub gen { $fh->print(" input clk;\n"); $fh->print(" input i;\n"); $fh->print(" output logic o;\n"); - for (my $i=0; $i<($n+1); ++$i) { + for (my $i = 0; $i < ($n + 1); ++$i) { $fh->print(" logic r$i;\n"); } $fh->print(" always @ (posedge clk) begin\n"); $fh->print(" r0 <= i;\n"); - for (my $i=1; $i<$n; ++$i) { - $fh->print(" r".($i+1)." <= r$i;\n"); + for (my $i = 1; $i < $n; ++$i) { + $fh->print(" r" . ($i+1) . " <= r$i;\n"); } $fh->print(" o <= r$n;\n"); - $fh->print(' $write("*-* All Finished *-*\n");',"\n"); - $fh->print(' $finish;',"\n"); + $fh->print(' $write("*-* All Finished *-*\n");', "\n"); + $fh->print(' $finish;', "\n"); $fh->print(" end\n"); $fh->print("endmodule\n"); } diff --git a/test_regress/t/t_flag_build.pl b/test_regress/t/t_flag_build.pl index 7076e8443..c26b6bcb0 100755 --- a/test_regress/t/t_flag_build.pl +++ b/test_regress/t/t_flag_build.pl @@ -8,7 +8,6 @@ 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 - scenarios(simulator => 1); top_filename("t/t_flag_make_cmake.v"); diff --git a/test_regress/t/t_flag_csplit.pl b/test_regress/t/t_flag_csplit.pl index 0f6336f60..bef212f13 100755 --- a/test_regress/t/t_flag_csplit.pl +++ b/test_regress/t/t_flag_csplit.pl @@ -29,13 +29,13 @@ while (1) { run(logfile => "$Self->{obj_dir}/vlt_gcc.log", tee => $self->{verbose}, cmd=>[$ENV{MAKE}, - "-C ".$Self->{obj_dir}, + "-C " . $Self->{obj_dir}, "-f $Self->{VM_PREFIX}.mk", "-j 4", "VM_PREFIX=$Self->{VM_PREFIX}", "TEST_OBJ_DIR=$Self->{obj_dir}", "CPPFLAGS_DRIVER=-D".uc($Self->{name}), - ($opt_verbose ? "CPPFLAGS_DRIVER2=-DTEST_VERBOSE=1":""), + ($opt_verbose ? "CPPFLAGS_DRIVER2=-DTEST_VERBOSE=1" : ""), "OPT_FAST=-O2", "OPT_SLOW=-O0", "OPT_GLOBAL=-Os", @@ -86,7 +86,7 @@ sub check_cpp { printf " File %6d %s\n", $size, $filename if $Self->{verbose}; my $fh = IO::File->new("<$filename") or error("$! $filenme"); my @funcs; - while (defined (my $line = $fh->getline)) { + while (defined(my $line = $fh->getline)) { if ($line =~ /^(void|IData)\s+(.*::.*)/) { my $func = $2; $func =~ s/\(.*$//; @@ -103,19 +103,19 @@ sub check_cpp { } } if ($#funcs > 0) { - error("Split had multiple functions in $filename\n\t".join("\n\t",@funcs)); + error("Split had multiple functions in $filename\n\t" . join("\n\t", @funcs)); } } sub check_gcc_flags { my $filename = shift; my $fh = IO::File->new("<$filename") or error("$! $filenme"); - while (defined (my $line = $fh->getline)) { + while (defined(my $line = $fh->getline)) { chomp $line; print ":log: $line\n" if $Self->{verbose}; if ($line =~ /$Self->{VM_PREFIX}\S*\.cpp/) { - my $filetype = ($line =~ /Slow|Syms/) ? "slow":"fast"; - my $opt = ($line !~ /-O2/) ? "slow":"fast"; + my $filetype = ($line =~ /Slow|Syms/) ? "slow" : "fast"; + my $opt = ($line !~ /-O2/) ? "slow" : "fast"; print "$filetype, $opt, $line\n" if $Self->{verbose}; if ($filetype ne $opt) { error("${filetype} file compiled as if was ${opt}: $line"); diff --git a/test_regress/t/t_flag_csplit_eval.pl b/test_regress/t/t_flag_csplit_eval.pl index c7d8da543..dfd67259c 100755 --- a/test_regress/t/t_flag_csplit_eval.pl +++ b/test_regress/t/t_flag_csplit_eval.pl @@ -22,7 +22,6 @@ sub check_evals { $got >= 3 or error("Too few _eval functions found: $got"); } - scenarios(vlt_all => 1); compile( diff --git a/test_regress/t/t_flag_csplit_off.pl b/test_regress/t/t_flag_csplit_off.pl index 8e3014653..8308d2a93 100755 --- a/test_regress/t/t_flag_csplit_off.pl +++ b/test_regress/t/t_flag_csplit_off.pl @@ -31,13 +31,13 @@ while (1) { run(logfile => "$Self->{obj_dir}/vlt_gcc.log", tee => $self->{verbose}, cmd=>[$ENV{MAKE}, - "-C ".$Self->{obj_dir}, + "-C " . $Self->{obj_dir}, "-f $Self->{VM_PREFIX}.mk", "-j 4", "VM_PREFIX=$Self->{VM_PREFIX}", "TEST_OBJ_DIR=$Self->{obj_dir}", "CPPFLAGS_DRIVER=-D".uc($Self->{name}), - ($opt_verbose ? "CPPFLAGS_DRIVER2=-DTEST_VERBOSE=1":""), + ($opt_verbose ? "CPPFLAGS_DRIVER2=-DTEST_VERBOSE=1" : ""), "OPT_FAST=-O2", "OPT_SLOW=-O0", ($param{make_flags}||""), @@ -79,7 +79,7 @@ sub check_all_file { sub check_gcc_flags { my $filename = shift; my $fh = IO::File->new("<$filename") or error("$! $filenme"); - while (defined (my $line = $fh->getline)) { + while (defined(my $line = $fh->getline)) { chomp $line; print ":log: $line\n" if $Self->{verbose}; if ($line =~ /\.cpp/ && $line =~ qr/-O0/) { diff --git a/test_regress/t/t_flag_ldflags.pl b/test_regress/t/t_flag_ldflags.pl index 1701a0b90..d72594ba4 100755 --- a/test_regress/t/t_flag_ldflags.pl +++ b/test_regress/t/t_flag_ldflags.pl @@ -13,13 +13,13 @@ scenarios(vlt => 1); my $m32 = $Self->cfg_with_m32 ? "-m32" : ""; run(cmd => ["cd $Self->{obj_dir}" - ." && $ENV{CXX} $m32 -c ../../t/t_flag_ldflags_a.cpp" - ." && ar -cr t_flag_ldflags_a.a t_flag_ldflags_a.o" - ." && ranlib t_flag_ldflags_a.a "], + . " && $ENV{CXX} $m32 -c ../../t/t_flag_ldflags_a.cpp" + . " && ar -cr t_flag_ldflags_a.a t_flag_ldflags_a.o" + . " && ranlib t_flag_ldflags_a.a "], check_finished => 0); run(cmd => ["cd $Self->{obj_dir}" - ." && $ENV{CXX} $m32 -fPIC -c ../../t/t_flag_ldflags_so.cpp" - ." && $ENV{CXX} $m32 -shared -o t_flag_ldflags_so.so -lc t_flag_ldflags_so.o"], + . " && $ENV{CXX} $m32 -fPIC -c ../../t/t_flag_ldflags_so.cpp" + . " && $ENV{CXX} $m32 -shared -o t_flag_ldflags_so.so -lc t_flag_ldflags_so.o"], check_finished => 0); compile( @@ -34,12 +34,12 @@ compile( # On OS X, LD_LIBRARY_PATH is ignored, so set rpath of the exe to find the .so if ($^O eq "darwin") { run(cmd => ["cd $Self->{obj_dir}" - ." && install_name_tool -add_rpath \@executable_path/." - ." $Self->{VM_PREFIX}"], + . " && install_name_tool -add_rpath \@executable_path/." + . " $Self->{VM_PREFIX}"], check_finished => 0); run(cmd => ["cd $Self->{obj_dir}" - ." && install_name_tool -change t_flag_ldflags_so.so" - ." \@rpath/t_flag_ldflags_so.so $Self->{VM_PREFIX}"], + . " && install_name_tool -change t_flag_ldflags_so.so" + . " \@rpath/t_flag_ldflags_so.so $Self->{VM_PREFIX}"], check_finished => 0); } diff --git a/test_regress/t/t_flag_make_cmake.pl b/test_regress/t/t_flag_make_cmake.pl index ba6828b85..868582ff7 100755 --- a/test_regress/t/t_flag_make_cmake.pl +++ b/test_regress/t/t_flag_make_cmake.pl @@ -8,7 +8,6 @@ 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 - scenarios(simulator => 1); compile( @@ -19,7 +18,7 @@ compile( if (!$Self->have_cmake) { skip("cmake is not installed"); } else { - my $cmakecache = $Self->{obj_dir}."/CMakeCache.txt"; + my $cmakecache = $Self->{obj_dir} . "/CMakeCache.txt"; if (! -e $cmakecache) { error("$cmakecache does not exist.") } diff --git a/test_regress/t/t_flag_make_gmake.pl b/test_regress/t/t_flag_make_gmake.pl index e5caca9d8..b25888d6e 100755 --- a/test_regress/t/t_flag_make_gmake.pl +++ b/test_regress/t/t_flag_make_gmake.pl @@ -8,7 +8,6 @@ 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 - scenarios(simulator => 1); top_filename("t/t_flag_make_cmake.v"); diff --git a/test_regress/t/t_flag_skipidentical.pl b/test_regress/t/t_flag_skipidentical.pl index f3be1255c..731515d06 100755 --- a/test_regress/t/t_flag_skipidentical.pl +++ b/test_regress/t/t_flag_skipidentical.pl @@ -15,9 +15,9 @@ scenarios(vlt => 1); print "NOTE: use --debugi, as --debug in driver turns off skip-identical\n"; - my $outfile = "$Self->{obj_dir}/V".$Self->{name}.".cpp"; + my $outfile = "$Self->{obj_dir}/V" . $Self->{name} . ".cpp"; my @oldstats = stat($outfile); - print "Old mtime=",$oldstats[9],"\n"; + print "Old mtime=", $oldstats[9], "\n"; $oldstats[9] or error("No output file found: $outfile\n"); sleep(2); # Or else it might take < 1 second to compile and see no diff. @@ -26,7 +26,7 @@ scenarios(vlt => 1); compile(); my @newstats = stat($outfile); - print "New mtime=",$newstats[9],"\n"; + print "New mtime=", $newstats[9], "\n"; ($oldstats[9] == $newstats[9]) or error("--skip-identical was ignored -- recompiled\n"); diff --git a/test_regress/t/t_flag_verilate.pl b/test_regress/t/t_flag_verilate.pl index 59b78738a..649eac752 100755 --- a/test_regress/t/t_flag_verilate.pl +++ b/test_regress/t/t_flag_verilate.pl @@ -8,7 +8,6 @@ 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 - scenarios(simulator => 1); top_filename("t/t_flag_make_cmake.v"); @@ -52,7 +51,7 @@ compile( # Don't call cmake nor gmake from driver.pl. Just build here ); # The previous run must not verilated, only build is expected. -if ( -e $Self->{obj_dir} . '/Vt_flag_verilate_990_final.tree' ) { +if (-e $Self->{obj_dir} . '/Vt_flag_verilate_990_final.tree') { $Self->error('Unexpectedly verilated.'); } @@ -60,6 +59,5 @@ execute( check_finished => 1, ); - ok(1); 1; diff --git a/test_regress/t/t_foreach.pl b/test_regress/t/t_foreach.pl index 5c5b93dd0..cb80916f1 100755 --- a/test_regress/t/t_foreach.pl +++ b/test_regress/t/t_foreach.pl @@ -21,14 +21,14 @@ execute( # We expect all loops should be unrolled by verilator, # none of the loop variables should exist in the output: for my $file (glob_all("$Self->{obj_dir}/$Self->{VM_PREFIX}*.cpp")) { - file_grep_not($file, qr/index_/); + file_grep_not($file, qr/index_/); } # Further, we expect that all logic within the loop should # have been evaluated inside the compiler. So there should be # no references to 'sum' in the .cpp. for my $file (glob_all("$Self->{obj_dir}/$Self->{VM_PREFIX}*.cpp")) { - file_grep_not($file, qr/sum/); + file_grep_not($file, qr/sum/); } ok(1); diff --git a/test_regress/t/t_gantt_io.pl b/test_regress/t/t_gantt_io.pl index f4643afeb..9a5924c8a 100755 --- a/test_regress/t/t_gantt_io.pl +++ b/test_regress/t/t_gantt_io.pl @@ -11,7 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(dist => 1); run(cmd => ["cd $Self->{obj_dir} && $ENV{VERILATOR_ROOT}/bin/verilator_gantt" - ." $Self->{t_dir}/t_gantt_io.dat > gantt.log"], + . " $Self->{t_dir}/t_gantt_io.dat > gantt.log"], check_finished => 0); files_identical("$Self->{obj_dir}/gantt.log", $Self->{golden_filename}); diff --git a/test_regress/t/t_gate_tree.pl b/test_regress/t/t_gate_tree.pl index 568c1868c..77115ef8f 100755 --- a/test_regress/t/t_gate_tree.pl +++ b/test_regress/t/t_gate_tree.pl @@ -14,7 +14,7 @@ use vars qw($Self); scenarios(simulator => 1); -my $width = 64*($ENV{VERILATOR_TEST_WIDTH}||4); +my $width = 64 * ($ENV{VERILATOR_TEST_WIDTH} || 4); my $vars = 64; $Self->{cycles} = ($Self->{benchmark} ? 1_000_000 : 100); @@ -34,15 +34,15 @@ sub gen { my %tree; my $fanin = 8; - my $stages = int(log($vars)/log($fanin)+0.99999)+1; + my $stages = int(log($vars) / log($fanin) + 0.99999) + 1; my $result = 0; - for (my $n=0; $n<$vars; $n++) { - $result += ($n||1); + for (my $n = 0; $n < $vars; $n++) { + $result += ($n || 1); $tree{0}{$n}{$n} = 1; my $nl = $n; - for (my $stage=1; $stage<$stages; $stage++) { + for (my $stage=1; $stage < $stages; $stage++) { my $lastn = $nl; - $nl = int($nl/$fanin); + $nl = int($nl / $fanin); $tree{$stage}{$nl}{$lastn} = 1; } } @@ -50,9 +50,9 @@ sub gen { $fh->print("\n"); my $workingset = 0; - foreach my $stage (sort {$a<=>$b} keys %tree) { - foreach my $n (sort {$a<=>$b} keys %{$tree{$stage}}) { - $fh->print( " reg [".($width-1).":0] v${stage}_${n};\n"); + foreach my $stage (sort { $a <=> $b} keys %tree) { + foreach my $n (sort { $a <=> $b} keys %{$tree{$stage}}) { + $fh->print( " reg [" . ($width - 1) . ":0] v${stage}_${n};\n"); $workingset += int($width/8 + 7); } } @@ -62,7 +62,7 @@ sub gen { $fh->print(" cyc <= cyc + 1;\n"); $fh->print("`ifdef TEST_VERBOSE\n"); $fh->print(" \$write(\"[%0t] rst=%0x v0_0=%0x v1_0=%0x result=%0x\\n\"" - .", \$time, reset, v0_0, v1_0, v".($stages-1)."_0);\n"); + .", \$time, reset, v0_0, v1_0, v" . ($stages - 1) . "_0);\n"); $fh->print("`endif\n"); $fh->print(" if (cyc==0) begin\n"); $fh->print(" reset <= 1;\n"); @@ -74,19 +74,19 @@ sub gen { $fh->print(" `define SIM_CYCLES 99\n"); $fh->print("`endif\n"); $fh->print(" else if (cyc==`SIM_CYCLES) begin\n"); - $fh->print(" if (v".($stages-1)."_0 != ${width}'d${result}) \$stop;\n"); + $fh->print(" if (v" . ($stages - 1) . "_0 != ${width}'d${result}) \$stop;\n"); $fh->print(" \$write(\"VARS=${vars} WIDTH=${width}" - ." WORKINGSET=".(int($workingset/1024))."KB\\n\");\n"); - $fh->print(' $write("*-* All Finished *-*\n");',"\n"); - $fh->print(' $finish;',"\n"); + ." WORKINGSET=" . (int($workingset / 1024)) . "KB\\n\");\n"); + $fh->print(' $write("*-* All Finished *-*\n");', "\n"); + $fh->print(' $finish;', "\n"); $fh->print(" end\n"); $fh->print(" end\n"); $fh->print("\n"); for (my $n=0; $n<$vars; $n++) { $fh->print(" always @ (posedge clk)" - ." v0_${n} <= reset ? ${width}'d".(${n}||1)." : v0_" - .((int($n/$fanin)*$fanin) + (($n+1) % $fanin)).";\n"); + . " v0_${n} <= reset ? ${width}'d" . (${n} || 1) . " : v0_" + . ((int($n / $fanin) * $fanin) + (($n + 1) % $fanin)) . ";\n"); } foreach my $stage (sort {$a<=>$b} keys %tree) { @@ -94,10 +94,10 @@ sub gen { $fh->print("\n"); foreach my $n (sort {$a<=>$b} keys %{$tree{$stage}}) { $fh->print(" always @ (posedge clk)" - ." v${stage}_${n} <="); + . " v${stage}_${n} <="); my $op = ""; foreach my $ni (sort {$a<=>$b} keys %{$tree{$stage}{$n}}) { - $fh->print($op." v".(${stage}-1)."_${ni}"); + $fh->print($op . " v" . (${stage} - 1) . "_${ni}"); $op = " +"; } $fh->print(";\n"); diff --git a/test_regress/t/t_hier_block_cmake.pl b/test_regress/t/t_hier_block_cmake.pl index 0517b3a3b..a4d74b89b 100755 --- a/test_regress/t/t_hier_block_cmake.pl +++ b/test_regress/t/t_hier_block_cmake.pl @@ -29,7 +29,7 @@ if (!$Self->have_cmake) { run(logfile => "$Self->{obj_dir}/run.log", cmd => ['cd "' . $Self->{obj_dir} . '" && ./t_hier_block_cmake', '.'] ); - my $target_dir = $Self->{obj_dir} .'/CMakeFiles/t_hier_block_cmake.dir/Vt_hier_block.dir/'; + my $target_dir = $Self->{obj_dir} . '/CMakeFiles/t_hier_block_cmake.dir/Vt_hier_block.dir/'; file_grep($target_dir . 'Vsub0/sub0.sv', /^module\s+(\S+)\s+/, "sub0"); file_grep($target_dir . 'Vsub1/sub1.sv', /^module\s+(\S+)\s+/, "sub1"); file_grep($target_dir . 'Vsub2/sub2.sv', /^module\s+(\S+)\s+/, "sub2"); diff --git a/test_regress/t/t_inst_misarray2_bad.pl b/test_regress/t/t_inst_misarray2_bad.pl index 7df095a97..a60503a1f 100755 --- a/test_regress/t/t_inst_misarray2_bad.pl +++ b/test_regress/t/t_inst_misarray2_bad.pl @@ -15,6 +15,5 @@ lint( expect_filename => $Self->{golden_filename}, ); - ok(1); 1; diff --git a/test_regress/t/t_inst_misarray_bad.pl b/test_regress/t/t_inst_misarray_bad.pl index 7df095a97..a60503a1f 100755 --- a/test_regress/t/t_inst_misarray_bad.pl +++ b/test_regress/t/t_inst_misarray_bad.pl @@ -15,6 +15,5 @@ lint( expect_filename => $Self->{golden_filename}, ); - ok(1); 1; diff --git a/test_regress/t/t_inst_notunsized.pl b/test_regress/t/t_inst_notunsized.pl index 4f4923342..fa437f2fe 100755 --- a/test_regress/t/t_inst_notunsized.pl +++ b/test_regress/t/t_inst_notunsized.pl @@ -11,7 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); compile( - verilator_flags2=>["-Wno-IMPLICIT"], + verilator_flags2 => ["-Wno-IMPLICIT"], ); execute( diff --git a/test_regress/t/t_inst_tree_inl0_pub1.pl b/test_regress/t/t_inst_tree_inl0_pub1.pl index effe5ebbe..b06051080 100755 --- a/test_regress/t/t_inst_tree_inl0_pub1.pl +++ b/test_regress/t/t_inst_tree_inl0_pub1.pl @@ -31,9 +31,9 @@ sub checkRelativeRefs { } if ($found_relative != $expect_relative) { - error("$file " . - ($found_relative ? "has" : "does not have") . - " relative variable references."); + error("$file " + . ($found_relative ? "has" : "does not have") + . " relative variable references."); } } } diff --git a/test_regress/t/t_optm_if_array.pl b/test_regress/t/t_optm_if_array.pl index aa9716f06..caf3de14b 100755 --- a/test_regress/t/t_optm_if_array.pl +++ b/test_regress/t/t_optm_if_array.pl @@ -18,7 +18,7 @@ execute( ); for my $file (glob_all("$Self->{obj_dir}/$Self->{VM_PREFIX}___024root*.cpp")) { - file_grep_not($file, qr/rstn_r/); + file_grep_not($file, qr/rstn_r/); } ok(1); diff --git a/test_regress/t/t_optm_redor.pl b/test_regress/t/t_optm_redor.pl index aa9716f06..caf3de14b 100755 --- a/test_regress/t/t_optm_redor.pl +++ b/test_regress/t/t_optm_redor.pl @@ -18,7 +18,7 @@ execute( ); for my $file (glob_all("$Self->{obj_dir}/$Self->{VM_PREFIX}___024root*.cpp")) { - file_grep_not($file, qr/rstn_r/); + file_grep_not($file, qr/rstn_r/); } ok(1); diff --git a/test_regress/t/t_order_dpi_export_1.pl b/test_regress/t/t_order_dpi_export_1.pl index 21b3c76b6..e76a9afcd 100755 --- a/test_regress/t/t_order_dpi_export_1.pl +++ b/test_regress/t/t_order_dpi_export_1.pl @@ -13,7 +13,7 @@ scenarios(vlt_all => 1); compile( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe","$Self->{t_dir}/$Self->{name}.cpp"], + verilator_flags2 => ["--exe", "$Self->{t_dir}/$Self->{name}.cpp"], ); execute( diff --git a/test_regress/t/t_order_dpi_export_2.pl b/test_regress/t/t_order_dpi_export_2.pl index 21b3c76b6..e76a9afcd 100755 --- a/test_regress/t/t_order_dpi_export_2.pl +++ b/test_regress/t/t_order_dpi_export_2.pl @@ -13,7 +13,7 @@ scenarios(vlt_all => 1); compile( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe","$Self->{t_dir}/$Self->{name}.cpp"], + verilator_flags2 => ["--exe", "$Self->{t_dir}/$Self->{name}.cpp"], ); execute( diff --git a/test_regress/t/t_order_dpi_export_3.pl b/test_regress/t/t_order_dpi_export_3.pl index 21b3c76b6..e76a9afcd 100755 --- a/test_regress/t/t_order_dpi_export_3.pl +++ b/test_regress/t/t_order_dpi_export_3.pl @@ -13,7 +13,7 @@ scenarios(vlt_all => 1); compile( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe","$Self->{t_dir}/$Self->{name}.cpp"], + verilator_flags2 => ["--exe", "$Self->{t_dir}/$Self->{name}.cpp"], ); execute( diff --git a/test_regress/t/t_order_dpi_export_4.pl b/test_regress/t/t_order_dpi_export_4.pl index 21b3c76b6..e76a9afcd 100755 --- a/test_regress/t/t_order_dpi_export_4.pl +++ b/test_regress/t/t_order_dpi_export_4.pl @@ -13,7 +13,7 @@ scenarios(vlt_all => 1); compile( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe","$Self->{t_dir}/$Self->{name}.cpp"], + verilator_flags2 => ["--exe", "$Self->{t_dir}/$Self->{name}.cpp"], ); execute( diff --git a/test_regress/t/t_order_dpi_export_5.pl b/test_regress/t/t_order_dpi_export_5.pl index 21b3c76b6..e76a9afcd 100755 --- a/test_regress/t/t_order_dpi_export_5.pl +++ b/test_regress/t/t_order_dpi_export_5.pl @@ -13,7 +13,7 @@ scenarios(vlt_all => 1); compile( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe","$Self->{t_dir}/$Self->{name}.cpp"], + verilator_flags2 => ["--exe", "$Self->{t_dir}/$Self->{name}.cpp"], ); execute( diff --git a/test_regress/t/t_order_quad.pl b/test_regress/t/t_order_quad.pl index 68cbf7858..68f1f0e47 100755 --- a/test_regress/t/t_order_quad.pl +++ b/test_regress/t/t_order_quad.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); compile( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe","$Self->{t_dir}/$Self->{name}.cpp"], + verilator_flags2 => ["--exe", "$Self->{t_dir}/$Self->{name}.cpp"], ); execute( diff --git a/test_regress/t/t_pipe_filter.pf b/test_regress/t/t_pipe_filter.pf index 22af10c97..6339fa044 100755 --- a/test_regress/t/t_pipe_filter.pf +++ b/test_regress/t/t_pipe_filter.pf @@ -49,7 +49,7 @@ for cmd in sys.stdin: pos = newpos + 1 # sys.stderr.write("Line count: %d\n" % lineno) - wholefile = ''.join(prefixes) + wholefile + wholefile = '' . join(prefixes) + wholefile print("Content-Length: " + str(len(wholefile)) + "\n" + wholefile) sys.stdout.flush() diff --git a/test_regress/t/t_protect_ids.pl b/test_regress/t/t_protect_ids.pl index 371f5e0a7..c1b4a0455 100755 --- a/test_regress/t/t_protect_ids.pl +++ b/test_regress/t/t_protect_ids.pl @@ -14,8 +14,8 @@ scenarios(vlt_all => 1); # This test makes randomly named .cpp/.h files, which tend to collect, so remove them first foreach my $filename (glob ("$Self->{obj_dir}/*_PS*.cpp" - ." $Self->{obj_dir}/*_PS*.h" - ." $Self->{obj_dir}/*.d" )) { + . " $Self->{obj_dir}/*_PS*.h" + . " $Self->{obj_dir}/*.d")) { print "rm $filename\n" if $Self->{verbose}; unlink $filename; } @@ -40,9 +40,9 @@ file_grep_not("$Self->{obj_dir}/$Self->{VM_PREFIX}__idmap.xml", qr/to="PS/); if ($Self->{vlt_all}) { # Check for secret in any outputs my $any; - foreach my $filename (glob $Self->{obj_dir}."/*.[ch]*") { + foreach my $filename (glob $Self->{obj_dir} . "/*.[ch]*") { if ($filename =~ /secret/i) { - $Self->error("Secret found in a filename: ".$filename); + $Self->error("Secret found in a filename: " . $filename); } file_grep_not($filename, qr/secret/i); $any = 1; diff --git a/test_regress/t/t_sys_fread.pl b/test_regress/t/t_sys_fread.pl index d4594dc84..73bebd44f 100755 --- a/test_regress/t/t_sys_fread.pl +++ b/test_regress/t/t_sys_fread.pl @@ -18,8 +18,8 @@ sub gen { my $filename = shift; my $fh = IO::File->new(">$filename"); - for (my $copy=0; $copy<32; ++$copy) { - for (my $i=0; $i<=255; ++$i) { + for (my $copy = 0; $copy < 32; ++$copy) { + for (my $i = 0; $i <= 255; ++$i) { $fh->print(chr($i)); } } diff --git a/test_regress/t/t_sys_sformat_noopt.pl b/test_regress/t/t_sys_sformat_noopt.pl index c27062f54..569209da9 100755 --- a/test_regress/t/t_sys_sformat_noopt.pl +++ b/test_regress/t/t_sys_sformat_noopt.pl @@ -20,7 +20,7 @@ compile( if ($Self->cxx_version =~ /clang/) { skip("Known clang bug"); #Here: if (VL_UNLIKELY(VL_NEQ_W(12, __Vtemp1, vlSymsp->TOP__t.__PVT__str))) -} else{ +} else { execute( check_finished => 1, ); diff --git a/test_regress/t/t_threads_crazy.pl b/test_regress/t/t_threads_crazy.pl index 54641105d..ee8031054 100755 --- a/test_regress/t/t_threads_crazy.pl +++ b/test_regress/t/t_threads_crazy.pl @@ -11,7 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vltmt => 1); if ($Self->cfg_with_m32) { - skip("Does not work with -m32 (resource unavailable)"); + skip("Does not work with -m32 (resource unavailable)"); } compile( diff --git a/test_regress/t/t_timing_long.pl b/test_regress/t/t_timing_long.pl index 5f0b728d3..eb279f82e 100755 --- a/test_regress/t/t_timing_long.pl +++ b/test_regress/t/t_timing_long.pl @@ -39,7 +39,7 @@ sub gen { # mostly unpredictable $fh->printf(" if (cnt == %d) begin\n", $i - 1); $fh->printf(" #1; ++cnt; `MSG((\"[%0t] cnt?=${i}\", \$time));" - ." if (cnt != %d) \$stop;\n", $i); + . " if (cnt != %d) \$stop;\n", $i); $fh->printf(" end\n"); } diff --git a/test_regress/t/t_trace_cat.pl b/test_regress/t/t_trace_cat.pl index 78832a416..a34973212 100755 --- a/test_regress/t/t_trace_cat.pl +++ b/test_regress/t/t_trace_cat.pl @@ -21,7 +21,7 @@ execute( ); system("cat $Self->{obj_dir}/simpart_0000.vcd " - ." $Self->{obj_dir}/simpart_0000_cat*.vcd > $Self->{obj_dir}/simall.vcd"); + . " $Self->{obj_dir}/simpart_0000_cat*.vcd > $Self->{obj_dir}/simall.vcd"); vcd_identical("$Self->{obj_dir}/simall.vcd", $Self->{golden_filename}); diff --git a/test_regress/t/t_trace_complex.pl b/test_regress/t/t_trace_complex.pl index 8400cbf09..f02e405e8 100755 --- a/test_regress/t/t_trace_complex.pl +++ b/test_regress/t/t_trace_complex.pl @@ -18,17 +18,17 @@ execute( check_finished => 1, ); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_arrp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arru\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arrp\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_strp\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_strp_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_arrp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arru\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arrp\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_strp\[/); -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_complex_old_api.pl b/test_regress/t/t_trace_complex_old_api.pl index 4150e31af..8136d3f79 100755 --- a/test_regress/t/t_trace_complex_old_api.pl +++ b/test_regress/t/t_trace_complex_old_api.pl @@ -23,15 +23,15 @@ execute( check_finished => 1, ); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_arrp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arru\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arrp\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_strp\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_strp_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_arrp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arru\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arrp\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_strp\[/); vcd_identical("$Self->{obj_dir}/simx.vcd", $Self->{golden_filename}); diff --git a/test_regress/t/t_trace_complex_portable.pl b/test_regress/t/t_trace_complex_portable.pl index 56c794042..8095d31aa 100755 --- a/test_regress/t/t_trace_complex_portable.pl +++ b/test_regress/t/t_trace_complex_portable.pl @@ -23,15 +23,15 @@ execute( check_finished => 1, ); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_arrp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arru\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arrp\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_strp\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_strp_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_arrp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arru\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arrp\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_strp\[/); vcd_identical("$Self->{obj_dir}/simx.vcd", $Self->{golden_filename}); diff --git a/test_regress/t/t_trace_complex_structs.pl b/test_regress/t/t_trace_complex_structs.pl index dbbf55c04..8bf726485 100755 --- a/test_regress/t/t_trace_complex_structs.pl +++ b/test_regress/t/t_trace_complex_structs.pl @@ -20,17 +20,17 @@ execute( check_finished => 1, ); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp /); -file_grep_not ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_arrp /); -file_grep_not ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arru\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arrp\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_strp\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_strp_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp /); +file_grep_not("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_arrp /); +file_grep_not("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arru\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arrp\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_strp\[/); -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_complex_threads_1.pl b/test_regress/t/t_trace_complex_threads_1.pl index 9a6e6d621..ae50a144d 100755 --- a/test_regress/t/t_trace_complex_threads_1.pl +++ b/test_regress/t/t_trace_complex_threads_1.pl @@ -21,17 +21,17 @@ execute( check_finished => 1, ); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_arrp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_strp /); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arru\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arrp\[/); -file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_arru_strp\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_strp_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_arrp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arrp_strp /); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arru\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_arrp\[/); +file_grep("$Self->{obj_dir}/simx.vcd", qr/ v_arru_strp\[/); -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_ena_cc.pl b/test_regress/t/t_trace_ena_cc.pl index ea30e0880..94c44cb0d 100755 --- a/test_regress/t/t_trace_ena_cc.pl +++ b/test_regress/t/t_trace_ena_cc.pl @@ -21,10 +21,10 @@ execute( ); if ($Self->{vlt_all}) { - file_grep ("$Self->{obj_dir}/V$Self->{name}__Trace__0__Slow.cpp", qr/c_trace_on\"/x); - file_grep_not ("$Self->{obj_dir}/V$Self->{name}__Trace__0__Slow.cpp", qr/_trace_off\"/x); - file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x); - file_grep_not ("$Self->{obj_dir}/simx.vcd", qr/inside_sub/x); + file_grep("$Self->{obj_dir}/V$Self->{name}__Trace__0__Slow.cpp", qr/c_trace_on\"/x); + file_grep_not("$Self->{obj_dir}/V$Self->{name}__Trace__0__Slow.cpp", qr/_trace_off\"/x); + file_grep("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x); + file_grep_not("$Self->{obj_dir}/simx.vcd", qr/inside_sub/x); vcd_identical("$Self->{obj_dir}/simx.vcd", $Self->{golden_filename}); } diff --git a/test_regress/t/t_trace_ena_sc.pl b/test_regress/t/t_trace_ena_sc.pl index 6a493841e..73e694095 100755 --- a/test_regress/t/t_trace_ena_sc.pl +++ b/test_regress/t/t_trace_ena_sc.pl @@ -26,7 +26,7 @@ else { if ($Self->{vlt_all}) { # Note more checks in _cc.pl - file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x); + file_grep("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x); vcd_identical("$Self->{obj_dir}/simx.vcd", $Self->{golden_filename}); } diff --git a/test_regress/t/t_unicode.pl b/test_regress/t/t_unicode.pl index 5d143bbdc..836641e83 100755 --- a/test_regress/t/t_unicode.pl +++ b/test_regress/t/t_unicode.pl @@ -23,12 +23,12 @@ sub gen { $fh->print("// Generated by t_unicode.pl\n"); $fh->print("module t;\n"); $fh->print(" // Chinese " - .chr(0xe8).chr(0xaf).chr(0x84).chr(0xe8).chr(0xae).chr(0xba) # Comment - ."\n"); + . chr(0xe8) . chr(0xaf) . chr(0x84) . chr(0xe8) . chr(0xae) . chr(0xba) # Comment + . "\n"); $fh->print(" initial begin\n"); $fh->print(" \$write(\"Hello " - .chr(0xe4).chr(0xb8).chr(0x96).chr(0xe7).chr(0x95).chr(0x8c) # World - ."\\n\");\n"); + . chr(0xe4) . chr(0xb8) . chr(0x96) . chr(0xe7) . chr(0x95) . chr(0x8c) # World + . "\\n\");\n"); $fh->print(" \$write(\"*-* All Finished *-*\\n\");\n"); $fh->print(" \$finish;\n"); $fh->print(" end\n"); diff --git a/test_regress/t/t_var_escape.pl b/test_regress/t/t_var_escape.pl index e8c85b61e..cb56ec58b 100755 --- a/test_regress/t/t_var_escape.pl +++ b/test_regress/t/t_var_escape.pl @@ -20,13 +20,12 @@ execute( ); if ($Self->{vlt_all}) { - file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x); + file_grep("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x); my $sig = quotemeta("bra[ket]slash/dash-colon:9"); - file_grep ("$Self->{obj_dir}/simx.vcd", qr/ $sig/); - file_grep ("$Self->{obj_dir}/simx.vcd", qr/ other\.cyc /); - file_grep ("$Self->{obj_dir}/simx.vcd", qr/ module mod\.with_dot /); - vcd_identical ("$Self->{obj_dir}/simx.vcd", - $Self->{golden_filename}); + file_grep("$Self->{obj_dir}/simx.vcd", qr/ $sig/); + file_grep("$Self->{obj_dir}/simx.vcd", qr/ other\.cyc /); + file_grep("$Self->{obj_dir}/simx.vcd", qr/ module mod\.with_dot /); + vcd_identical("$Self->{obj_dir}/simx.vcd", $Self->{golden_filename}); } ok(1); diff --git a/test_regress/t/t_verilated_all.pl b/test_regress/t/t_verilated_all.pl index 44b2d3a72..cc0caa085 100755 --- a/test_regress/t/t_verilated_all.pl +++ b/test_regress/t/t_verilated_all.pl @@ -55,7 +55,7 @@ foreach my $file (sort keys %hit) { && $file !~ /_fst/ && $file !~ /_heavy/ && ($file !~ /_thread/ || $Self->cfg_with_threaded)) { - error("Include file not covered by t_verilated_all test: ",$file); + error("Include file not covered by t_verilated_all test: ", $file); } } diff --git a/test_regress/t/t_vpi_get_public_rw_switch.pl b/test_regress/t/t_vpi_get_public_rw_switch.pl index 2142c3afc..3a0123177 100755 --- a/test_regress/t/t_vpi_get_public_rw_switch.pl +++ b/test_regress/t/t_vpi_get_public_rw_switch.pl @@ -21,8 +21,8 @@ compile( make_top_shell => 0, make_main => 0, verilator_flags2 => ["--exe --vpi" - ." --public-flat-rw --prefix Vt_vpi_get --no-l2name" - ." $Self->{t_dir}/t_vpi_get.cpp"], + . " --public-flat-rw --prefix Vt_vpi_get --no-l2name" + . " $Self->{t_dir}/t_vpi_get.cpp"], make_pli => 1, iv_flags2 => ["-g2005-sv -D USE_VPI_NOT_DPI"], v_flags2 => ["+define+USE_VPI_NOT_DPI"], diff --git a/test_regress/t/t_wire_beh1364_bad.pl b/test_regress/t/t_wire_beh1364_bad.pl index ee98f2262..6a33667e2 100755 --- a/test_regress/t/t_wire_beh1364_bad.pl +++ b/test_regress/t/t_wire_beh1364_bad.pl @@ -19,7 +19,7 @@ lint( ); if (-e $waiver_filename) { - error("Waiver file generated, not expected.."); + error("Waiver file generated, not expected"); } ok(1); diff --git a/test_regress/t/t_x_assign_0.pl b/test_regress/t/t_x_assign_0.pl index 6f9e1347f..aa0614025 100755 --- a/test_regress/t/t_x_assign_0.pl +++ b/test_regress/t/t_x_assign_0.pl @@ -13,8 +13,8 @@ scenarios(vlt_all => 1); top_filename("t/t_x_assign.v"); compile( - make_top_shell => 0, - make_main => 0, + make_top_shell => 0, + make_main => 0, verilator_flags2 => ["--x-assign 0 --exe $Self->{t_dir}/t_x_assign.cpp"], ); diff --git a/test_regress/t/t_x_assign_1.pl b/test_regress/t/t_x_assign_1.pl index 2a6ffe0a8..d55fbc7a0 100755 --- a/test_regress/t/t_x_assign_1.pl +++ b/test_regress/t/t_x_assign_1.pl @@ -13,8 +13,8 @@ scenarios(vlt_all => 1); top_filename("t/t_x_assign.v"); compile( - make_top_shell => 0, - make_main => 0, + make_top_shell => 0, + make_main => 0, verilator_flags2 => ["--x-assign 1 --exe $Self->{t_dir}/t_x_assign.cpp"], ); diff --git a/test_regress/t/t_x_assign_unique_0.pl b/test_regress/t/t_x_assign_unique_0.pl index bef9e2495..675fbbd33 100755 --- a/test_regress/t/t_x_assign_unique_0.pl +++ b/test_regress/t/t_x_assign_unique_0.pl @@ -13,8 +13,8 @@ scenarios(vlt_all => 1); top_filename("t/t_x_assign.v"); compile( - make_top_shell => 0, - make_main => 0, + make_top_shell => 0, + make_main => 0, verilator_flags2 => ["--x-assign unique --exe $Self->{t_dir}/t_x_assign.cpp"], ); diff --git a/test_regress/t/t_x_assign_unique_1.pl b/test_regress/t/t_x_assign_unique_1.pl index bef9e2495..675fbbd33 100755 --- a/test_regress/t/t_x_assign_unique_1.pl +++ b/test_regress/t/t_x_assign_unique_1.pl @@ -13,8 +13,8 @@ scenarios(vlt_all => 1); top_filename("t/t_x_assign.v"); compile( - make_top_shell => 0, - make_main => 0, + make_top_shell => 0, + make_main => 0, verilator_flags2 => ["--x-assign unique --exe $Self->{t_dir}/t_x_assign.cpp"], ); diff --git a/test_regress/t/t_xml_debugcheck.pl b/test_regress/t/t_xml_debugcheck.pl index 392d9a60c..4d1491a1b 100755 --- a/test_regress/t/t_xml_debugcheck.pl +++ b/test_regress/t/t_xml_debugcheck.pl @@ -29,9 +29,9 @@ file_grep("$out_filename", qr//x); # for and -file_grep("$out_filename", qr/ signed=/x); # for -file_grep("$out_filename", qr/ func=/x); # for +file_grep("$out_filename", qr//x); # for and +file_grep("$out_filename", qr/ signed=/x); # for +file_grep("$out_filename", qr/ func=/x); # for ok(1); 1;