library ieee;
use ieee.std_logic_1164.all;
entity latch373 is
port(
d:in std_logic_vector(7 downto 0);
oe,g:in std_logic;
q0,q1,q2,q3,q4,q5,q6,q7:out std_logic
--q:out std_logic_vector(7 downto 0)
);
end latch373;
architecture rtl of latch373 is
signal q_temp: std_logic_vector(7 downto 0);
begin
q0<=q_temp(0);
q1<=q_temp(1);
q2<=q_temp(2);
q3<=q_temp(3);
q4<=q_temp(4);
q5<=q_temp(5);
q6<=q_temp(6);
q7<=q_temp(7);
process(oe,g,d)
begin
if(oe='0')then
if(g='1')then
q_temp<=d;
end if;
else
q_temp<="ZZZZZZZZ";%Z的大小写报的错误不一样;想知道为什么;
end if;
end process;
end rtl;
文章评论(0条评论)
登录后参与讨论