Tests: Reformat some recent tests to mostly verilog-format standard. No test functional change.
This commit is contained in:
parent
ffa87540cc
commit
2c156d6655
|
|
@ -1,9 +1,8 @@
|
|||
.. comment: generated by t_lint_assigneqexpr_bad
|
||||
.. code-block:: sv
|
||||
:linenos:
|
||||
:emphasize-lines: 3
|
||||
|
||||
assign d_o = // Note = not == below
|
||||
(
|
||||
c_o = 1 // <--- Warning: ASSIGNEQEXPR
|
||||
) ? 1 : (
|
||||
output logic c_o,
|
||||
output logic d_o
|
||||
);
|
||||
assign c_o = (a_i != 0) ? 1 : 0;
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
// SPDX-License-Identifier: CC0-1.0
|
||||
// ======================================================================
|
||||
|
||||
module sub
|
||||
#(parameter type TYPE_t = logic)
|
||||
(
|
||||
module sub #(
|
||||
parameter type TYPE_t = logic
|
||||
) (
|
||||
input TYPE_t in,
|
||||
output TYPE_t out
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
// SPDX-License-Identifier: CC0-1.0
|
||||
// ======================================================================
|
||||
|
||||
module top
|
||||
(
|
||||
module top (
|
||||
input clk,
|
||||
input fastclk,
|
||||
input reset_l,
|
||||
|
|
@ -19,15 +18,24 @@ module top
|
|||
input [69:0] in_wide
|
||||
);
|
||||
|
||||
sub #(.TYPE_t(logic [1:0])) sub_small
|
||||
(.in(in_small),
|
||||
.out(out_small));
|
||||
sub #(
|
||||
.TYPE_t(logic [1:0])
|
||||
) sub_small (
|
||||
.in(in_small),
|
||||
.out(out_small)
|
||||
);
|
||||
|
||||
sub #(.TYPE_t(logic [39:0])) sub_quad
|
||||
(.in(in_quad),
|
||||
.out(out_quad));
|
||||
sub #(
|
||||
.TYPE_t(logic [39:0])
|
||||
) sub_quad (
|
||||
.in(in_quad),
|
||||
.out(out_quad)
|
||||
);
|
||||
|
||||
sub #(.TYPE_t(logic [69:0])) sub_wide
|
||||
(.in(in_wide),
|
||||
.out(out_wide));
|
||||
sub #(
|
||||
.TYPE_t(logic [69:0])
|
||||
) sub_wide (
|
||||
.in(in_wide),
|
||||
.out(out_wide)
|
||||
);
|
||||
endmodule
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@
|
|||
// This module will be used as libsecret.a or libsecret.so without
|
||||
// exposing the source.
|
||||
|
||||
module secret_impl
|
||||
(
|
||||
module secret_impl (
|
||||
input [31:0] a,
|
||||
input [31:0] b,
|
||||
output logic [31:0] x,
|
||||
input clk,
|
||||
input reset_l);
|
||||
input reset_l
|
||||
);
|
||||
|
||||
logic [31:0] accum_q;
|
||||
logic [31:0] secret_value;
|
||||
|
|
@ -27,10 +27,8 @@ module secret_impl
|
|||
end
|
||||
else begin
|
||||
accum_q <= accum_q + a;
|
||||
if (accum_q > 10)
|
||||
x <= b;
|
||||
else
|
||||
x <= a + b + secret_value;
|
||||
if (accum_q > 10) x <= b;
|
||||
else x <= a + b + secret_value;
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@
|
|||
|
||||
// See also https://verilator.org/guide/latest/examples.html"
|
||||
|
||||
module top (input clk);
|
||||
module top (
|
||||
input clk
|
||||
);
|
||||
|
||||
int cyc;
|
||||
logic reset_l;
|
||||
|
|
@ -14,7 +16,13 @@ module top (input clk);
|
|||
logic [31:0] b;
|
||||
logic [31:0] x;
|
||||
|
||||
verilated_secret secret (.a, .b, .x, .clk, .reset_l);
|
||||
verilated_secret secret (
|
||||
.a,
|
||||
.b,
|
||||
.x,
|
||||
.clk,
|
||||
.reset_l
|
||||
);
|
||||
|
||||
always @(posedge clk) begin
|
||||
$display("[%0t] cyc=%0d a=%0d b=%0d x=%0d", $time, cyc, a, b, x);
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
// SPDX-License-Identifier: CC0-1.0
|
||||
// ======================================================================
|
||||
|
||||
module sub
|
||||
(
|
||||
module sub (
|
||||
input clk,
|
||||
input reset_l
|
||||
);
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@
|
|||
// This is intended to be a complex example of several features, please also
|
||||
// see the simpler examples/make_hello_c.
|
||||
|
||||
module top
|
||||
(
|
||||
module top (
|
||||
// Declare some signals so we can see how I/O works
|
||||
input clk,
|
||||
input reset_l,
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
// SPDX-License-Identifier: CC0-1.0
|
||||
// ======================================================================
|
||||
|
||||
module sub
|
||||
(
|
||||
module sub (
|
||||
input clk,
|
||||
input fastclk,
|
||||
input reset_l
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@
|
|||
// This is intended to be a complex example of several features, please also
|
||||
// see the simpler examples/make_hello_c.
|
||||
|
||||
module top
|
||||
(
|
||||
module top (
|
||||
// Declare some signals so we can see how I/O works
|
||||
input clk,
|
||||
input fastclk,
|
||||
|
|
|
|||
|
|
@ -22,11 +22,13 @@ module t ( /*AUTOARG*/
|
|||
force a = 16'h1234;
|
||||
if (a != 16'h1234 || a != b) $stop;
|
||||
release a;
|
||||
end else if (cyc == 2) begin
|
||||
end
|
||||
else if (cyc == 2) begin
|
||||
force b = 16'h5678;
|
||||
if (a != 16'h5678 || a != b) $stop;
|
||||
release b;
|
||||
end else if (cyc == 3) begin
|
||||
end
|
||||
else if (cyc == 3) begin
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define check(got ,exp) do if ((got) !== (exp)) begin $write("%%Error: %s:%0d: $time=%0t got='h%x exp='h%x\n", `__FILE__,`__LINE__, $time, (got), (exp)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t;
|
||||
|
||||
|
|
@ -26,7 +28,8 @@ module t;
|
|||
idx = ~idx;
|
||||
tmp = array[~idx];
|
||||
return tmp;
|
||||
end else begin
|
||||
end
|
||||
else begin
|
||||
return 0;
|
||||
end
|
||||
endfunction
|
||||
|
|
|
|||
|
|
@ -11,7 +11,10 @@ module top;
|
|||
);
|
||||
endmodule
|
||||
|
||||
module sub(a, b);
|
||||
module sub (
|
||||
a,
|
||||
b
|
||||
);
|
||||
input [127:0] a;
|
||||
input [127:0] b;
|
||||
always @(a or b) begin
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkd(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got=%0d exp=%0d (%s !== %s)\n", `__FILE__,`__LINE__, (gotv), (expv), `"gotv`", `"expv`"); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
class Cls;
|
||||
int m_index;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
%Error-UNSUPPORTED: t/t_array_method_map.v:17:15: Unsupported: Array 'map' method (IEEE 1800-2023 7.12.5)
|
||||
%Error-UNSUPPORTED: t/t_array_method_map.v:19:15: Unsupported: Array 'map' method (IEEE 1800-2023 7.12.5)
|
||||
: ... note: In instance 't'
|
||||
17 | res = a.map(el) with (el == 200);
|
||||
19 | res = a.map(el) with (el == 200);
|
||||
| ^~~
|
||||
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
|
||||
%Error: t/t_array_method_map.v:17:15: Unknown built-in array method 'map'
|
||||
%Error: t/t_array_method_map.v:19:15: Unknown built-in array method 'map'
|
||||
: ... note: In instance 't'
|
||||
17 | res = a.map(el) with (el == 200);
|
||||
19 | res = a.map(el) with (el == 200);
|
||||
| ^~~
|
||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||
%Error: Exiting due to
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2024 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); $stop; end while(0);
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
module t;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ module t #(
|
|||
.ID_T(ID_T),
|
||||
.STAGE_IDS(STAGE_IDS)
|
||||
) pipe (
|
||||
.*);
|
||||
.*
|
||||
);
|
||||
|
||||
initial $finish;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,11 +10,8 @@
|
|||
// verilog_format: on
|
||||
|
||||
module t (
|
||||
/*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
input clk
|
||||
);
|
||||
input clk;
|
||||
|
||||
global clocking @(posedge clk);
|
||||
endclocking
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
%Error: t/t_assert_future_bad.v:18:31: Future sampled value function called outside property or sequence expression (IEEE 16.9.4)
|
||||
%Error: t/t_assert_future_bad.v:16:31: Future sampled value function called outside property or sequence expression (IEEE 16.9.4)
|
||||
: ... note: In instance 't'
|
||||
18 | else $display("Future=%0d", $future_gclk(a));
|
||||
16 | else $display("Future=%0d", $future_gclk(a));
|
||||
| ^~~~~~~~~~~~
|
||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||
%Error: t/t_assert_future_bad.v:21:31: Future sampled value function called outside property or sequence expression (IEEE 16.9.4)
|
||||
%Error: t/t_assert_future_bad.v:19:31: Future sampled value function called outside property or sequence expression (IEEE 16.9.4)
|
||||
: ... note: In instance 't'
|
||||
21 | else $display("Future=%0d", $rising_gclk(a));
|
||||
19 | else $display("Future=%0d", $rising_gclk(a));
|
||||
| ^~~~~~~~~~~~
|
||||
%Error: t/t_assert_future_bad.v:24:31: Future sampled value function called outside property or sequence expression (IEEE 16.9.4)
|
||||
%Error: t/t_assert_future_bad.v:22:31: Future sampled value function called outside property or sequence expression (IEEE 16.9.4)
|
||||
: ... note: In instance 't'
|
||||
24 | else $display("Future=%0d", $falling_gclk(a));
|
||||
22 | else $display("Future=%0d", $falling_gclk(a));
|
||||
| ^~~~~~~~~~~~~
|
||||
%Error: t/t_assert_future_bad.v:27:31: Future sampled value function called outside property or sequence expression (IEEE 16.9.4)
|
||||
%Error: t/t_assert_future_bad.v:25:31: Future sampled value function called outside property or sequence expression (IEEE 16.9.4)
|
||||
: ... note: In instance 't'
|
||||
27 | else $display("Future=%0d", $steady_gclk(a));
|
||||
25 | else $display("Future=%0d", $steady_gclk(a));
|
||||
| ^~~~~~~~~~~~
|
||||
%Error: t/t_assert_future_bad.v:30:31: Future sampled value function called outside property or sequence expression (IEEE 16.9.4)
|
||||
%Error: t/t_assert_future_bad.v:28:31: Future sampled value function called outside property or sequence expression (IEEE 16.9.4)
|
||||
: ... note: In instance 't'
|
||||
30 | else $display("Future=%0d", $changing_gclk(a));
|
||||
28 | else $display("Future=%0d", $changing_gclk(a));
|
||||
| ^~~~~~~~~~~~~~
|
||||
%Error: Exiting due to
|
||||
|
|
|
|||
|
|
@ -4,12 +4,10 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
module t ( /*AUTOARG*/
|
||||
// Inputs
|
||||
a, clk
|
||||
module t (
|
||||
input a,
|
||||
input clk
|
||||
);
|
||||
input a;
|
||||
input clk;
|
||||
|
||||
global clocking @(posedge clk);
|
||||
endclocking
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
%Error-UNSUPPORTED: t/t_assert_future_unsup.v:21:54: Unsupported/illegal: Future value function used with expression with operator FUNCREF 'func'
|
||||
%Error-UNSUPPORTED: t/t_assert_future_unsup.v:19:54: Unsupported/illegal: Future value function used with expression with operator FUNCREF 'func'
|
||||
: ... note: In instance 't'
|
||||
21 | assert property (@(posedge clk) $future_gclk(a) == func(a));
|
||||
19 | assert property (@(posedge clk) $future_gclk(a) == func(a));
|
||||
| ^~~~
|
||||
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
|
||||
%Error: Exiting due to
|
||||
|
|
|
|||
|
|
@ -4,12 +4,10 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
module t ( /*AUTOARG*/
|
||||
// Inputs
|
||||
a, clk
|
||||
module t (
|
||||
input a,
|
||||
input clk
|
||||
);
|
||||
input a;
|
||||
input clk;
|
||||
|
||||
function logic func(input logic i);
|
||||
return i;
|
||||
|
|
|
|||
|
|
@ -4,13 +4,12 @@
|
|||
// without warranty, 2025 by Wilson Snyder
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
module t (
|
||||
input clk
|
||||
);
|
||||
|
||||
input clk;
|
||||
integer cyc; initial cyc=1;
|
||||
integer cyc;
|
||||
initial cyc = 1;
|
||||
|
||||
Test test (
|
||||
/*AUTOINST*/
|
||||
|
|
@ -35,7 +34,9 @@ module t (/*AUTOARG*/
|
|||
endmodule
|
||||
|
||||
// Interface for data validation with coverage
|
||||
interface data_valid_if (input logic clk);
|
||||
interface data_valid_if (
|
||||
input logic clk
|
||||
);
|
||||
logic enable_invalid_data_checks;
|
||||
logic valid;
|
||||
logic [7:0] data;
|
||||
|
|
@ -49,8 +50,7 @@ interface data_valid_if (input logic clk);
|
|||
|
||||
endinterface
|
||||
|
||||
module Test
|
||||
(
|
||||
module Test (
|
||||
input clk,
|
||||
input integer cyc
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4,15 +4,14 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,
|
||||
expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got=%0x exp=%0x (%s !== %s)\n", `__FILE__,`__LINE__, (gotv), (expv), `"gotv`", `"expv`"); `stop; end while(0);
|
||||
`define checkh(gotv, expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got=%0x exp=%0x (%s !== %s)\n", `__FILE__,`__LINE__, (gotv), (expv), `"gotv`", `"expv`"); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
module t ( /*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
module t (
|
||||
input clk
|
||||
);
|
||||
input clk;
|
||||
|
||||
bit toggle = 0;
|
||||
int inc = 0;
|
||||
|
|
@ -49,7 +48,8 @@ module t ( /*AUTOARG*/
|
|||
`endif
|
||||
if (cyc % 3 == 0) begin
|
||||
toggle <= 1;
|
||||
end else begin
|
||||
end
|
||||
else begin
|
||||
toggle <= 0;
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,34 +1,34 @@
|
|||
%Error: t/t_assign_automatic_bad.v:35:10: Dynamically-sized variable not allowed in continuous assignment (IEEE 1800-2023 6.21): 'bad_dyn5'
|
||||
%Error: t/t_assign_automatic_bad.v:36:10: Dynamically-sized variable not allowed in continuous assignment (IEEE 1800-2023 6.21): 'bad_dyn5'
|
||||
: ... note: In instance 't'
|
||||
35 | assign bad_dyn5[0] = empty_dyn;
|
||||
36 | assign bad_dyn5[0] = empty_dyn;
|
||||
| ^~~~~~~~
|
||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||
%Error: t/t_assign_automatic_bad.v:37:12: Automatic lifetime variable not allowed in continuous assignment (IEEE 1800-2023 6.21): 'm_bad1'
|
||||
%Error: t/t_assign_automatic_bad.v:38:12: Automatic lifetime variable not allowed in continuous assignment (IEEE 1800-2023 6.21): 'm_bad1'
|
||||
: ... note: In instance 't'
|
||||
37 | assign c.m_bad1 = 2;
|
||||
38 | assign c.m_bad1 = 2;
|
||||
| ^~~~~~
|
||||
%Error: t/t_assign_automatic_bad.v:47:5: Dynamically-sized variable not allowed in nonblocking assignment (IEEE 1800-2023 6.21): 'bad_dyn6'
|
||||
%Error: t/t_assign_automatic_bad.v:48:5: Dynamically-sized variable not allowed in nonblocking assignment (IEEE 1800-2023 6.21): 'bad_dyn6'
|
||||
: ... note: In instance 't'
|
||||
47 | bad_dyn6[0] <= 2;
|
||||
48 | bad_dyn6[0] <= 2;
|
||||
| ^~~~~~~~
|
||||
%Error: t/t_assign_automatic_bad.v:49:5: Dynamically-sized variable not allowed in nonblocking assignment (IEEE 1800-2023 6.21): 'bad_queue'
|
||||
%Error: t/t_assign_automatic_bad.v:50:5: Dynamically-sized variable not allowed in nonblocking assignment (IEEE 1800-2023 6.21): 'bad_queue'
|
||||
: ... note: In instance 't'
|
||||
49 | bad_queue[0] <= 2;
|
||||
50 | bad_queue[0] <= 2;
|
||||
| ^~~~~~~~~
|
||||
%Error: t/t_assign_automatic_bad.v:51:5: Dynamically-sized variable not allowed in nonblocking assignment (IEEE 1800-2023 6.21): 'bad_assoc'
|
||||
%Error: t/t_assign_automatic_bad.v:52:5: Dynamically-sized variable not allowed in nonblocking assignment (IEEE 1800-2023 6.21): 'bad_assoc'
|
||||
: ... note: In instance 't'
|
||||
51 | bad_assoc[0] <= 2;
|
||||
52 | bad_assoc[0] <= 2;
|
||||
| ^~~~~~~~~
|
||||
%Error: t/t_assign_automatic_bad.v:54:7: Automatic lifetime variable not allowed in nonblocking assignment (IEEE 1800-2023 6.21): 'm_bad2'
|
||||
%Error: t/t_assign_automatic_bad.v:55:7: Automatic lifetime variable not allowed in nonblocking assignment (IEEE 1800-2023 6.21): 'm_bad2'
|
||||
: ... note: In instance 't'
|
||||
54 | c.m_bad2 <= 2;
|
||||
55 | c.m_bad2 <= 2;
|
||||
| ^~~~~~
|
||||
%Error: t/t_assign_automatic_bad.v:56:10: Dynamically-sized variable not allowed in nonblocking assignment (IEEE 1800-2023 6.21): 's_dyn'
|
||||
%Error: t/t_assign_automatic_bad.v:57:10: Dynamically-sized variable not allowed in nonblocking assignment (IEEE 1800-2023 6.21): 's_dyn'
|
||||
: ... note: In instance 't'
|
||||
56 | Cls::s_dyn[0] <= 2;
|
||||
57 | Cls::s_dyn[0] <= 2;
|
||||
| ^~~~~
|
||||
%Error: t/t_assign_automatic_bad.v:58:26: Dynamically-sized variable not allowed in nonblocking assignment (IEEE 1800-2023 6.21): 's_dyn'
|
||||
%Error: t/t_assign_automatic_bad.v:63:7: Dynamically-sized variable not allowed in nonblocking assignment (IEEE 1800-2023 6.21): 's_dyn'
|
||||
: ... note: In instance 't'
|
||||
58 | clist[bad_dyn6[0]++].s_dyn[0] <= '1;
|
||||
63 | ].s_dyn[0] <= '1;
|
||||
| ^~~~~
|
||||
%Error: Exiting due to
|
||||
|
|
|
|||
|
|
@ -18,8 +18,9 @@ class Cls;
|
|||
int m_bad2;
|
||||
endclass
|
||||
|
||||
module t(clk);
|
||||
input clk;
|
||||
module t (
|
||||
input clk
|
||||
);
|
||||
|
||||
Cls c;
|
||||
|
||||
|
|
@ -54,8 +55,12 @@ module t(clk);
|
|||
c.m_bad2 <= 2; // <--- Error: nonblocking class automatic
|
||||
Cls::s_dyn <= 2; // OK: nonblocking class static dynarray assignment, not to its element
|
||||
Cls::s_dyn[0] <= 2; // Error: nonblocking class static dynarray element
|
||||
clist[bad_dyn6[0]++].s_dyn <= '1; // OK: direct nonblocking assignment to dynamically-sized array
|
||||
clist[bad_dyn6[0]++].s_dyn[0] <= '1; // Error: nonblocking assigment to dynamically-sized array element
|
||||
clist[
|
||||
bad_dyn6[0]++
|
||||
].s_dyn <= '1; // OK: direct nonblocking assignment to dynamically-sized array
|
||||
clist[
|
||||
bad_dyn6[0]++
|
||||
].s_dyn[0] <= '1; // Error: nonblocking assigment to dynamically-sized array element
|
||||
mt(ok_7);
|
||||
$stop;
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got=%0x exp=%0x (%s !== %s)\n", `__FILE__,`__LINE__, (gotv), (expv), `"gotv`", `"expv`"); `stop; end while(0);
|
||||
`define checks(gotv,expv) do if ((gotv) != (expv)) begin $write("%%Error: %s:%0d: got='%s' exp='%s'\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
class X;
|
||||
typedef enum int {
|
||||
|
|
@ -31,14 +33,11 @@ class X;
|
|||
|
||||
endclass
|
||||
|
||||
module t;/*AUTOARG*/
|
||||
|
||||
module t;
|
||||
|
||||
initial begin
|
||||
X x = new;
|
||||
$finish;
|
||||
end
|
||||
|
||||
|
||||
|
||||
endmodule
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); $stop; end while(0);
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
|
||||
module t;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
%Error-UNSUPPORTED: t/t_assoc_wildcard_map.v:17:15: Unsupported: Wildcard array 'map' method (IEEE 1800-2023 7.12.5)
|
||||
%Error-UNSUPPORTED: t/t_assoc_wildcard_map.v:19:15: Unsupported: Wildcard array 'map' method (IEEE 1800-2023 7.12.5)
|
||||
: ... note: In instance 't'
|
||||
17 | res = a.map(el) with (el == 2);
|
||||
19 | res = a.map(el) with (el == 2);
|
||||
| ^~~
|
||||
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
|
||||
%Error: Exiting due to
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2023 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); $stop; end while(0);
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
module t;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@
|
|||
// warranty, 2024 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); $stop; end while(0);
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
// Test IEEE 1800-2023 concat bit selects, function bit selects, method bit selects
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
module t
|
||||
(
|
||||
module t (
|
||||
input wire [31:0] foo,
|
||||
output reg [144:0] bar,
|
||||
output reg [144:0] bar2,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%Error-UNSUPPORTED: t/t_c_width_bad.v:9:22: Unsupported: $c can't generate wider than 64 bits
|
||||
%Error-UNSUPPORTED: t/t_c_width_bad.v:9:21: Unsupported: $c can't generate wider than 64 bits
|
||||
: ... note: In instance 't'
|
||||
9 | bit [99:0] wide = $c100("0");
|
||||
| ^~~~~
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
typedef enum {
|
||||
UVM_TLM_READ_COMMAND,
|
||||
|
|
|
|||
|
|
@ -5,8 +5,11 @@
|
|||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
package foo;
|
||||
class bar#(type T=int);
|
||||
class bar #(
|
||||
type T = int
|
||||
);
|
||||
endclass
|
||||
endpackage;
|
||||
endpackage
|
||||
;
|
||||
|
||||
import foo::bar;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
class uvm_process_guard#(type T=int);
|
||||
class uvm_process_guard #(
|
||||
type T = int
|
||||
);
|
||||
T m_context;
|
||||
extern function T get_context();
|
||||
extern function new(T ctxt);
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@
|
|||
// any use, without warranty, 2025 by Petr Nohavica
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
`define checks(gotv,expv) do if ((gotv) != (expv)) begin $write("%%Error: %s:%0d: got='%s' exp='%s'\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
interface class IBottomMid;
|
||||
pure virtual function void moo(int i);
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
module m ();
|
||||
class c;
|
||||
|
|
|
|||
|
|
@ -4,13 +4,17 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
class Class1 #(type T);
|
||||
class Class1 #(
|
||||
type T
|
||||
);
|
||||
static function int get_p();
|
||||
return 7;
|
||||
endfunction
|
||||
endclass
|
||||
|
||||
class Class2 #(type T) extends Class1 #(T);
|
||||
class Class2 #(
|
||||
type T
|
||||
) extends Class1 #(T);
|
||||
static function int get_p2;
|
||||
return T::get_p();
|
||||
endfunction
|
||||
|
|
|
|||
|
|
@ -4,17 +4,19 @@
|
|||
// without warranty.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
class func_c #(parameter p_width=4);
|
||||
static function logic[p_width-1:0] func(
|
||||
input logic[p_width-1:0] inb
|
||||
class func_c #(
|
||||
parameter p_width = 4
|
||||
);
|
||||
static function logic [p_width-1:0] func(input logic [p_width-1:0] inb);
|
||||
func = inb;
|
||||
endfunction
|
||||
endclass
|
||||
|
||||
module modA #(parameter p_width = 7)(
|
||||
input logic [p_width-1:0] sig_a
|
||||
,output logic [p_width-1:0] sig_b
|
||||
module modA #(
|
||||
parameter p_width = 7
|
||||
) (
|
||||
input logic [p_width-1:0] sig_a,
|
||||
output logic [p_width-1:0] sig_b
|
||||
);
|
||||
assign sig_b = func_c#(p_width)::func(sig_a);
|
||||
endmodule
|
||||
|
|
@ -25,9 +27,11 @@ module the_top();
|
|||
logic [Size-1:0] sig_a;
|
||||
logic [Size-1:0] sig_b;
|
||||
|
||||
modA #(.p_width(Size)) modA(
|
||||
.sig_a(sig_a)
|
||||
,.sig_b(sig_b)
|
||||
modA #(
|
||||
.p_width(Size)
|
||||
) modA (
|
||||
.sig_a(sig_a),
|
||||
.sig_b(sig_b)
|
||||
);
|
||||
|
||||
//assign sig_b = func_c#(p_width)::func(inb_i);
|
||||
|
|
|
|||
|
|
@ -4,17 +4,19 @@
|
|||
// without warranty.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
class func_c #(parameter p_width=4);
|
||||
static function logic[p_width-1:0] func(
|
||||
input logic[p_width-1:0] inb
|
||||
class func_c #(
|
||||
parameter p_width = 4
|
||||
);
|
||||
static function logic [p_width-1:0] func(input logic [p_width-1:0] inb);
|
||||
func = inb;
|
||||
endfunction
|
||||
endclass
|
||||
|
||||
module modA #(parameter p_width = 7)(
|
||||
input logic [p_width-1:0] sig_a
|
||||
,output logic [p_width-1:0] sig_b
|
||||
module modA #(
|
||||
parameter p_width = 7
|
||||
) (
|
||||
input logic [p_width-1:0] sig_a,
|
||||
output logic [p_width-1:0] sig_b
|
||||
);
|
||||
assign sig_b = func_c#(p_width)::func(sig_a);
|
||||
endmodule
|
||||
|
|
@ -26,9 +28,11 @@ module the_top();
|
|||
logic [Size-1:0] sig_b;
|
||||
logic [Size-1:0] sig_c;
|
||||
|
||||
modA #(.p_width(Size)) modA(
|
||||
.sig_a(sig_a)
|
||||
,.sig_b(sig_b)
|
||||
modA #(
|
||||
.p_width(Size)
|
||||
) modA (
|
||||
.sig_a(sig_a),
|
||||
.sig_b(sig_b)
|
||||
);
|
||||
|
||||
initial begin
|
||||
|
|
|
|||
|
|
@ -4,18 +4,18 @@
|
|||
// without warranty.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
class func_c #(parameter p_width=4);
|
||||
typedef struct packed {
|
||||
logic[p_width-1:0] data;
|
||||
} my_type_t;
|
||||
static function my_type_t func(
|
||||
input logic[p_width-1:0] inb
|
||||
class func_c #(
|
||||
parameter p_width = 4
|
||||
);
|
||||
typedef struct packed {logic [p_width-1:0] data;} my_type_t;
|
||||
static function my_type_t func(input logic [p_width-1:0] inb);
|
||||
func.data = inb;
|
||||
endfunction
|
||||
endclass
|
||||
|
||||
module modA #(parameter p_width = 7)(
|
||||
module modA #(
|
||||
parameter p_width = 7
|
||||
) (
|
||||
input func_c#(p_width)::my_type_t sig_a,
|
||||
output func_c#(p_width)::my_type_t sig_b
|
||||
);
|
||||
|
|
@ -27,7 +27,9 @@ module the_top();
|
|||
|
||||
func_c #(Size)::my_type_t sig_a, sig_b, sig_c;
|
||||
|
||||
modA #(.p_width(Size)) modA(
|
||||
modA #(
|
||||
.p_width(Size)
|
||||
) modA (
|
||||
.sig_a(sig_a),
|
||||
.sig_b(sig_b)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4,22 +4,16 @@
|
|||
// without warranty.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkd(gotv,expv) \
|
||||
do if ((gotv) !== (expv)) begin \
|
||||
$write("%%Error: %s:%0d: got=%0d exp=%0d\n", \
|
||||
`__FILE__,`__LINE__, (gotv), (expv)); \
|
||||
`stop; \
|
||||
end while(0);
|
||||
`define checkd(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got=%0d exp=%0d\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
class pipeline_class #(
|
||||
parameter type XWORD = logic
|
||||
);
|
||||
|
||||
typedef struct packed {
|
||||
XWORD pc;
|
||||
} if_id_t;
|
||||
typedef struct packed {XWORD pc;} if_id_t;
|
||||
|
||||
endclass
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
class factory #(type T);
|
||||
class factory #(
|
||||
type T
|
||||
);
|
||||
static function T create;
|
||||
T obj = new;
|
||||
return obj;
|
||||
|
|
@ -24,10 +26,9 @@ endclass
|
|||
module t;
|
||||
initial begin
|
||||
foo f;
|
||||
if (bit'($random))
|
||||
f = bar::create;
|
||||
else
|
||||
f = factory#(foo)::create();
|
||||
if (bit'($random)) f = bar::create;
|
||||
else f = factory#(foo)::create();
|
||||
$finish;
|
||||
end
|
||||
endmodule;
|
||||
endmodule
|
||||
;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%Error: t/t_class_scope_import_bad.v:11:11: Import statement directly within a class scope is illegal
|
||||
%Error: t/t_class_scope_import_bad.v:11:10: Import statement directly within a class scope is illegal
|
||||
11 | import pkg::*;
|
||||
| ^~~
|
||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%Error: t/t_class_super_new_noextend_bad.v:10:12: 'super' used on non-extended class (IEEE 1800-2023 8.15)
|
||||
%Error: t/t_class_super_new_noextend_bad.v:10:10: 'super' used on non-extended class (IEEE 1800-2023 8.15)
|
||||
10 | super.new();
|
||||
| ^
|
||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%Error: t/t_class_to_basic_assignment_bad.v:26:29: Assign RHS 'class{}Foo' cannot be assigned to non-class 'int'
|
||||
%Error: t/t_class_to_basic_assignment_bad.v:26:27: Assign RHS 'class{}Foo' cannot be assigned to non-class 'int'
|
||||
26 | new_node.phase_done = get();
|
||||
| ^
|
||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@ module t;
|
|||
end
|
||||
|
||||
initial begin
|
||||
#4
|
||||
if (data != 1) $stop;
|
||||
#4 if (data != 1) $stop;
|
||||
if (cb.data != 0) $stop;
|
||||
#1;
|
||||
#1step;
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@ module t;
|
|||
end
|
||||
|
||||
initial begin
|
||||
#4
|
||||
if(data != 1 ) $stop;
|
||||
#4 if (data != 1) $stop;
|
||||
if (cb.data != 0) $stop;
|
||||
#1;
|
||||
#1step;
|
||||
|
|
|
|||
|
|
@ -73,11 +73,13 @@ module t_constraint_global_arr_unsup;
|
|||
o.m_mid_arr[1].m_arr[2].m_y == 400) begin
|
||||
$display("*-* All Finished *-*");
|
||||
$finish;
|
||||
end else begin
|
||||
end
|
||||
else begin
|
||||
$display("*-* FAILED *-*");
|
||||
$stop;
|
||||
end
|
||||
end else begin
|
||||
end
|
||||
else begin
|
||||
$display("*-* FAILED: randomize() returned 0 *-*");
|
||||
$stop;
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,9 +6,7 @@
|
|||
|
||||
class RandomValue;
|
||||
rand int value;
|
||||
constraint small_int_c {
|
||||
value < 10;
|
||||
}
|
||||
constraint small_int_c {value < 10;}
|
||||
task disable_val();
|
||||
value.rand_mode(0);
|
||||
endtask
|
||||
|
|
|
|||
|
|
@ -5,13 +5,10 @@
|
|||
// any use, without warranty, 2024 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
module t (
|
||||
input clk
|
||||
);
|
||||
|
||||
input clk;
|
||||
|
||||
int cyc, bump, result;
|
||||
logic foo;
|
||||
%000001 initial begin
|
||||
|
|
|
|||
|
|
@ -4,13 +4,10 @@
|
|||
// any use, without warranty, 2024 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
module t (
|
||||
input clk
|
||||
);
|
||||
|
||||
input clk;
|
||||
|
||||
int cyc, bump, result;
|
||||
logic foo;
|
||||
initial begin
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
%Error: t/t_covergroup_in_class_duplicate_bad.v:13:16: Duplicate declaration of CLASS '__vlAnonCG_embeddedCg': '__vlAnonCG_embeddedCg'
|
||||
%Error: t/t_covergroup_in_class_duplicate_bad.v:13:14: Duplicate declaration of CLASS '__vlAnonCG_embeddedCg': '__vlAnonCG_embeddedCg'
|
||||
13 | covergroup embeddedCg;
|
||||
| ^~~~~~~~~~
|
||||
t/t_covergroup_in_class_duplicate_bad.v:9:16: ... Location of original declaration
|
||||
t/t_covergroup_in_class_duplicate_bad.v:9:14: ... Location of original declaration
|
||||
9 | covergroup embeddedCg;
|
||||
| ^~~~~~~~~~
|
||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@
|
|||
|
||||
`define STRINGIFY(x) `"x`"
|
||||
|
||||
module test (
|
||||
);
|
||||
module test ();
|
||||
initial begin
|
||||
$display("TEST_MACRO %s", `STRINGIFY(`TEST_MACRO));
|
||||
$finish;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
module t;
|
||||
timeunit 10s;
|
||||
timeprecision 1s;
|
||||
timeunit 10s; timeprecision 1s;
|
||||
|
||||
initial begin
|
||||
#1;
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define check(got ,exp) do if ((got) !== (exp)) begin $write("%%Error: %s:%0d: cyc=%0d got='h%x exp='h%x\n", `__FILE__,`__LINE__, cyc, (got), (exp)); `stop; end while(0)
|
||||
`define check(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: cyc=%0d got='h%x exp='h%x\n", `__FILE__,`__LINE__, cyc, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
module t (
|
||||
input clk
|
||||
);
|
||||
input clk;
|
||||
|
||||
reg [31:0] cyc = 0;
|
||||
reg [6:0] cntA = 0;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@
|
|||
// any use, without warranty, 2025 by Geza Lore.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
module mul (input [8:0] A, input [16:0] B, output [25:0] Y);
|
||||
module mul (
|
||||
input [8:0] A,
|
||||
input [16:0] B,
|
||||
output [25:0] Y
|
||||
);
|
||||
assign Y = $signed(A) * $signed(B);
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@
|
|||
// without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkd(gotv,
|
||||
expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got=%0d exp=%0d\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
`define checkd(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got=%0d exp=%0d\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
module sub (
|
||||
input clk,
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define check(got ,exp) do if ((got) !== (exp)) begin $write("%%Error: %s:%0d: $time=%0t got='h%x exp='h%x\n", `__FILE__,`__LINE__, $time, (got), (exp)); `stop; end while(0)
|
||||
`define check(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: $time=%0t got='h%x exp='h%x\n", `__FILE__,`__LINE__, $time, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module top;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
... For warning description see https://verilator.org/warn/UNOPTFLAT?v=latest
|
||||
... Use "/* verilator lint_off UNOPTFLAT */" and lint_on around source to disable this message.
|
||||
t/t_dfg_true_cycle_bad.v:10:23: Example path: o
|
||||
t/t_dfg_true_cycle_bad.v:12:22: Example path: ASSIGNW
|
||||
t/t_dfg_true_cycle_bad.v:12:20: Example path: ASSIGNW
|
||||
t/t_dfg_true_cycle_bad.v:10:23: Example path: o
|
||||
%Error: Exiting due to
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
%Error: t/t_disable_bad.v:9:15: Can't find definition of block/task: 'abcd'
|
||||
%Error: t/t_disable_bad.v:9:13: Can't find definition of block/task: 'abcd'
|
||||
9 | disable abcd;
|
||||
| ^~~~
|
||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||
%Error: Internal Error: t/t_disable_bad.v:9:7: ../V3LinkJump.cpp:#: Unlinked disable statement
|
||||
%Error: Internal Error: t/t_disable_bad.v:9:5: ../V3LinkJump.cpp:#: Unlinked disable statement
|
||||
9 | disable abcd;
|
||||
| ^~~~~~~
|
||||
... This fatal error may be caused by the earlier error(s); resolve those first.
|
||||
|
|
|
|||
|
|
@ -9,8 +9,10 @@
|
|||
package pyhdl_if;
|
||||
|
||||
typedef chandle PyObject;
|
||||
import "DPI-C" context function PyObject _pyhdl_if_PyTuple_GetItem(input PyObject p0,
|
||||
input longint unsigned p1);
|
||||
import "DPI-C" context function PyObject _pyhdl_if_PyTuple_GetItem(
|
||||
input PyObject p0,
|
||||
input longint unsigned p1
|
||||
);
|
||||
|
||||
function PyObject PyTuple_GetItem(input PyObject p0, input longint unsigned p1);
|
||||
return _pyhdl_if_PyTuple_GetItem(p0, p1);
|
||||
|
|
@ -32,11 +34,9 @@ package pyhdl_if;
|
|||
|
||||
endpackage
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
module t (
|
||||
input clk
|
||||
);
|
||||
input clk;
|
||||
|
||||
import pyhdl_if::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%Error-UNSUPPORTED: t/t_event_control_expr_unsup.v:15:21: Unsupported: Impure function calls in sensitivity lists
|
||||
%Error-UNSUPPORTED: t/t_event_control_expr_unsup.v:15:20: Unsupported: Impure function calls in sensitivity lists
|
||||
15 | always @(posedge foo());
|
||||
| ^~~
|
||||
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
|
||||
|
|
|
|||
|
|
@ -4,13 +4,10 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
module t (
|
||||
input clk
|
||||
);
|
||||
|
||||
input clk;
|
||||
|
||||
int cyc = 0;
|
||||
|
||||
function automatic logic is_odd(int value);
|
||||
|
|
@ -20,8 +17,7 @@ module t (/*AUTOARG*/
|
|||
endfunction
|
||||
|
||||
always_ff @(posedge clk) begin
|
||||
if (cyc[0] == 1'b0 || is_odd(cyc))
|
||||
cyc <= cyc + 1;
|
||||
if (cyc[0] == 1'b0 || is_odd(cyc)) cyc <= cyc + 1;
|
||||
if (cyc == 10) begin
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
%Error: t/t_flag_unroll_limit_const.v:17:16: Expecting expression to be constant, but can't determine constant for FUNCREF 'f'
|
||||
%Error: t/t_flag_unroll_limit_const.v:17:19: Expecting expression to be constant, but can't determine constant for FUNCREF 'f'
|
||||
: ... note: In instance 't'
|
||||
t/t_flag_unroll_limit_const.v:9:3: ... Location of non-constant LOOP: Loop simulation took too long; probably this is an infinite loop, otherwise set '--unroll-limit' above 4
|
||||
t/t_flag_unroll_limit_const.v:17:16: ... Called from 'f()' with parameters:
|
||||
t/t_flag_unroll_limit_const.v:17:19: ... Called from 'f()' with parameters:
|
||||
x = ?32?h5
|
||||
17 | output logic [f(5):0] o5
|
||||
| ^
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@
|
|||
// any use, without warranty, 2021 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
`define checkr(gotv,expv) do if ((gotv) != (expv)) begin $write("%%Error: %s:%0d: got=%f exp=%f\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
module t(/*AUTOARG*/
|
||||
// Inputs
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%Error: t/t_force_chained.v:27: got='h0 exp='h00000001
|
||||
%Error: t/t_force_chained.v:33: got='h0 exp='h00000002
|
||||
%Error: t/t_force_chained.v:40: got='h0 exp='h00000003
|
||||
%Error: t/t_force_chained.v:46: got='h0 exp='h00000003
|
||||
%Error: t/t_force_chained.v:30: got='h0 exp='h00000001
|
||||
%Error: t/t_force_chained.v:36: got='h0 exp='h00000002
|
||||
%Error: t/t_force_chained.v:43: got='h0 exp='h00000003
|
||||
%Error: t/t_force_chained.v:49: got='h0 exp='h00000003
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); end while(0)
|
||||
// verilog_format: off
|
||||
`define stop // TODO
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t;
|
||||
reg [1:0] a;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
%Error-UNSUPPORTED: t/t_force_complex_sel_unsup.v:37:22: Unsupported: Force / release statement with complex select expression
|
||||
%Error-UNSUPPORTED: t/t_force_complex_sel_unsup.v:41:22: Unsupported: Force / release statement with complex select expression
|
||||
: ... note: In instance 't'
|
||||
37 | force logic_arr[($c(1))] = 0;
|
||||
41 | force logic_arr[($c(1))] = 0;
|
||||
| ^
|
||||
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
|
||||
%Error-UNSUPPORTED: t/t_force_complex_sel_unsup.v:44:24: Unsupported: Force / release statement with complex select expression
|
||||
%Error-UNSUPPORTED: t/t_force_complex_sel_unsup.v:51:24: Unsupported: Force / release statement with complex select expression
|
||||
: ... note: In instance 't'
|
||||
44 | release logic_arr[($c(1))];
|
||||
51 | release logic_arr[($c(1))];
|
||||
| ^
|
||||
%Error: Exiting due to
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
`define checkr(gotv,expv) do if ((gotv) != (expv)) begin $write("%%Error: %s:%0d: got=%f exp=%f\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
`ifdef VERILATOR
|
||||
// The '$c(1)' is there to prevent inlining of the signal by V3Gate
|
||||
|
|
@ -31,23 +33,31 @@ module t ( /*AUTOARG*/
|
|||
cyc <= cyc + 1;
|
||||
if (cyc == 0) begin
|
||||
logic_arr[`IMPURE_ONE] <= 1;
|
||||
end else if (cyc == 1) begin
|
||||
end
|
||||
else if (cyc == 1) begin
|
||||
`checkh(logic_arr[`IMPURE_ONE], 1);
|
||||
end else if (cyc == 2) begin
|
||||
end
|
||||
else if (cyc == 2) begin
|
||||
force logic_arr[`IMPURE_ONE] = 0;
|
||||
end else if (cyc == 3) begin
|
||||
end
|
||||
else if (cyc == 3) begin
|
||||
`checkh(logic_arr[`IMPURE_ONE], 0);
|
||||
logic_arr[`IMPURE_ONE] <= 1;
|
||||
end else if (cyc == 4) begin
|
||||
end
|
||||
else if (cyc == 4) begin
|
||||
`checkh(logic_arr[`IMPURE_ONE], 0);
|
||||
end else if (cyc == 5) begin
|
||||
end
|
||||
else if (cyc == 5) begin
|
||||
release logic_arr[`IMPURE_ONE];
|
||||
end else if (cyc == 6) begin
|
||||
end
|
||||
else if (cyc == 6) begin
|
||||
`checkh(logic_arr[`IMPURE_ONE], 0);
|
||||
logic_arr[`IMPURE_ONE] <= 1;
|
||||
end else if (cyc == 7) begin
|
||||
end
|
||||
else if (cyc == 7) begin
|
||||
`checkh(logic_arr[`IMPURE_ONE], 1);
|
||||
end else if (cyc == 8) begin
|
||||
end
|
||||
else if (cyc == 8) begin
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%Error: t/t_force_func.v:26: got='h0 exp='h00000001
|
||||
%Error: t/t_force_func.v:34: got='h0 exp='h00000002
|
||||
%Error: t/t_force_func.v:39: got='h0 exp='h00000003
|
||||
%Error: t/t_force_func.v:43: got='h0 exp='h00000003
|
||||
%Error: t/t_force_func.v:29: got='h0 exp='h00000001
|
||||
%Error: t/t_force_func.v:37: got='h0 exp='h00000002
|
||||
%Error: t/t_force_func.v:42: got='h0 exp='h00000003
|
||||
%Error: t/t_force_func.v:46: got='h0 exp='h00000003
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); end while(0)
|
||||
// verilog_format: off
|
||||
`define stop // TODO
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
function bit [1:0] get_arg (bit [1:0] x);
|
||||
return x;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); end while(0)
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t;
|
||||
reg [1:0] a = 0;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2021 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t(/*AUTOARG*/
|
||||
// Outputs
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2021 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t(/*AUTOARG*/
|
||||
// Inputs
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2024 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module sub(
|
||||
input wire [7:0] i,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
0 d=0,e=0
|
||||
10 d=1,e=1
|
||||
20 d=1,e=0
|
||||
%Error: t/t_force_release.v:36: got='h1 exp='h00000000
|
||||
%Error: t/t_force_release.v:39: got='h1 exp='h00000000
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); end while(0)
|
||||
// verilog_format: off
|
||||
`define stop // TODO
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
// Example from IEEE 1800-2023 10.6.2
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2022 by Geza Lore.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2021 by Geza Lore.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t;
|
||||
reg [1:0] a;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t;
|
||||
bit [1:0] a;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t;
|
||||
logic [7:0] a = 1;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
typedef struct packed {
|
||||
logic sig1;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2021 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t(/*AUTOARG*/
|
||||
// Inputs
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2021 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t(/*AUTOARG*/
|
||||
// Inputs
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
%Error-UNSUPPORTED: t/t_force_tri.v:27:10: Unsupported tristate construct: ASSIGNFORCE
|
||||
%Error-UNSUPPORTED: t/t_force_tri.v:29:10: Unsupported tristate construct: ASSIGNFORCE
|
||||
: ... note: In instance 't'
|
||||
27 | force bus = 4'bzz10;
|
||||
29 | force bus = 4'bzz10;
|
||||
| ^~~~~
|
||||
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
|
||||
%Error: Exiting due to
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2021 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
// verilog_format: on
|
||||
|
||||
module t(/*AUTOARG*/
|
||||
// Inputs
|
||||
|
|
|
|||
|
|
@ -4,15 +4,15 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
`define checkr(gotv,expv) do if ((gotv) != (expv)) begin $write("%%Error: %s:%0d: got=%f exp=%f\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
module t ( /*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
module t (
|
||||
input clk
|
||||
);
|
||||
input clk;
|
||||
|
||||
integer cyc = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,15 +4,15 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0)
|
||||
`define checkr(gotv,expv) do if ((gotv) != (expv)) begin $write("%%Error: %s:%0d: got=%f exp=%f\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
module t ( /*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
module t (
|
||||
input clk
|
||||
);
|
||||
input clk;
|
||||
|
||||
integer cyc = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
module t;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
%Warning-NOEFFECT: t/t_foreach_noivar.v:17:5: foreach with no loop variable has no effect
|
||||
%Warning-NOEFFECT: t/t_foreach_noivar.v:19:5: foreach with no loop variable has no effect
|
||||
: ... note: In instance 't'
|
||||
17 | foreach (array[]) begin
|
||||
19 | foreach (array[]) begin
|
||||
| ^~~~~~~
|
||||
... For warning description see https://verilator.org/warn/NOEFFECT?v=latest
|
||||
... Use "/* verilator lint_off NOEFFECT */" and lint_on around source to disable this message.
|
||||
%Warning-NOEFFECT: t/t_foreach_noivar.v:23:5: foreach with no loop variable has no effect
|
||||
%Warning-NOEFFECT: t/t_foreach_noivar.v:25:5: foreach with no loop variable has no effect
|
||||
: ... note: In instance 't'
|
||||
23 | foreach (array[,,]) begin
|
||||
25 | foreach (array[,,]) begin
|
||||
| ^~~~~~~
|
||||
%Error: Exiting due to
|
||||
|
|
|
|||
|
|
@ -7,9 +7,11 @@
|
|||
module t;
|
||||
bit flag;
|
||||
initial begin
|
||||
fork begin
|
||||
fork
|
||||
begin
|
||||
$stop;
|
||||
end join_none
|
||||
end
|
||||
join_none
|
||||
$finish;
|
||||
end
|
||||
endmodule
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@
|
|||
// any use, without warranty, 2025 by Augustin Fabre.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got=%0x exp=%0x (%s !== %s)\n", `__FILE__,`__LINE__, (gotv), (expv), `"gotv`", `"expv`"); `stop; end while(0);
|
||||
`define checks(gotv,expv) do if ((gotv) != (expv)) begin $write("%%Error: %s:%0d: got='%s' exp='%s'\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
// Bug5747: Make sure that a variable with automatic storage is freshly
|
||||
// allocated when entering the function.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ module t;
|
|||
if (x) begin
|
||||
if (x) begin
|
||||
return 1;
|
||||
end else begin
|
||||
end
|
||||
else begin
|
||||
$c("");
|
||||
end
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -4,13 +4,16 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
class cl #(type T= int);
|
||||
class cl #(
|
||||
type T = int
|
||||
);
|
||||
function void f();
|
||||
T obj = new;
|
||||
endfunction
|
||||
endclass
|
||||
virtual class vcl;
|
||||
endclass;
|
||||
endclass
|
||||
;
|
||||
module t;
|
||||
cl #(vcl) c = new;
|
||||
initial begin
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
%Error: t/t_func_virt_new_bad.v:9:13: Illegal to call 'new' using an abstract virtual class 'vcl' (IEEE 1800-2023 8.21)
|
||||
%Error: t/t_func_virt_new_bad.v:11:13: Illegal to call 'new' using an abstract virtual class 'vcl' (IEEE 1800-2023 8.21)
|
||||
: ... note: In instance 't'
|
||||
9 | T obj = new;
|
||||
11 | T obj = new;
|
||||
| ^~~
|
||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||
%Error: Exiting due to
|
||||
|
|
|
|||
|
|
@ -4,13 +4,16 @@
|
|||
// any use, without warranty, 2025 by Antmicro.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
class cl #(type T= int);
|
||||
class cl #(
|
||||
type T = int
|
||||
);
|
||||
function void f();
|
||||
T obj = new;
|
||||
endfunction
|
||||
endclass
|
||||
virtual class vcl;
|
||||
endclass;
|
||||
endclass
|
||||
;
|
||||
module t;
|
||||
cl #(vcl) c = new;
|
||||
initial begin
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@
|
|||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// verilog_format: off
|
||||
`define stop $stop
|
||||
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got=%0x exp=%0x (%s !== %s)\n", `__FILE__,`__LINE__, (gotv), (expv), `"gotv`", `"expv`"); `stop; end while(0);
|
||||
`define checks(gotv,expv) do if ((gotv) != (expv)) begin $write("%%Error: %s:%0d: got='%s' exp='%s'\n", `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0);
|
||||
// verilog_format: on
|
||||
|
||||
module Child;
|
||||
int ch_value;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue