带三态输出的8位D寄存器:74374.txt
Upload User: easylife05
Upload Date: 2013-03-21
Package Size: 42k
Code Size: 1k
Development Platform:

C/C++

  1. -- Octal D-Type Register with 3-State Outputs
  2. -- Simple model of an Octal D-type register with three-state outputs using two concurrent statements.
  3. -- download from: www.fpga.com.cn & www.pld.com.cn
  4. LIBRARY ieee;
  5. USE ieee.std_logic_1164.ALL;
  6. ENTITY ttl374 IS
  7.    PORT(clock, oebar : IN std_logic; 
  8.         data : IN std_logic_vector(7 DOWNTO 0);
  9.         qout : OUT std_logic_vector(7 DOWNTO 0));
  10. END ENTITY ttl374;
  11. ARCHITECTURE using_1164 OF ttl374 IS
  12.    --internal flip-flop outputs
  13.    SIGNAL qint : std_logic_vector(7 DOWNTO 0);
  14. BEGIN
  15.    qint <= data WHEN rising_edge(clock); --d-type flip flops
  16.    qout <= qint WHEN oebar = '0' ELSE "ZZZZZZZZ"; --three-state buffers
  17. END ARCHITECTURE using_1164;