網(wǎng)站制作NEWS
SCROLL
那個VHDL開發(fā)板~~怎么用quartus編程~~編出一個led燈每隔一秒閃一次啊~~
ENTITY LED IS
PORT(clk: IN BIT; -- 假設(shè)clk為2Hz,周期0.5秒
led_out: OUT BIT);
END LED;
ARCHITECTURE behav OF LED IS
SIGNAL q: BIT;
BEGIN
PROCESS(clk)
BEGIN
IF (clk‘Event AND clk='1') THEN
q <= NOT q;
END IF;
END PROCESS;
led <= q;
END behav;
如果你的時鐘信號頻率比較高,再設(shè)計一個分頻器,將其頻率降為2Hz即可。
多重隨機標(biāo)簽