Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- do you have any code yet? and what language are you trying to use? --- Quote End --- Hello. I have some code about it in VHDL,but I am not sure of it. the code is following. Do you have a better code than mine? Thanks alot. ---------------------------- library ieee; use ieee.std_logic_1164.all; entity tristate_dr is port( d_in: in std_logic_vector(7 downto 0); en: in std_logic; d_out:out std_logic_vector(7 downto 0) ); end tristate_dr; architecture behavior of tristate_dr is begin process(d_in, en) begin if en='1' then d_out <= d_in; else d_out <= "ZZZZZZZZ"; end if; end process; end behavior;