2019-11-27 23:17:53 +08:00
|
|
|
module top(input clk, rst, output reg [7:0] leds);
|
2019-04-02 01:02:08 +08:00
|
|
|
|
2019-11-27 23:17:53 +08:00
|
|
|
reg [7:0] ctr;
|
2019-04-02 01:02:08 +08:00
|
|
|
always @(posedge clk)
|
2019-11-27 23:17:53 +08:00
|
|
|
if (rst)
|
|
|
|
ctr <= 8'h00;
|
|
|
|
else
|
|
|
|
ctr <= ctr + 1'b1;
|
2019-04-02 01:02:08 +08:00
|
|
|
|
2019-11-27 23:17:53 +08:00
|
|
|
assign leds = ctr;
|
2019-04-02 01:02:08 +08:00
|
|
|
|
2019-11-27 23:17:53 +08:00
|
|
|
endmodule
|