aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/carry_tests/counter.v
diff options
context:
space:
mode:
Diffstat (limited to 'ice40/carry_tests/counter.v')
-rw-r--r--ice40/carry_tests/counter.v9
1 files changed, 9 insertions, 0 deletions
diff --git a/ice40/carry_tests/counter.v b/ice40/carry_tests/counter.v
new file mode 100644
index 00000000..8906ff45
--- /dev/null
+++ b/ice40/carry_tests/counter.v
@@ -0,0 +1,9 @@
+module top(input clk, cen, rst, ina, inb, output outa, outb, outc, outd);
+
+ reg [3:0] ctr = 0;
+
+ always @(posedge clk)
+ ctr <= ctr + 1'b1;
+
+ assign {outa, outb, outc, outd} = ctr;
+endmodule