ROM (256 bytes)

Inputs

PinTypeDescription
Addrbus8Address to read from (0–255)

Outputs

PinTypeDescription
Databus8Byte at address Addr

How It Works

ROM is read-only during simulation. It has no Write Enable pin — its contents cannot be modified by the circuit. The only way to write data into ROM is through the Assembler panel during compilation.

When you press ▶ Execute in the Assembler panel, the assembler compiles your code into bytes and writes them directly into the ROM node's memory array. After that, the circuit can only read from ROM.

The address input typically comes from the ProgramCounter. On each clock cycle, PC outputs an address → ROM reads that address → the instruction byte is passed to the Decoder via a Splitter.

All 256 cells start as 0. After compilation, only the cells corresponding to your program instructions are non-zero.

Usage

Serves as instruction memory in Harvard architecture (levels 18–29). Works in tandem with the ProgramCounter: PC specifies which instruction to fetch, ROM provides the instruction byte.

The separation of ROM (instructions) and RAM (data) is the defining characteristic of Harvard architecture — the CPU can fetch an instruction and access data simultaneously on different buses.