From d635f8adaa40ca1e52c5da7b71d70284d6aef7dc Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 26 Oct 2013 22:29:40 +0200 Subject: Renamed techlibs/xilinx7 to techlibs/xilinx --- techlibs/xilinx/counter.v | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 techlibs/xilinx/counter.v (limited to 'techlibs/xilinx/counter.v') diff --git a/techlibs/xilinx/counter.v b/techlibs/xilinx/counter.v new file mode 100644 index 00000000..72208bd8 --- /dev/null +++ b/techlibs/xilinx/counter.v @@ -0,0 +1,12 @@ +module counter (clk, rst, en, count); + + input clk, rst, en; + output reg [3:0] count; + + always @(posedge clk) + if (rst) + count <= 4'd0; + else if (en) + count <= count + 4'd1; + +endmodule -- cgit v1.2.3