ยง 3.3.3. DRAM¶
One-bank digital DRAM with explicit activation, a sensed row buffer, restoration, precharge, and refresh. It follows the common device architecture, but does not reuse FF/SRAM cell semantics.
| Component | Description | Structural | Behavioral |
|---|---|---|---|
DRAMCell |
Charge bit with destructive sampling and restoration | Yes | No |
DRAMRow<C> |
C cells sharing a wordline | Yes | Yes |
DRAMSenseColumn<R> |
One row-buffer bit and restoration signal | Yes | No |
DRAMStorageBank<W> |
Rows connected to shared sense columns | Yes | Yes |
DRAMCommandControl<W> |
Clocked command acceptance and the timing chains of each command, as gates and delay lines | Yes | No |
DRAM<W> |
Complete single-bank device | Yes | Yes |
Real DRAM controllers track open rows, issue precharge and activate commands, and respect the device's intervals. This device keeps those distinctions, with intervals from the active timing profile: in embedded an SDR SDRAM (Micron MT48LC16M16A2), in desktop a DDR4 part (Micron MT40A1G8). It is not a pin-compatible SDRAM or DDR interface. See Microchip's SDRAM controller description.
Configuration¶
W, N, and K follow 3.1. Defaults are W=8 in examples, N=4, K=2.
| Parameter | Default | Meaning / constraints |
|---|---|---|
retention_ticks |
From the profile | How long a closed row keeps its charge; 1,024 โฆ 10ยนยฒ. In the realistic profiles 64 ms (tREF) |
block_words |
2 | Columns read by one READ_BURST: a power of two, at most the row's words and 16 |
phase_ticks |
32 | Accepted (32โฆ10,000) for compatibility; it no longer sets any timing |
Storage starts X. Retention is checked lazily at the next activation, avoiding periodic decay events for every cell. A cell closed for at least retention_ticks samples X; refresh after expiry cannot recover its old data. While a row is open, the enabled sense amplifiers restore it. A displayed idle cell Q is not a continuously updated analog charge measurement.
Compile the C++ examples in page order: larger references compose the earlier ones. They cover binary controls, stored state and outputs. Their command steps use one placeholder duration, ticks, where the device uses the profile's intervals (see Timing); they do not model gate propagation or analog behavior.
Configuration is DRAMDeviceConfig. Catalog contracts are memory.dram.cell, memory.dram.row, memory.dram.sense-column, memory.dram.bank.W, memory.dram.command-control.W, and memory.dram.device.W. Standalone rows use columns and retention_ticks; sense columns use rows. Only the public bank/device wrappers are C++ width templates. The command controller is catalog-created, not a public C++ template.
3.3.3.1. DRAMCell¶
One digital charge bit with destructive sampling and restoration.
IO pins¶
| Pin | Direction | Width | Description |
|---|---|---|---|
WL |
Input | 1 | Wordline; activation samples charge |
RESTORE |
Input | 1 | Rewrite charge from D while WL is high |
D |
Input | 1 | Restore/write value |
SAMPLE |
Output | 1 | Value sampled on activation; held until close |
Q |
Output | 1 | Modeled cell charge |
Behavior¶
A newly selected cell copies retained charge into SAMPLE and invalidates Q. With WL=RESTORE=1, D restores Q. Closing clears SAMPLE and starts the retention interval; closing without restoration loses the bit. Reading a cell alone is destructive: the bank's sense column supplies restoration.
C++ example¶
Binary controls with std::optional<bool> representing known charge or X. Retention is tested at activation.
#include <cstddef>
#include <optional>
struct DRAMCellReference {
std::optional<bool> q, sample;
bool selected = false, restored = false;
std::size_t closed_at = 0;
void update(std::size_t now, std::size_t retention,
bool wl, bool restore, std::optional<bool> data) {
if (wl && !selected) {
sample = now - closed_at >= retention ? std::nullopt : q;
q.reset();
restored = false;
}
if (wl && restore) { q = data; restored = true; }
if (!wl && selected) {
if (!restored) q.reset();
sample.reset();
closed_at = now;
restored = false;
}
selected = wl;
}
};
Unknown inputs¶
Starts X. Unknown WL makes charge and sample unknown; unknown RESTORE while selected makes charge unknown. D=Z stores X. WL=0 ignores restore/data. retention_ticks accepts 1,024โ10ยนยฒ. Expiry has no periodic event: the next activation observes loss.
Implementation¶
Structural implementation¶
Terminal digital charge primitive, not a flip-flop or an RC electrical simulation. Q and SAMPLE make the storage/sensing distinction explicit. No redundant behavioral-fidelity replacement is registered.
The visualizer displays separate charge (Q) and read sample (SAMPLE) panels, with WL/RESTORE indicators, using recorded pin values at the selected time. It does not invent an analog charge level or retention countdown; expiry is checked on activation as described above.
Examples¶
All 8 recorded rows of DRAMCellTest, in checkpoint order. Outputs are test expectations verified against the simulation. Time is the absolute settled checkpoint time in simulator units, not milliseconds or CPU cycles.
Default scenario profile: fidelity-gate-v1 / structural (ed03f70afe360dba). Changing fidelity or the circuit can change these times.
| Checkpointzero-based number ยท timeline label | Timesimulator units | DInput ยท 1 bit |
RESTOREInput ยท 1 bit |
WLInput ยท 1 bit |
QExpected output ยท 1 bit |
SAMPLEExpected output ยท 1 bit |
|---|---|---|---|---|---|---|
#0unknown-startup | 1 | 1 |
0 |
0 |
X |
X |
#1activate-empty | 2 | 1 |
0 |
1 |
not checked | X |
#2restore-one | 4 | 1 |
1 |
1 |
1 |
not checked |
#3close | 5 | 1 |
0 |
0 |
1 |
not checked |
#4destructive-read | 7 | 1 |
0 |
1 |
X |
1 |
#5omit-restore | 9 | 1 |
0 |
0 |
X |
not checked |
#6activate-lost-bit | 10 | 1 |
0 |
1 |
not checked | X |
#7write-zero | 12 | 0 |
1 |
1 |
0 |
not checked |
Scroll within the table for all rows and pins. Buses use hexadecimal; values containing X/Z use MSB-first binary. Inputs show the declared values in effect at each checkpoint, including retained inputs. Sequential tests also replay preparation changes between checkpoints, such as lowering the clock. Use the matching checkpoint label in the simulation below.
The sequence starts unknown, restores one, closes, samples that one destructively without restoring, observes loss, then writes zero. Device timing tests separately cover retention and refresh.
Embedded simulation¶
The standalone DRAMCellTest opens this component as MEMORY_ROOT. This component has one registered structural implementation.
Open DRAMCell in the simulator
Source and tests¶
| Test | Coverage |
|---|---|
DRAMCellTest |
The complete standalone sequence shown above |
MemoryDeviceTimingTest |
Retention, refresh before expiry, and loss after expiry through structural and compact devices |
3.3.3.2. DRAMRow<C>¶
C charge cells sharing one wordline.
IO pins¶
| Pin | Direction | Width | Description |
|---|---|---|---|
WL |
Input | 1 | Shared wordline |
RESTORE_c |
Input | 1 each | Column c restoration enable |
D_c |
Input | 1 each | Column c restore/write value |
Q_c, SAMPLE_c |
Output | 1 each | Charge and sample, 0 โค c < C |
Behavior¶
columns=C creates 1โ512 independent cells (default 4). Each follows the DRAMCell rule with shared WL and per-column restore/data. A row may contain K words; it has no address decoder or command port.
C++ example¶
Row composition. Instantiate Cell with the DRAMCellReference above; each record owns its charge, sample, and closed timestamp.
#include <array>
#include <cstddef>
#include <optional>
template<class Cell, std::size_t C>
void dram_row_update(std::array<Cell, C>& cells, std::size_t now,
std::size_t retention, bool wl,
const std::array<bool, C>& restore,
const std::array<std::optional<bool>, C>& data) {
for (std::size_t c = 0; c < C; ++c)
cells[c].update(now, retention, wl, restore[c], data[c]);
}
Unknown inputs¶
Each column applies the cell's X/Z and lazy-retention rules independently. An unknown shared WL affects every cell. Use separate settled activation and restoration steps; this is not an instantaneous atomic row read.
Implementation¶
Structural implementation¶
CELL_0 through CELL_(Cโ1) are DRAMCell primitives. WL fans out to all cells; restoration and output pins remain per-column. Cells are laid out horizontally.
Behavioral implementation¶
Stores C charge records and applies sampling, restoration, close timestamps, and expiry directly. It preserves expanded row pins but removes the cell objects.
Examples¶
All 5 recorded rows of DRAMRowTest, in checkpoint order. Outputs are test expectations verified against the simulation. Time is the absolute settled checkpoint time in simulator units, not milliseconds or CPU cycles.
Default scenario profile: fidelity-gate-v1 / structural (ed03f70afe360dba). Changing fidelity or the circuit can change these times.
| Checkpointzero-based number ยท timeline label | Timesimulator units | D_0Input ยท 1 bit |
D_1Input ยท 1 bit |
RESTORE_0Input ยท 1 bit |
RESTORE_1Input ยท 1 bit |
WLInput ยท 1 bit |
Q_0Expected output ยท 1 bit |
Q_1Expected output ยท 1 bit |
SAMPLE_0Expected output ยท 1 bit |
SAMPLE_1Expected output ยท 1 bit |
|---|---|---|---|---|---|---|---|---|---|---|
#0initial | 1 | 1 |
0 |
0 |
0 |
0 |
X |
X |
not checked | not checked |
#1activate | 2 | 1 |
0 |
0 |
0 |
1 |
not checked | not checked | X |
not checked |
#2write-row | 4 | 1 |
0 |
1 |
1 |
1 |
1 |
0 |
not checked | not checked |
#3close | 5 | 1 |
0 |
0 |
0 |
0 |
1 |
not checked | not checked | not checked |
#4sample | 7 | 1 |
0 |
0 |
0 |
1 |
not checked | not checked | 1 |
0 |
Scroll within the table for all rows and pins. Buses use hexadecimal; values containing X/Z use MSB-first binary. Inputs show the declared values in effect at each checkpoint, including retained inputs. Sequential tests also replay preparation changes between checkpoints, such as lowering the clock. Use the matching checkpoint label in the simulation below.
The two-column example restores one and zero, closes the row, then reactivates it and checks both samples.
Embedded simulation¶
The standalone DRAMRowTest opens this component as MEMORY_ROOT. Use the explorer to compare structural and behavioral implementations.
Open DRAMRow<C> in the simulator
Source and tests¶
| Test | Coverage |
|---|---|
DRAMRowTest |
The complete standalone sequence shown above |
MemoryDeviceContractTest |
Structural/behavioral agreement at settled checkpoints, including mixed hierarchy selection |
3.3.3.3. DRAMSenseColumn<R>¶
One shared column's row-buffer bit and restoration control.
IO pins¶
| Pin | Direction | Width | Description |
|---|---|---|---|
PRECHARGE |
Input | 1 | Prepare the column with all wordlines low |
SENSE |
Input | 1 | Enable sensing/restoration |
WL_r, SAMPLE_r |
Input | 1 each | Selection and sampled charge, 0 โค r < R |
WRITE |
Input | 1 | Replace the active row-buffer bit |
D |
Input | 1 | Write value |
Q |
Output | 1 | Latched row-buffer bit |
RESTORE |
Output | 1 | Feed Q into the selected cell |
Behavior¶
After precharge, sensing exactly one selected row latches its SAMPLE and asserts RESTORE. Subsequent SAMPLE changes do not overwrite the latch; WRITE changes it. No active sensing means RESTORE=0 while the buffer can remain latched. Switching to another row without precharging invalidates the buffer. rows=R accepts 1โ512, default 2.
C++ example¶
Binary controls, including zero/multiple selected rows. An empty data optional means X. The reference retains the buffer when sensing is disabled.
#include <cstddef>
#include <optional>
#include <vector>
struct DRAMSenseReference {
bool prepared = true, restore = false;
std::optional<std::size_t> sensed_row;
std::optional<bool> q;
void update(bool precharge, bool sense, const std::vector<bool>& wl,
const std::vector<std::optional<bool>>& samples,
bool write, std::optional<bool> data) {
std::optional<std::size_t> row;
unsigned count = 0;
for (std::size_t r = 0; r < wl.size(); ++r)
if (wl[r]) { row = r; ++count; }
restore = false;
if (precharge && !count) {
prepared = true;
sensed_row.reset(); q.reset();
} else if (precharge || count > 1) {
prepared = false;
sensed_row.reset(); q.reset();
} else if (sense && row) {
if (!prepared || (sensed_row && sensed_row != row)) {
prepared = false; sensed_row.reset(); q.reset();
return;
}
if (!sensed_row) { sensed_row = row; q = samples.at(*row); }
if (write) q = data;
restore = true;
}
}
};
Unknown inputs¶
Starts prepared with Q=X. Unknown wordlines, more than one selected row, unknown SENSE, or invalid precharge conditions invalidate preparation and Q. Unknown WRITE during sensing makes Q unknown. PRECHARGE=1 with all wordlines low prepares regardless of SENSE. It is a memory primitive; samples must settle before SENSE.
Implementation¶
Structural implementation¶
Terminal stateful sense primitive. Its latched Q forms one bit of the bank's row buffer; RESTORE feeds the selected cells. It models the result of sensing/restoration, not voltage differences or transistor gain.
Examples¶
All 6 recorded rows of DRAMSenseColumnTest, in checkpoint order. Outputs are test expectations verified against the simulation. Time is the absolute settled checkpoint time in simulator units, not milliseconds or CPU cycles.
Default scenario profile: fidelity-gate-v1 / structural (ed03f70afe360dba). Changing fidelity or the circuit can change these times.
| Checkpointzero-based number ยท timeline label | Timesimulator units | DInput ยท 1 bit |
PRECHARGEInput ยท 1 bit |
SAMPLE_0Input ยท 1 bit |
SAMPLE_1Input ยท 1 bit |
SENSEInput ยท 1 bit |
WL_0Input ยท 1 bit |
WL_1Input ยท 1 bit |
WRITEInput ยท 1 bit |
QExpected output ยท 1 bit |
RESTOREExpected output ยท 1 bit |
|---|---|---|---|---|---|---|---|---|---|---|---|
#0precharge | 32 | 0 |
1 |
1 |
0 |
0 |
0 |
0 |
0 |
X |
0 |
#1activate | 33 | 0 |
0 |
1 |
0 |
0 |
1 |
0 |
0 |
not checked | 0 |
#2sense-and-restore | 66 | 0 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
1 |
#3latch-survives-sample-change | 67 | 0 |
0 |
X |
0 |
1 |
1 |
0 |
0 |
1 |
not checked |
#4write-row-buffer | 100 | 0 |
0 |
X |
0 |
1 |
1 |
0 |
1 |
0 |
not checked |
#5conflicting-rows | 133 | 0 |
0 |
X |
0 |
1 |
1 |
1 |
1 |
X |
0 |
Scroll within the table for all rows and pins. Buses use hexadecimal; values containing X/Z use MSB-first binary. Inputs show the declared values in effect at each checkpoint, including retained inputs. Sequential tests also replay preparation changes between checkpoints, such as lowering the clock. Use the matching checkpoint label in the simulation below.
Precharge, activate row zero, sense one, change SAMPLE to X while retaining the latch, write zero into the buffer, then assert conflicting wordlines and check invalidation.
Embedded simulation¶
The standalone DRAMSenseColumnTest opens this component as MEMORY_ROOT. This component has one registered structural implementation.
Open DRAMSenseColumn<R> in the simulator
Source and tests¶
| Test | Coverage |
|---|---|
DRAMSenseColumnTest |
The complete standalone sequence shown above |
MemoryDeviceContractTest |
Integration in the new structural devices and comparison with their compact implementations |
3.3.3.4. DRAMStorageBank<W>¶
A matrix of charge cells connected to a shared row buffer.
IO pins¶
| Pin | Direction | Width | Description |
|---|---|---|---|
PRECHARGE, SENSE |
Input | 1 each | Shared column controls |
WL_r |
Input | 1 each | Row wordlines, 0 โค r < N/K |
DRIVE_c, DATA_c |
Input | 1 each | Column write enables and values |
COL_c |
Output | 1 each | Row-buffer bits, 0 โค c < WรK |
Behavior¶
Activate one wordline, allow cell samples to settle, then enable SENSE. Each column latches and restores its sample. DRIVE_c writes that column's row-buffer bit and restores it into the selected cell. Close the wordline before precharge. Address translation, byte masks, and legal command sequencing belong to the device.
C++ example¶
The bank composes the preceding cell and sense-column references. Each call settles charge sampling, column sensing, and restoration in that order; it does not model the individual gate delays between them.
#include <vector>
struct DRAMBankReference {
std::vector<std::vector<DRAMCellReference>> rows;
std::vector<DRAMSenseReference> columns;
DRAMBankReference(std::size_t r, std::size_t c)
: rows(r, std::vector<DRAMCellReference>(c)), columns(c) {}
void update(std::size_t now, std::size_t retention, bool precharge, bool sense,
const std::vector<bool>& wl, const std::vector<bool>& drive,
const std::vector<std::optional<bool>>& data) {
for (std::size_t c = 0; c < columns.size(); ++c) {
std::vector<std::optional<bool>> samples;
for (std::size_t r = 0; r < rows.size(); ++r) {
rows[r][c].update(now, retention, wl.at(r), false, std::nullopt);
samples.push_back(rows[r][c].sample);
}
auto& column = columns[c];
column.update(precharge, sense, wl, samples, drive.at(c), data.at(c));
for (std::size_t r = 0; r < rows.size(); ++r)
rows[r][c].update(now, retention, wl.at(r), column.restore, column.q);
}
}
// COL_c = columns[c].q. Cell charge and samples remain independently visible.
};
Unknown inputs¶
Selection conflicts and unknown controls follow DRAMSenseColumn; individual charge records follow DRAMCell. Closing without valid restoration can lose data. Both bank fidelities retain scalar pins and the 4,096-cell limit. Compare settled checkpoints, not transient gate waveforms or the exact retention boundary, across fidelities.
Implementation¶
Structural implementation¶
ROW_r contains WรK cells. COLUMN_c is a DRAMSenseColumn connected to SAMPLE_c from every row, with Q/RESTORE feedback to every cell in that column. WL qualifies which cell accepts restoration. Rows are stacked and sense columns align beneath them.
Behavioral implementation¶
Uses charge records plus a row-buffer vector, with independent selection/preparation state. It preserves destructive sampling, restoration, precharge, per-column writes, and retention without expanding the cells.
Examples¶
All 9 recorded rows of DRAMStorageBankTest, in checkpoint order. Outputs are test expectations verified against the simulation. Time is the absolute settled checkpoint time in simulator units, not milliseconds or CPU cycles.
Default scenario profile: fidelity-gate-v1 / structural (ed03f70afe360dba). Changing fidelity or the circuit can change these times.
| Checkpointzero-based number ยท timeline label | Timesimulator units | DATA_0Input ยท 1 bit |
DATA_1Input ยท 1 bit |
DATA_10Input ยท 1 bit |
DATA_11Input ยท 1 bit |
DATA_12Input ยท 1 bit |
DATA_13Input ยท 1 bit |
DATA_14Input ยท 1 bit |
DATA_15Input ยท 1 bit |
DATA_2Input ยท 1 bit |
DATA_3Input ยท 1 bit |
DATA_4Input ยท 1 bit |
DATA_5Input ยท 1 bit |
DATA_6Input ยท 1 bit |
DATA_7Input ยท 1 bit |
DATA_8Input ยท 1 bit |
DATA_9Input ยท 1 bit |
DRIVE_0Input ยท 1 bit |
DRIVE_1Input ยท 1 bit |
DRIVE_10Input ยท 1 bit |
DRIVE_11Input ยท 1 bit |
DRIVE_12Input ยท 1 bit |
DRIVE_13Input ยท 1 bit |
DRIVE_14Input ยท 1 bit |
DRIVE_15Input ยท 1 bit |
DRIVE_2Input ยท 1 bit |
DRIVE_3Input ยท 1 bit |
DRIVE_4Input ยท 1 bit |
DRIVE_5Input ยท 1 bit |
DRIVE_6Input ยท 1 bit |
DRIVE_7Input ยท 1 bit |
DRIVE_8Input ยท 1 bit |
DRIVE_9Input ยท 1 bit |
PRECHARGEInput ยท 1 bit |
SENSEInput ยท 1 bit |
WL_0Input ยท 1 bit |
WL_1Input ยท 1 bit |
COL_0Expected output ยท 1 bit |
COL_1Expected output ยท 1 bit |
COL_10Expected output ยท 1 bit |
COL_11Expected output ยท 1 bit |
COL_12Expected output ยท 1 bit |
COL_13Expected output ยท 1 bit |
COL_14Expected output ยท 1 bit |
COL_15Expected output ยท 1 bit |
COL_2Expected output ยท 1 bit |
COL_3Expected output ยท 1 bit |
COL_4Expected output ยท 1 bit |
COL_5Expected output ยท 1 bit |
COL_6Expected output ยท 1 bit |
COL_7Expected output ยท 1 bit |
COL_8Expected output ยท 1 bit |
COL_9Expected output ยท 1 bit |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
#0precharge | 32 | 0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
X |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#1activate-row-zero | 33 | 0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#2sense-empty-row | 66 | 0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
X |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#3write-row | 100 | 0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
#4hold-row | 101 | 0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
#5close-row | 134 | 0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#6precharge-again | 167 | 0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
X |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#7reopen-row | 169 | 0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#8read-restored-row | 203 | 0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
Scroll within the table for all rows and pins. Buses use hexadecimal; values containing X/Z use MSB-first binary. Inputs show the declared values in effect at each checkpoint, including retained inputs. Sequential tests also replay preparation changes between checkpoints, such as lowering the clock. Use the matching checkpoint label in the simulation below.
Writes alternating bits across row zero, releases write drive, closes/precharges, reopens the row, and checks that restoration preserved all 16 columns.
Embedded simulation¶
The standalone DRAMStorageBankTest opens this component as MEMORY_ROOT. Use the explorer to compare structural and behavioral implementations.
Open DRAMStorageBank<W> in the simulator
Source and tests¶
| Test | Coverage |
|---|---|
DRAMStorageBankTest |
The complete standalone sequence shown above |
MemoryDeviceContractTest |
Structural/behavioral agreement at settled checkpoints, including mixed hierarchy selection |
3.3.3.5. DRAMCommandControl<W>¶
Takes a command at a rising clock edge and runs that command's timing chain of gates and delay lines.
IO pins¶
| Pin | Direction | Width | Description |
|---|---|---|---|
CLK |
Input | 1 | Rising edge takes a command |
CMD |
Input | 3 | NOP, ACTIVATE, READ, WRITE, PRECHARGE, REFRESH, READ_BURST |
ADDR |
Input | 32 | Row for ACTIVATE, word slot for READ, WRITE and READ_BURST |
WRITE_DATA |
Input | W | Write payload |
WRITE_MASK |
Input | W/8 | Byte enables |
BUSY, ERROR, READ_VALID, ROW_OPEN |
Output | 1 each | Device status |
ROW_ADDR, COLUMN_ADDR |
Output | 32 each | Latched row and word slot |
DATA |
Output | W | Latched write payload |
MASK |
Output | W/8 | Latched write byte enables |
PRECHARGE, SENSE |
Output | 1 each | Column controls |
ROW_ENABLE, WRITE_ENABLE |
Output | 1 each | Row and write controls |
OUTPUT_ENABLE |
Output | 1 | A finished read's data is on the output |
Behavior¶
Carries out the command table of DRAM<W> without
storing array data. A legal command at a rising edge latches what it needs,
clears an old error and read-valid state, raises BUSY, and starts its
chain: each step of the command is a delay line from the profile, gated by
the command's run signal. The end of the chain is sampled at the next rising
edge by a one-stage sampler; the completion is then shown at once (BUSY
low, READ_VALID for a read, the new ROW_OPEN state) and takes effect at
the following edge, which may already take the next command, as a real SDRAM
takes its next command when the interval is over. NOP keeps the status. An
illegal command while idle reports ERROR; a command while busy reports
ERROR without disturbing the running operation.
C++ example¶
Binary pin values; geometry is prevalidated. Call on input changes and at every nonzero due. output supplies both READ_VALID and OUTPUT_ENABLE; wl supplies ROW_ENABLE. Every step takes the same placeholder ticks, and a new command waits until the previous one has finished (the device can take it in the completing cycle). READ_BURST is not modelled here.
#include <cstdint>
#include <cstddef>
#include <optional>
#include <vector>
template<std::size_t W> struct DRAMControlReference {
struct Inputs {
bool clock = false;
unsigned cmd = 0;
std::uint32_t address = 0, data = 0;
unsigned mask = 0;
};
std::size_t rows, slots, ticks, due = 0;
unsigned command = 0, stage = 0;
std::size_t row = 0, col = 0, refresh_row = 0;
bool busy = false, error = false, open = false, precharge = true;
bool sense = false, wl = false, write = false, output = false;
std::optional<bool> previous_clock; // First observed high is not a 0->1 edge.
std::vector<std::optional<bool>> data = std::vector<std::optional<bool>>(W);
unsigned mask = 0;
DRAMControlReference(std::size_t r, std::size_t k, std::size_t t)
: rows(r), slots(k), ticks(t) {}
void update(std::size_t now, const Inputs& in) {
// Finish the current phase before accepting a simultaneous command edge.
if (due && now >= due) {
due = 0; ++stage;
switch (command) {
case 1: // ACT: select -> sense/restore -> row open.
if (stage == 1) wl = true;
else if (stage == 2) sense = true;
else { open = true; busy = false; }
break;
case 2: output = true; busy = false; break;
case 3:
if (stage == 1) write = true;
else if (stage == 2) write = false;
else busy = false;
break;
case 4:
if (stage == 1) { wl = false; sense = false; }
else if (stage == 2) precharge = true;
else { open = false; busy = false; }
break;
case 5: // Refresh exactly one row, then advance the cursor.
if (stage == 1) wl = true;
else if (stage == 2) sense = true;
else if (stage == 3) { wl = false; sense = false; }
else if (stage == 4) precharge = true;
else { refresh_row = (refresh_row + 1) % rows; busy = false; }
break;
}
if (busy) due = now + ticks;
}
const bool edge = previous_clock == false && in.clock;
previous_clock = in.clock;
if (!edge || in.cmd == 0) return; // NOP preserves status, even while busy.
if (busy) { error = true; return; } // Do not disturb the active operation.
bool allowed = false;
switch (in.cmd) {
case 1: allowed = !open && in.address < rows; break;
case 2: case 3: allowed = open && in.address < slots; break;
case 4: allowed = open; break;
case 5: allowed = !open; break;
}
output = false;
if (!allowed) { error = true; return; }
error = false; busy = true; command = in.cmd; stage = 0; due = now + ticks;
if (command == 1 || command == 5) {
row = command == 1 ? in.address : refresh_row;
precharge = wl = sense = false;
}
if (command == 2 || command == 3) col = in.address;
if (command == 3) {
for (unsigned b = 0; b < W; ++b) data[b] = bool((in.data >> b) & 1u);
mask = in.mask;
}
}
};
Unknown inputs¶
Only CLK=0 followed by CLK=1 takes a command; X/Zโ1 is not an edge. An unknown CMD reports ERROR. ACTIVATE, READ and WRITE need a binary ADDR; WRITE also needs a binary mask. Unknown payload bits become unknown storage in the enabled bytes. Inputs a command does not use are ignored.
Implementation¶
Structural implementation¶
Flip-flops hold the command, row, column, payload and status bits; gates
decide legality and the next state at each edge. Each command's steps are
MemoryDelayLines in a chain (ACTIVATE: wordline, sense, restore; READ:
column; WRITE: drive on, drive off, recovery; PRECHARGE: close, precharge,
equalize; REFRESH: an activation and a precharge of the next refresh row,
plus the refresh cycle's remaining time in the realistic profiles). The sense
and precharge steps also carry a replica of the row decoder, so they outlast
it in every profile. A one-stage Synchronizer samples the end of the chain;
a round-robin counter chooses the refresh row. A device with no reset pin
starts idle through a PowerOnReset.
Examples¶
All 135 recorded rows of DRAMCommandControlTest, in checkpoint order. Outputs are test expectations verified against the simulation. Time is the absolute settled checkpoint time in simulator units, not milliseconds or CPU cycles.
Default scenario profile: fidelity-gate-v1 / structural (ed03f70afe360dba). Changing fidelity or the circuit can change these times.
| Checkpointzero-based number ยท timeline label | Timesimulator units | ADDRInput ยท 32 bit |
CLKInput ยท 1 bit |
CMDInput ยท 3 bit |
WRITE_DATAInput ยท 8 bit |
WRITE_MASKInput ยท 1 bit |
BUSYExpected output ยท 1 bit |
COLUMN_ADDRExpected output ยท 32 bit |
DATAExpected output ยท 8 bit |
ERRORExpected output ยท 1 bit |
MASKExpected output ยท 1 bit |
OUTPUT_ENABLEExpected output ยท 1 bit |
PRECHARGEExpected output ยท 1 bit |
READ_VALIDExpected output ยท 1 bit |
ROW_ADDRExpected output ยท 32 bit |
ROW_ENABLEExpected output ยท 1 bit |
ROW_OPENExpected output ยท 1 bit |
SENSEExpected output ยท 1 bit |
WRITE_ENABLEExpected output ยท 1 bit |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
#0closed-startup | 20 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
0 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | 0 |
not checked | not checked |
#1read-while-closed-setup | 34 | 0x00000000 |
0 |
0x2 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#2read-while-closed-edge | 40 | 0x00000000 |
1 |
0x2 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#3read-while-closed-command-removed | 51 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#4read-while-closed-clock-1 | 56 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#5read-while-closed-clock-1-low | 61 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#6read-while-closed-clock-2 | 66 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#7read-while-closed-clock-2-low | 71 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#8read-while-closed-clock-3 | 76 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#9read-while-closed | 81 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
0 |
not checked | not checked | 1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#10activate-row-zero-setup | 101 | 0x00000000 |
0 |
0x1 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#11activate-row-zero-edge | 217 | 0x00000000 |
1 |
0x1 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#12activate-row-zero-command-removed | 233 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#13activate-row-zero-clock-1 | 246 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#14activate-row-zero-clock-1-low | 253 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#15activate-row-zero-clock-2 | 265 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#16activate-row-zero-clock-2-low | 273 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#17activate-row-zero-clock-3 | 288 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#18activate-row-zero | 293 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
0 |
not checked | not checked | 0 |
not checked | not checked | not checked | not checked | not checked | not checked | 1 |
not checked | not checked |
#19write-column-zero-setup | 317 | 0x00000000 |
0 |
0x3 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#20write-column-zero-edge | 429 | 0x00000000 |
1 |
0x3 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#21write-column-zero-command-removed | 445 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#22write-column-zero-clock-1 | 458 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#23write-column-zero-clock-1-low | 465 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#24write-column-zero-clock-2 | 477 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#25write-column-zero-clock-2-low | 485 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#26write-column-zero-clock-3 | 500 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#27write-column-zero | 505 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
0 |
not checked | not checked | 0 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#28read-column-zero-setup | 529 | 0x00000000 |
0 |
0x2 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#29read-column-zero-edge | 575 | 0x00000000 |
1 |
0x2 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#30read-column-zero-command-removed | 591 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#31read-column-zero-clock-1 | 604 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#32read-column-zero-clock-1-low | 611 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#33read-column-zero-clock-2 | 623 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#34read-column-zero-clock-2-low | 631 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#35read-column-zero-clock-3 | 646 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#36read-column-zero | 651 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
0 |
not checked | not checked | not checked | not checked | 1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#37masked-write-setup | 675 | 0x00000000 |
0 |
0x3 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#38masked-write-edge | 787 | 0x00000000 |
1 |
0x3 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#39masked-write-command-removed | 803 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#40masked-write-clock-1 | 816 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#41masked-write-clock-1-low | 823 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#42masked-write-clock-2 | 835 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#43masked-write-clock-2-low | 843 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#44masked-write-clock-3 | 858 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#45masked-write | 863 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#46read-masked-word-setup | 887 | 0x00000000 |
0 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#47read-masked-word-edge | 933 | 0x00000000 |
1 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#48read-masked-word-command-removed | 949 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#49read-masked-word-clock-1 | 962 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#50read-masked-word-clock-1-low | 969 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#51read-masked-word-clock-2 | 981 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#52read-masked-word-clock-2-low | 989 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#53read-masked-word-clock-3 | 1004 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#54read-masked-word | 1009 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#55back-to-back-reads-first-setup | 1031 | 0x00000001 |
0 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#56back-to-back-reads-first-taken | 1077 | 0x00000001 |
1 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#57back-to-back-reads-first-removed | 1093 | 0x00000001 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#58back-to-back-reads-sampled | 1106 | 0x00000001 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#59back-to-back-reads-sampled-low | 1113 | 0x00000001 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#60back-to-back-reads-releasing | 1125 | 0x00000001 |
1 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#61back-to-back-reads-second-setup | 1148 | 0x00000000 |
0 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#62back-to-back-reads-second-taken | 1162 | 0x00000000 |
1 |
0x2 |
0x5A |
1 |
1 |
not checked | not checked | 0 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#63back-to-back-reads-second-removed | 1178 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#64back-to-back-reads-clock-1 | 1225 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#65back-to-back-reads-clock-1-low | 1230 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#66back-to-back-reads-clock-2 | 1242 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#67back-to-back-reads-clock-2-low | 1249 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#68back-to-back-reads-clock-3 | 1261 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#69back-to-back-reads | 1269 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#70unknown-command-setup | 1284 | 0x00000000 |
0 |
0bXXX |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | 1 |
not checked | not checked | not checked | not checked | not checked |
#71unknown-command-rejected | 1299 | 0x00000000 |
1 |
0bXXX |
0x5A |
1 |
0 |
not checked | not checked | 1 |
not checked | 0 |
not checked | 0 |
not checked | not checked | not checked | not checked | not checked |
#72nop-preserves-error-setup | 1315 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#73nop-preserves-error-edge | 1321 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#74nop-preserves-error-command-removed | 1326 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#75nop-preserves-error-clock-1 | 1331 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#76nop-preserves-error-clock-1-low | 1336 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#77nop-preserves-error-clock-2 | 1341 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#78nop-preserves-error-clock-2-low | 1346 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#79nop-preserves-error-clock-3 | 1351 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#80nop-preserves-error | 1356 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | 1 |
not checked | not checked | not checked | 0 |
not checked | not checked | not checked | not checked | not checked |
#81bad-column-setup | 1381 | 0x00000002 |
0 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#82bad-column-edge | 1386 | 0x00000002 |
1 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#83bad-column-command-removed | 1397 | 0x00000002 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#84bad-column-clock-1 | 1402 | 0x00000002 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#85bad-column-clock-1-low | 1407 | 0x00000002 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#86bad-column-clock-2 | 1412 | 0x00000002 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#87bad-column-clock-2-low | 1417 | 0x00000002 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#88bad-column-clock-3 | 1422 | 0x00000002 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#89bad-column | 1427 | 0x00000002 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | 1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#90precharge-setup | 1445 | 0x00000000 |
0 |
0x4 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#91precharge-edge | 1560 | 0x00000000 |
1 |
0x4 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#92precharge-command-removed | 1575 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#93precharge-clock-1 | 1590 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#94precharge-clock-1-low | 1598 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#95precharge-clock-2 | 1610 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#96precharge-clock-2-low | 1618 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#97precharge-clock-3 | 1633 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#98precharge | 1638 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | 0 |
not checked | not checked | not checked | not checked | not checked | not checked | 0 |
not checked | not checked |
#99refresh-next-row-setup | 1655 | 0x00000000 |
0 |
0x5 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#100refresh-next-row-edge | 1838 | 0x00000000 |
1 |
0x5 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#101refresh-next-row-command-removed | 1854 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#102refresh-next-row-clock-1 | 1867 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#103refresh-next-row-clock-1-low | 1874 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#104refresh-next-row-clock-2 | 1887 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#105refresh-next-row-clock-2-low | 1895 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#106refresh-next-row-clock-3 | 1908 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#107refresh-next-row | 1913 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | 0 |
not checked | not checked | not checked | not checked | not checked | not checked | 0 |
not checked | not checked |
#108activate-restored-row-setup | 1933 | 0x00000000 |
0 |
0x1 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#109activate-restored-row-edge | 2049 | 0x00000000 |
1 |
0x1 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#110activate-restored-row-command-removed | 2065 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#111activate-restored-row-clock-1 | 2078 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#112activate-restored-row-clock-1-low | 2085 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#113activate-restored-row-clock-2 | 2097 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#114activate-restored-row-clock-2-low | 2105 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#115activate-restored-row-clock-3 | 2120 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#116activate-restored-row | 2125 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | 0 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#117read-persisted-word-setup | 2149 | 0x00000000 |
0 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#118read-persisted-word-edge | 2195 | 0x00000000 |
1 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#119read-persisted-word-command-removed | 2211 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#120read-persisted-word-clock-1 | 2224 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#121read-persisted-word-clock-1-low | 2231 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#122read-persisted-word-clock-2 | 2243 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#123read-persisted-word-clock-2-low | 2251 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#124read-persisted-word-clock-3 | 2266 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#125read-persisted-word | 2271 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#126reserved-command-setup | 2293 | 0x00000000 |
0 |
0x7 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#127reserved-command-edge | 2300 | 0x00000000 |
1 |
0x7 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#128reserved-command-command-removed | 2311 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#129reserved-command-clock-1 | 2316 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#130reserved-command-clock-1-low | 2321 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#131reserved-command-clock-2 | 2326 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#132reserved-command-clock-2-low | 2331 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#133reserved-command-clock-3 | 2336 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
#134reserved-command | 2341 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | 1 |
not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked | not checked |
Scroll within the table for all rows and pins. Buses use hexadecimal; values containing X/Z use MSB-first binary. Inputs show the declared values in effect at each checkpoint, including retained inputs. Sequential tests also replay preparation changes between checkpoints, such as lowering the clock. Use the matching checkpoint label in the simulation below.
The sequence checks a read while closed, activation, write/read, byte mask, unknown and reserved commands, NOP status preservation, invalid column, precharge, and one refresh.
Embedded simulation¶
The standalone DRAMCommandControlTest opens this component as MEMORY_ROOT. Expand it to follow the command chains.
Open DRAMCommandControl<W> in the simulator
Source and tests¶
| Test | Coverage |
|---|---|
DRAMCommandControlTest |
The complete standalone sequence shown above |
MemoryDeviceTimingTest |
Intermediate BUSY and ROW_OPEN, and the command chains in the device |
3.3.3.6. DRAM<W>¶
Complete single-bank command-addressed DRAM device.
IO pins¶
| Pin | Direction | Width | Description |
|---|---|---|---|
CLK |
Input | 1 | Strict 0โ1 command edge |
CMD |
Input | 3 | Command code below |
ADDR |
Input | 32 | Row for ACT; word slot for READ/WRITE |
WRITE_DATA |
Input | W | Latched write payload |
WRITE_MASK |
Input | W/8 | Byte enables |
BUSY |
Output | 1 | Command in progress |
ERROR |
Output | 1 | Rejected request; next accepted non-NOP clears it |
ROW_OPEN |
Output | 1 | Activation completed; row available |
READ_VALID |
Output | 1 | Completed read available |
READ_DATA |
Output | W | Selected word while valid, otherwise Z |
Behavior¶
Commands operate on one open row at a time. A word's linear index is row*K + slot; ADDR itself is not always a linear word address.
Commands and timing¶
A command is taken at a rising CLK edge while the device is idle, or in the
cycle the previous command completes. Each step lasts one of the profile's
DRAM intervals (listed under Timing).
| CMD | Operation | Legal when / ADDR | Steps |
|---|---|---|---|
| 0 | NOP | Inputs ignored | None; status kept |
| 1 | ACTIVATE | No row open; ADDR < N/K |
Wordline, sense, restore; then the row is open |
| 2 | READ | Row open; ADDR < K |
Column read; then READ_VALID |
| 3 | WRITE | Row open; ADDR < K; binary mask |
Drive on, drive off, recovery |
| 4 | PRECHARGE | Row open; ADDR ignored | Close, precharge, equalize; then no row is open |
| 5 | REFRESH | No row open; ADDR ignored | Activation and precharge of the next refresh row (and the rest of tRFC) |
| 6 | READ_BURST | Row open; ADDR < K |
As READ; then the next columns of the aligned block_words block, wrapping within it, one per edge |
| 7 | Reserved | Always rejected | ERROR; no storage operation |
REFRESH services one row at an internal round-robin cursor starting at zero; N/K refresh commands cover the bank. The device does not refresh itself; the DRAM controller issues REFRESH, and a direct user must do the same. Refresh samples an expired row as X and cannot repair it.
Write data, address and mask are latched when the command is taken. A zero
mask is a valid write that changes nothing. Unknown payload bits become
unknown storage only in enabled byte lanes. An initial CLK=X followed by
high is not an edge. ROW_OPEN stays high during a precharge until it
completes. A finished read stays valid until another command is taken or an
idle illegal command clears it.
C++ example¶
Complete native-port reference composed from the command control and bank above, for W=8/16/32: command rejection, refresh, retention, destructive sampling and restoration, byte writes, status and disabled read output, with the placeholder step duration. Binary inputs and validated geometry are assumed; empty data optionals preserve unknown stored bits.
#include <cstddef>
#include <optional>
#include <vector>
template<std::size_t W> struct DRAMReference {
static_assert(W == 8 || W == 16 || W == 32);
DRAMControlReference<W> control;
DRAMBankReference bank;
std::size_t retention;
std::vector<std::optional<bool>> read_data = std::vector<std::optional<bool>>(W);
bool high_z = true;
DRAMReference(std::size_t words, std::size_t slots, std::size_t ticks,
std::size_t retention_ticks)
: control(words / slots, slots, ticks), bank(words / slots, W * slots),
retention(retention_ticks) {}
void update(std::size_t now, const typename DRAMControlReference<W>::Inputs& in) {
control.update(now, in);
std::vector<bool> wl(control.rows, false), drive(W * control.slots, false);
std::vector<std::optional<bool>> data(W * control.slots);
if (control.wl) wl[control.row] = true;
for (std::size_t c = 0; c < data.size(); ++c) {
data[c] = control.data[c % W];
drive[c] = control.write && c / W == control.col &&
(control.mask & (1u << ((c % W) / 8)));
}
bank.update(now, retention, control.precharge, control.sense, wl, drive, data);
high_z = !control.output;
for (std::size_t b = 0; b < W; ++b)
read_data[b] = high_z ? std::nullopt : bank.columns[control.col * W + b].q;
}
// BUSY / ERROR / READ_VALID / ROW_OPEN = control.busy / error / output / open.
// Next scheduled device phase: control.due (0 means none).
};
Unknown inputs¶
Command validation follows DRAMCommandControl. A rejected unknown idle command clears an earlier read just like a reserved command; a command rejected while busy leaves the operation running. Masked-off bytes ignore unknown payload. Retention is measured from when a row closes to its next activation.
Implementation¶
Structural implementation¶
COMMAND_CONTROL drives ROW_DECODE and storage phases. STORAGE exposes cell rows and sense/restore columns; COLUMN_SELECT reads one word from the row buffer; WRITE_DRIVERS distributes byte-qualified writes; OUTPUT publishes only valid data. No FF or SRAM memory is hidden underneath.
Behavioral implementation¶
Uses packed MemoryStorage, per-row close times and a WรK row buffer. Activation samples the row destructively, sensing restores it, and writes merge enabled bytes into the buffer and storage. Its command control (DRAMSyncControl) follows the gate-level control edge for edge, with the same chain lengths, so it takes the same cycles; the storage and sense data path is implemented separately. History is read-only; initialize through ACTIVATE and WRITE, and disable history for large runs.
Timing. The steps of each command are delay lines with these intervals. In the realistic profiles they reproduce the datasheet's tRCD, CL and tRP (the ACTIVATE steps add up to tRCD, the READ step is CL, the PRECHARGE steps add up to tRP):
Analog intervals of the DRAM devices, per timing profile.
| DRAM interval | unitticks | embeddedtime | desktoptime |
|---|---|---|---|
| ACTIVATE: wordline | 32 | 3 ns | 2.5 ns |
| ACTIVATE: sense, base | 32 | 12 ns | 9 ns |
| ACTIVATE: sense, per row | 0 | 0 ps | 0 ps |
| ACTIVATE: restore | 32 | 3 ns | 2.25 ns |
| READ: column to data | 32 | 18 ns | 13.75 ns |
| WRITE: drive on | 32 | 6 ns | 7.5 ns |
| WRITE: drive off | 32 | 3 ns | 3.75 ns |
| WRITE: recovery | 32 | 3 ns | 3.75 ns |
| PRECHARGE: close row | 32 | 3 ns | 2.5 ns |
| PRECHARGE: precharge | 32 | 12 ns | 9 ns |
| PRECHARGE: equalize | 32 | 3 ns | 2.25 ns |
| REFRESH: full restore | 0 | 27 ns | 20.5 ns |
| REFRESH: rest of the refresh cycle | 0 | 0 ps | 304 ns |
| Refresh interval (0: the controller's own count) | 0 | 7.81 ยตs | 7.81 ยตs |
| Cell retention | 100,000 | 64 ms | 64 ms |
A command is issued in one clock cycle, but the device then works through
these intervals on its own time and reports BUSY until it is done. No clock
can be certified around the device alone; its controller counts the cycles
each command needs at the controller's clock. Through the controller, at
256 KiB:
Measured latency in clock cycles, from the edge that accepts a request to the edge that takes its response, through the compact endpoint of a 256 KiB memory at the advanced core's certified clock (unit 80 ticks, embedded 4.1 ns, desktop 2.86 ns). Refresh is off. โConfiguredโ rows are too long to simulate and show the device interval instead.
| Memory | Access | unitcycles | embeddedcycles | desktopcycles |
|---|---|---|---|---|
| DRAM | read, row closed | 7 (560 ticks) | 14 (57.46 ns) | 15 (42.87 ns) |
| DRAM | read, row open (hit) | 4 (320 ticks) | 8 (32.83 ns) | 8 (22.86 ns) |
| DRAM | read, other row open (conflict) | 10 (800 ticks) | 20 (82.08 ns) | 22 (62.88 ns) |
| DRAM | write, row open (hit) | 5 (400 ticks) | 7 (28.73 ns) | 9 (25.72 ns) |
Examples¶
All 135 recorded rows of DRAMTest, in checkpoint order. Outputs are test expectations verified against the simulation. Time is the absolute settled checkpoint time in simulator units, not milliseconds or CPU cycles.
Default scenario profile: fidelity-gate-v1 / structural (ed03f70afe360dba). Changing fidelity or the circuit can change these times.
| Checkpointzero-based number ยท timeline label | Timesimulator units | ADDRInput ยท 32 bit |
CLKInput ยท 1 bit |
CMDInput ยท 3 bit |
WRITE_DATAInput ยท 8 bit |
WRITE_MASKInput ยท 1 bit |
BUSYExpected output ยท 1 bit |
ERRORExpected output ยท 1 bit |
READ_DATAExpected output ยท 8 bit |
READ_VALIDExpected output ยท 1 bit |
ROW_OPENExpected output ยท 1 bit |
|---|---|---|---|---|---|---|---|---|---|---|---|
#0closed-startup | 36 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
0 |
not checked | not checked | not checked | 0 |
#1read-while-closed-setup | 50 | 0x00000000 |
0 |
0x2 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#2read-while-closed-edge | 56 | 0x00000000 |
1 |
0x2 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#3read-while-closed-command-removed | 67 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#4read-while-closed-clock-1 | 72 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#5read-while-closed-clock-1-low | 77 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#6read-while-closed-clock-2 | 82 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#7read-while-closed-clock-2-low | 87 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#8read-while-closed-clock-3 | 92 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#9read-while-closed | 97 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
0 |
1 |
not checked | not checked | not checked |
#10activate-row-zero-setup | 117 | 0x00000000 |
0 |
0x1 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#11activate-row-zero-edge | 233 | 0x00000000 |
1 |
0x1 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#12activate-row-zero-command-removed | 249 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#13activate-row-zero-clock-1 | 262 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#14activate-row-zero-clock-1-low | 269 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#15activate-row-zero-clock-2 | 281 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#16activate-row-zero-clock-2-low | 289 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#17activate-row-zero-clock-3 | 304 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#18activate-row-zero | 309 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
0 |
0 |
not checked | not checked | 1 |
#19write-column-zero-setup | 333 | 0x00000000 |
0 |
0x3 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#20write-column-zero-edge | 445 | 0x00000000 |
1 |
0x3 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#21write-column-zero-command-removed | 461 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#22write-column-zero-clock-1 | 474 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#23write-column-zero-clock-1-low | 481 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#24write-column-zero-clock-2 | 493 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#25write-column-zero-clock-2-low | 501 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#26write-column-zero-clock-3 | 516 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#27write-column-zero | 521 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
0 |
0 |
not checked | not checked | not checked |
#28read-column-zero-setup | 545 | 0x00000000 |
0 |
0x2 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#29read-column-zero-edge | 591 | 0x00000000 |
1 |
0x2 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#30read-column-zero-command-removed | 607 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#31read-column-zero-clock-1 | 620 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#32read-column-zero-clock-1-low | 627 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#33read-column-zero-clock-2 | 639 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#34read-column-zero-clock-2-low | 647 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#35read-column-zero-clock-3 | 662 | 0x00000000 |
1 |
0x0 |
0x81 |
1 |
not checked | not checked | not checked | not checked | not checked |
#36read-column-zero | 667 | 0x00000000 |
0 |
0x0 |
0x81 |
1 |
0 |
not checked | 0x81 |
1 |
not checked |
#37masked-write-setup | 691 | 0x00000000 |
0 |
0x3 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#38masked-write-edge | 803 | 0x00000000 |
1 |
0x3 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#39masked-write-command-removed | 819 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#40masked-write-clock-1 | 832 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#41masked-write-clock-1-low | 839 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#42masked-write-clock-2 | 851 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#43masked-write-clock-2-low | 859 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#44masked-write-clock-3 | 874 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#45masked-write | 879 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | not checked | not checked |
#46read-masked-word-setup | 903 | 0x00000000 |
0 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#47read-masked-word-edge | 949 | 0x00000000 |
1 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#48read-masked-word-command-removed | 965 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#49read-masked-word-clock-1 | 978 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#50read-masked-word-clock-1-low | 985 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#51read-masked-word-clock-2 | 997 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#52read-masked-word-clock-2-low | 1005 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#53read-masked-word-clock-3 | 1020 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#54read-masked-word | 1025 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | 0x5A |
not checked | not checked |
#55back-to-back-reads-first-setup | 1047 | 0x00000001 |
0 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#56back-to-back-reads-first-taken | 1093 | 0x00000001 |
1 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#57back-to-back-reads-first-removed | 1109 | 0x00000001 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#58back-to-back-reads-sampled | 1122 | 0x00000001 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#59back-to-back-reads-sampled-low | 1129 | 0x00000001 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#60back-to-back-reads-releasing | 1141 | 0x00000001 |
1 |
0x0 |
0x5A |
1 |
0 |
not checked | not checked | not checked | not checked |
#61back-to-back-reads-second-setup | 1164 | 0x00000000 |
0 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#62back-to-back-reads-second-taken | 1178 | 0x00000000 |
1 |
0x2 |
0x5A |
1 |
1 |
0 |
not checked | not checked | not checked |
#63back-to-back-reads-second-removed | 1194 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#64back-to-back-reads-clock-1 | 1241 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#65back-to-back-reads-clock-1-low | 1246 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#66back-to-back-reads-clock-2 | 1258 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#67back-to-back-reads-clock-2-low | 1265 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#68back-to-back-reads-clock-3 | 1277 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#69back-to-back-reads | 1285 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | 0x5A |
1 |
not checked |
#70unknown-command-setup | 1300 | 0x00000000 |
0 |
0bXXX |
0x5A |
1 |
not checked | not checked | not checked | 1 |
not checked |
#71unknown-command-rejected | 1315 | 0x00000000 |
1 |
0bXXX |
0x5A |
1 |
0 |
1 |
0bZZZZZZZZ |
0 |
not checked |
#72nop-preserves-error-setup | 1331 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#73nop-preserves-error-edge | 1337 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#74nop-preserves-error-command-removed | 1342 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#75nop-preserves-error-clock-1 | 1347 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#76nop-preserves-error-clock-1-low | 1352 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#77nop-preserves-error-clock-2 | 1357 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#78nop-preserves-error-clock-2-low | 1362 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#79nop-preserves-error-clock-3 | 1367 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#80nop-preserves-error | 1372 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
1 |
not checked | 0 |
not checked |
#81bad-column-setup | 1397 | 0x00000002 |
0 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#82bad-column-edge | 1402 | 0x00000002 |
1 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#83bad-column-command-removed | 1413 | 0x00000002 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#84bad-column-clock-1 | 1418 | 0x00000002 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#85bad-column-clock-1-low | 1423 | 0x00000002 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#86bad-column-clock-2 | 1428 | 0x00000002 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#87bad-column-clock-2-low | 1433 | 0x00000002 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#88bad-column-clock-3 | 1438 | 0x00000002 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#89bad-column | 1443 | 0x00000002 |
0 |
0x0 |
0x5A |
1 |
0 |
1 |
not checked | not checked | not checked |
#90precharge-setup | 1461 | 0x00000000 |
0 |
0x4 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#91precharge-edge | 1576 | 0x00000000 |
1 |
0x4 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#92precharge-command-removed | 1591 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#93precharge-clock-1 | 1606 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#94precharge-clock-1-low | 1614 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#95precharge-clock-2 | 1626 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#96precharge-clock-2-low | 1634 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#97precharge-clock-3 | 1649 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#98precharge | 1654 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
0 |
not checked | not checked | 0 |
#99refresh-next-row-setup | 1671 | 0x00000000 |
0 |
0x5 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#100refresh-next-row-edge | 1855 | 0x00000000 |
1 |
0x5 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#101refresh-next-row-command-removed | 1871 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#102refresh-next-row-clock-1 | 1884 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#103refresh-next-row-clock-1-low | 1891 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#104refresh-next-row-clock-2 | 1904 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#105refresh-next-row-clock-2-low | 1912 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#106refresh-next-row-clock-3 | 1925 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#107refresh-next-row | 1930 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
0 |
not checked | not checked | 0 |
#108activate-restored-row-setup | 1950 | 0x00000000 |
0 |
0x1 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#109activate-restored-row-edge | 2066 | 0x00000000 |
1 |
0x1 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#110activate-restored-row-command-removed | 2082 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#111activate-restored-row-clock-1 | 2095 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#112activate-restored-row-clock-1-low | 2102 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#113activate-restored-row-clock-2 | 2114 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#114activate-restored-row-clock-2-low | 2122 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#115activate-restored-row-clock-3 | 2137 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#116activate-restored-row | 2142 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
0 |
not checked | not checked | not checked |
#117read-persisted-word-setup | 2166 | 0x00000000 |
0 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#118read-persisted-word-edge | 2212 | 0x00000000 |
1 |
0x2 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#119read-persisted-word-command-removed | 2228 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#120read-persisted-word-clock-1 | 2241 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#121read-persisted-word-clock-1-low | 2248 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#122read-persisted-word-clock-2 | 2260 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#123read-persisted-word-clock-2-low | 2268 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#124read-persisted-word-clock-3 | 2283 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#125read-persisted-word | 2288 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
not checked | 0x5A |
not checked | not checked |
#126reserved-command-setup | 2310 | 0x00000000 |
0 |
0x7 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#127reserved-command-edge | 2317 | 0x00000000 |
1 |
0x7 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#128reserved-command-command-removed | 2328 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#129reserved-command-clock-1 | 2333 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#130reserved-command-clock-1-low | 2338 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#131reserved-command-clock-2 | 2343 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#132reserved-command-clock-2-low | 2348 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#133reserved-command-clock-3 | 2353 | 0x00000000 |
1 |
0x0 |
0x5A |
1 |
not checked | not checked | not checked | not checked | not checked |
#134reserved-command | 2358 | 0x00000000 |
0 |
0x0 |
0x5A |
1 |
0 |
1 |
not checked | not checked | not checked |
Scroll within the table for all rows and pins. Buses use hexadecimal; values containing X/Z use MSB-first binary. Inputs show the declared values in effect at each checkpoint, including retained inputs. Sequential tests also replay preparation changes between checkpoints, such as lowering the clock. Use the matching checkpoint label in the simulation below.
The W=8 device writes 0x81, changes its enabled byte to 0x5A, exercises invalid commands and status preservation, closes, refreshes, and reads 0x5A again. Wider byte-mask coverage is in the contract test. The table contains setup rows as well as command-completion rows.
Embedded simulation¶
The standalone DRAMTest opens this component as MEMORY_ROOT. Use the explorer to compare structural and behavioral implementations.
Source and tests¶
| Test | Coverage |
|---|---|
DRAMTest |
The complete standalone sequence shown above |
MemoryDeviceContractTest |
W=8/16/32, K=1/2/4, mixed fidelity, a masked-write oracle, geometry rejection, and compact history/allocation |
MemoryDeviceTimingTest |
Early BUSY, refresh preservation, expiry, and event-queue quiescence |
MemoryDeviceDocumentationTest |
Compile the exact references; test cell/bank feedback, W=8/16/32 device behavior, refresh/expiry, busy rejection and simultaneous completion/command edges; replay native command/device binary-input prefixes |