mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
By adding ivtest to the iverilog source tree, it is easier to keep the regression test synchronized with the source that is being tested. This should be especially helpful for PRs that add a new feature, and have a matching ivtest PR with the regression test for that feature.
31 lines
521 B
Verilog
31 lines
521 B
Verilog
module bar(clk, rst, inp, out);
|
|
(* this_is_clock = 1 *)
|
|
input wire clk;
|
|
(* this_is_reset = 1 *)
|
|
input wire rst;
|
|
input wire inp;
|
|
(* an_output_register = 1*)
|
|
output reg out;
|
|
|
|
always @(posedge clk)
|
|
if (rst) out <= 1'd0;
|
|
else out <= ~inp;
|
|
|
|
endmodule
|
|
|
|
module foo(clk, rst, inp, out);
|
|
(* this_is_the_master_clock *)
|
|
input wire clk;
|
|
input wire rst;
|
|
input wire inp;
|
|
output wire out;
|
|
|
|
bar bar_instance (clk, rst, inp, out);
|
|
|
|
initial begin
|
|
$display("PASSED");
|
|
end
|
|
|
|
endmodule
|
|
|