diff options
Diffstat (limited to 'tests/arch/common/counter.v')
-rw-r--r-- | tests/arch/common/counter.v | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/arch/common/counter.v b/tests/arch/common/counter.v new file mode 100644 index 000000000..9746fd701 --- /dev/null +++ b/tests/arch/common/counter.v @@ -0,0 +1,11 @@ +module top ( out, clk, reset );
+ output [7:0] out;
+ input clk, reset;
+ reg [7:0] out;
+
+ always @(posedge clk, posedge reset)
+ if (reset)
+ out <= 8'b0;
+ else
+ out <= out + 1;
+endmodule
|