summaryrefslogtreecommitdiffstats
path: root/mylib/counter_10.v
blob: 72c96faea41f9f2e17269a284ee04cc885a31b73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
`timescale 1ns / 100ps

module counter_10(clock,enable,count);

	parameter BIT_SZ = 10;
	input clock;
	input enable;
	output [BIT_SZ-1:0] count;
	
	reg [BIT_SZ-1:0] count;
	
	initial count = 0;
	
	always @ (posedge clock)
		if(enable == 1'b1)
			count <= count + 1'b1;
			
endmodule