diff options
author | David Shah <davey1576@gmail.com> | 2018-06-26 16:04:10 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-26 16:04:10 +0200 |
commit | 841d126672112e65450322c5f905bbf22b7dfa54 (patch) | |
tree | 5eed7149e47d668ccd38e4bfa281c537c2005ef5 /ice40/carry_tests/counter_tb.v | |
parent | 95de0a36b43776ffd07993ff7d2be994981aa8fb (diff) | |
download | nextpnr-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.v | 23 |
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 |