yosys/tests/arch/common/counter.v

12 lines
224 B
Verilog
Raw Normal View History

2021-06-09 05:16:33 -05:00
module top ( out, clk, reset );
output [7:0] out;
input clk, reset;
reg [7:0] out;
always @(posedge clk, posedge reset)
if (reset)
out <= 8'b0;
else
out <= out + 1;
endmodule