diff options
author | Yann Herklotz <git@yannherklotz.com> | 2022-11-24 18:49:44 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2022-11-24 18:49:44 +0000 |
commit | 46c49262fc9910ba5ff92e76d567ed2e4446fb41 (patch) | |
tree | 5bc1955e8fbf29ea454a0db3db1eaf4955e2ca28 /picorv32/scripts/icestorm/example_tb.v | |
parent | 08cf3d9a31b8acbf679b3c761edc95f3d27f7e2a (diff) | |
parent | 3291d86ec38031e191ec1e7e5e8ddfa74b77cb7c (diff) | |
download | butterstick-46c49262fc9910ba5ff92e76d567ed2e4446fb41.tar.gz butterstick-46c49262fc9910ba5ff92e76d567ed2e4446fb41.zip |
Merge commit '3291d86ec38031e191ec1e7e5e8ddfa74b77cb7c' as 'picorv32'
Diffstat (limited to 'picorv32/scripts/icestorm/example_tb.v')
-rw-r--r-- | picorv32/scripts/icestorm/example_tb.v | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/picorv32/scripts/icestorm/example_tb.v b/picorv32/scripts/icestorm/example_tb.v new file mode 100644 index 0000000..f04f8f8 --- /dev/null +++ b/picorv32/scripts/icestorm/example_tb.v @@ -0,0 +1,30 @@ +`timescale 1 ns / 1 ps + +module testbench; + reg clk = 1; + always #5 clk = ~clk; + wire LED0, LED1, LED2, LED3, LED4, LED5, LED6, LED7; + + top uut ( + .clk(clk), + .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); + repeat (10000) @(posedge clk); + $finish; + end +endmodule |