library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity lch is
port (d:in std_logic_vector(7 downto 0);
qut std_logic_vector(7 downto 0);
clk,oe: in std_logic );
end lch;
architecture a of lch is
signal qint: std_logic_vector(7 downto 0);
begin
process(clk)
begin
if clk'event and clk='1'then qint<=d;
end if;
if oe='0'then q<=qint;
else q<="ZZZZZZZZ";
end if;
end process;
end a;
首先,高阻态的Z必须用大写;其次,多字节时要用双引号。 |