Skip to content

ยง 3.7. Caches

A cache keeps copies of recently read words. A requester connects to its upper transaction port; the MEM_ port connects to a separate lower memory endpoint or another cache. The cache does not own the backing memory or its initial contents. 3.8 Cache Experiments measures what these caches do for access patterns over DRAM; ยง 4.7 connects them to a processor and ยง 4.8 measures programs through them.

Component Description Structural Behavioral
Cache<W> Expanded FF/SRAM tag and data banks Yes Controller only
Cache<W> with scalable banks The same controller with scalable tag and data endpoints Yes Controller only

W is the number of bits in one word: 8, 16 or 32. Both forms have the same pins and behavior. Their catalog IDs are memory.cache.<W> and memory.cache.scalable.<W>. The scalable form changes the size of the tag and data stores. The cache controller is gate-level by default; the setting controller=behavioral replaces it with a compact part that runs the same gates (see Behavioral implementation).

Configuration

Choose the word width W and these geometry parameters when building the circuit. They determine where a word can be kept and how much data fits. Addresses are always 32-bit byte addresses, even for a 16- or 32-bit word.

Parameter What it means Default and allowed values
W (C++ template width) Bits in one word; a 32-bit word occupies four bytes. 8, 16 or 32
sets Number of groups selected by the address. Default 4; a power of two. With line_state=registers: up to 4 expanded or 64 scalable; with line_state=store: up to 128 expanded or 4,096 scalable
ways Places a line can occupy within its selected set. One way is direct mapped. Default 1; 1, 2, 4 or 8
block_bytes Bytes copied from the lower memory on a miss. This is one cache line. Default one word (0 selects it); 1, 2 or 4 whole words per line, with a power-of-two byte count
backing_depth_words Size of the lower address range the cache accepts; this is not cache capacity. Default 16; power of two and large enough for every cache line

The cache holds sets ร— ways ร— block_bytes data bytes. For example, Cache<32> with two sets, two ways and block_bytes=8 holds 2 ร— 2 ร— 8 = 32 data bytes: eight 32-bit words.

The remaining choices select behavior and the reusable memory parts:

Parameter Meaning Choices
mode Whether the upper port may write. read_only (default) or read_write
write_policy Where a write goes (read-write caches). through (default): every write goes to the lower memory. back: a write hit only changes the line and marks it dirty
write_miss What a write miss does (read-write caches). no-allocate (default): the line is not fetched. allocate: the line is fetched first, then written
write_buffer Writes waiting for the lower memory (write-through only). 0 (default), 1, 2 or 4 entries
replacement Which way of a full set a miss replaces. lru (default up to two ways), plru (default for four and eight ways), fifo or random
fill How a miss fetches its line. words (default): one lower READ per word. burst: one burst READ from the requested word; the lower memory must answer bursts of a line
line_state Where valid, dirty and replacement bits are kept. registers (default): flip-flops in the controller. store: one word per set in a memory bank beside the tags
tag_technology, data_technology Memory technology for each way's tag and data store; the two choices are independent. A line-state store uses the tag technology. ff (default) or sram
storage_form Expanded cells or scalable stores under the same controller. expanded or scalable, matching the catalog ID
controller The controller's implementation. Both give the same values at every clock edge. structural (default) or behavioral

A write buffer works only with write-through, and the write settings need read_write. Exact lru exists for one and two ways only. Each way uses one 32-bit tag endpoint and one W-bit data endpoint. Expanded stores also obey the 4,096-cell limit of their memory components. The cache parameters do not choose the lower memory technology; connect any compatible lower endpoint to MEM_.

3.7.1. Cache<W>

IO pins

Directions are relative to the cache. All addresses are byte addresses. Connect each MEM_ pin to the corresponding unprefixed pin of one matching-width lower endpoint.

Pin Direction Width Description
CLK Input 1 Rising-edge transaction clock
RST Input 1 Clear transaction and cache metadata state
REQ_VALID Input 1 Offer an upper request
REQ_READY Output 1 Cache can accept the upper request
REQ_OP Input 3 READ (0), WRITE (1) or burst READ (4)
REQ_ADDR Input 32 Upper byte address
REQ_WRITE_DATA Input W Positioned write payload
REQ_WRITE_MASK Input W/8 Enabled write byte lanes
RSP_VALID Output 1 Upper response is available
RSP_READY Input 1 Accept the upper response
RSP_READ_DATA Output W Read result; zero for writes and errors
RSP_STATUS Output 3 Common endpoint status code
INV_VALID Input 1 Request all-line invalidation
INV_READY Output 1 Invalidation can be accepted at the next edge
MEM_CLK Output 1 Clock forwarded to lower endpoint
MEM_RST Output 1 Reset forwarded to lower endpoint
MEM_REQ_VALID Output 1 Offer a lower request
MEM_REQ_READY Input 1 Lower endpoint can accept the request
MEM_REQ_OP Output 3 Lower READ, burst READ (fill=burst) or WRITE
MEM_REQ_ADDR Output 32 Lower byte address
MEM_REQ_WRITE_DATA Output W Lower write payload
MEM_REQ_WRITE_MASK Output W/8 Lower write byte lanes
MEM_RSP_VALID Input 1 Lower response is available
MEM_RSP_READY Output 1 Accept the lower response
MEM_RSP_READ_DATA Input W Lower read result
MEM_RSP_STATUS Input 3 Lower status code

Behavior

Only one upper transaction is served at a time. A request is looked up in every way at once in the cycle after it is taken, and a completed response stays valid until RSP_READY accepts it.

Reads. The address selects one set, and the cache compares the address tag with that set's valid ways:

  1. Hit: return the stored word. The lower port receives no READ.
  2. Miss: choose a victim way. An invalid way is always chosen first. Otherwise replacement decides:
  3. lru: the way used least recently (exact; one bit per set for two ways).
  4. plru: pseudo-LRU, a tree of ways โˆ’ 1 bits per set. Each bit points to the half of the set that holds the victim, and every access to a line points the bits on its path away from it. For two ways it chooses as lru does.
  5. fifo: a pointer per set to the next way to replace, advanced by every completed fill.
  6. random: the low bits of a 16-bit linear-feedback shift register shared by all sets, stepped by every completed fill, so runs are reproducible.
  7. Fetch the line through MEM_ from the requested word on, wrapping around the line: one READ per word, or one burst READ with fill=burst. Store the new tag and data, then return the requested word. A failed fill leaves that way invalid.

A burst read (operation 4) is answered with every word of the line from the requested one on, wrapping: after a hit the words come from the data store, one per cycle; after a miss each word is passed on as the fill brings it.

Writes (read_write only; read_only rejects WRITE; PROGRAM and ERASE are unsupported):

  • Write-through, no write buffer (the default): every accepted WRITE goes to the lower memory and is answered when that write completes. If its line is cached, the selected byte lanes change there too. A lower write failure leaves the cached copy unchanged.
  • With a write buffer: the WRITE is answered in its lookup cycle and waits in the buffer. The buffer sends its writes to the lower memory oldest first, whenever no fill needs the lower port. A read miss waits until the buffer is empty, so it never reads a word older than a buffered write. A full buffer holds off new requests. The lower memory's status for a buffered write is not returned.
  • Write-back: a write hit changes only the line, marks it dirty and is answered in its lookup cycle. Before a dirty line is replaced, its words are written back. A write miss without allocation goes around the cache to the lower memory. The lower status of a write-back is not returned.
  • Write-allocate: a write miss first fills its line like a read miss, then writes into it.

Invalidation. INV_VALID clears every line at an idle rising edge when INV_READY is high; hold the request while busy. Before that, a cache with a write buffer waits until the buffer is empty, and a write-back cache writes back every dirty line, one line at a time. Afterwards the lower memory holds every write. Reset clears cache metadata and in-flight transactions without writing anything back; it does not erase the backing image.

Line-state store. With line_state=store, the valid, dirty and replacement bits of each set are one 32-bit word in a memory bank (LINE_STORE). The word is read with the tags and written back whenever a bit changes. Its contents are unknown at power-up, so after reset the controller writes an empty word into every set, one set per cycle, before it accepts a request. An invalidation does the same. This keeps the controller the same size however many sets there are.

For two levels, connect L1's MEM_ pins to the upper pins of a matching-width L2, then connect L2's MEM_ pins to RAM. An L1 miss can hit in L2 without accessing RAM. Each cache manages its own lines. The surrounding circuit must coordinate invalidation (an L1 before its L2), arbitrate multiple requesters (ยง3.5.3) and route device addresses around cacheable RAM.

C++ example

This small reference describes the completed binary transactions of a cache with the default behavior: write-through, no write-allocate, no write buffer, lru replacement and one READ per fill word. backing stands for a separately connected memory endpoint; Line groups the tag, data and valid state that the simulator builds from separate tag/data endpoints and clocked bits. Template parameters show how word width, sets, ways and words per line change the same algorithm. The actual cache implements lookup and control structurally, with clocked REQ/RSP handshakes.

#include <array>
#include <cstddef>
#include <cstdint>
#include <stdexcept>
#include <vector>

template<std::size_t W, std::size_t Sets, std::size_t Ways,
         std::size_t WordsPerLine>
class CacheReference {
    static_assert((W == 8 || W == 16 || W == 32) && Sets > 0 &&
                  (Ways == 1 || Ways == 2) && WordsPerLine > 0);
    static constexpr std::size_t BytesPerWord = W / 8;
    struct Line {
        bool valid = false;
        std::size_t tag = 0;
        std::array<std::uint32_t, WordsPerLine> data{};
    };
    struct Address {
        std::size_t word, block_base, set, tag, offset;
    };
    std::array<std::array<Line, Ways>, Sets> lines_{};
    std::array<std::size_t, Sets> most_recent_way_{};
    std::vector<std::uint32_t>& backing_;
    bool writable_;

    Address decode(std::uint32_t byte_address) const {
        if (byte_address % BytesPerWord) throw std::invalid_argument("alignment");
        const auto word = byte_address / BytesPerWord;
        const auto block = word / WordsPerLine;
        const auto base = block * WordsPerLine;
        if (base + WordsPerLine > backing_.size()) throw std::out_of_range("line");
        return {word, base, block % Sets, block / Sets, word % WordsPerLine};
    }

public:
    std::size_t lower_reads = 0, lower_writes = 0;
    CacheReference(std::vector<std::uint32_t>& backing, bool writable)
        : backing_(backing), writable_(writable) {}

    void invalidate() {
        for (auto& set : lines_) for (auto& line : set) line.valid = false;
        most_recent_way_.fill(0); // Backing contents are unchanged.
    }

    std::uint32_t read(std::uint32_t byte_address) {
        const auto a = decode(byte_address);
        auto& set = lines_[a.set];
        for (std::size_t way = 0; way < Ways; ++way) {
            if (set[way].valid && set[way].tag == a.tag) {
                most_recent_way_[a.set] = way;
                return set[way].data[a.offset]; // Hit: no backing READ.
            }
        }
        const std::size_t victim = Ways == 1 ? 0 :
            !set[0].valid ? 0 : !set[1].valid ? 1 :
            1 - most_recent_way_[a.set]; // Invalid first, then two-way LRU.
        auto& line = set[victim];
        line.valid = false;
        for (std::size_t i = 0; i < WordsPerLine; ++i) {
            line.data[i] = backing_[a.block_base + i];
            ++lower_reads; // One lower READ per word of the line.
        }
        line.tag = a.tag;
        line.valid = true; // Publish only after the whole line has arrived.
        most_recent_way_[a.set] = victim;
        return line.data[a.offset];
    }

    bool write(std::uint32_t byte_address, std::uint32_t data,
               std::uint32_t byte_mask) {
        if (!writable_) return false; // A read-only cache rejects WRITE.
        const auto a = decode(byte_address);
        if (byte_mask >= (1u << BytesPerWord))
            throw std::invalid_argument("mask");
        auto merged = backing_[a.word];
        for (std::size_t lane = 0; lane < BytesPerWord; ++lane) {
            if (byte_mask & (1u << lane)) {
                const auto bits = 0xffu << (8 * lane);
                merged = (merged & ~bits) | (data & bits);
            }
        }
        backing_[a.word] = merged;
        ++lower_writes; // Every accepted WRITE goes to backing.
        for (std::size_t way = 0; way < Ways; ++way) {
            auto& line = lines_[a.set][way];
            if (line.valid && line.tag == a.tag) {
                line.data[a.offset] = merged; // Update a cached hit only.
                most_recent_way_[a.set] = way;
                break; // A write miss does not allocate a line.
            }
        }
        return true;
    }
};

For example, CacheReference<32, 2, 2, 2> has two sets, two ways and two 32-bit words per line. Reading byte address 0 fills words 0 and 1; reading byte address 4 then hits without another backing READ. Its masked WRITE sends one backing WRITE and changes a cached word only if that line is present. The example assumes successful backing and internal transactions; the simulator also handles held responses and failure statuses.

Unknown inputs

Unknown operation or address bits return InvalidRequest; an unknown byte mask on a WRITE does likewise. Read requests ignore write payload and mask. The cache validates alignment and the configured backing range before a lower request. Its backing depth must contain complete lines. Lower endpoint technology and profile affect the time spent on fills and writes. In the processor arrangements of ยง 4.8, the clock analysis certifies the caches at the profile's core clock (4,104 ps in embedded, 2,858 ps in desktop), with either controller.

Implementation

Structural implementation

The cache is a controller (CONTROLLER) and, per way, a tag store (TAG_STORE_<n>) and a data store (DATA_STORE_<n>), plus LINE_STORE with line_state=store. The stores are native memory devices, FF or the clocked on-chip SRAM, chosen independently by contract ID and driven directly by the controller; their small strobe gates are named after them. The backing memory connects to MEM_ outside the cache. The scalable form selects scalable store devices under this same controller.

The controller is gate-level throughout:

Part What it does
FRONTEND The transaction port: one outstanding request and a one-entry response buffer
REQUEST_CHECK Operation, alignment, range and mask checks, and the status of a rejected request
ADDRESS_PATH Splits the address into tag, set and word, and counts fill words
PHASES State bits LOOKUP, MEMORY_SEND, MEMORY_WAIT, STREAM, DONE
TAG_MATCH_<n> A 32-bit comparator (one XORGate<32> DIFFER and a ZeroDetect<32> EQUAL) and the valid bit of each way
LINE_STATE_<n> Valid (and with write-back, dirty) bits of every line of a way, in registers mode; one state bit per set, with the next-state logic of all sets as word gates over the sets (at 4โ€“32 sets)
REPLACEMENT Two-way lru: one bit per set; plru and fifo: their bits per set
WRITE_QUEUE The write buffer: each slot a valid bit and the write's address, data and mask
EVICT_*, FLUSH_* Write-back of a dirty victim, and the walk over every line before invalidation
LINE_WORD, CLEAR_INDEX With a line-state store: the set's word while a request lasts, and the clearing walk

Way numbers travel as small binary indexes: the hit way, the victim and the way a fill or write uses. Multiplexer trees choose a way's tag and data, and decoders turn an index back into one line per way.

Behavioral implementation

There is no behavioral form of the whole cache: the stores are already native devices with compact forms. With controller=behavioral, the controller is one compact part with the same pins. It keeps the gate-level controller's rules by running that controller's own gate list:

  • When built, it builds the gate-level controller for the same parameters, compiles its gates, state bits and registers into a list, and proves its delay table on those gates (inputs to outputs, clock to outputs, setup).
  • Each input change recomputes only the bits it reaches, with the gates' four-state values. State bits and registers follow their own rules: a reset clears them at once, and a rising clock edge captures their data.

A change to the gate-level controller therefore changes the compact one too. In the tests the two give the same upper and lower port values after every step. They run the experiments' standalone traces and processor programs with the same cycles and final memory, 4 to 7 times faster.

Examples

Each example names its geometry and shows the corresponding circuit in the visualizer. The first three drive known responses into one cache's lower port, making each hit, fill and eviction easy to follow. The fourth wires two caches to a real FF RAM endpoint. These are correctness examples, not speed benchmarks.

Example Word Sets ร— ways Line Data capacity Tag/data stores
Direct mapped 32 bits 2 ร— 1 1 word 8 bytes Expanded FF/FF
Two way with writes 8 bits 2 ร— 2 2 words 8 bytes Expanded FF/FF
Scalable two way 32 bits 8 ร— 2 2 words 128 bytes Scalable SRAM/SRAM
Two levels 8 bits L1: 1 ร— 1; L2: 2 ร— 2 L1: 1 word; L2: 2 words L1: 1 byte; L2: 8 bytes FF cache stores, FF backing RAM

Direct mapped: one place per set

This Cache<32> has sets=2, ways=1, block_bytes=4 and backing_depth_words=16. Address 0 fills its only way in set 0; reading 0 again is a hit. Address 8 maps to the same set and replaces 0, so a later read of 0 must refill. The lower port is scripted and shows one READ per miss. An address beyond the configured backing range is rejected without a lower request.

All 30 recorded rows of CacheDirectMappedScenarioTest, 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 CLKInput ยท 1 bit INV_VALIDInput ยท 1 bit MEM_REQ_READYInput ยท 1 bit MEM_RSP_READ_DATAInput ยท 32 bit MEM_RSP_STATUSInput ยท 3 bit MEM_RSP_VALIDInput ยท 1 bit REQ_ADDRInput ยท 32 bit REQ_OPInput ยท 3 bit REQ_VALIDInput ยท 1 bit REQ_WRITE_DATAInput ยท 32 bit REQ_WRITE_MASKInput ยท 4 bit RSP_READYInput ยท 1 bit RSTInput ยท 1 bit INV_READYExpected output ยท 1 bit MEM_CLKExpected output ยท 1 bit MEM_REQ_ADDRExpected output ยท 32 bit MEM_REQ_OPExpected output ยท 3 bit MEM_REQ_VALIDExpected output ยท 1 bit MEM_REQ_WRITE_DATAExpected output ยท 32 bit MEM_REQ_WRITE_MASKExpected output ยท 4 bit MEM_RSP_READYExpected output ยท 1 bit MEM_RSTExpected output ยท 1 bit REQ_READYExpected output ยท 1 bit RSP_READ_DATAExpected output ยท 32 bit RSP_STATUSExpected output ยท 3 bit RSP_VALIDExpected output ยท 1 bit
#0reset16 0 0 0 0x00000000 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 1 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#1ready21 0 0 0 0x00000000 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#2cold-setup29 0 0 0 0x00000000 0x0 0 0x00000000 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#3cold-accepted42 1 0 0 0x00000000 0x0 0 0x00000000 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#4cold-word-0-lower-request257 0 0 0 0x00000000 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked 0x00000000 0x0 1 not checked not checked not checked not checked not checked not checked not checked not checked
#5cold-word-0-lower-ready269 0 0 1 0x00000000 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 1 not checked not checked not checked not checked not checked not checked not checked not checked
#6cold-word-0-lower-accepted276 1 0 1 0x00000000 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#7cold-word-0-lower-response295 0 0 0 0xA3A2A1A0 0x0 1 0x00000000 0x0 0 0x00000000 0x0 0 0 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
#8cold-response531 0 0 0 0xA3A2A1A0 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA3A2A1A0 0x0 1
#9same-word-setup564 0 0 0 0xA3A2A1A0 0x0 0 0x00000000 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#10same-word-accepted577 1 0 0 0xA3A2A1A0 0x0 0 0x00000000 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#11same-word-no-lower-read688 0 0 0 0xA3A2A1A0 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#12same-word-response889 0 0 0 0xA3A2A1A0 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA3A2A1A0 0x0 1
#13conflict-setup923 0 0 0 0xA3A2A1A0 0x0 0 0x00000008 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#14conflict-accepted945 1 0 0 0xA3A2A1A0 0x0 0 0x00000008 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#15conflict-word-0-lower-request1160 0 0 0 0xA3A2A1A0 0x0 0 0x00000008 0x0 0 0x00000000 0x0 0 0 not checked not checked 0x00000008 0x0 1 not checked not checked not checked not checked not checked not checked not checked not checked
#16conflict-word-0-lower-ready1172 0 0 1 0xA3A2A1A0 0x0 0 0x00000008 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 1 not checked not checked not checked not checked not checked not checked not checked not checked
#17conflict-word-0-lower-accepted1179 1 0 1 0xA3A2A1A0 0x0 0 0x00000008 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#18conflict-word-0-lower-response1197 0 0 0 0xABAAA9A8 0x0 1 0x00000008 0x0 0 0x00000000 0x0 0 0 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
#19conflict-response1433 0 0 0 0xABAAA9A8 0x0 0 0x00000008 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xABAAA9A8 0x0 1
#20evicted-word-setup1470 0 0 0 0xABAAA9A8 0x0 0 0x00000000 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#21evicted-word-accepted1493 1 0 0 0xABAAA9A8 0x0 0 0x00000000 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#22evicted-word-word-0-lower-request1708 0 0 0 0xABAAA9A8 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked 0x00000000 0x0 1 not checked not checked not checked not checked not checked not checked not checked not checked
#23evicted-word-word-0-lower-ready1720 0 0 1 0xABAAA9A8 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 1 not checked not checked not checked not checked not checked not checked not checked not checked
#24evicted-word-word-0-lower-accepted1727 1 0 1 0xABAAA9A8 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#25evicted-word-word-0-lower-response1747 0 0 0 0xA3A2A1A0 0x0 1 0x00000000 0x0 0 0x00000000 0x0 0 0 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
#26evicted-word-response1983 0 0 0 0xA3A2A1A0 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA3A2A1A0 0x0 1
#27out-of-range-setup2033 0 0 0 0xA3A2A1A0 0x0 0 0x00000040 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#28out-of-range-accepted2052 1 0 0 0xA3A2A1A0 0x0 0 0x00000040 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#29out-of-range-response2276 0 0 0 0xA3A2A1A0 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0x00000000 0x2 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.

Open direct-mapped scenario

Two ways and two-word lines

This Cache<8> has sets=2, ways=2, block_bytes=2 and backing_depth_words=16. Reading 0 fetches bytes 0 and 1; reading 1 then hits in the same line. Another line can occupy the second way, and a third conflicting line replaces the least recently used way. The scripted lower port also shows a write-through hit, a write miss without allocation, invalidation and a rejected address.

All 116 recorded rows of CacheComponentScenarioTest, 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 CLKInput ยท 1 bit INV_VALIDInput ยท 1 bit MEM_REQ_READYInput ยท 1 bit MEM_RSP_READ_DATAInput ยท 8 bit MEM_RSP_STATUSInput ยท 3 bit MEM_RSP_VALIDInput ยท 1 bit REQ_ADDRInput ยท 32 bit REQ_OPInput ยท 3 bit REQ_VALIDInput ยท 1 bit REQ_WRITE_DATAInput ยท 8 bit REQ_WRITE_MASKInput ยท 1 bit RSP_READYInput ยท 1 bit RSTInput ยท 1 bit INV_READYExpected output ยท 1 bit MEM_CLKExpected output ยท 1 bit MEM_REQ_ADDRExpected output ยท 32 bit MEM_REQ_OPExpected output ยท 3 bit MEM_REQ_VALIDExpected output ยท 1 bit MEM_REQ_WRITE_DATAExpected output ยท 8 bit MEM_REQ_WRITE_MASKExpected output ยท 1 bit MEM_RSP_READYExpected output ยท 1 bit MEM_RSTExpected output ยท 1 bit REQ_READYExpected output ยท 1 bit RSP_READ_DATAExpected output ยท 8 bit RSP_STATUSExpected output ยท 3 bit RSP_VALIDExpected output ยท 1 bit
#0reset16 0 0 0 0x00 0x0 0 0x00000000 0x0 0 0x00 0 0 1 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked 0
#1ready21 0 0 0 0x00 0x0 0 0x00000000 0x0 0 0x00 0 0 0 1 not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#2cold-setup29 0 0 0 0x00 0x0 0 0x00000000 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#3cold-accepted42 1 0 0 0x00 0x0 0 0x00000000 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#4cold-word-0-lower-blocked257 0 0 0 0x00 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked 0x00000000 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#5cold-word-0-lower-ready269 0 0 1 0x00 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked 0x00000000 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#6cold-word-0-lower-accepted276 1 0 1 0x00 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#7cold-word-0-lower-response293 0 0 0 0xA0 0x0 1 0x00000000 0x0 0 0x00 0 0 0 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
#8cold-word-1-lower-blocked524 0 0 0 0xA0 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked 0x00000001 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#9cold-word-1-lower-ready536 0 0 1 0xA0 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked 0x00000001 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#10cold-word-1-lower-accepted543 1 0 1 0xA0 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#11cold-word-1-lower-response567 0 0 0 0xA1 0x0 1 0x00000000 0x0 0 0x00 0 0 0 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
#12cold-response806 0 0 0 0xA1 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA0 0x0 1
#13cold-held811 1 0 0 0xA1 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0xA0 0x0 1
#14same-line-setup854 0 0 0 0xA1 0x0 0 0x00000001 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#15same-line-accepted885 1 0 0 0xA1 0x0 0 0x00000001 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#16same-line-no-lower-read996 0 0 0 0xA1 0x0 0 0x00000001 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#17same-line-response1197 0 0 0 0xA1 0x0 0 0x00000001 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA1 0x0 1
#18same-line-held1202 1 0 0 0xA1 0x0 0 0x00000001 0x0 0 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0xA1 0x0 1
#19second-way-setup1247 0 0 0 0xA1 0x0 0 0x00000004 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#20second-way-accepted1270 1 0 0 0xA1 0x0 0 0x00000004 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#21second-way-word-0-lower-blocked1488 0 0 0 0xA1 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked 0x00000004 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#22second-way-word-0-lower-ready1500 0 0 1 0xA1 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked 0x00000004 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#23second-way-word-0-lower-accepted1507 1 0 1 0xA1 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#24second-way-word-0-lower-response1526 0 0 0 0xA4 0x0 1 0x00000004 0x0 0 0x00 0 0 0 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
#25second-way-word-1-lower-blocked1757 0 0 0 0xA4 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked 0x00000005 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#26second-way-word-1-lower-ready1769 0 0 1 0xA4 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked 0x00000005 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#27second-way-word-1-lower-accepted1776 1 0 1 0xA4 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#28second-way-word-1-lower-response1800 0 0 0 0xA5 0x0 1 0x00000004 0x0 0 0x00 0 0 0 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
#29second-way-response2039 0 0 0 0xA5 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA4 0x0 1
#30second-way-held2044 1 0 0 0xA5 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0xA4 0x0 1
#31touch-first-way-setup2081 0 0 0 0xA5 0x0 0 0x00000000 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#32touch-first-way-accepted2105 1 0 0 0xA5 0x0 0 0x00000000 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#33touch-first-way-no-lower-read2216 0 0 0 0xA5 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#34touch-first-way-response2417 0 0 0 0xA5 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA0 0x0 1
#35touch-first-way-held2422 1 0 0 0xA5 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0xA0 0x0 1
#36replace-lru-setup2456 0 0 0 0xA5 0x0 0 0x00000008 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#37replace-lru-accepted2479 1 0 0 0xA5 0x0 0 0x00000008 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#38replace-lru-word-0-lower-blocked2697 0 0 0 0xA5 0x0 0 0x00000008 0x0 0 0x00 0 0 0 not checked not checked 0x00000008 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#39replace-lru-word-0-lower-ready2709 0 0 1 0xA5 0x0 0 0x00000008 0x0 0 0x00 0 0 0 not checked not checked 0x00000008 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#40replace-lru-word-0-lower-accepted2716 1 0 1 0xA5 0x0 0 0x00000008 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#41replace-lru-word-0-lower-response2736 0 0 0 0xA8 0x0 1 0x00000008 0x0 0 0x00 0 0 0 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
#42replace-lru-word-1-lower-blocked2967 0 0 0 0xA8 0x0 0 0x00000008 0x0 0 0x00 0 0 0 not checked not checked 0x00000009 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#43replace-lru-word-1-lower-ready2979 0 0 1 0xA8 0x0 0 0x00000008 0x0 0 0x00 0 0 0 not checked not checked 0x00000009 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#44replace-lru-word-1-lower-accepted2986 1 0 1 0xA8 0x0 0 0x00000008 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#45replace-lru-word-1-lower-response3010 0 0 0 0xA9 0x0 1 0x00000008 0x0 0 0x00 0 0 0 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
#46replace-lru-response3249 0 0 0 0xA9 0x0 0 0x00000008 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA8 0x0 1
#47replace-lru-held3254 1 0 0 0xA9 0x0 0 0x00000008 0x0 0 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0xA8 0x0 1
#48retained-way-setup3291 0 0 0 0xA9 0x0 0 0x00000000 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#49retained-way-accepted3315 1 0 0 0xA9 0x0 0 0x00000000 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#50retained-way-no-lower-read3426 0 0 0 0xA9 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#51retained-way-response3627 0 0 0 0xA9 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA0 0x0 1
#52retained-way-held3632 1 0 0 0xA9 0x0 0 0x00000000 0x0 0 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0xA0 0x0 1
#53evicted-way-setup3666 0 0 0 0xA9 0x0 0 0x00000004 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#54evicted-way-accepted3689 1 0 0 0xA9 0x0 0 0x00000004 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#55evicted-way-word-0-lower-blocked3907 0 0 0 0xA9 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked 0x00000004 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#56evicted-way-word-0-lower-ready3919 0 0 1 0xA9 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked 0x00000004 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#57evicted-way-word-0-lower-accepted3926 1 0 1 0xA9 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#58evicted-way-word-0-lower-response3946 0 0 0 0xA4 0x0 1 0x00000004 0x0 0 0x00 0 0 0 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
#59evicted-way-word-1-lower-blocked4177 0 0 0 0xA4 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked 0x00000005 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#60evicted-way-word-1-lower-ready4189 0 0 1 0xA4 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked 0x00000005 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#61evicted-way-word-1-lower-accepted4196 1 0 1 0xA4 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#62evicted-way-word-1-lower-response4220 0 0 0 0xA5 0x0 1 0x00000004 0x0 0 0x00 0 0 0 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
#63evicted-way-response4459 0 0 0 0xA5 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA4 0x0 1
#64evicted-way-held4464 1 0 0 0xA5 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0xA4 0x0 1
#65write-hit-setup4500 0 0 0 0xA5 0x0 0 0x00000004 0x1 1 0x5C 1 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#66write-hit-accepted4516 1 0 0 0xA5 0x0 0 0x00000004 0x1 1 0x5C 1 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#67write-hit-lower-blocked4733 0 0 0 0xA5 0x0 0 0x00000004 0x1 0 0x5C 1 0 0 not checked not checked 0x00000004 0x1 1 0x5C 1 not checked not checked not checked not checked not checked 0
#68write-hit-lower-ready4745 0 0 1 0xA5 0x0 0 0x00000004 0x1 0 0x5C 1 0 0 not checked not checked 0x00000004 0x1 1 0x5C 1 not checked not checked not checked not checked not checked 0
#69write-hit-lower-accepted4752 1 0 1 0xA5 0x0 0 0x00000004 0x1 0 0x5C 1 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#70write-hit-lower-response4773 0 0 0 0x00 0x0 1 0x00000004 0x1 0 0x5C 1 0 0 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
#71write-hit-response5006 0 0 0 0x00 0x0 0 0x00000004 0x1 0 0x5C 1 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0x00 0x0 1
#72write-hit-held5011 1 0 0 0x00 0x0 0 0x00000004 0x1 0 0x5C 1 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0x00 0x0 1
#73read-after-write-setup5057 0 0 0 0x00 0x0 0 0x00000004 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#74read-after-write-accepted5072 1 0 0 0x00 0x0 0 0x00000004 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#75read-after-write-no-lower-read5183 0 0 0 0x00 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#76read-after-write-response5384 0 0 0 0x00 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0x5C 0x0 1
#77read-after-write-held5389 1 0 0 0x00 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0x5C 0x0 1
#78write-miss-setup5425 0 0 0 0x00 0x0 0 0x0000000C 0x1 1 0x7D 1 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#79write-miss-accepted5442 1 0 0 0x00 0x0 0 0x0000000C 0x1 1 0x7D 1 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#80write-miss-lower-blocked5657 0 0 0 0x00 0x0 0 0x0000000C 0x1 0 0x7D 1 0 0 not checked not checked 0x0000000C 0x1 1 0x7D 1 not checked not checked not checked not checked not checked 0
#81write-miss-lower-ready5669 0 0 1 0x00 0x0 0 0x0000000C 0x1 0 0x7D 1 0 0 not checked not checked 0x0000000C 0x1 1 0x7D 1 not checked not checked not checked not checked not checked 0
#82write-miss-lower-accepted5676 1 0 1 0x00 0x0 0 0x0000000C 0x1 0 0x7D 1 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#83write-miss-lower-response5690 0 0 0 0x00 0x0 1 0x0000000C 0x1 0 0x7D 1 0 0 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
#84write-miss-response5923 0 0 0 0x00 0x0 0 0x0000000C 0x1 0 0x7D 1 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0x00 0x0 1
#85write-miss-held5928 1 0 0 0x00 0x0 0 0x0000000C 0x1 0 0x7D 1 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0x00 0x0 1
#86read-after-write-miss-setup5974 0 0 0 0x00 0x0 0 0x0000000C 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#87read-after-write-miss-accepted5989 1 0 0 0x00 0x0 0 0x0000000C 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#88read-after-write-miss-word-0-lower-blocked6204 0 0 0 0x00 0x0 0 0x0000000C 0x0 0 0x00 0 0 0 not checked not checked 0x0000000C 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#89read-after-write-miss-word-0-lower-ready6216 0 0 1 0x00 0x0 0 0x0000000C 0x0 0 0x00 0 0 0 not checked not checked 0x0000000C 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#90read-after-write-miss-word-0-lower-accepted6223 1 0 1 0x00 0x0 0 0x0000000C 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#91read-after-write-miss-word-0-lower-response6243 0 0 0 0x7D 0x0 1 0x0000000C 0x0 0 0x00 0 0 0 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
#92read-after-write-miss-word-1-lower-blocked6474 0 0 0 0x7D 0x0 0 0x0000000C 0x0 0 0x00 0 0 0 not checked not checked 0x0000000D 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#93read-after-write-miss-word-1-lower-ready6486 0 0 1 0x7D 0x0 0 0x0000000C 0x0 0 0x00 0 0 0 not checked not checked 0x0000000D 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#94read-after-write-miss-word-1-lower-accepted6493 1 0 1 0x7D 0x0 0 0x0000000C 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#95read-after-write-miss-word-1-lower-response6517 0 0 0 0xAD 0x0 1 0x0000000C 0x0 0 0x00 0 0 0 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
#96read-after-write-miss-response6756 0 0 0 0xAD 0x0 0 0x0000000C 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0x7D 0x0 1
#97read-after-write-miss-held6761 1 0 0 0xAD 0x0 0 0x0000000C 0x0 0 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0x7D 0x0 1
#98invalidate-ready6799 0 1 0 0xAD 0x0 0 0x0000000C 0x0 0 0x00 0 0 0 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
#99invalidated6804 1 1 0 0xAD 0x0 0 0x0000000C 0x0 0 0x00 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 0
#100refill-after-invalidate-setup6823 0 0 0 0xAD 0x0 0 0x00000004 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#101refill-after-invalidate-accepted6837 1 0 0 0xAD 0x0 0 0x00000004 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#102refill-after-invalidate-word-0-lower-blocked7052 0 0 0 0xAD 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked 0x00000004 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#103refill-after-invalidate-word-0-lower-ready7064 0 0 1 0xAD 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked 0x00000004 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#104refill-after-invalidate-word-0-lower-accepted7071 1 0 1 0xAD 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#105refill-after-invalidate-word-0-lower-response7091 0 0 0 0x5C 0x0 1 0x00000004 0x0 0 0x00 0 0 0 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
#106refill-after-invalidate-word-1-lower-blocked7322 0 0 0 0x5C 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked 0x00000005 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#107refill-after-invalidate-word-1-lower-ready7334 0 0 1 0x5C 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked 0x00000005 0x0 1 not checked not checked not checked not checked not checked not checked not checked 0
#108refill-after-invalidate-word-1-lower-accepted7341 1 0 1 0x5C 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#109refill-after-invalidate-word-1-lower-response7365 0 0 0 0xA5 0x0 1 0x00000004 0x0 0 0x00 0 0 0 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
#110refill-after-invalidate-response7604 0 0 0 0xA5 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0x5C 0x0 1
#111refill-after-invalidate-held7609 1 0 0 0xA5 0x0 0 0x00000004 0x0 0 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0x5C 0x0 1
#112out-of-range-setup7659 0 0 0 0xA5 0x0 0 0x00000010 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#113out-of-range-accepted7678 1 0 0 0xA5 0x0 0 0x00000010 0x0 1 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#114out-of-range-response7902 0 0 0 0xA5 0x0 0 0x00000010 0x0 0 0x00 0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0x00 0x2 1
#115out-of-range-held7907 1 0 0 0xA5 0x0 0 0x00000010 0x0 0 0x00 0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked not checked 0x00 0x2 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.

Open two-way scenario

Scalable stores with larger geometry

This Cache<32> has sets=8, ways=2, block_bytes=8, backing_depth_words=64 and independently selected scalable SRAM tag and data stores. Reading byte address 4 fetches words at 0 and 4; the next read of 0 is a same-line hit. Lines starting at 0, 64 and 128 all map to one set, so the later reads show both ways and least-recently-used replacement. The lower responses are scripted; the visualized cache control is the same structural design as in the smaller examples.

All 58 recorded rows of CacheScalableScenarioTest, 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-logic-v1 / structural (3c048584c5332bb2). Changing fidelity or the circuit can change these times.

Checkpointzero-based number ยท timeline label Timesimulator units CLKInput ยท 1 bit INV_VALIDInput ยท 1 bit MEM_REQ_READYInput ยท 1 bit MEM_RSP_READ_DATAInput ยท 32 bit MEM_RSP_STATUSInput ยท 3 bit MEM_RSP_VALIDInput ยท 1 bit REQ_ADDRInput ยท 32 bit REQ_OPInput ยท 3 bit REQ_VALIDInput ยท 1 bit REQ_WRITE_DATAInput ยท 32 bit REQ_WRITE_MASKInput ยท 4 bit RSP_READYInput ยท 1 bit RSTInput ยท 1 bit INV_READYExpected output ยท 1 bit MEM_CLKExpected output ยท 1 bit MEM_REQ_ADDRExpected output ยท 32 bit MEM_REQ_OPExpected output ยท 3 bit MEM_REQ_VALIDExpected output ยท 1 bit MEM_REQ_WRITE_DATAExpected output ยท 32 bit MEM_REQ_WRITE_MASKExpected output ยท 4 bit MEM_RSP_READYExpected output ยท 1 bit MEM_RSTExpected output ยท 1 bit REQ_READYExpected output ยท 1 bit RSP_READ_DATAExpected output ยท 32 bit RSP_STATUSExpected output ยท 3 bit RSP_VALIDExpected output ยท 1 bit
#0reset82 0 0 0 0x00000000 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 1 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#1ready87 0 0 0 0x00000000 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#2cold-setup98 0 0 0 0x00000000 0x0 0 0x00000004 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#3cold-accepted260 1 0 0 0x00000000 0x0 0 0x00000004 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#4cold-word-0-lower-request389 0 0 0 0x00000000 0x0 0 0x00000004 0x0 0 0x00000000 0x0 0 0 not checked not checked 0x00000004 0x0 1 not checked not checked not checked not checked not checked not checked not checked not checked
#5cold-word-0-lower-ready394 0 0 1 0x00000000 0x0 0 0x00000004 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 1 not checked not checked not checked not checked not checked not checked not checked not checked
#6cold-word-0-lower-accepted401 1 0 1 0x00000000 0x0 0 0x00000004 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#7cold-word-0-lower-response415 0 0 0 0xA7A6A5A4 0x0 1 0x00000004 0x0 0 0x00000000 0x0 0 0 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
#8cold-word-1-lower-request758 0 0 0 0xA7A6A5A4 0x0 0 0x00000004 0x0 0 0x00000000 0x0 0 0 not checked not checked 0x00000000 0x0 1 not checked not checked not checked not checked not checked not checked not checked not checked
#9cold-word-1-lower-ready763 0 0 1 0xA7A6A5A4 0x0 0 0x00000004 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 1 not checked not checked not checked not checked not checked not checked not checked not checked
#10cold-word-1-lower-accepted770 1 0 1 0xA7A6A5A4 0x0 0 0x00000004 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#11cold-word-1-lower-response784 0 0 0 0xA3A2A1A0 0x0 1 0x00000004 0x0 0 0x00000000 0x0 0 0 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
#12cold-response1130 0 0 0 0xA3A2A1A0 0x0 0 0x00000004 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA7A6A5A4 0x0 1
#13neighbor-setup1159 0 0 0 0xA3A2A1A0 0x0 0 0x00000000 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#14neighbor-accepted1337 1 0 0 0xA3A2A1A0 0x0 0 0x00000000 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#15neighbor-no-lower-read1403 0 0 0 0xA3A2A1A0 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#16neighbor-response1524 0 0 0 0xA3A2A1A0 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA3A2A1A0 0x0 1
#17second-way-setup1553 0 0 0 0xA3A2A1A0 0x0 0 0x00000040 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#18second-way-accepted1731 1 0 0 0xA3A2A1A0 0x0 0 0x00000040 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#19second-way-word-0-lower-request1861 0 0 0 0xA3A2A1A0 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked 0x00000040 0x0 1 not checked not checked not checked not checked not checked not checked not checked not checked
#20second-way-word-0-lower-ready1866 0 0 1 0xA3A2A1A0 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 1 not checked not checked not checked not checked not checked not checked not checked not checked
#21second-way-word-0-lower-accepted1873 1 0 1 0xA3A2A1A0 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#22second-way-word-0-lower-response1887 0 0 0 0xE3E2E1E0 0x0 1 0x00000040 0x0 0 0x00000000 0x0 0 0 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
#23second-way-word-1-lower-request2230 0 0 0 0xE3E2E1E0 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked 0x00000044 0x0 1 not checked not checked not checked not checked not checked not checked not checked not checked
#24second-way-word-1-lower-ready2235 0 0 1 0xE3E2E1E0 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 1 not checked not checked not checked not checked not checked not checked not checked not checked
#25second-way-word-1-lower-accepted2242 1 0 1 0xE3E2E1E0 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#26second-way-word-1-lower-response2257 0 0 0 0xE7E6E5E4 0x0 1 0x00000040 0x0 0 0x00000000 0x0 0 0 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
#27second-way-response2603 0 0 0 0xE7E6E5E4 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xE3E2E1E0 0x0 1
#28touch-first-way-setup2632 0 0 0 0xE7E6E5E4 0x0 0 0x00000004 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#29touch-first-way-accepted2810 1 0 0 0xE7E6E5E4 0x0 0 0x00000004 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#30touch-first-way-no-lower-read2876 0 0 0 0xE7E6E5E4 0x0 0 0x00000004 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#31touch-first-way-response2997 0 0 0 0xE7E6E5E4 0x0 0 0x00000004 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA7A6A5A4 0x0 1
#32third-conflict-setup3026 0 0 0 0xE7E6E5E4 0x0 0 0x00000080 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#33third-conflict-accepted3204 1 0 0 0xE7E6E5E4 0x0 0 0x00000080 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#34third-conflict-word-0-lower-request3334 0 0 0 0xE7E6E5E4 0x0 0 0x00000080 0x0 0 0x00000000 0x0 0 0 not checked not checked 0x00000080 0x0 1 not checked not checked not checked not checked not checked not checked not checked not checked
#35third-conflict-word-0-lower-ready3339 0 0 1 0xE7E6E5E4 0x0 0 0x00000080 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 1 not checked not checked not checked not checked not checked not checked not checked not checked
#36third-conflict-word-0-lower-accepted3346 1 0 1 0xE7E6E5E4 0x0 0 0x00000080 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#37third-conflict-word-0-lower-response3360 0 0 0 0x23222120 0x0 1 0x00000080 0x0 0 0x00000000 0x0 0 0 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
#38third-conflict-word-1-lower-request3703 0 0 0 0x23222120 0x0 0 0x00000080 0x0 0 0x00000000 0x0 0 0 not checked not checked 0x00000084 0x0 1 not checked not checked not checked not checked not checked not checked not checked not checked
#39third-conflict-word-1-lower-ready3708 0 0 1 0x23222120 0x0 0 0x00000080 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 1 not checked not checked not checked not checked not checked not checked not checked not checked
#40third-conflict-word-1-lower-accepted3715 1 0 1 0x23222120 0x0 0 0x00000080 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#41third-conflict-word-1-lower-response3730 0 0 0 0x27262524 0x0 1 0x00000080 0x0 0 0x00000000 0x0 0 0 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
#42third-conflict-response4076 0 0 0 0x27262524 0x0 0 0x00000080 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0x23222120 0x0 1
#43retained-way-setup4105 0 0 0 0x27262524 0x0 0 0x00000000 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#44retained-way-accepted4283 1 0 0 0x27262524 0x0 0 0x00000000 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#45retained-way-no-lower-read4349 0 0 0 0x27262524 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#46retained-way-response4470 0 0 0 0x27262524 0x0 0 0x00000000 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xA3A2A1A0 0x0 1
#47evicted-way-setup4499 0 0 0 0x27262524 0x0 0 0x00000040 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 1 not checked not checked not checked
#48evicted-way-accepted4677 1 0 0 0x27262524 0x0 0 0x00000040 0x0 1 0x00000000 0x0 0 0 not checked not checked not checked not checked not checked not checked not checked not checked not checked 0 not checked not checked not checked
#49evicted-way-word-0-lower-request4807 0 0 0 0x27262524 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked 0x00000040 0x0 1 not checked not checked not checked not checked not checked not checked not checked not checked
#50evicted-way-word-0-lower-ready4812 0 0 1 0x27262524 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 1 not checked not checked not checked not checked not checked not checked not checked not checked
#51evicted-way-word-0-lower-accepted4819 1 0 1 0x27262524 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#52evicted-way-word-0-lower-response4833 0 0 0 0xE3E2E1E0 0x0 1 0x00000040 0x0 0 0x00000000 0x0 0 0 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
#53evicted-way-word-1-lower-request5175 0 0 0 0xE3E2E1E0 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked 0x00000044 0x0 1 not checked not checked not checked not checked not checked not checked not checked not checked
#54evicted-way-word-1-lower-ready5180 0 0 1 0xE3E2E1E0 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 1 not checked not checked not checked not checked not checked not checked not checked not checked
#55evicted-way-word-1-lower-accepted5187 1 0 1 0xE3E2E1E0 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked not checked not checked not checked
#56evicted-way-word-1-lower-response5202 0 0 0 0xE7E6E5E4 0x0 1 0x00000040 0x0 0 0x00000000 0x0 0 0 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
#57evicted-way-response5548 0 0 0 0xE7E6E5E4 0x0 0 0x00000040 0x0 0 0x00000000 0x0 0 0 not checked not checked not checked not checked 0 not checked not checked not checked not checked not checked 0xE3E2E1E0 0x0 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.

Open scalable cache scenario

Two levels over a real memory endpoint

The hierarchy scenario connects one requester to a one-word direct-mapped L1, then to a two-way L2 with two-word lines, then to a 16-byte FF RAM endpoint. Both levels use Cache<8> and the same request/response pins.

requester โ†’ L1 โ†’ L2 โ†’ FF RAM

The first read of address 0 misses in both caches, so L2 reads bytes 0 and 1 from RAM. Repeating 0 hits L1. Reading 1 misses L1 but hits L2: the verified RAM-read count stays at two. A later write to 0 reaches RAM; after both idle caches are invalidated, reading 0 refills the changed value. The ten timeline checkpoints show those boundaries in the actual connected circuit. This fixture has one requester and broadcasts invalidation only while both levels are idle.

Open two-level scenario

Tests

The three single-cache examples are registered component scenarios with generated checkpoint tables. CacheTwoLevelScenarioTest is a precomputed visualizer timeline over a connected two-cache fixture and checks exact RAM traffic and final data.

The headless CacheReadTest uses standalone cache-plus-endpoint circuits. It covers:

  • W = 8, 16 and 32, expanded and scalable storage, 1, 2, 4 and 8 ways, and 1, 2 and 4 words per line;
  • FF and SRAM tag and data stores, word and burst fills, and burst reads;
  • masked writes, invalidation, reset during a miss, FF, SRAM, DRAM and ROM backing, and a failed second fill word.

Streams of reads and masked writes are compared with an independent reference model of sets, ways and bytes. The comparison covers each write policy, the write buffer, both line-state modes (including 256 sets) and every replacement policy. It checks read values, lower reads, the number of lower writes and the final backing bytes after invalidation.

CacheControllerLockstepTest runs such streams twice, with the gate-level and with the compact controller. It requires the same upper port, lower port and INV_READY values after every step.

A separate 32-bit fixture connects an expanded upper cache to a scalable SRAM-backed L2 and DRAM. It checks that an L1 miss can hit L2 without another DRAM read, that masked writes reach DRAM, and that invalidation makes both levels refill. These checks establish functional composition, not an inclusive or coherent cache policy. External writes require invalidation; no coherence protocol is provided.

CacheDocumentationTest compiles the exact C++ reference above and checks its widths, hits, fills, replacement, writes and invalidation.