2020-07-22 14:17:05 -05:00
|
|
|
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
|