From 51155ec6a76617bcd1b96c242879e6c75ce5d78b Mon Sep 17 00:00:00 2001 From: David Shah Date: Sat, 8 Dec 2018 14:37:12 +0000 Subject: ci: Add attosoc smoketest for ice40 Signed-off-by: David Shah --- ice40/smoketest/attosoc/attosoc_tb.v | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 ice40/smoketest/attosoc/attosoc_tb.v (limited to 'ice40/smoketest/attosoc/attosoc_tb.v') 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 -- cgit v1.2.3