Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. -- Copyright (C) 2018 Intel Corporation. All rights reserved.
  2. -- Your use of Intel Corporation's design tools, logic functions
  3. -- and other software and tools, and its AMPP partner logic
  4. -- functions, and any output files from any of the foregoing
  5. -- (including device programming or simulation files), and any
  6. -- associated documentation or information are expressly subject
  7. -- to the terms and conditions of the Intel Program License
  8. -- Subscription Agreement, the Intel Quartus Prime License Agreement,
  9. -- the Intel FPGA IP License Agreement, or other applicable license
  10. -- agreement, including, without limitation, that your use is for
  11. -- the sole purpose of programming logic devices manufactured by
  12. -- Intel and sold by Intel or its authorized distributors. Please
  13. -- refer to the applicable agreement for further details.
  14.  
  15. -- ***************************************************************************
  16. -- This file contains a Vhdl test bench template that is freely editable to
  17. -- suit user's needs .Comments are provided in each section to help the user
  18. -- fill out necessary details.
  19. -- ***************************************************************************
  20. -- Generated on "12/11/2019 09:24:30"
  21.  
  22. -- Vhdl Test Bench template for design : oppg1_SynkOgPuls
  23. --
  24. -- Simulation tool : ModelSim-Altera (VHDL)
  25. --
  26.  
  27. LIBRARY ieee;
  28. USE ieee.std_logic_1164.all;
  29.  
  30. ENTITY oppg1_SynkOgPuls_vhd_tst IS
  31. END oppg1_SynkOgPuls_vhd_tst;
  32. ARCHITECTURE oppg1_SynkOgPuls_arch OF oppg1_SynkOgPuls_vhd_tst IS
  33. -- constants
  34. -- signals
  35. SIGNAL adresse : STD_LOGIC_VECTOR(7 DOWNTO 0);
  36. SIGNAL brytere : STD_LOGIC_VECTOR(7 DOWNTO 0);
  37. SIGNAL clock_50 : STD_LOGIC;
  38. SIGNAL reset : STD_LOGIC;
  39. SIGNAL status : STD_LOGIC_VECTOR(2 DOWNTO 0);
  40. SIGNAL status_pf : STD_LOGIC_VECTOR(2 DOWNTO 0);
  41.  
  42. signal key0 : std_logic;
  43. COMPONENT oppg1_SynkOgPuls
  44. PORT (
  45. adresse : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
  46. brytere : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
  47. clock_50 : IN STD_LOGIC;
  48. reset : IN STD_LOGIC;
  49. status : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
  50. status_pf : OUT STD_LOGIC_VECTOR(2 DOWNTO 0)
  51. );
  52. END COMPONENT;
  53. BEGIN
  54. i1 : oppg1_SynkOgPuls
  55. PORT MAP (
  56. -- list connections between master ports and signals
  57. adresse => adresse,
  58. brytere => brytere,
  59. clock_50 => clock_50,
  60. reset => reset,
  61. status => status,
  62. status_pf => status_pf
  63. );
  64.  
  65. status(0) <= key0;
  66. status(1) <= '1';
  67. status(2) <= '1';
  68.  
  69. klokke : process
  70. begin
  71. clock_50 <= '0';
  72. loop
  73. wait for 10 ns;
  74. clock_50 <= not clock_50;
  75. end loop;
  76. wait;
  77. end process klokke;
  78.  
  79. rst : process
  80. begin
  81.  
  82. reset <= '0';
  83. for i in 1 to 2 loop
  84. wait until clock_50 ='1';
  85. end loop;
  86. reset <= '1';
  87.  
  88. wait;
  89. end process rst;
  90.  
  91.  
  92. status_og_brytere : PROCESS
  93. -- variable declarations
  94. BEGIN
  95. brytere(7 downto 0) <= "11000011";
  96. wait for 300 ns; brytere(7 downto 0) <= not brytere(7 downto 0);
  97.  
  98. key0 <= '1', '0' after 350 ns, '1' after 500 ns;
  99. WAIT;
  100. END PROCESS status_og_brytere;
  101. always : PROCESS
  102. -- optional sensitivity list
  103. -- ( )
  104. -- variable declarations
  105. BEGIN
  106. -- code executes for every event on sensitivity list
  107. WAIT;
  108. END PROCESS always;
  109. END oppg1_SynkOgPuls_arch;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement