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
|
.. comment: generated by t_lint_assigneqexpr_bad
|
||||||
.. code-block:: sv
|
.. code-block:: sv
|
||||||
:linenos:
|
:linenos:
|
||||||
:emphasize-lines: 3
|
|
||||||
|
|
||||||
assign d_o = // Note = not == below
|
output logic c_o,
|
||||||
(
|
output logic d_o
|
||||||
c_o = 1 // <--- Warning: ASSIGNEQEXPR
|
);
|
||||||
) ? 1 : (
|
assign c_o = (a_i != 0) ? 1 : 0;
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
module sub
|
module sub #(
|
||||||
#(parameter type TYPE_t = logic)
|
parameter type TYPE_t = logic
|
||||||
(
|
) (
|
||||||
input TYPE_t in,
|
input TYPE_t in,
|
||||||
output TYPE_t out
|
output TYPE_t out
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
module top
|
module top (
|
||||||
(
|
|
||||||
input clk,
|
input clk,
|
||||||
input fastclk,
|
input fastclk,
|
||||||
input reset_l,
|
input reset_l,
|
||||||
|
|
@ -19,15 +18,24 @@ module top
|
||||||
input [69:0] in_wide
|
input [69:0] in_wide
|
||||||
);
|
);
|
||||||
|
|
||||||
sub #(.TYPE_t(logic [1:0])) sub_small
|
sub #(
|
||||||
(.in(in_small),
|
.TYPE_t(logic [1:0])
|
||||||
.out(out_small));
|
) sub_small (
|
||||||
|
.in(in_small),
|
||||||
|
.out(out_small)
|
||||||
|
);
|
||||||
|
|
||||||
sub #(.TYPE_t(logic [39:0])) sub_quad
|
sub #(
|
||||||
(.in(in_quad),
|
.TYPE_t(logic [39:0])
|
||||||
.out(out_quad));
|
) sub_quad (
|
||||||
|
.in(in_quad),
|
||||||
|
.out(out_quad)
|
||||||
|
);
|
||||||
|
|
||||||
sub #(.TYPE_t(logic [69:0])) sub_wide
|
sub #(
|
||||||
(.in(in_wide),
|
.TYPE_t(logic [69:0])
|
||||||
.out(out_wide));
|
) sub_wide (
|
||||||
|
.in(in_wide),
|
||||||
|
.out(out_wide)
|
||||||
|
);
|
||||||
endmodule
|
endmodule
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,13 @@
|
||||||
// This module will be used as libsecret.a or libsecret.so without
|
// This module will be used as libsecret.a or libsecret.so without
|
||||||
// exposing the source.
|
// exposing the source.
|
||||||
|
|
||||||
module secret_impl
|
module secret_impl (
|
||||||
(
|
|
||||||
input [31:0] a,
|
input [31:0] a,
|
||||||
input [31:0] b,
|
input [31:0] b,
|
||||||
output logic [31:0] x,
|
output logic [31:0] x,
|
||||||
input clk,
|
input clk,
|
||||||
input reset_l);
|
input reset_l
|
||||||
|
);
|
||||||
|
|
||||||
logic [31:0] accum_q;
|
logic [31:0] accum_q;
|
||||||
logic [31:0] secret_value;
|
logic [31:0] secret_value;
|
||||||
|
|
@ -27,10 +27,8 @@ module secret_impl
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
accum_q <= accum_q + a;
|
accum_q <= accum_q + a;
|
||||||
if (accum_q > 10)
|
if (accum_q > 10) x <= b;
|
||||||
x <= b;
|
else x <= a + b + secret_value;
|
||||||
else
|
|
||||||
x <= a + b + secret_value;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,9 @@
|
||||||
|
|
||||||
// See also https://verilator.org/guide/latest/examples.html"
|
// See also https://verilator.org/guide/latest/examples.html"
|
||||||
|
|
||||||
module top (input clk);
|
module top (
|
||||||
|
input clk
|
||||||
|
);
|
||||||
|
|
||||||
int cyc;
|
int cyc;
|
||||||
logic reset_l;
|
logic reset_l;
|
||||||
|
|
@ -14,7 +16,13 @@ module top (input clk);
|
||||||
logic [31:0] b;
|
logic [31:0] b;
|
||||||
logic [31:0] x;
|
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
|
always @(posedge clk) begin
|
||||||
$display("[%0t] cyc=%0d a=%0d b=%0d x=%0d", $time, cyc, a, b, x);
|
$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
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
module sub
|
module sub (
|
||||||
(
|
|
||||||
input clk,
|
input clk,
|
||||||
input reset_l
|
input reset_l
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@
|
||||||
// This is intended to be a complex example of several features, please also
|
// This is intended to be a complex example of several features, please also
|
||||||
// see the simpler examples/make_hello_c.
|
// see the simpler examples/make_hello_c.
|
||||||
|
|
||||||
module top
|
module top (
|
||||||
(
|
|
||||||
// Declare some signals so we can see how I/O works
|
// Declare some signals so we can see how I/O works
|
||||||
input clk,
|
input clk,
|
||||||
input reset_l,
|
input reset_l,
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
module sub
|
module sub (
|
||||||
(
|
|
||||||
input clk,
|
input clk,
|
||||||
input fastclk,
|
input fastclk,
|
||||||
input reset_l
|
input reset_l
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@
|
||||||
// This is intended to be a complex example of several features, please also
|
// This is intended to be a complex example of several features, please also
|
||||||
// see the simpler examples/make_hello_c.
|
// see the simpler examples/make_hello_c.
|
||||||
|
|
||||||
module top
|
module top (
|
||||||
(
|
|
||||||
// Declare some signals so we can see how I/O works
|
// Declare some signals so we can see how I/O works
|
||||||
input clk,
|
input clk,
|
||||||
input fastclk,
|
input fastclk,
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,13 @@ module t ( /*AUTOARG*/
|
||||||
force a = 16'h1234;
|
force a = 16'h1234;
|
||||||
if (a != 16'h1234 || a != b) $stop;
|
if (a != 16'h1234 || a != b) $stop;
|
||||||
release a;
|
release a;
|
||||||
end else if (cyc == 2) begin
|
end
|
||||||
|
else if (cyc == 2) begin
|
||||||
force b = 16'h5678;
|
force b = 16'h5678;
|
||||||
if (a != 16'h5678 || a != b) $stop;
|
if (a != 16'h5678 || a != b) $stop;
|
||||||
release b;
|
release b;
|
||||||
end else if (cyc == 3) begin
|
end
|
||||||
|
else if (cyc == 3) begin
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Wilson Snyder.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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(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;
|
module t;
|
||||||
|
|
||||||
|
|
@ -26,7 +28,8 @@ module t;
|
||||||
idx = ~idx;
|
idx = ~idx;
|
||||||
tmp = array[~idx];
|
tmp = array[~idx];
|
||||||
return tmp;
|
return tmp;
|
||||||
end else begin
|
end
|
||||||
|
else begin
|
||||||
return 0;
|
return 0;
|
||||||
end
|
end
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,10 @@ module top;
|
||||||
);
|
);
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
module sub(a, b);
|
module sub (
|
||||||
|
a,
|
||||||
|
b
|
||||||
|
);
|
||||||
input [127:0] a;
|
input [127:0] a;
|
||||||
input [127:0] b;
|
input [127:0] b;
|
||||||
always @(a or b) begin
|
always @(a or b) begin
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Wilson Snyder.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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);
|
`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;
|
class Cls;
|
||||||
int m_index;
|
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'
|
: ... 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
|
... 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'
|
: ... 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.
|
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2024 by Wilson Snyder.
|
// any use, without warranty, 2024 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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;
|
module t;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ module t #(
|
||||||
.ID_T(ID_T),
|
.ID_T(ID_T),
|
||||||
.STAGE_IDS(STAGE_IDS)
|
.STAGE_IDS(STAGE_IDS)
|
||||||
) pipe (
|
) pipe (
|
||||||
.*);
|
.*
|
||||||
|
);
|
||||||
|
|
||||||
initial $finish;
|
initial $finish;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,8 @@
|
||||||
// verilog_format: on
|
// verilog_format: on
|
||||||
|
|
||||||
module t (
|
module t (
|
||||||
/*AUTOARG*/
|
input clk
|
||||||
// Inputs
|
|
||||||
clk
|
|
||||||
);
|
);
|
||||||
input clk;
|
|
||||||
|
|
||||||
global clocking @(posedge clk);
|
global clocking @(posedge clk);
|
||||||
endclocking
|
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'
|
: ... 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.
|
... 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'
|
: ... 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'
|
: ... 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'
|
: ... 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'
|
: ... note: In instance 't'
|
||||||
30 | else $display("Future=%0d", $changing_gclk(a));
|
28 | else $display("Future=%0d", $changing_gclk(a));
|
||||||
| ^~~~~~~~~~~~~~
|
| ^~~~~~~~~~~~~~
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Wilson Snyder.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
module t ( /*AUTOARG*/
|
module t (
|
||||||
// Inputs
|
input a,
|
||||||
a, clk
|
input clk
|
||||||
);
|
);
|
||||||
input a;
|
|
||||||
input clk;
|
|
||||||
|
|
||||||
global clocking @(posedge clk);
|
global clocking @(posedge clk);
|
||||||
endclocking
|
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'
|
: ... 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
|
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Wilson Snyder.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
module t ( /*AUTOARG*/
|
module t (
|
||||||
// Inputs
|
input a,
|
||||||
a, clk
|
input clk
|
||||||
);
|
);
|
||||||
input a;
|
|
||||||
input clk;
|
|
||||||
|
|
||||||
function logic func(input logic i);
|
function logic func(input logic i);
|
||||||
return i;
|
return i;
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,12 @@
|
||||||
// without warranty, 2025 by Wilson Snyder
|
// without warranty, 2025 by Wilson Snyder
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
module t (/*AUTOARG*/
|
module t (
|
||||||
// Inputs
|
input clk
|
||||||
clk
|
|
||||||
);
|
);
|
||||||
|
|
||||||
input clk;
|
integer cyc;
|
||||||
integer cyc; initial cyc=1;
|
initial cyc = 1;
|
||||||
|
|
||||||
Test test (
|
Test test (
|
||||||
/*AUTOINST*/
|
/*AUTOINST*/
|
||||||
|
|
@ -35,7 +34,9 @@ module t (/*AUTOARG*/
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
// Interface for data validation with coverage
|
// 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 enable_invalid_data_checks;
|
||||||
logic valid;
|
logic valid;
|
||||||
logic [7:0] data;
|
logic [7:0] data;
|
||||||
|
|
@ -49,8 +50,7 @@ interface data_valid_if (input logic clk);
|
||||||
|
|
||||||
endinterface
|
endinterface
|
||||||
|
|
||||||
module Test
|
module Test (
|
||||||
(
|
|
||||||
input clk,
|
input clk,
|
||||||
input integer cyc
|
input integer cyc
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,14 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`define stop $stop
|
||||||
`define checkh(gotv,
|
`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);
|
||||||
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*/
|
module t (
|
||||||
// Inputs
|
input clk
|
||||||
clk
|
|
||||||
);
|
);
|
||||||
input clk;
|
|
||||||
|
|
||||||
bit toggle = 0;
|
bit toggle = 0;
|
||||||
int inc = 0;
|
int inc = 0;
|
||||||
|
|
@ -49,7 +48,8 @@ module t ( /*AUTOARG*/
|
||||||
`endif
|
`endif
|
||||||
if (cyc % 3 == 0) begin
|
if (cyc % 3 == 0) begin
|
||||||
toggle <= 1;
|
toggle <= 1;
|
||||||
end else begin
|
end
|
||||||
|
else begin
|
||||||
toggle <= 0;
|
toggle <= 0;
|
||||||
end
|
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'
|
: ... 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.
|
... 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'
|
: ... 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'
|
: ... 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'
|
: ... 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'
|
: ... 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'
|
: ... 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'
|
: ... 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'
|
: ... note: In instance 't'
|
||||||
58 | clist[bad_dyn6[0]++].s_dyn[0] <= '1;
|
63 | ].s_dyn[0] <= '1;
|
||||||
| ^~~~~
|
| ^~~~~
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,9 @@ class Cls;
|
||||||
int m_bad2;
|
int m_bad2;
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
module t(clk);
|
module t (
|
||||||
input clk;
|
input clk
|
||||||
|
);
|
||||||
|
|
||||||
Cls c;
|
Cls c;
|
||||||
|
|
||||||
|
|
@ -54,8 +55,12 @@ module t(clk);
|
||||||
c.m_bad2 <= 2; // <--- Error: nonblocking class automatic
|
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 <= 2; // OK: nonblocking class static dynarray assignment, not to its element
|
||||||
Cls::s_dyn[0] <= 2; // Error: nonblocking class static dynarray 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[
|
||||||
clist[bad_dyn6[0]++].s_dyn[0] <= '1; // Error: nonblocking assigment to dynamically-sized array element
|
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);
|
mt(ok_7);
|
||||||
$stop;
|
$stop;
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,11 @@
|
||||||
// any use, without warranty, 2025 by Wilson Snyder.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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);
|
||||||
`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);
|
`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;
|
class X;
|
||||||
typedef enum int {
|
typedef enum int {
|
||||||
|
|
@ -31,14 +33,11 @@ class X;
|
||||||
|
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
module t;/*AUTOARG*/
|
module t;
|
||||||
|
|
||||||
|
|
||||||
initial begin
|
initial begin
|
||||||
X x = new;
|
X x = new;
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
`define stop $stop
|
`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;
|
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'
|
: ... 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
|
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2023 by Wilson Snyder.
|
// any use, without warranty, 2023 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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;
|
module t;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,10 @@
|
||||||
// warranty, 2024 by Wilson Snyder.
|
// warranty, 2024 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// 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
|
// 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.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
module t
|
module t (
|
||||||
(
|
|
||||||
input wire [31:0] foo,
|
input wire [31:0] foo,
|
||||||
output reg [144:0] bar,
|
output reg [144:0] bar,
|
||||||
output reg [144:0] bar2,
|
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'
|
: ... note: In instance 't'
|
||||||
9 | bit [99:0] wide = $c100("0");
|
9 | bit [99:0] wide = $c100("0");
|
||||||
| ^~~~~
|
| ^~~~~
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Wilson Snyder.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
UVM_TLM_READ_COMMAND,
|
UVM_TLM_READ_COMMAND,
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,11 @@
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
package foo;
|
package foo;
|
||||||
class bar#(type T=int);
|
class bar #(
|
||||||
|
type T = int
|
||||||
|
);
|
||||||
endclass
|
endclass
|
||||||
endpackage;
|
endpackage
|
||||||
|
;
|
||||||
|
|
||||||
import foo::bar;
|
import foo::bar;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,9 @@
|
||||||
// any use, without warranty, 2025 by Wilson Snyder.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
class uvm_process_guard#(type T=int);
|
class uvm_process_guard #(
|
||||||
|
type T = int
|
||||||
|
);
|
||||||
T m_context;
|
T m_context;
|
||||||
extern function T get_context();
|
extern function T get_context();
|
||||||
extern function new(T ctxt);
|
extern function new(T ctxt);
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,11 @@
|
||||||
// any use, without warranty, 2025 by Petr Nohavica
|
// any use, without warranty, 2025 by Petr Nohavica
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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);
|
||||||
`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);
|
`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;
|
interface class IBottomMid;
|
||||||
pure virtual function void moo(int i);
|
pure virtual function void moo(int i);
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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 m ();
|
module m ();
|
||||||
class c;
|
class c;
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,17 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
class Class1 #(type T);
|
class Class1 #(
|
||||||
|
type T
|
||||||
|
);
|
||||||
static function int get_p();
|
static function int get_p();
|
||||||
return 7;
|
return 7;
|
||||||
endfunction
|
endfunction
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
class Class2 #(type T) extends Class1 #(T);
|
class Class2 #(
|
||||||
|
type T
|
||||||
|
) extends Class1 #(T);
|
||||||
static function int get_p2;
|
static function int get_p2;
|
||||||
return T::get_p();
|
return T::get_p();
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,19 @@
|
||||||
// without warranty.
|
// without warranty.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
class func_c #(parameter p_width=4);
|
class func_c #(
|
||||||
static function logic[p_width-1:0] func(
|
parameter p_width = 4
|
||||||
input logic[p_width-1:0] inb
|
|
||||||
);
|
);
|
||||||
|
static function logic [p_width-1:0] func(input logic [p_width-1:0] inb);
|
||||||
func = inb;
|
func = inb;
|
||||||
endfunction
|
endfunction
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
module modA #(parameter p_width = 7)(
|
module modA #(
|
||||||
input logic [p_width-1:0] sig_a
|
parameter p_width = 7
|
||||||
,output logic [p_width-1:0] sig_b
|
) (
|
||||||
|
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);
|
assign sig_b = func_c#(p_width)::func(sig_a);
|
||||||
endmodule
|
endmodule
|
||||||
|
|
@ -25,9 +27,11 @@ module the_top();
|
||||||
logic [Size-1:0] sig_a;
|
logic [Size-1:0] sig_a;
|
||||||
logic [Size-1:0] sig_b;
|
logic [Size-1:0] sig_b;
|
||||||
|
|
||||||
modA #(.p_width(Size)) modA(
|
modA #(
|
||||||
.sig_a(sig_a)
|
.p_width(Size)
|
||||||
,.sig_b(sig_b)
|
) modA (
|
||||||
|
.sig_a(sig_a),
|
||||||
|
.sig_b(sig_b)
|
||||||
);
|
);
|
||||||
|
|
||||||
//assign sig_b = func_c#(p_width)::func(inb_i);
|
//assign sig_b = func_c#(p_width)::func(inb_i);
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,19 @@
|
||||||
// without warranty.
|
// without warranty.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
class func_c #(parameter p_width=4);
|
class func_c #(
|
||||||
static function logic[p_width-1:0] func(
|
parameter p_width = 4
|
||||||
input logic[p_width-1:0] inb
|
|
||||||
);
|
);
|
||||||
|
static function logic [p_width-1:0] func(input logic [p_width-1:0] inb);
|
||||||
func = inb;
|
func = inb;
|
||||||
endfunction
|
endfunction
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
module modA #(parameter p_width = 7)(
|
module modA #(
|
||||||
input logic [p_width-1:0] sig_a
|
parameter p_width = 7
|
||||||
,output logic [p_width-1:0] sig_b
|
) (
|
||||||
|
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);
|
assign sig_b = func_c#(p_width)::func(sig_a);
|
||||||
endmodule
|
endmodule
|
||||||
|
|
@ -26,9 +28,11 @@ module the_top();
|
||||||
logic [Size-1:0] sig_b;
|
logic [Size-1:0] sig_b;
|
||||||
logic [Size-1:0] sig_c;
|
logic [Size-1:0] sig_c;
|
||||||
|
|
||||||
modA #(.p_width(Size)) modA(
|
modA #(
|
||||||
.sig_a(sig_a)
|
.p_width(Size)
|
||||||
,.sig_b(sig_b)
|
) modA (
|
||||||
|
.sig_a(sig_a),
|
||||||
|
.sig_b(sig_b)
|
||||||
);
|
);
|
||||||
|
|
||||||
initial begin
|
initial begin
|
||||||
|
|
|
||||||
|
|
@ -4,18 +4,18 @@
|
||||||
// without warranty.
|
// without warranty.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
class func_c #(parameter p_width=4);
|
class func_c #(
|
||||||
typedef struct packed {
|
parameter p_width = 4
|
||||||
logic[p_width-1:0] data;
|
|
||||||
} my_type_t;
|
|
||||||
static function my_type_t func(
|
|
||||||
input logic[p_width-1:0] inb
|
|
||||||
);
|
);
|
||||||
|
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;
|
func.data = inb;
|
||||||
endfunction
|
endfunction
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
module modA #(parameter p_width = 7)(
|
module modA #(
|
||||||
|
parameter p_width = 7
|
||||||
|
) (
|
||||||
input func_c#(p_width)::my_type_t sig_a,
|
input func_c#(p_width)::my_type_t sig_a,
|
||||||
output func_c#(p_width)::my_type_t sig_b
|
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;
|
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_a(sig_a),
|
||||||
.sig_b(sig_b)
|
.sig_b(sig_b)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,22 +4,16 @@
|
||||||
// without warranty.
|
// without warranty.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`define stop $stop
|
||||||
`define checkd(gotv,expv) \
|
`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);
|
||||||
do if ((gotv) !== (expv)) begin \
|
// verilog_format: on
|
||||||
$write("%%Error: %s:%0d: got=%0d exp=%0d\n", \
|
|
||||||
`__FILE__,`__LINE__, (gotv), (expv)); \
|
|
||||||
`stop; \
|
|
||||||
end while(0);
|
|
||||||
|
|
||||||
class pipeline_class #(
|
class pipeline_class #(
|
||||||
parameter type XWORD = logic
|
parameter type XWORD = logic
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef struct packed {
|
typedef struct packed {XWORD pc;} if_id_t;
|
||||||
XWORD pc;
|
|
||||||
} if_id_t;
|
|
||||||
|
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,9 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
class factory #(type T);
|
class factory #(
|
||||||
|
type T
|
||||||
|
);
|
||||||
static function T create;
|
static function T create;
|
||||||
T obj = new;
|
T obj = new;
|
||||||
return obj;
|
return obj;
|
||||||
|
|
@ -24,10 +26,9 @@ endclass
|
||||||
module t;
|
module t;
|
||||||
initial begin
|
initial begin
|
||||||
foo f;
|
foo f;
|
||||||
if (bit'($random))
|
if (bit'($random)) f = bar::create;
|
||||||
f = bar::create;
|
else f = factory#(foo)::create();
|
||||||
else
|
|
||||||
f = factory#(foo)::create();
|
|
||||||
$finish;
|
$finish;
|
||||||
end
|
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::*;
|
11 | import pkg::*;
|
||||||
| ^~~
|
| ^~~
|
||||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
... 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();
|
10 | super.new();
|
||||||
| ^
|
| ^
|
||||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
... 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();
|
26 | new_node.phase_done = get();
|
||||||
| ^
|
| ^
|
||||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@ module t;
|
||||||
end
|
end
|
||||||
|
|
||||||
initial begin
|
initial begin
|
||||||
#4
|
#4 if (data != 1) $stop;
|
||||||
if (data != 1) $stop;
|
|
||||||
if (cb.data != 0) $stop;
|
if (cb.data != 0) $stop;
|
||||||
#1;
|
#1;
|
||||||
#1step;
|
#1step;
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@ module t;
|
||||||
end
|
end
|
||||||
|
|
||||||
initial begin
|
initial begin
|
||||||
#4
|
#4 if (data != 1) $stop;
|
||||||
if(data != 1 ) $stop;
|
|
||||||
if (cb.data != 0) $stop;
|
if (cb.data != 0) $stop;
|
||||||
#1;
|
#1;
|
||||||
#1step;
|
#1step;
|
||||||
|
|
|
||||||
|
|
@ -73,11 +73,13 @@ module t_constraint_global_arr_unsup;
|
||||||
o.m_mid_arr[1].m_arr[2].m_y == 400) begin
|
o.m_mid_arr[1].m_arr[2].m_y == 400) begin
|
||||||
$display("*-* All Finished *-*");
|
$display("*-* All Finished *-*");
|
||||||
$finish;
|
$finish;
|
||||||
end else begin
|
end
|
||||||
|
else begin
|
||||||
$display("*-* FAILED *-*");
|
$display("*-* FAILED *-*");
|
||||||
$stop;
|
$stop;
|
||||||
end
|
end
|
||||||
end else begin
|
end
|
||||||
|
else begin
|
||||||
$display("*-* FAILED: randomize() returned 0 *-*");
|
$display("*-* FAILED: randomize() returned 0 *-*");
|
||||||
$stop;
|
$stop;
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@
|
||||||
|
|
||||||
class RandomValue;
|
class RandomValue;
|
||||||
rand int value;
|
rand int value;
|
||||||
constraint small_int_c {
|
constraint small_int_c {value < 10;}
|
||||||
value < 10;
|
|
||||||
}
|
|
||||||
task disable_val();
|
task disable_val();
|
||||||
value.rand_mode(0);
|
value.rand_mode(0);
|
||||||
endtask
|
endtask
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,10 @@
|
||||||
// any use, without warranty, 2024 by Wilson Snyder.
|
// any use, without warranty, 2024 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
module t (/*AUTOARG*/
|
module t (
|
||||||
// Inputs
|
input clk
|
||||||
clk
|
|
||||||
);
|
);
|
||||||
|
|
||||||
input clk;
|
|
||||||
|
|
||||||
int cyc, bump, result;
|
int cyc, bump, result;
|
||||||
logic foo;
|
logic foo;
|
||||||
%000001 initial begin
|
%000001 initial begin
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,10 @@
|
||||||
// any use, without warranty, 2024 by Wilson Snyder.
|
// any use, without warranty, 2024 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
module t (/*AUTOARG*/
|
module t (
|
||||||
// Inputs
|
input clk
|
||||||
clk
|
|
||||||
);
|
);
|
||||||
|
|
||||||
input clk;
|
|
||||||
|
|
||||||
int cyc, bump, result;
|
int cyc, bump, result;
|
||||||
logic foo;
|
logic foo;
|
||||||
initial begin
|
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;
|
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;
|
9 | covergroup embeddedCg;
|
||||||
| ^~~~~~~~~~
|
| ^~~~~~~~~~
|
||||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,7 @@
|
||||||
|
|
||||||
`define STRINGIFY(x) `"x`"
|
`define STRINGIFY(x) `"x`"
|
||||||
|
|
||||||
module test (
|
module test ();
|
||||||
);
|
|
||||||
initial begin
|
initial begin
|
||||||
$display("TEST_MACRO %s", `STRINGIFY(`TEST_MACRO));
|
$display("TEST_MACRO %s", `STRINGIFY(`TEST_MACRO));
|
||||||
$finish;
|
$finish;
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
module t;
|
module t;
|
||||||
timeunit 10s;
|
timeunit 10s; timeprecision 1s;
|
||||||
timeprecision 1s;
|
|
||||||
|
|
||||||
initial begin
|
initial begin
|
||||||
#1;
|
#1;
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,14 @@
|
||||||
// any use, without warranty, 2025 by Wilson Snyder.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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*/
|
module t (
|
||||||
// Inputs
|
input clk
|
||||||
clk
|
|
||||||
);
|
);
|
||||||
input clk;
|
|
||||||
|
|
||||||
reg [31:0] cyc = 0;
|
reg [31:0] cyc = 0;
|
||||||
reg [6:0] cntA = 0;
|
reg [6:0] cntA = 0;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,11 @@
|
||||||
// any use, without warranty, 2025 by Geza Lore.
|
// any use, without warranty, 2025 by Geza Lore.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// 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);
|
assign Y = $signed(A) * $signed(B);
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,10 @@
|
||||||
// without warranty, 2025 by Antmicro.
|
// without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`define stop $stop
|
||||||
`define checkd(gotv,
|
`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);
|
||||||
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 (
|
module sub (
|
||||||
input clk,
|
input clk,
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Wilson Snyder.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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;
|
module top;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,6 @@
|
||||||
... For warning description see https://verilator.org/warn/UNOPTFLAT?v=latest
|
... 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.
|
... 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: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
|
t/t_dfg_true_cycle_bad.v:10:23: Example path: o
|
||||||
%Error: Exiting due to
|
%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;
|
9 | disable abcd;
|
||||||
| ^~~~
|
| ^~~~
|
||||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
... 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;
|
9 | disable abcd;
|
||||||
| ^~~~~~~
|
| ^~~~~~~
|
||||||
... This fatal error may be caused by the earlier error(s); resolve those first.
|
... This fatal error may be caused by the earlier error(s); resolve those first.
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,10 @@
|
||||||
package pyhdl_if;
|
package pyhdl_if;
|
||||||
|
|
||||||
typedef chandle PyObject;
|
typedef chandle PyObject;
|
||||||
import "DPI-C" context function PyObject _pyhdl_if_PyTuple_GetItem(input PyObject p0,
|
import "DPI-C" context function PyObject _pyhdl_if_PyTuple_GetItem(
|
||||||
input longint unsigned p1);
|
input PyObject p0,
|
||||||
|
input longint unsigned p1
|
||||||
|
);
|
||||||
|
|
||||||
function PyObject 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);
|
return _pyhdl_if_PyTuple_GetItem(p0, p1);
|
||||||
|
|
@ -32,11 +34,9 @@ package pyhdl_if;
|
||||||
|
|
||||||
endpackage
|
endpackage
|
||||||
|
|
||||||
module t (/*AUTOARG*/
|
module t (
|
||||||
// Inputs
|
input clk
|
||||||
clk
|
|
||||||
);
|
);
|
||||||
input clk;
|
|
||||||
|
|
||||||
import pyhdl_if::*;
|
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());
|
15 | always @(posedge foo());
|
||||||
| ^~~
|
| ^~~
|
||||||
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
|
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Wilson Snyder.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
module t (/*AUTOARG*/
|
module t (
|
||||||
// Inputs
|
input clk
|
||||||
clk
|
|
||||||
);
|
);
|
||||||
|
|
||||||
input clk;
|
|
||||||
|
|
||||||
int cyc = 0;
|
int cyc = 0;
|
||||||
|
|
||||||
function automatic logic is_odd(int value);
|
function automatic logic is_odd(int value);
|
||||||
|
|
@ -20,8 +17,7 @@ module t (/*AUTOARG*/
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
always_ff @(posedge clk) begin
|
always_ff @(posedge clk) begin
|
||||||
if (cyc[0] == 1'b0 || is_odd(cyc))
|
if (cyc[0] == 1'b0 || is_odd(cyc)) cyc <= cyc + 1;
|
||||||
cyc <= cyc + 1;
|
|
||||||
if (cyc == 10) begin
|
if (cyc == 10) begin
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$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'
|
: ... 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: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
|
x = ?32?h5
|
||||||
17 | output logic [f(5):0] o5
|
17 | output logic [f(5):0] o5
|
||||||
| ^
|
| ^
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,11 @@
|
||||||
// any use, without warranty, 2021 by Wilson Snyder.
|
// any use, without warranty, 2021 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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)
|
||||||
`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);
|
`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*/
|
module t(/*AUTOARG*/
|
||||||
// Inputs
|
// Inputs
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%Error: t/t_force_chained.v:27: got='h0 exp='h00000001
|
%Error: t/t_force_chained.v:30: got='h0 exp='h00000001
|
||||||
%Error: t/t_force_chained.v:33: got='h0 exp='h00000002
|
%Error: t/t_force_chained.v:36: got='h0 exp='h00000002
|
||||||
%Error: t/t_force_chained.v:40: got='h0 exp='h00000003
|
%Error: t/t_force_chained.v:43: got='h0 exp='h00000003
|
||||||
%Error: t/t_force_chained.v:46: 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.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// 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;
|
module t;
|
||||||
reg [1:0] a;
|
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'
|
: ... 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
|
... 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'
|
: ... note: In instance 't'
|
||||||
44 | release logic_arr[($c(1))];
|
51 | release logic_arr[($c(1))];
|
||||||
| ^
|
| ^
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,11 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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)
|
||||||
`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);
|
`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
|
`ifdef VERILATOR
|
||||||
// The '$c(1)' is there to prevent inlining of the signal by V3Gate
|
// The '$c(1)' is there to prevent inlining of the signal by V3Gate
|
||||||
|
|
@ -31,23 +33,31 @@ module t ( /*AUTOARG*/
|
||||||
cyc <= cyc + 1;
|
cyc <= cyc + 1;
|
||||||
if (cyc == 0) begin
|
if (cyc == 0) begin
|
||||||
logic_arr[`IMPURE_ONE] <= 1;
|
logic_arr[`IMPURE_ONE] <= 1;
|
||||||
end else if (cyc == 1) begin
|
end
|
||||||
|
else if (cyc == 1) begin
|
||||||
`checkh(logic_arr[`IMPURE_ONE], 1);
|
`checkh(logic_arr[`IMPURE_ONE], 1);
|
||||||
end else if (cyc == 2) begin
|
end
|
||||||
|
else if (cyc == 2) begin
|
||||||
force logic_arr[`IMPURE_ONE] = 0;
|
force logic_arr[`IMPURE_ONE] = 0;
|
||||||
end else if (cyc == 3) begin
|
end
|
||||||
|
else if (cyc == 3) begin
|
||||||
`checkh(logic_arr[`IMPURE_ONE], 0);
|
`checkh(logic_arr[`IMPURE_ONE], 0);
|
||||||
logic_arr[`IMPURE_ONE] <= 1;
|
logic_arr[`IMPURE_ONE] <= 1;
|
||||||
end else if (cyc == 4) begin
|
end
|
||||||
|
else if (cyc == 4) begin
|
||||||
`checkh(logic_arr[`IMPURE_ONE], 0);
|
`checkh(logic_arr[`IMPURE_ONE], 0);
|
||||||
end else if (cyc == 5) begin
|
end
|
||||||
|
else if (cyc == 5) begin
|
||||||
release logic_arr[`IMPURE_ONE];
|
release logic_arr[`IMPURE_ONE];
|
||||||
end else if (cyc == 6) begin
|
end
|
||||||
|
else if (cyc == 6) begin
|
||||||
`checkh(logic_arr[`IMPURE_ONE], 0);
|
`checkh(logic_arr[`IMPURE_ONE], 0);
|
||||||
logic_arr[`IMPURE_ONE] <= 1;
|
logic_arr[`IMPURE_ONE] <= 1;
|
||||||
end else if (cyc == 7) begin
|
end
|
||||||
|
else if (cyc == 7) begin
|
||||||
`checkh(logic_arr[`IMPURE_ONE], 1);
|
`checkh(logic_arr[`IMPURE_ONE], 1);
|
||||||
end else if (cyc == 8) begin
|
end
|
||||||
|
else if (cyc == 8) begin
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%Error: t/t_force_func.v:26: got='h0 exp='h00000001
|
%Error: t/t_force_func.v:29: got='h0 exp='h00000001
|
||||||
%Error: t/t_force_func.v:34: got='h0 exp='h00000002
|
%Error: t/t_force_func.v:37: got='h0 exp='h00000002
|
||||||
%Error: t/t_force_func.v:39: got='h0 exp='h00000003
|
%Error: t/t_force_func.v:42: got='h0 exp='h00000003
|
||||||
%Error: t/t_force_func.v:43: 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.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// 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);
|
function bit [1:0] get_arg (bit [1:0] x);
|
||||||
return x;
|
return x;
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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;
|
module t;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// 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;
|
module t;
|
||||||
reg [1:0] a = 0;
|
reg [1:0] a = 0;
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2021 by Wilson Snyder.
|
// any use, without warranty, 2021 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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(/*AUTOARG*/
|
module t(/*AUTOARG*/
|
||||||
// Outputs
|
// Outputs
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2021 by Wilson Snyder.
|
// any use, without warranty, 2021 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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(/*AUTOARG*/
|
module t(/*AUTOARG*/
|
||||||
// Inputs
|
// Inputs
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2024 by Wilson Snyder.
|
// any use, without warranty, 2024 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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 sub(
|
module sub(
|
||||||
input wire [7:0] i,
|
input wire [7:0] i,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
0 d=0,e=0
|
0 d=0,e=0
|
||||||
10 d=1,e=1
|
10 d=1,e=1
|
||||||
20 d=1,e=0
|
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.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// 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
|
// Example from IEEE 1800-2023 10.6.2
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2022 by Geza Lore.
|
// any use, without warranty, 2022 by Geza Lore.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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 (/*AUTOARG*/
|
module t (/*AUTOARG*/
|
||||||
// Inputs
|
// Inputs
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2021 by Geza Lore.
|
// any use, without warranty, 2021 by Geza Lore.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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 (/*AUTOARG*/
|
module t (/*AUTOARG*/
|
||||||
// Inputs
|
// Inputs
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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;
|
module t;
|
||||||
reg [1:0] a;
|
reg [1:0] a;
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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;
|
module t;
|
||||||
bit [1:0] a;
|
bit [1:0] a;
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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;
|
module t;
|
||||||
logic [7:0] a = 1;
|
logic [7:0] a = 1;
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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
|
||||||
|
|
||||||
typedef struct packed {
|
typedef struct packed {
|
||||||
logic sig1;
|
logic sig1;
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2021 by Wilson Snyder.
|
// any use, without warranty, 2021 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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(/*AUTOARG*/
|
module t(/*AUTOARG*/
|
||||||
// Inputs
|
// Inputs
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2021 by Wilson Snyder.
|
// any use, without warranty, 2021 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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(/*AUTOARG*/
|
module t(/*AUTOARG*/
|
||||||
// Inputs
|
// 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'
|
: ... 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
|
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2021 by Wilson Snyder.
|
// any use, without warranty, 2021 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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(/*AUTOARG*/
|
module t(/*AUTOARG*/
|
||||||
// Inputs
|
// Inputs
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,15 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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)
|
||||||
`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);
|
`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*/
|
module t (
|
||||||
// Inputs
|
input clk
|
||||||
clk
|
|
||||||
);
|
);
|
||||||
input clk;
|
|
||||||
|
|
||||||
integer cyc = 0;
|
integer cyc = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,15 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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)
|
||||||
`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);
|
`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*/
|
module t (
|
||||||
// Inputs
|
input clk
|
||||||
clk
|
|
||||||
);
|
);
|
||||||
input clk;
|
|
||||||
|
|
||||||
integer cyc = 0;
|
integer cyc = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
// any use, without warranty, 2025 by Wilson Snyder.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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;
|
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'
|
: ... note: In instance 't'
|
||||||
17 | foreach (array[]) begin
|
19 | foreach (array[]) begin
|
||||||
| ^~~~~~~
|
| ^~~~~~~
|
||||||
... For warning description see https://verilator.org/warn/NOEFFECT?v=latest
|
... 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.
|
... 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'
|
: ... note: In instance 't'
|
||||||
23 | foreach (array[,,]) begin
|
25 | foreach (array[,,]) begin
|
||||||
| ^~~~~~~
|
| ^~~~~~~
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,11 @@
|
||||||
module t;
|
module t;
|
||||||
bit flag;
|
bit flag;
|
||||||
initial begin
|
initial begin
|
||||||
fork begin
|
fork
|
||||||
|
begin
|
||||||
$stop;
|
$stop;
|
||||||
end join_none
|
end
|
||||||
|
join_none
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
endmodule
|
endmodule
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,11 @@
|
||||||
// any use, without warranty, 2025 by Augustin Fabre.
|
// any use, without warranty, 2025 by Augustin Fabre.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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);
|
||||||
`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);
|
`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
|
// Bug5747: Make sure that a variable with automatic storage is freshly
|
||||||
// allocated when entering the function.
|
// allocated when entering the function.
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ module t;
|
||||||
if (x) begin
|
if (x) begin
|
||||||
if (x) begin
|
if (x) begin
|
||||||
return 1;
|
return 1;
|
||||||
end else begin
|
end
|
||||||
|
else begin
|
||||||
$c("");
|
$c("");
|
||||||
end
|
end
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,16 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
class cl #(type T= int);
|
class cl #(
|
||||||
|
type T = int
|
||||||
|
);
|
||||||
function void f();
|
function void f();
|
||||||
T obj = new;
|
T obj = new;
|
||||||
endfunction
|
endfunction
|
||||||
endclass
|
endclass
|
||||||
virtual class vcl;
|
virtual class vcl;
|
||||||
endclass;
|
endclass
|
||||||
|
;
|
||||||
module t;
|
module t;
|
||||||
cl #(vcl) c = new;
|
cl #(vcl) c = new;
|
||||||
initial begin
|
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'
|
: ... 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.
|
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,16 @@
|
||||||
// any use, without warranty, 2025 by Antmicro.
|
// any use, without warranty, 2025 by Antmicro.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
class cl #(type T= int);
|
class cl #(
|
||||||
|
type T = int
|
||||||
|
);
|
||||||
function void f();
|
function void f();
|
||||||
T obj = new;
|
T obj = new;
|
||||||
endfunction
|
endfunction
|
||||||
endclass
|
endclass
|
||||||
virtual class vcl;
|
virtual class vcl;
|
||||||
endclass;
|
endclass
|
||||||
|
;
|
||||||
module t;
|
module t;
|
||||||
cl #(vcl) c = new;
|
cl #(vcl) c = new;
|
||||||
initial begin
|
initial begin
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,11 @@
|
||||||
// any use, without warranty, 2025 by Wilson Snyder.
|
// any use, without warranty, 2025 by Wilson Snyder.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// verilog_format: off
|
||||||
`define stop $stop
|
`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);
|
||||||
`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);
|
`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;
|
module Child;
|
||||||
int ch_value;
|
int ch_value;
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue