Quartus® Prime Pro Edition User Guide: Timing Analyzer

ID 683243
Date 11/26/2024
Public
Document Table of Contents

3.2.2.1. Resolve Violation: Asynchronous Reset Is Not Synchronized

The following steps describe how to resolve the RES-50001 Asynchronous Reset Is Not Synchronized DRC violation that occurs for the RDC Example:

Figure 247. Design Assistant Identifies Asynchronous Reset


  1. In the Design Assistant, right-click the RES-50001 violation, then click Report Asynchronous CDC. The report shows the topology of RDCs, including improperly synchronized destination nodes grouped under the Register Reset by Unsynchronized Signal category.
    Figure 248. Report Asynchronous CDC - Register Reset by Unsynchronized Signal


  2. Take corrective action to implement reset synchronizers. The topology of a reset synchronizer typically consists of a series of D flipflops set by the asynchronous reset, as the following diagram shows:
    Figure 249. Reset Synchronizers


    The following examples define a three-stage synchronizer for a reset signal in Verilog and VHDL:

    Three-Stage Synchronizer for Reset (Verilog HDL)

    module reset_synchronizer (
        input wire clk,          // Clock signal of the destination domain
        input wire async_reset,  // Asynchronous reset signal from the source domain
        output reg sync_reset    // Synchronized reset signal for the destination domain
    );
     
    reg [2:0] reset_ff; // 3 flip-flops for the synchronizer chain
     
    always @(posedge clk or posedge async_reset) begin
        if (async_reset) begin
            reset_ff <= 3'b111; // Assert the synchronizer flip-flops
        end else begin
            reset_ff[0] <= 1'b0;       // First stage
            reset_ff[1] <= reset_ff[0]; // Second stage
            reset_ff[2] <= reset_ff[1]; // Third stage
        end
        sync_reset <= reset_ff[2]; // Output from the third stage
    end
     
    endmodule

    Three-Stage Synchronizer for Reset (VHDL)

    library IEEE;
    use IEEE.STD_LOGIC_1164.ALL;
     
    entity reset_synchronizer is
        Port (
            clk : in STD_LOGIC;           -- Clock signal of the destination domain
            async_reset : in STD_LOGIC;   -- Asynchronous reset signal from the source domain
            sync_reset : out STD_LOGIC    -- Synchronized reset signal for the destination domain
        );
    end reset_synchronizer;
     
    architecture Behavioral of reset_synchronizer is
        signal reset_ff : STD_LOGIC_VECTOR(2 downto 0); -- 3 flip-flops for the synchronizer chain
    begin
     
        process(clk, async_reset)
        begin
            if async_reset = '1' then
                reset_ff <= (others => '1'); -- Assert the synchronizer flip-flops
            elsif rising_edge(clk) then
                reset_ff(0) <= '0';          -- First stage
                reset_ff(1) <= reset_ff(0);  -- Second stage
                reset_ff(2) <= reset_ff(1);  -- Third stage
            end if;
            sync_reset <= reset_ff(2);      -- Output from the third stage
        end process;
     
    end Behavioral;
  3. After properly synchronizing the reset signal, Design Assistant and Report Asynchronous CDC identify the implemented topology under the Unconstrained Reset Synchronizer category.
    Figure 250. Design Assistant Results


    Figure 251. Unconstrained Reset Synchronizer in Report Asynchronous CDC


  4. Modify the .sdc timing constraints to ensure the synchronizer flipflops have sufficient time to stabilize the asynchronous reset signal and to ensure the setup and hold times are met for the flipflops within the synchronizer chain. The following is an example of the necessary timing constraints in SDC format:
    # Define the clock (assuming the clock name is clk for the destination domain)
    create_clock -name clk -period 10 [get_ports {clk_port_name}] # Adjust period according to actual clock period
     
    # Define the asynchronous reset (assuming the reset name is async_reset)
    set_false_path -from [get_ports {async_reset_port_name}] -to [get_registers RDC|reset_ff[*]]
  5. After modifying the RDC constraints, Report Asynchronous CDC reports this as a Compliant Reset Synchronizer.
    Figure 252. Compliant Reset Synchronizer


  6. Verify the RDC topology in the CDC Statistic tab.
    Figure 253. CDC Statistic Tab


    The following diagram shows how the design appears following these changes:

    Figure 254. Design After Violation Resolution