aboutsummaryrefslogtreecommitdiffstats
path: root/examples/gowin/demo.v
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gowin/demo.v')
-rw-r--r--examples/gowin/demo.v9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/gowin/demo.v b/examples/gowin/demo.v
index e1a2f19ec..6ea108384 100644
--- a/examples/gowin/demo.v
+++ b/examples/gowin/demo.v
@@ -1,11 +1,12 @@
module demo (
input clk,
- output led1, led2, led3, led4, led5, led6, led7, led8,
- output led9, led10, led11, led12, led13, led14, led15, led16
+ input [3:0] sw,
+ output [15:0] leds,
+ output [7:0] seg7dig,
+ output [3:0] seg7sel
);
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];
+ assign leds = 1 << counter[PRESCALE +: 4];
endmodule