Guest User

Untitled

a guest
Sep 18th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. --------------------------------------------------------------------------------
  2. -- Company:
  3. -- Engineer:
  4. --
  5. -- Create Date: 00:30:43 03/23/2012
  6. -- Design Name:
  7. -- Module Name: /home/neo/Projects/FPGA/CPUNV/TB.vhd
  8. -- Project Name: CPUNV
  9. -- Target Device:
  10. -- Tool versions:
  11. -- Description:
  12. --
  13. -- VHDL Test Bench Created by ISE for module: SistemaPrincipal
  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 TB IS
  36. END TB;
  37.  
  38. ARCHITECTURE behavior OF TB IS
  39.  
  40. -- Component Declaration for the Unit Under Test (UUT)
  41.  
  42. COMPONENT SistemaPrincipal
  43. PORT(
  44. clk : IN std_logic;
  45. SalPort : OUT std_logic_vector(15 downto 0)
  46. );
  47. END COMPONENT;
  48.  
  49.  
  50. --Inputs
  51. signal clk : std_logic := '0';
  52.  
  53. --Outputs
  54. signal SalPort : std_logic_vector(15 downto 0);
  55.  
  56. -- Clock period definitions
  57. constant clk_period : time := 10 ns;
  58.  
  59. BEGIN
  60.  
  61. -- Instantiate the Unit Under Test (UUT)
  62. uut: SistemaPrincipal PORT MAP (
  63. clk => clk,
  64. SalPort => SalPort
  65. );
  66.  
  67. -- Clock process definitions
  68. clk_process :process
  69. begin
  70. clk <= '0';
  71. wait for clk_period/2;
  72. clk <= '1';
  73. wait for clk_period/2;
  74. end process;
  75.  
  76.  
  77. -- Stimulus process
  78. stim_proc: process
  79. begin
  80. -- hold reset state for 100 ns.
  81. wait for 100 ns;
  82.  
  83. wait for clk_period*10;
  84.  
  85. -- insert stimulus here
  86.  
  87. wait;
  88. end process;
  89.  
  90. END;
Add Comment
Please, Sign In to add comment