yosys/examples/gowin/demo.v

11 lines
226 B
Verilog
Raw Permalink Normal View History

2016-11-07 05:55:56 -06:00
module demo (
input clk,
2019-09-04 09:29:40 -05:00
output [15:0] leds,
output unused
2016-11-07 05:55:56 -06:00
);
localparam PRESCALE = 20;
reg [PRESCALE+3:0] counter = 0;
always @(posedge clk) counter <= counter + 1;
2016-11-08 12:07:22 -06:00
assign leds = 1 << counter[PRESCALE +: 4];
2016-11-07 05:55:56 -06:00
endmodule