Reset Synchronizer


Need for reset synchronizer: The way most of the designs have been modelled needs asynchronous reset assertion and synchronous de-assertion. The requirement of most of the designs these days is:
  1. When reset is asserted, it propagates to all designs; brings them to reset state whether or not clock is toggling; i.e. assertion should be asynchronous
  2. When reset is deasserted, wait for a clock edge, and then, move the system to next state as per the FSM (Finite State Machine); i.e. deassertion should be synchronous
The top level reset sources are mostly asynchronous, both in assertion and during deassertion. The circuit that manipulates the asynchronous reset to have asynchronous assertion and synchronous deassertion is referred as reset synchronizer.

Definition of reset synchronizer: A reset synchronizer synchronizes the deassertion of reset with respect to the clock domain. In other words, a reset synchronizer manipulates the asynchronous reset to have synchronous deassetion.

Figure 1 below shows the schematic representation of how a reset synchronizer is built. It consists of two registers connected in series, the input of first register tied to VDD. The asynchronous reset signal is connected to the Rbar pin of both the register. The output of this circuit has synchronized de-assertion. This synchronised reset fans out to the design.

Figure 1: Reset synchronizer

How reset synchronizer works: When the reset is asserted, it first propagates to reset synchronizer flops. It resets both the flops of reset synchronizer asynchronously (without waiting for clock edge) thereby generating reset assertion for fanout registers. Figure 2 below shows the scenario of reset assertion, and also the timing waveforms associated with assertion of reset.

Figure 2: Reset assertion


Similarly, the de-assertion of reset first reaches the two flops of reset synchronizer. Now, the first flop in chain propagates 1 to intermediate output upon arrival of a clock edge. Upon next clock edge, this signal propagates to the output thereby reaching the fanout registers. The reset de-assertion timing (recovery and removal checks timing) should be met from second stage of reset synchronizer to all the domain registers' reset pins as the deassertion is synchronous.







Some facts about reset synchronizer:

  1. The reset synchronizer manipulates the originally asynchronous reset to have synchronous deassertion.
  2. The reset synchronizer must fanout to all the registers that need to be "OUT OF RESET" in a single cycle. And there must be a single synchronizer for all such flops, otherwise, some flops will be out of reset 2 cycles later, some 3 cycles later; thus, defeating the purpose of reset synchronization.
  3. There can, of course, be multiple reset synchronizers in the design, with the number equal to number of functional clock domains. Each reset synchronizer fans out to all the resettable flops of its own clock domain.
  4. The timing constraints related to a reset synchronizer are discussed here.
Also read:

14 comments:

  1. In Figure 2, how reset assertion combinationally causes the output of the second flop in reset synchronizer to go to zero?

    ReplyDelete
    Replies
    1. This is the basic property of a flip-flop with asynchronous reset. When reset is asserted, the flop's output goes zero. This is what is happening here. :-)

      Delete
    2. if reset is asserted (=1) you say the flops output goes to 0. Then in figure 3 is wrong, because the reset = 1 , then is asserted and then flops output goes to 0 right?. In figure 3 the reset shouldn't be 0 all the time ?

      Delete
    3. Reset assertion means (reset = 0) deassertion is (reset = 1). He is showing an example of active low reset, that is the circuit is driven low when the input is driven low.

      Delete
    4. The reset signal described in this article is active low, meaning, when reset is asserted, it has a value of 0 and when reset is deasserted, it has a value of 1. So Figure 3 is correct.

      Delete
  2. Do we need to use inverter at the input of each reset pin of functional domain FF

    ReplyDelete
    Replies
    1. It depends upon your design architecture actually. Let us suppose the flip-flops we are using are the ones with active low asynchronous reset. If the reset signal coming is also active low, we dont need to. In case the reset signal is active high, then, we need to use inverters. But that inverter will be common for all registers of that domain.

      Delete
    2. Also it saves ton of energy. Imagine, in a system where reset assertion means giving 1 on reset pin, to put system in reset you have to keep giving 1 in the system. That means even when system is under reset it uses a lot of power. Compared to this, when reset is active low, you just power off the domain and you can have 0 on the reset pin. POWER SAVED!

      Delete
  3. why do we need two stages here? When reset is de-asserted, we can propagate the reset to the fanouts with 1 clk cycle delay right? May be I am missing something. Can you please clarify?

    ReplyDelete
    Replies
    1. Hi

      Good question. The reason we use two flops is because the reset is asynchronous to the fanout flops. Thus, one stage is needed to absorb the metastability itself.

      Delete
  4. In Figure 3, for synchronizer flops, reset deassertion should be asynchronous right ? So why does the output change only when clock edge arrives ?

    ReplyDelete
    Replies
    1. Hi

      A reset synchronizer synchronizes the deassertion of reset. That is why, deassertion is shown with respect to clock edge and is now synchronous.

      Delete
  5. The synchronizer flop outputs change only at clock edges because that is the basic property of a flip-flop. Since reset is deasserted, the regular operation of a flip-flop occurs, which is to capture the value at its input pin on a clock edge (in this case, rising), and have it appear at the output pin.

    ReplyDelete
  6. Hi, what about the reset synchronisers if they are scan-flops, will it impact ATPG during shift?

    ReplyDelete

Thanks for your valuable inputs/feedbacks. :-)