SOFA/BENCHMARK/counter/counter.v

17 lines
211 B
Coq
Raw Normal View History

module counter(clk, q, rst);
2020-11-17 14:55:47 -06:00
input clk;
input rst;
output [7:0] q;
reg [7:0] q;
2020-11-17 14:55:47 -06:00
always @ (posedge clk)
2020-11-17 14:55:47 -06:00
begin
if(rst)
q <= 8'b00000000;
2020-11-17 14:55:47 -06:00
else
q <= q + 1;
2020-11-17 14:55:47 -06:00
end
endmodule