From 087728bc8b86f5e3823a41f23f229ddb9716107a Mon Sep 17 00:00:00 2001 From: gianmarcogirau Date: Tue, 25 Feb 2020 12:51:33 +0000 Subject: [PATCH] Added reset synchronization stage to prevent violating recovery timing --- .../comms_unique_id/src/comms_avalon_unique_id.vhd | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/generic_ip/comms_unique_id/src/comms_avalon_unique_id.vhd b/generic_ip/comms_unique_id/src/comms_avalon_unique_id.vhd index f081c89..d9b5707 100644 --- a/generic_ip/comms_unique_id/src/comms_avalon_unique_id.vhd +++ b/generic_ip/comms_unique_id/src/comms_avalon_unique_id.vhd @@ -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 );