(FPGA) EPM240T100C5N >> VHDL
LED
File > New Project Wizard...
Next
Next
Next
EPM240T100C5
Next
Finish
File > New...
VHDL
程式碼如下:
library ieee; use ieee.std_logic_1164.all; entity main is port( btn: in bit; led: out bit); end main; architecture logic of main is begin led<= btn; end logic;
相較於Verilog語言,VHDL會比較嚴謹且語法比較偏向Pascal語言,上例就是把btn輸入當做led輸出
Assignments > Pin Planner
指定Pin腳位
Processing > Start Compilation
編譯結果
Tools > Programmer
Hardware Setup...
USB-Blaster
勾選後,才可以按下Start燒錄
按下Start燒錄
P.S. *.sof檔案是存於RAM,而*.pof則是燒到flash,因此,如要開機後還可以執行,則需要使用*.pof檔案燒錄
完成