1 ------------------------------------------------------------------------------- 2 -- File : RegisterVector.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2017-04-15 5 -- Last update: 2017-06-05 6 ------------------------------------------------------------------------------- 7 -- Description: 1 c-c register delay 8 ------------------------------------------------------------------------------- 9 -- This file is part of 'SLAC Firmware Standard Library'. 10 -- It is subject to the license terms in the LICENSE.txt file found in the 11 -- top-level directory of this distribution and at: 12 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 13 -- No part of 'SLAC Firmware Standard Library', including this file, 14 -- may be copied, modified, propagated, or distributed except according to 15 -- the terms contained in the LICENSE.txt file. 16 ------------------------------------------------------------------------------- 19 use ieee.std_logic_1164.
all;
20 use ieee.std_logic_unsigned.
all;
21 use ieee.std_logic_arith.
all;
26 --! @ingroup base_general 36 en : in sl := '1';
-- Optional clock enable 38 reg_o :
out slv(WIDTH_G-1
downto 0));
39 end entity RegisterVector;
45 type RegType is record 46 reg : slv(WIDTH_G-1
downto 0);
49 constant REG_INIT_C : RegType := ( 52 signal r : RegType := REG_INIT_C;
60 -- Latch the current value 63 -- Check the clock enable 65 -- Register/Delay for 1 clock cycle 73 -- Register the variable for next clock cycle 80 seq :
process (
clk)
is 82 if (rising_edge(clk)) then in sig_islv( WIDTH_G- 1 downto 0)
in rstsl :=not RST_POLARITY_G