aboutsummaryrefslogtreecommitdiffstats
path: root/manual/CHAPTER_StateOfTheArt/always02.v
blob: 63f1ce317993f0b231e3416a9d64007b59d18c5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module uut_always02(clock, reset, c3, c2, c1, c0);

input clock, reset;
output c3, c2, c1, c0;
reg [3:0] count;

assign {c3, c2, c1, c0} = count;

always @(posedge clock) begin
	count <= count + 1;
	if (reset)
		count <= 0;
end

endmodule