Advertisement
vmgustavo

Untitled

Nov 22nd, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.50 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3.  
  4. entity par_reg is
  5.     generic(
  6.             n: integer := 1
  7.             );
  8.    port(
  9.          clk  : in  std_logic;
  10.             en  : in std_logic;
  11.          pin   : in  std_logic_vector(n downto 0);
  12.          pout   : out std_logic_vector(n downto 0)
  13.         );
  14. end par_reg;
  15.  
  16. architecture arch of par_reg is
  17. begin
  18.    process (clk, en)
  19.    begin
  20.         if(en = '1') then
  21.        if (Clk'event and Clk='1') then
  22.            pout <= pin;
  23.        end if;
  24.         end if;
  25.    end process;
  26. end arch;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement