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.

pipeline.vhd 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ----------------------------------------------------------------------------------
  2. -- Company:
  3. -- Engineer:
  4. --
  5. -- Create Date: 13:45:17 04/16/2021
  6. -- Design Name:
  7. -- Module Name: 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 primitives in this code.
  27. --library UNISIM;
  28. --use UNISIM.VComponents.all;
  29. entity pipeline is
  30. Port ( OP_IN : in STD_LOGIC_VECTOR (7 downto 0);
  31. A_IN : in STD_LOGIC_VECTOR (7 downto 0);
  32. B_IN : in STD_LOGIC_VECTOR (7 downto 0);
  33. C_IN : in STD_LOGIC_VECTOR (7 downto 0);
  34. CLK : in STD_LOGIC;
  35. EN : in STD_LOGIC;
  36. OP_OUT : out STD_LOGIC_VECTOR (7 downto 0);
  37. A_OUT : out STD_LOGIC_VECTOR (7 downto 0);
  38. B_OUT : out STD_LOGIC_VECTOR (7 downto 0);
  39. C_OUT : out STD_LOGIC_VECTOR (7 downto 0));
  40. end pipeline;
  41. architecture Behavioral of pipeline is
  42. begin
  43. process
  44. begin
  45. wait until rising_edge(CLK);
  46. if (EN = '1') then
  47. OP_OUT <= OP_IN;
  48. A_OUT <= A_IN;
  49. B_OUT <= B_IN;
  50. C_OUT <= C_IN;
  51. else
  52. OP_OUT <= "00000000";
  53. A_OUT <= "00000000";
  54. B_OUT <= "00000000";
  55. C_OUT <= "00000000";
  56. end if;
  57. end process;
  58. end Behavioral;