OpenFPGA/openfpga_flow/benchmarks/micro_benchmark/counter/counter.v

17 lines
306 B
Coq
Raw Normal View History

module counter(clk_counter, q_counter, rst_counter);
2020-07-22 13:33:52 -05:00
input clk_counter;
input rst_counter;
output [7:0] q_counter;
reg [7:0] q_counter;
always @ (posedge clk_counter)
begin
if(rst_counter)
q_counter <= 8'b00000000;
else
q_counter <= q_counter + 1;
end
endmodule