No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Test_Pipeline.vhd 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ----------------------------------------------------------------------------------
  2. -- Company:
  3. -- Engineer:
  4. --
  5. -- Create Date: 19.04.2021 17:35:57
  6. -- Design Name:
  7. -- Module Name: Test_Pipeline - Behavioral
  8. -- Project Name:
  9. -- Target Devices:
  10. -- Tool Versions:
  11. -- Description:
  12. --
  13. -- Dependencies:
  14. --
  15. -- Revision:
  16. -- Revision 0.01 - File Created
  17. -- Additional Comments:
  18. --
  19. ----------------------------------------------------------------------------------
  20. library IEEE;
  21. use IEEE.STD_LOGIC_1164.ALL;
  22. -- Uncomment the following library declaration if using
  23. -- arithmetic functions with Signed or Unsigned values
  24. --use IEEE.NUMERIC_STD.ALL;
  25. -- Uncomment the following library declaration if instantiating
  26. -- any Xilinx leaf cells in this code.
  27. --library UNISIM;
  28. --use UNISIM.VComponents.all;
  29. entity Test_Pipeline is
  30. -- Port ( );
  31. end Test_Pipeline;
  32. architecture Behavioral of Test_Pipeline is
  33. component Pipeline is
  34. Generic (Nb_bits : Natural := 8;
  35. Instruction_En_Memoire_Size : Natural := 29;
  36. Addr_Memoire_Instruction_Size : Natural := 3;
  37. Memoire_Instruction_Size : Natural := 8;
  38. Instruction_Bus_Size : Natural := 5;
  39. Nb_Instructions : Natural := 32;
  40. Nb_Registres : Natural := 16;
  41. Memoire_Size : Natural := 32;
  42. Memoire_Adresses_Retour_Size : Natural := 16;
  43. Adresse_Memoire_Adresses_Retour_Size : Natural := 4);
  44. Port (CLK : STD_LOGIC;
  45. RST : STD_LOGIC;
  46. STD_IN : in STD_LOGIC_VECTOR (Nb_bits - 1 downto 0);
  47. STD_OUT : out STD_LOGIC_VECTOR (Nb_bits - 1 downto 0));
  48. end component;
  49. signal my_CLK : STD_LOGIC := '0';
  50. signal my_RST : STD_LOGIC := '1';
  51. signal my_STD_IN : STD_LOGIC_VECTOR (8 - 1 downto 0) := (others => '0');
  52. signal my_STD_OUT : STD_LOGIC_VECTOR (8 - 1 downto 0) := (others => '0');
  53. constant CLK_period : time := 10 ns;
  54. begin
  55. instance : Pipeline
  56. port map (CLK => my_CLK,
  57. RST => my_RST,
  58. STD_IN => my_STD_IN,
  59. STD_OUT => my_STD_OUT);
  60. CLK_process :process
  61. begin
  62. my_CLK <= '1';
  63. wait for CLK_period/2;
  64. my_CLK <= '0';
  65. wait for CLK_period/2;
  66. end process;
  67. process
  68. begin
  69. my_RST <= '0' after 34 ns, '1' after 57 ns;
  70. wait;
  71. end process;
  72. end Behavioral;