yosys/manual/FILES_StateOfTheArt/always02.v

16 lines
239 B
Coq
Raw Normal View History

2013-07-20 08:19:12 -05:00
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