retro-silicon

Components

memory/port-cdc

memory/sdram's byte port across two clock domains

Board verified Sim: passing (4 passed). Used by Nintendo Entertainment System. Source.

BoardStateRun
TUL PYNQ-Z2verified2026-10-30, at 0a03732

Verified: the latest run on that board of a system using it passed every test, and the component hasn't changed since. Stale: it has changed since that run.

README

memory/sdram’s byte port across two clock domains: a user on clk and a memory on mclk. For example, memory/axi-bridge can run on a faster clock than the system it serves, as on the PYNQ-Z2, where a DDR read through the Zynq’s HP0 port takes fewer nanoseconds on a faster clock.

Module mem_port_cdc.

Ports

PortDirWidthMeaning
clk, rstin1The user’s clock and synchronous reset
req, we, addr, wdatain1, 1, AW, 8The user’s access, held until ack
ack, rdataout1, DWOne-clock pulse when it’s done; a read’s data
readyout1The memory’s ready, in the user’s domain
mclk, mrstin1The memory’s clock and synchronous reset (in its own domain)
m_req, m_we, m_addr, m_wdataout1, 1, AW, 8The memory’s access, held until m_ack
m_ack, m_rdata, m_readyin1, DW, 1The memory’s acknowledge, read data and ready

Parameters

ParameterDefaultMeaning
AW23Byte address width
DW64Read data width

Status

Sim tests: random reads and writes cross to a memory on an unrelated clock four times as fast, and to one on a slower clock, and match a byte array. The bench caught three bugs planted in it.

In systems/nes (nes_axi, ASYNC) on the PYNQ-Z2, it carries the cache’s misses and prefetches from the 37.125 MHz system clock to HP0 on the 74.25 MHz pixel clock. All 103 golden ROMs and both HDMI ROMs pass.