aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/carry_tests/counter_tb.v
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-26 16:04:10 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-26 16:04:10 +0200
commit841d126672112e65450322c5f905bbf22b7dfa54 (patch)
tree5eed7149e47d668ccd38e4bfa281c537c2005ef5 /ice40/carry_tests/counter_tb.v
parent95de0a36b43776ffd07993ff7d2be994981aa8fb (diff)
downloadnextpnr-841d126672112e65450322c5f905bbf22b7dfa54.tar.gz
nextpnr-841d126672112e65450322c5f905bbf22b7dfa54.tar.bz2
nextpnr-841d126672112e65450322c5f905bbf22b7dfa54.zip
CarryInSet added to bitstream gen, add counter tb
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/carry_tests/counter_tb.v')
-rw-r--r--ice40/carry_tests/counter_tb.v23
1 files changed, 23 insertions, 0 deletions
diff --git a/ice40/carry_tests/counter_tb.v b/ice40/carry_tests/counter_tb.v
new file mode 100644
index 00000000..ede133a7
--- /dev/null
+++ b/ice40/carry_tests/counter_tb.v
@@ -0,0 +1,23 @@
+module counter_tb;
+ reg clk;
+ always #5 clk = (clk === 1'b0);
+
+ wire outa, outb, outc, outd;
+
+ chip uut (
+ .clk(clk),
+ .cen(1'b1),
+ .rst(1'b0),
+ .outa(outa),
+ .outb(outb),
+ .outc(outc),
+ .outd(outd)
+ );
+
+ initial begin
+ $dumpfile("counter_tb.vcd");
+ $dumpvars(0, counter_tb);
+ repeat (100000) @(posedge clk);
+ $finish;
+ end
+endmodule