diff --git a/test_regress/t/t_math_svl.pl b/test_regress/t/t_math_svl.pl index 030802e1f..b3f97d2a2 100755 --- a/test_regress/t/t_math_svl.pl +++ b/test_regress/t/t_math_svl.pl @@ -7,8 +7,6 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); - compile ( ); diff --git a/test_regress/t/t_math_svl.v b/test_regress/t/t_math_svl.v index 5e4256fe3..8f68717c8 100644 --- a/test_regress/t/t_math_svl.v +++ b/test_regress/t/t_math_svl.v @@ -23,7 +23,7 @@ module t (/*AUTOARG*/ reg wo; reg w0; - always_comb @* begin + always @* begin lc = $countones(l); lo = $onehot(l); l0 = $onehot0(l); @@ -36,11 +36,23 @@ module t (/*AUTOARG*/ end integer cyc; initial cyc=1; + integer cyc_com; + always_comb begin + cyc_com = cyc; + end + + integer cyc_d1; always_ff @ (posedge clk) begin + cyc_d1 <= cyc_com; + end + + always @ (posedge clk) begin if (cyc!=0) begin cyc <= cyc + 1; //$write("%d %x %d %x %x %x %d %x %x %x %d %x %x\n", // cyc, l, lc, lo, l0, q,qc,qo,q0, w,wc,wo,w0); + if (cyc_com != cyc_com) $stop; + if (cyc_d1 != cyc-1) $stop; if (cyc==0) begin // Constification check if ($countones(32'b11001011101) != 7) $stop;