initial commit
This commit is contained in:
42
SIM/toplevel_tb.v
Normal file
42
SIM/toplevel_tb.v
Normal file
@@ -0,0 +1,42 @@
|
||||
`timescale 1ns/1ps
|
||||
|
||||
module toplevel_tb;
|
||||
reg clk;
|
||||
reg reset_n;
|
||||
reg button;
|
||||
wire led;
|
||||
|
||||
toplevel m_toplevel(
|
||||
.clk(clk),
|
||||
.reset_n(reset_n),
|
||||
.button(button),
|
||||
.led(led)
|
||||
);
|
||||
|
||||
initial begin
|
||||
$dumpfile("toplevel_tb.vcd");
|
||||
$dumpvars (0, toplevel_tb);
|
||||
|
||||
clk <= 1'b0;
|
||||
reset_n <= 1'b0;
|
||||
button <= 1'b0;
|
||||
|
||||
#50 reset_n <= 1'b1;
|
||||
|
||||
#70 button <= 1'b1;
|
||||
|
||||
#185 button <= 1'b0;
|
||||
|
||||
#200
|
||||
$finish;
|
||||
end
|
||||
|
||||
always #37 clk = ~clk;
|
||||
|
||||
`ifdef TIMING_SIM
|
||||
initial begin
|
||||
$sdf_annotate("impl/pnr/modem.sdf", m_toplevel, , , "MAXIMUM");
|
||||
end
|
||||
`endif
|
||||
|
||||
endmodule
|
||||
Reference in New Issue
Block a user