2 use ieee.std_logic_1164.
all;
3 use ieee.numeric_std.
all;
5 entity bit_synchronizer
is
15 end entity bit_synchronizer
;
17 architecture arch
of bit_synchronizer
is
19 type PIPE
is array (LENGTH
- 1 downto 0) of std_logic;
21 signal bit_shift
: PIPE
;
25 LENGTH_OFF
: if (LENGTH
= 0) generate
31 LENGTH_ON
: if (LENGTH
/= 0) generate
33 sync
: process( clk
, rst
)
36 bit_shift
<= ((others => '0');
37 elsif rising_edge
(clk
) then
38 bit_shift
<= bit_shift
(bit_shift
'HIGH - 1 downto 0) & d
;
42 q
<= bit_shift
(bit_shift
'HIGH);