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

  • How to Use This Course
  • Reading Path
  • CDC/RDC Glossary
  • CDC/RDC Metrics Reference
  • CDC/RDC Interview Prep
  • CDC/RDC Signoff Cheatsheet
  • Clock Domains and Failure Modes8
  • Metastability and Synchronizers16
  • CDC Protocols and Handshakes16
  • Reconvergence and Gray Coding16
    • Gray Code Crossing
    • Reconvergence Analysis
    • Multi-bit Crossing Strategies
      • Mux Recirculation
      • Handshake for Buses
      • Dual-Clock RAM
      • Qualified Capture
    • Reconvergence Debug
  • Reset Domain Crossing16
  • Architecture and Design Rules16
  • CDC Signoff Methodology24
  • RDC Signoff16
  • Debug and Case Studies11
  • CDC and RDC Interview Prep30
  • Capstone: Sign Off a Multi-clock Peripheral4
Loading lesson

‹Multi-bit Crossing Strategies
  1. Topics
  2. CDC & RDC
  3. Reconvergence and Gray Coding
  4. Multi-bit Crossing Strategies
  5. Dual-Clock RAM

Part 4 · Reconvergence and Gray Coding · All levels

Dual-Clock RAM

Two-port RAM crossing and its hazards: same-address access, and when it replaces a FIFO.

On this page

    A true dual-port RAM with one port on each clock moves bulk data without any synchroniser on the datapath: the write port stores, the read port fetches. But a RAM is storage, not a protocol. The addresses, the write-read ordering, and the full and empty decisions still cross somewhere, and every one of them needs its own safe crossing.

    What the RAM solves and what it does not

    Solved by the RAM

    Still needs a crossing

    Data bits never pass through synchronisers

    Write and read pointers or addresses (Gray or handshake)

    Arbitrary access order on each port

    Full and empty: the reader must not read an empty slot

    Wide words at speed

    Write-to-read ordering: the reader must not fetch a slot being written

    Hazards

    • Same-address read and write. Reading an address in the same cycle it is written returns old data, new data, or a mixture depending on the memory. The protocol must exclude it: write-then-read sequencing, separate valid flags per slot, or a bypass register.

    • Stale control. A write pointer that crosses late lets the reader fetch a slot whose data has not landed, or re-fetch a slot already overwritten. Pointer crossings need the same Gray and synchroniser discipline as a FIFO.

    • Reset. Both ports start from an agreed empty state; a one-sided reset orphans the other side's idea of which slots are valid.

    When it replaces a FIFO

    • Random access is needed: lookup tables, coefficient banks, or mailboxes where the reader picks slots out of order.

    • Producer and consumer rates are matched by protocol (valid flags, credits) rather than by FIFO backpressure.

    • Never as a shortcut around pointer discipline: a dual-clock RAM with unsynchronised address or valid crossing is a torn bus with memory behind it.

    Common pitfall

    Reading and writing the same address from the two clocks during bring-up “works” on one memory and corrupts on another, because read-during-write behaviour is implementation defined. Gate it by protocol in RTL instead of characterising it per target.

    Check yourself A mailbox uses a dual-clock RAM: the writer stores a word then raises a flag, the reader waits for the flag then reads. Which parts cross clock domains, and how?

    Two crossings: the flag crosses through a synchroniser (single bit, held until acknowledged), and the data crosses by stability (written before the flag, unread until the flag, held until the reader is done). The RAM itself is just storage; the flag plus the hold promise is the crossing.

    Related topics

    • Handshake for buses

    • Next: qualified capture

    Previous

    57 / 179

    Next: Qualified Capture

    Up next

    Up nextQualified Capture

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Mux Recirculation