-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[env] | ||
board = iCE40-UP5K | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
module rgb_test (input clk, | ||
output led_blue, | ||
output led_green, | ||
output led_red); | ||
|
||
|
||
//-- Modify this value for changing the blink frequency | ||
localparam N = 24; //-- N<=21 Fast, N>=23 Slow | ||
|
||
reg [N:0] counter; | ||
always @(posedge clk) | ||
counter <= counter + 1; | ||
|
||
assign led_green = counter[N]; | ||
assign led_blue = counter[N-1]; | ||
assign led_red = counter[N-2]; | ||
|
||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
set_io --warn-no-port led_blue 39 | ||
set_io --warn-no-port led_green 40 | ||
set_io --warn-no-port led_red 41 | ||
set_io --warn-no-port clk 35 | ||
|
||
|
||
|