Example ROM


The ROM is a memory component whose data can be loaded from a file by the author of the circuit and which is then part of the stored circuit containing the ROM. During the execution of the simulation the stored data cannot be changed.

If the CS input of the ROM has the value 1 during simulation, the data at a specific memory address can be read out by applying the address at input "A". The data stored at this address will be available at output D after the propagation delay has expired.


The ROM component offers the possibility to translate the values of memory cells into a readable form when they are displayed. A typical example is machine code of a microcomputer whose individual machine instructions are to be translated into the corresponding assembler instructions, a process called "disassembling".

The ROM component uses a list of regular expressions for this purpose, which the author of the circuit can save as an attribute of the ROM component. If the value of a memory cell is to be displayed, Antares searches for the first regular expression that is matched by the value of the memory cell and displays the result of the regular expression. The result can contain references to so-called "capture groups" to access parts of the memory cell contents.

regularExpression = result

The following example is taken from the example project "Microcomputer (Tannenbaum)".

0([A-F0-9]{3})=LODD $1
1([A-F0-9]{3})=DEATH $1
2([A-F0-9]{3})=ADDD $1
3([A-F0-9]{3})=SUBD $1
4([A-F0-9]{3})=JPOS $1
5([A-F0-9]{3})=JZER $1
6([A-F0-9]{3})=JUMP $1
7([A-F0-9]{3})=LOCO $1
8([A-F0-9]{3})=LODL $1
9([A-F0-9]{3})=STOL $1
A([A-F0-9]{3})=ADDL $1
B([A-F0-9]{3})=SUBL $1
C([A-F0-9]{3})=JNEG $1
D([A-F0-9]{3})=JNZE $1
E([A-F0-9]{3})=CALL $1
FC([A-F0-9]{2})=INSP $1
FE([A-F0-9]{2})=DESP $1

The configuration with the example above leads to the following display in the symbol of the ROM component, which contains a machine program for the Tannenbaum CPU that adds up all numbers between 1 and 100 (only a section is shown).




Input "Address": Determines the address of the memory cell whose data is to be read out.


Input "Chip Select": The ROM component only outputs data at output "D" if this input has the value 1. With value 0, output "D" is undefined.


Output "Data": Outputs the data of the memory cell addressed with input "A".


See the chapter Memory for a description of the general memory attributes. This section only describes the special attributes of the ROM component.

Show Disassembler

Only displayed if the attribute "Show contents" is selected. If the attribute "Show Disassembler" is set, the memory values are disassembled according to the "Disassembler configuration" and the result is displayed additionally.

Disassembler configuration

A list of disassembler regular expressions. The definitions must be separated by line breaks.