diff options
author | David Shah <davey1576@gmail.com> | 2018-12-08 14:37:12 +0000 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-12-08 17:09:27 +0000 |
commit | 51155ec6a76617bcd1b96c242879e6c75ce5d78b (patch) | |
tree | a25af6d06641a736147972c8a9afa83bfe42a397 /ice40/smoketest/attosoc/attosoc_tb.v | |
parent | 98d2fc6b101c8f8e4e3404cd083243da7bf2dfb2 (diff) | |
download | nextpnr-51155ec6a76617bcd1b96c242879e6c75ce5d78b.tar.gz nextpnr-51155ec6a76617bcd1b96c242879e6c75ce5d78b.tar.bz2 nextpnr-51155ec6a76617bcd1b96c242879e6c75ce5d78b.zip |
ci: Add attosoc smoketest for ice40
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/smoketest/attosoc/attosoc_tb.v')
-rw-r--r-- | ice40/smoketest/attosoc/attosoc_tb.v | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ice40/smoketest/attosoc/attosoc_tb.v b/ice40/smoketest/attosoc/attosoc_tb.v new file mode 100644 index 00000000..65496fcd --- /dev/null +++ b/ice40/smoketest/attosoc/attosoc_tb.v @@ -0,0 +1,32 @@ +module testbench(); + integer out; + reg clk; + + always #5 clk = (clk === 1'b0); + + initial begin + out = $fopen("output.txt","w"); + $dumpfile("testbench.vcd"); + $dumpvars(0, testbench); + + repeat (100) begin + repeat (256) @(posedge clk); + $display("+256 cycles"); + end + $fclose(out); + #100; + $finish; + end + + wire [7:0] led; + + always @(led) begin + #1 $display("%b", led); + $fwrite(out, "%b\n", led); + end + + attosoc uut ( + .clk (clk ), + .led (led ) + ); +endmodule |