mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 13:18:56 +00:00
Added examples/gowin/
This commit is contained in:
parent
ef603c6fe1
commit
84badc97b3
6 changed files with 57 additions and 0 deletions
11
examples/gowin/demo.v
Normal file
11
examples/gowin/demo.v
Normal file
|
@ -0,0 +1,11 @@
|
|||
module demo (
|
||||
input clk,
|
||||
output led1, led2, led3, led4, led5, led6, led7, led8,
|
||||
output led9, led10, led11, led12, led13, led14, led15, led16
|
||||
);
|
||||
localparam PRESCALE = 20;
|
||||
reg [PRESCALE+3:0] counter = 0;
|
||||
always @(posedge clk) counter <= counter + 1;
|
||||
assign {led1, led2, led3, led4, led5, led6, led7, led8,
|
||||
led9, led10, led11, led12, led13, led14, led15, led16} = 1 << counter[PRESCALE +: 4];
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue