Overview
An Architectural Variable (AV) is a state variable in an Instruction-Level Abstraction (ILA) that captures the abstract, observable state of a processor or accelerator at the instruction level. AVs generalize the notion of architectural state — historically tied to processor ISAs — to hardware accelerators and other SoC components, enabling uniform instruction-level modeling and verification across heterogeneous designs.
In an ILA, a design is described by:
- A set S of architectural variables (the AVs),
- A set W of inputs (e.g., MMIO interface signals for accelerators),
- An initial-state mapping S0,
- A set of instructions I, each defined by a decode function D (trigger condition) and a state-update function N (a state transition function over the AVs).
The ISA of a processor is treated as a special case of an ILA, where the architectural state corresponds to the conventional visible processor state (registers, program counter, etc.).
Examples
In an AES cryptographic accelerator modeled as an ILA, the architectural variables include:
key— the encryption key,length— the length of text to encrypt,addr— the address of the text,status— operation status,data_mem— internal data memory,output_data— encryption output.
Inputs W (e.g., addr_in, data_in, cmd) are distinct from AVs and represent the interface signals through which the host processor (or firmware) issues loads/stores to the accelerator.
Role in Tandem Simulation
AVs are the central objects checked and exchanged during tandem simulation:
- AV-Check — At the end of each instruction (or at predefined checkpoints), the corresponding instruction-level architectural variables (ILAVs) from the ILEM are compared against the RTL architectural variables (RTAVs) of the RTEM. A mismatch indicates a potential bug, which can be localized using nearby instructions.
- AV-Swap — Values of AVs are transferred from the ILEM to the RTEM, allowing a high-level simulation to "jump-start" the RTL simulation, skipping the warm-up phase and improving simulation speed.
Because the RTL implementation contains additional micro-architectural variables beyond those in the ILA, AV-Swapping requires careful handling to ensure the extra micro-architectural state is set consistently.
Hierarchy
ILAs support child-ILAs, allowing complex instructions (e.g., START_ENCRYPT in the AES example) to be decomposed into child-instructions (Load, Encrypt, Store). In hierarchical ILA models, architectural variables may be defined at the parent or child level, and state transitions propagate through the hierarchy.