Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

FPGA reset asynchronous or synchronous?

I normally reset all my d-types using their asynchronous input. I have done this for a long time without any issues.

The other day I was chatting to someone else and he said it is best practice not to use the asynchronous input but use a synchronous reset instead. But he didn't know why. The problem I see with synchronous reset is it could make the set-up and hold time longer.

Does anyone have any comments or advice on this subject?

Thanks in advance.

geobyjmh

15 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Sorry, could you elaborate what you mean by gating?

    --- Quote End ---

    For synchronous reset the reset signal is ANDed with D input such that either D passes or reset value. This is required per each flip.

    So whether a lab wide route is available or not this gating will be needed (unlike wiring rst to the async port)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    There is some dedicated hardware for doing the synchronous clear, but it's in there already. Actually, at least on older architectures, it wasn't a simple AND gate. Instead, something else was done to give the D input priority, so that it wasn't slowed down by the synchronous clear, which an AND gate would do. I don't remember the exact details and don't know if it's still done. It was probably only a 100ps savings to your datapath, but an interesting way to do it.

    (I believe in the Resource Property Editor the synchronous clear is shown as an AND gate, but that may be to simplify the picture)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Ok thanks. I imagine some tricky ways could be done such as switching off D inputs at some level and applying tristate on reset signal at source.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you for all your replies. This has helped me enormously :-)

    Based on this post I did some searching and PietervanderStar suggested the best approach to resetting your FPGA.

    I have written a blog post on what I have found: http://geobyjmhembeddedengineer.blogspot.co.uk/2014/06/reseting-my-nios-ii.html

    But the most helpful reference is the Altera - Recommended Design Practices found: http://www.altera.co.uk/literature/hb/qts/qts_qii51006.pdf

    A summary is as follows:

    The asynchronous reset is the simplest to implement and is probably the most common type of reset used in an FPGA design. The advantage of this kind of reset is it does not need to insert any extra logic in the data path and therefore will not inadvertently increase the logic layers between d-types in an RTL stage. This means that asynchronous reset will not impact on the data arrival time to a register input. The other big advantage of an asynchronous reset is that the reset will take effect immediately i.e. it is not dependent on the clock.

    But there is a very big disadvantage to using asynchronous resets! You cannot guarantee that the resets for all the d-types will be released in the same clock cycle. This create the small possibility of you design not coming out of reset in the way that was predicted. This could cause an intermittent fault that is tricky to track down.

    However there is a down side to synchronous resets. Your design will be more complex and you create the risk of adding additional gate delays to accommodate the reset signal. This will produce a negative impact on the d-types set-up slack time.

    This design avoids the potential problems associated with synchronous reset and purely asynchronous reset. The reset is applied asynchronously and immediately. It also does not create the additional logic we have seen with the synchronous design. However the one big advantage is that when the reset is released, it is synchronous to the clock. This mean that all the registers will be reset in the same clock cycle. You can also use static timing analysis to prove your timings.

    Thanks again for all your help

    geobyjmh