-
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.
ColorLight-5A-75B-V8: Ledon and Blinky examples added
- Loading branch information
Showing
8 changed files
with
64 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,17 @@ | ||
//------------------------------------------------------------------ | ||
//-- Blinking LED | ||
//------------------------------------------------------------------ | ||
|
||
module Test ( | ||
input CLK, // 25MHz clock | ||
output led, // LED to blink | ||
); | ||
|
||
reg [23:0] counter = 0; | ||
|
||
always @(posedge CLK) | ||
counter <= counter + 1; | ||
|
||
assign led = counter[23]; | ||
|
||
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,3 @@ | ||
[env] | ||
board = ColorLight-5A-75B-V8 | ||
|
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 @@ | ||
Blinking LED |
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,12 @@ | ||
# -- Board: ColorLight-5A-75E-V71_(FT2232H) | ||
|
||
# -- CLK | ||
LOCATE COMP "CLK" SITE "P6"; | ||
IOBUF PORT "CLK" PULLMODE=NONE IO_TYPE=LVCMOS33 DRIVE=4; | ||
|
||
# -- LED | ||
LOCATE COMP "led" SITE "T6"; | ||
IOBUF PORT "led" PULLMODE=NONE IO_TYPE=LVCMOS33 DRIVE=4; | ||
|
||
|
||
|
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 = ColorLight-5A-75B-V8 | ||
|
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 @@ | ||
Blinking LEDs D0-D5 |
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 @@ | ||
//-------------------------------------- | ||
//-- Turning on the LED | ||
//-------------------------------------- | ||
|
||
module top( | ||
output led, //-- LED | ||
); | ||
|
||
// -- The LED on the ColorLight-5A-75E works | ||
// -- with inverse logic: | ||
// -- 0: Turn on the LED | ||
// -- 1: Turn off the LED | ||
|
||
// Turn on the led | ||
// (output the bit 0 to the led) | ||
assign led = 1'b0; | ||
|
||
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 @@ | ||
# -- Board: ColorLight-5A-75E-V71_(FT2232H) | ||
|
||
# -- LED | ||
LOCATE COMP "led" SITE "T6"; | ||
IOBUF PORT "led" IO_TYPE=LVCMOS33; | ||
|
||
|
||
|