·上一文章:|VHDL实例|双向总线(注2)
·下一文章:[VHDL实例]解复用器
VHDL:Tri-State Buses
prebus.vhd
LIBRARY IEEE;
USE ieee.std_logIC_1164.ALL;
ENTITY prebus IS
PORT(
my_in : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
sel : IN STD_LOGIC;
my_out : OUT STD_LOGIC_VECTOR(7 DOWNTO 0));
END prebus;
ARCHITECTURE cpld OF prebus IS
BEGIN
my_out <= "ZZZZZZZZ"
WHEN (sel = '1')
ELSE my_in;
END cpld;