Advertisement
Guest User

VHDL

a guest
May 18th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 1.01 KB | None | 0 0
  1. LIBRARY ieee;
  2. USE ieee.std_logic_1164.ALL;
  3.  
  4. ENTITY TB IS
  5. END TB;
  6.  
  7. ARCHITECTURE behavior OF TB IS
  8.  
  9.     -- Component Declaration for the Unit Under Test (UUT)
  10.  
  11.     COMPONENT Beep
  12.  
  13.     PORT(
  14.          E : IN  std_logic;
  15.          Clk : IN  std_logic;
  16.          Start : OUT  std_logic;
  17.          Addr : OUT  std_logic_vector(3 downto 0);
  18.          Cmd : OUT  std_logic_vector(3 downto 0);
  19.          DATA : OUT  std_logic_vector(11 downto 0)
  20.         );
  21.  
  22.     END COMPONENT;
  23.  
  24.    --Inputs
  25.  
  26.    signal E : std_logic := '1';
  27.    signal Clk : std_logic := '0';
  28.  
  29.     --Outputs
  30.  
  31.    signal Start : std_logic;
  32.    signal Addr : std_logic_vector(3 downto 0);
  33.    signal Cmd : std_logic_vector(3 downto 0);
  34.    signal DATA : std_logic_vector(11 downto 0);
  35.  
  36. BEGIN
  37.  
  38.     -- Instantiate the Unit Under Test (UUT)
  39.  
  40.    uut: Beep PORT MAP (
  41.           E => E,
  42.           Clk => Clk,
  43.           Start => Start,
  44.           Addr => Addr,
  45.           Cmd => Cmd,
  46.           DATA => DATA
  47.         );
  48.        
  49.  
  50. Clk<=not Clk after 20ns;
  51.  
  52. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement