Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 1.57 KB | None | 0 0
  1. library ieee;
  2. use IEEE.Std_Logic_1164.all;
  3.  
  4.  
  5. entity tb_Config is
  6. end tb_Config;
  7.  
  8. entity secondDevice is
  9. end secondDevice;
  10.  
  11. architecture TEST of tb_Config is
  12.  
  13.   component secondDevice
  14.   port(D : in std_logic;
  15.        S, R, CLK: in std_logic;
  16.        Q: inout std_logic_vector ( 3 downto 0)
  17.     );
  18.   end component;
  19.  
  20. signal in_D, in_S, in_R, in_CLK: std_logic := '0';
  21. signal out_Q_BEH, out_Q_STR, out_Q_RTL : std_logic_vector ( 3 downto 0);  
  22.  
  23. begin
  24.  
  25. p1 : secondDevice port map(in_D, in_S, in_R, in_CLK, out_Q_BEH);
  26. p2 : secondDevice port map(in_D, in_S, in_R, in_CLK, out_Q_STR);
  27. p3 : secondDevice port map(in_D, in_S, in_R, in_CLK, out_Q_RTL);
  28. p4 : process
  29.      begin
  30.        in_D <= not in_D;
  31.        wait for 75 ns;
  32.      end process;
  33. p5 : process
  34.      begin
  35.        wait for 100 ns;    
  36.        in_S <= not in_S;   
  37.        wait for 20 ns;
  38.        in_S <= not in_S;
  39.        wait for 100 ns;
  40.      end process;
  41. p6 : process
  42.      begin
  43.        wait for 180 ns;
  44.        in_R <= not in_R;
  45.        wait for 20 ns;
  46.        in_R <= not in_R;
  47.        wait for 100 ns;
  48.      end process;
  49. p7 : process
  50.      begin
  51.        wait for 7 ns;
  52.        in_CLK <= not in_CLK;
  53.      end process;
  54. end TEST;
  55.  
  56.  
  57. library en41_belous_lab2;
  58. use en41_belous_lab2.all;
  59. configuration config1 of tb_Config is
  60.  for TEST
  61.  for p1 : secondDevice use entity en41_belous_lab2.secondDevice_RTL(RTL); end for;
  62.  for p2 : secondDevice use entity en41_belous_lab2.secondDevice_BEH(BEH); end for;
  63.  for p3 : secondDevice use entity en41_belous_lab2.secondDevice_STR(STR); end for;
  64.  end for;
  65. end configuration;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement