Memory Handling & Initialization

Advanced details on ROM/RAM data population and simulation behavior.

Data Population

Simic supports two primary methods for populating memory primitives (ROM, RAMA, RAMB, RAMC): static initialization in the netlist and dynamic initialization via the CLAMP command.

1. Static Netlist Initialization

Use the DATA keyword within the PART statement in your .net file. Data is provided as a comma-separated list of hexadecimal values.

PART=U1 TYPE=ROM I=... O=... DATA=X0, FF, AA, X4, 01

2. Dynamic Command Initialization (CLAMP)

Pre-simulation RAM or ROM initialization is performed using the CLAMP command. This is the preferred method for loading program code or firmware from a .run file.

# Syntax: CLAMP PART=<name> DATA=X<addr> <data> ...
# Example: Load code starting at address 0x0000 and 0xC000
CLAMP PART=RAM1 DATA=X0000 00 01 02 03 04 05 06 07 $
                     08 09 0A 0B 0C 0D 0E 0F $
                     XC000 FF FF FF FF

The DATA Syntax

X-Handling Logic

Simic uses sophisticated logic to handle unknown (X) states on control and address lines, balancing accuracy with simulation performance.

Address Line X-States

If any bit of the address bus is in an X state:

Control Line X-States

Sparse Memory Allocation

Simic utilizes a sparse allocation technique for large memory primitives. Memory is allocated in 1024-word pages only when a write operation occurs to a specific address range. This allows simulation of systems with large address spaces (e.g., 32-bit address buses) as long as the utilized memory remains within the host machine's physical limits.

[!NOTE] Large static initializations using DATA in the netlist will cause these pages to be allocated during simulation startup, which may increase initial memory footprint.