1
0
mirror of synced 2026-02-17 21:36:55 +00:00
Files
YosysHQ.yosys/techlibs/xilinx7/counter.v
2013-08-22 20:31:04 +02:00

13 lines
219 B
Verilog

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