Overview
The Core Adapter is part of a SystemC-based co-simulation setup for processor verification. The broader testbench co-simulates an RTL core under test with an ISS reference model, while a test controller repeatedly executes one instruction on the RTL core, executes the same instruction on the ISS, and compares their execution states, especially register state. [C1]
Within that setup, the Core Adapter provides a clean testing interface over implementation-specific RTL details. It is introduced because detecting instruction completion in a pipelined RTL core can require detailed knowledge of pipeline behavior, including multi-cycle operations, delays, and gaps. [C2]
Responsibilities
The Core Adapter has three primary responsibilities:
Hide core implementation details
The adapter abstracts the internal details of the RTL core and exposes a cleaner interface for the verification testbench. [C2]Detect completed RTL instructions
It observes internal signal changes of the core, particularly pipeline-related signals, and notifies the test controller each time the RTL core completes an instruction. [C2]Expose RTL register state
It provides access to RTL-core register values so they can be compared against the ISS state. [C2]
The adapter also preserves the correct instruction order in cases involving illegal instructions. [C2]
Role in the co-simulation flow
The co-simulation testbench is implemented in SystemC and coordinates execution between an RTL core and an ISS reference model. The test controller lets the RTL core execute one instruction, then lets the ISS execute the same instruction, and finally compares the resulting execution states. If the states mismatch, an error is reported; otherwise, testing continues. [C1]
In this flow, the Core Adapter sits on the RTL side of the testbench. It bridges low-level RTL signal behavior and the higher-level test controller by reporting instruction completion and making RTL register data available for comparison. [C2]
Instruction-stream implications
The adapter is used in a setup where unrestricted instruction streams are generated. This is complicated by RTL prefetching: the RTL core may fetch instructions that are never executed after jumps or traps, while the ISS may fetch a different sequence of program counters. [C3]
The evidence explicitly notes that completed instructions are not directly fed from the Core Adapter to the ISS, because doing so would compromise the testing approach by relying on instruction propagation in the RTL core, which is itself under test. [C3]
Related entities
- [[Co-Simulation Testbench]] — contains the Core Adapter as part of the processor-verification co-simulation architecture.
- [[MINRES TGF RISC-V Core]] — related as the monitored RTL core in the provided entity relationship; the evidence supports the general role of the Core Adapter as observing internal RTL-core signal changes.