retro-silicon

Components

memory/arbiter

Fixed-priority sharing of one byte-port memory among N clients

Portable Sim: passing (3 passed). Used by Nintendo Entertainment System. Source.

BoardStateRun
Sipeed Tang Nano 20Kverified2026-10-28, at ac84cec
Sipeed Tang Console 138Kverified2026-10-25, at f2536e6
TUL PYNQ-Z2verified2026-10-28, at ac84cec

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

Shares one byte-port memory among N clients by fixed priority, client 0 first. A system takes its memory through this, so a board can put any memory behind the one port: memory/sdram on the Tang Nano 20K, memory/bram on the Tang Console 138K.

Module mem_arbiter.

Timing

Ports

PortDirWidthMeaning
clk, rstin1Clock; synchronous reset, which drops any grant
c_req, c_we, c_ackin, in, outNPer client
c_addr, c_wdatainN×AW, N×8Client i in bits [i*AW +: AW] and [i*8 +: 8]
c_rdataout8Read data, for the client being acked
m_req, m_we, m_addr, m_wdataout1, 1, AW, 8To the memory
m_ack, m_rdatain1, 8From the memory

Parameters

ParameterDefaultMeaning
N2Clients
AW23Address bits

Status

Sim test (N = 3) against a memory with a random latency of 1 to 7 clocks, with three clients each keeping requests going in its own part of the address space: 200,000 clocks in which every request is served exactly once, every read gives the byte last written, and client 0 never waits more than two accesses. In systems/nes it serves the CPU’s PRG reads and the shell, on both boards.