Added reset synchronization stage to prevent violating recovery timing

This commit is contained in:
gianmarcogirau 2020-02-25 12:51:33 +00:00
commit 087728bc8b

View file

@ -33,14 +33,26 @@ architecture rtl of comms_avalon_unique_id is
end component;
signal data_valid : std_logic;
signal rst_i, rst : std_logic;
signal chip_id : std_logic_vector(63 downto 0);
begin
pRST_SYNC : process(rst_n, clk)
begin
if(rst_n = '0') then
rst_i <= '1';
rst <= '1';
elsif(clk = '1' and clk'event) then
rst_i <= '0';
rst <= rst_i;
end if;
end process pRST_SYNC;
u_chip_ID : unique_chip_ID
port map(
clkin => clk,
reset => not rst_n,
reset => rst,
data_valid => data_valid,
chip_id => chip_id
);