2020-02-29 14:44:51 +00:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
//
|
|
|
|
// This file ONLY is placed into the Public Domain, for any use,
|
2020-02-29 15:06:52 +00:00
|
|
|
// without warranty, 2020 by Wilson Snyder.
|
2020-02-29 14:44:51 +00:00
|
|
|
|
|
|
|
module t (/*AUTOARG*/
|
|
|
|
// Inputs
|
|
|
|
clk
|
|
|
|
);
|
|
|
|
|
|
|
|
input clk;
|
|
|
|
|
|
|
|
integer cyc; initial cyc=1;
|
|
|
|
integer c_trace_on;
|
|
|
|
|
|
|
|
sub sub ();
|
|
|
|
|
|
|
|
always @ (posedge clk) begin
|
2020-02-29 15:06:52 +00:00
|
|
|
if (cyc != 0) begin
|
2020-02-29 14:44:51 +00:00
|
|
|
cyc <= cyc + 1;
|
|
|
|
c_trace_on <= cyc + 2;
|
2020-02-29 15:06:52 +00:00
|
|
|
if (cyc == 10) begin
|
2020-02-29 14:44:51 +00:00
|
|
|
$write("*-* All Finished *-*\n");
|
|
|
|
$finish;
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
endmodule
|
|
|
|
|
|
|
|
module sub;
|
|
|
|
integer inside_sub_a = 1;
|
|
|
|
endmodule
|