Steward
分享是一種喜悅、更是一種幸福
微處理器 - Altera 10M02SCM (STEP-MAX10 V1) - Quartus Prime - VHDL - LED
參考資訊:
https://www.stepfpga.com/doc/step-max10
main.vhd
library ieee;
use ieee.std_logic_1164.all;
entity main is
port(
clk : in std_logic;
led : out std_logic_vector(0 to 7) := "11111111"
);
end main;
architecture logic of main is
signal val: std_logic_vector(0 to 7) := "11111111";
signal clk_cnt : integer := 0;
begin
process(clk) is
begin
if (clk'event and clk = '1') then
clk_cnt <= clk_cnt + 1;
if (clk_cnt = 12000000) then
clk_cnt <= 0;
led <= val;
val <= not val;
end if;
end if;
end process;
end logic;
File => New Project Wizard

Name

Empty Project

加入main.vhd

選擇型號

Next

合成電路

設定腳位


編譯

編譯完成

Programmer


Auto Detect => Start

下載完成

P.S. *.sof檔案是存於RAM,而*.pof則是燒到flash,因此,如要開機後還可以執行,則需要使用*.pof檔案燒錄
完成
