Advertisement
Vedro

Gray_test

Mar 10th, 2019
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 2.38 KB | None | 0 0
  1. --------------------------------------------------------------------------------
  2. -- Company:
  3. -- Engineer:
  4. --
  5. -- Create Date:   12:21:48 03/10/2019
  6. -- Design Name:  
  7. -- Module Name:   C:/ZapiskiStudenckie/Gray/Gray_test.vhd
  8. -- Project Name:  Gray
  9. -- Target Device:  
  10. -- Tool versions:  
  11. -- Description:  
  12. --
  13. -- VHDL Test Bench Created by ISE for module: Gray_kod
  14. --
  15. -- Dependencies:
  16. --
  17. -- Revision:
  18. -- Revision 0.01 - File Created
  19. -- Additional Comments:
  20. --
  21. -- Notes:
  22. -- This testbench has been automatically generated using types std_logic and
  23. -- std_logic_vector for the ports of the unit under test.  Xilinx recommends
  24. -- that these types always be used for the top-level I/O of a design in order
  25. -- to guarantee that the testbench will bind correctly to the post-implementation
  26. -- simulation model.
  27. --------------------------------------------------------------------------------
  28. LIBRARY ieee;
  29. USE ieee.std_logic_1164.ALL;
  30.  
  31. -- Uncomment the following library declaration if using
  32. -- arithmetic functions with Signed or Unsigned values
  33. --USE ieee.numeric_std.ALL;
  34.  
  35. ENTITY Gray_test IS
  36. END Gray_test;
  37.  
  38. ARCHITECTURE behavior OF Gray_test IS
  39.  
  40.     -- Component Declaration for the Unit Under Test (UUT)
  41.  
  42.     COMPONENT Gray_kod
  43.     PORT(
  44.          CLK : IN  std_logic;
  45.          RST : IN  std_logic;
  46.          LED_0 : OUT  std_logic;
  47.          LED_1 : OUT  std_logic);
  48.     END COMPONENT;
  49.    
  50.  
  51.    --Inputs
  52.    signal CLK : std_logic := '0';
  53.    signal RST : std_logic := '0';
  54.  
  55.     --Outputs
  56.    signal LED_0 : std_logic;
  57.    signal LED_1 : std_logic;
  58.  
  59.  
  60. BEGIN
  61.  
  62.     -- Instantiate the Unit Under Test (UUT)
  63.    uut: Gray_kod PORT MAP (
  64.           CLK => CLK,
  65.           RST => RST,
  66.           LED_0 => LED_0,
  67.           LED_1 => LED_1
  68.         );
  69.  
  70.  
  71.  
  72.    stim_proc: process
  73.    begin       
  74.  
  75.             CLK <= '1';
  76.             wait for 10 ns;
  77.             CLK <= '0';
  78.             wait for 10 ns;
  79.             CLK <= '1';
  80.             wait for 4 ns;
  81.             RST <= '1';
  82.             wait for 2 ns;
  83.             RST <= '0';
  84.             wait for 4 ns;
  85.             CLK <= '0';
  86.             wait for 10 ns;
  87.             CLK <= '1';
  88.             wait for 10 ns;
  89.             CLK <= '0';
  90.             wait for 10 ns;
  91.             CLK <= '1';
  92.             wait for 10 ns;
  93.             CLK <= '0';
  94.             wait for 10 ns;
  95.             CLK <= '1';
  96.             wait for 10 ns;
  97.             CLK <= '0';
  98.             wait for 10 ns;
  99.             CLK <= '1';
  100.             wait for 10 ns;
  101.             CLK <= '0';
  102.             wait for 10 ns;
  103.             CLK <= '1';
  104.             wait for 10 ns;
  105.             CLK <= '0';
  106.             wait;
  107.    end process;
  108.  
  109. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement