Advertisement
aristotel13

Untitled

Dec 5th, 2019
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.92 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.std_logic_unsigned.all;
  4.  
  5. entity vjezba_tb is
  6. end entity;
  7.  
  8. architecture Test_tb of vjezba_tb is
  9.    
  10.     signal sA : std_logic_vector(2 downto 0 );
  11.     signal sB : std_logic_vector(4 downto 0 );
  12.     signal sC : std_logic_vector(7 downto 0 );
  13.     signal sSEL : std_logic_vector(3 downto 0 );
  14.     signal sRESULT : std_logic_vector(7 downto 0);
  15.  
  16. component vjezba is
  17.     port (
  18.         iA : in std_logic_vector(2 downto 0 );
  19.         iB : in std_logic_vector(4 downto 0 );
  20.         iC : in std_logic_vector(7 downto 0 );
  21.         iSEL : in std_logic_vector(3 downto 0 );
  22.         oRESULT : out std_logic_vector(7 downto 0)
  23.        
  24.     );
  25.     end component;
  26.    
  27.     begin
  28.    
  29.     uut: vjezba port map(
  30.         iA => sA,
  31.         iB => sB,
  32.         iC => sC,
  33.         iSEL => sSEL,
  34.         oRESULT => sRESULT
  35.     );
  36.    
  37.     stimulus: process
  38.     begin
  39.    
  40.     sA<= "111";
  41.     sB <= "00001";
  42.     sC <= "10110101";
  43.     sSEL <= "0001";
  44.     wait;
  45.    
  46.     end process;
  47. end architecture;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement