aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ecp5/counter.v
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ecp5/counter.v')
-rw-r--r--tests/ecp5/counter.v17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ecp5/counter.v b/tests/ecp5/counter.v
new file mode 100644
index 000000000..52852f8ac
--- /dev/null
+++ b/tests/ecp5/counter.v
@@ -0,0 +1,17 @@
+module top (
+out,
+clk,
+reset
+);
+ output [7:0] out;
+ input clk, reset;
+ reg [7:0] out;
+
+ always @(posedge clk, posedge reset)
+ if (reset) begin
+ out <= 8'b0 ;
+ end else
+ out <= out + 1;
+
+
+endmodule