Button-controlled LED for Sipeed Tang Primer 25K FPGA board
This board from Chinese company Sipeed uses a Gowin FPGA from their top of the range Arora V 22nm family - the GW5A-LV25MG121 - mounted on a tiny plug-in module with an SPI flash memory chip. The module plugs into a dock board fitted with a 40-pin connector and three 12-way sockets. The 40-pin connector is intended for an SRAM board and the 12-way sockets take PMOD modules. They are connected directly to the FPGA so they can be used as general I/O.
Sipeed also sells a kit with a selection of PMOD modules and an SRAM board.
You can buy the board and PMOD kit here:
https://a.aliexpress.com/_EQqvF4N
Uses button S1 and DONE LED.
VHDL code (I called the file led_btn.vhd)
use IEEE.STD_LOGIC_1164.ALL;
entity led_btn is
Port ( btn : in STD_LOGIC;
led : out STD_LOGIC);
end led_btn;
architecture Behavioral of led_btn is
begin
led <= not btn;
end Behavioral;
Physical constraints (I called the file led_btn.cst)
IO_LOC "led" D7;
IO_LOC "btn" H11;
IO_PORT "btn" PULL_MODE=DOWN BANK_VCCIO=3.3;
IO_LOC "led" D7;
IO_LOC "btn" H11;
IO_PORT "btn" PULL_MODE=DOWN BANK_VCCIO=3.3;
.
You need to enable the DONE LED:
In Gowin IDE check this
Project -> Configuration -> Place & Route -> Dual-Purpose Pin
Project -> Configuration -> Place & Route -> Dual-Purpose Pin
Comments
Post a Comment