picorv32/scripts/icestorm/example_tb.v

31 lines
515 B
Coq
Raw Permalink Normal View History

2015-07-19 22:09:19 +08:00
`timescale 1 ns / 1 ps
module testbench;
2016-07-14 15:07:52 +08:00
reg clk = 1;
always #5 clk = ~clk;
2015-07-19 22:09:19 +08:00
wire LED0, LED1, LED2, LED3, LED4, LED5, LED6, LED7;
top uut (
2016-07-14 15:07:52 +08:00
.clk(clk),
2015-07-19 22:09:19 +08:00
.LED0(LED0),
.LED1(LED1),
.LED2(LED2),
.LED3(LED3),
.LED4(LED4),
.LED5(LED5),
.LED6(LED6),
.LED7(LED7)
);
initial begin
if ($test$plusargs("vcd")) begin
$dumpfile("example.vcd");
$dumpvars(0, testbench);
end
$monitor(LED7, LED6, LED5, LED4, LED3, LED2, LED1, LED0);
2016-07-14 15:07:52 +08:00
repeat (10000) @(posedge clk);
2015-07-19 22:09:19 +08:00
$finish;
end
endmodule