这个是流水灯程序,很简单,我看不懂,红色部分我看不明白,懂得的朋友帮我解释下。谢谢!
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY shift8 IS
PORT(clk: IN STD_LOGIC;
q: BUFFER STD_LOGIC_VECTOR (5 DOWNTO 0));
END shift8;
ARCHITECTURE fun OF shift8 IS
SIGNAL b:STD_LOGIC_VECTOR (5 DOWNTO 0):="100000";
BEGIN
PROCESS(clk)
BEGIN
IF(clk'EVENT AND clk='1')
THEN
b<=b(0)&b(5 DOWNTO 1);
q<=b;
END IF;
END PROCESS;
END fun; |