Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • RTL Foundations36
  • Combinational Design25
  • Sequential Design27
  • FSM & Control27
  • Timing & Clocking39
  • Reset & CDC34
    • Reset Architecture
    • Metastability and Synchronisation
    • Asynchronous FIFO
      • Why an Async FIFO Is the Standard
      • Pointers and Gray Conversion
      • Full, Empty and the Complete Design
      • Almost Full and Almost Empty
      • Reset and Initialisation
      • Verification and CDC Closure
      • Sizing a FIFO, End to End
    • CDC Protocols
    • Reset Domain Crossing
    • CDC Verification
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹Asynchronous FIFO
  1. Topics
  2. RTL Design
  3. Reset & CDC
  4. Asynchronous FIFO
  5. Reset and Initialisation

Part 6 · Reset & CDC · Intermediate

Reset and Initialisation

Resetting both FIFO domains together, with synchronised resets held long enough to flush.

On this page

    Why this matters

    Reset only the read side and the read pointer returns to 0 while the write pointer sits somewhere else. The FIFO then reports a wrong occupancy for ever, and a reset that arrives mid-burst on one side corrupts it the same way.

    After this lesson you can: reset both sides of an async FIFO safely: state the reset values, the hold time, and what the producer and consumer must not do during reset.

    Two domains, two resets

    An async FIFO has state in both domains: the write pointer and wfull in the write domain, the read pointer and rempty in the read domain. After a reset both pointers must return to the same value (zero), otherwise the FIFO's idea of its occupancy is wrong forever.

    Reset scenario

    Result

    Rule

    Both sides reset together, released in any order after both are cleared

    Correct: empty, not full

    Hold both resets at least until each side has seen a few clock edges

    Only the write side is reset

    The read pointer still has its old value: occupancy is garbage (negative or full)

    Never reset one side of a running FIFO

    Only the read side is reset

    Same problem

    Same

    Release of one side while the other is still in reset

    The released side sees the other side's pointer (zero) and behaves correctly

    Allowed, provided the resets are synchronised in their own domains

    Reset rules

    1. Reset each side with its own synchronised reset (async assert, sync release; see reset architecture).

    2. Assert both resets from the same source at the same time, so the pointers clear together.

    3. Hold reset long enough for the pointer synchronisers to flush: at least 3 cycles of the slower clock after the pointers reach 0.

    4. The producer must not write while wrst_n is low, and the consumer must not read while rrst_n is low (the testbench gates winc and rinc with the reset).

    5. After reset, wfull = 0 and rempty = 1.

    Resetting an async FIFO: both resets assert together, the pointers clear to 0, the resets are held while the pointer synchronisers flush, and each side releases on its own clock

    Read the lanes from left to right in cycles of the slower clock.

    • Both resets fall at the same moment from the same source, so both pointers are 0 together.

    • The resets stay low for at least 3 slower-clock cycles, so each synchroniser holds 0 before either side runs. The testbench holds them for 6.

    • Each side releases on its own clock, so the two releases are not at the same instant. That is allowed: the released side sees the other pointer at 0.

    • winc and rinc stay low until their own side is out of reset.

    The simulation-model synchronisers of the previous lessons have no reset of their own. The testbench therefore holds both resets for six periods of the slower clock before releasing them.

    In the real two-flop chain (SKEW = 0), the flops take the same reset as their domain.

    Common mistakes

    Common pitfall

    A reset that arrives in the middle of a burst on only one side (for example a watchdog that resets the consumer domain) corrupts the FIFO. Any reset event that affects one side must reset or drain the FIFO as a whole. This is the reset-domain-crossing problem; see the RDC topic.

    Interview

    Typical follow-up: “What if only the read side is reset?” The read pointer returns to 0 but the write pointer is somewhere else, so the FIFO appears to hold a random number of entries. You need to reset both pointers or flush the FIFO.

    Check yourself After both resets, what are the values of wfull and rempty?

    wfull = 0 (nothing written) and rempty = 1 (nothing to read). The design's reset values reflect that.

    Remember

    • Reset each side with its own synchronised reset, both from the same source at the same time, so the pointers clear together.

    • Hold reset at least 3 cycles of the slower clock after the pointers reach 0. No write while wrst_n is low and no read while rrst_n is low.

    • After reset, wfull = 0 and rempty = 1.

    Rule of thumb: any reset event that touches one side must reset or drain the whole FIFO.

    Keep going

    • Interview: run a mock interview on this topic

    Related topics

    • Verification and CDC closure

    Previous

    169 / 350

    Next: Verification and CDC Closure

    Up next

    Up nextVerification and CDC Closure

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Why an Async FIFO Is the Standard
    • Pointers and Gray Conversion
    • Full, Empty and the Complete Design