yosys/examples/gowin/demo.v

13 lines
273 B
Coq
Raw Normal View History

2016-11-07 05:55:56 -06:00
module demo (
input clk,
2016-11-08 12:07:22 -06:00
input [3:0] sw,
output [15:0] leds,
output [7:0] seg7dig,
output [3:0] seg7sel
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