Which Platform for Which Job
Each platform answers some questions fast and cannot answer others at all. Choose by the job: what must be real, and how many instructions it needs. When a fast platform finds a failure, hand it back to RTL.
You Will Be Able To
- Choose a platform for a job from what it must model and what the ladder measured.
- Hand a failure from a fast platform back to RTL simulation, and read it there.
- Tell a failure that exists only on RTL from one that exists only on a model.
- Say when no fast platform is needed at all.
- Lesson
- V13.8
- Time
- 26 min
- Runs on
- Your browser
- Check
- 5 questions
The driver passes on the VP, run after run. On the first hybrid run it reads zeros from the flash. Is the hybrid broken, the driver, or the chip?
- File
- Model
- Tool
- External
- Data
- Debug
- Before RTL
Only the VP exists: drivers and tests start there.
- RTL arrives
RTL simulation checks everything; the hybrid runs software on real devices.
- Long runs
Stable RTL goes into emulators and onto FPGAs for software and systems.
- Hand back
A failure on a fast platform comes back to RTL, where every signal can be seen.
Read the diagram as text
- Specification: registers defined
- Virtual platform: drivers, tests before RTL
- RTL simulation: every signal; the final word
- Hybrid: real devices, faster software
- Emulator: named only
- FPGA prototype: build report only here
- Silicon: the same tests
- Specification → Virtual platform: early
- Specification → RTL simulation: RTL written
- Hybrid → RTL simulation: hand back
- Virtual platform → RTL simulation: hand back
- RTL simulation → Emulator: stable RTL
- RTL simulation → FPGA prototype: stable RTL
- FPGA prototype → Silicon: tape-out
This site runs the VP, the hybrid and RTL; the emulator is named and the FPGA build is a report (V13.5, V13.7).
Before You Start
Read the lessons of this module from Why Simulation Is Too Slow on. Waveforms of the chip bench are read in Debugging a Failing C Test.
| Question | |
|---|---|
| 1 | What decides the platform for a job? |
| 2 | What does each of our platforms model, and at what speed? |
| 3 | How is a failure handed back to RTL? |
| 4 | What does a difference between platforms mean? |
| 5 | When is no fast platform needed? |
The Idea: Detail Needed, Then Speed
Every job asks for some detail of the chip. A driver needs registers. A pin test needs pads. A latency check needs the core's pipeline. Only the platforms that model that detail can answer.
Among those, take the fastest that ends in time. That is the whole choice. The ladder of V13.1 gave the speeds; the lessons since gave what each rung models.
Then plan the way back. A fast platform finds a failure in minutes and shows little of why. RTL simulation shows every signal. So a failure moves down the ladder, to the slowest platform that still shows it, and is read there.
New Words
| Word | Meaning |
|---|---|
| Hand-back | Moving a failure seen on a fast platform to RTL simulation, to see it with every signal. |
| Reproducer | The smallest image and input that shows the failure. |
| Detail level | What a platform models: registers only, real devices and pads, or every cycle. |
| Co-verification | Running software and hardware together to verify both; the book's word for this module's subject. |
The Smallest Example: The Decision Table
Detail first, speed second. The rates are this laptop's SPI polling rates, from V13.1.
| Platform | Models | Instructions a second (SPI loop) | Good for |
|---|---|---|---|
| Virtual platform | registers and their effects | 23,580,327 | drivers before RTL, long software |
| Hybrid | real devices and pads; a model core | 197,208 | software that needs real devices |
| Verilator RTL | everything, every cycle | 98,146 | cycles, pipeline, final checks, debug |
| Emulator (named) | everything, in hardware | not measured here | billions of cycles of final RTL |
The Rules
Rule 1: Choose by detail, then by speed.
List what must be real, keep the platforms that model it, take the fastest.
Rule 2: Plan the hand-back before the run.
The same image and inputs must run on RTL, so a failure can be reproduced there.
Rule 3: A difference between platforms is a finding.
Either a model is wrong, the firmware depends on something it should not, or RTL has a bug. Find out which.
Rule 4: Debug on the slowest platform that still fails.
It shows the most. RTL with waves is the end of the line.
Rule 5: No software, no co-verification.
A subsystem that runs no software is verified with agents on a bench; it needs no VP or emulator.
Sources for These Rules
Software and hardware co-verification, and regressions on acceleration, emulation or prototypes: MEHTA-DV 16.10, 16.11. A virtual platform for software and test development: 16.12, 17.11.
A subsystem with no software needs no co-verification and no emulator: MEHTA-DV 17.9, 17.10.
Running the failing snippet in simulation with full visibility: MEHTA-DV 12.4.1.
The hand-back of this page: tools/probes/socv/record-v13-labs.mjs, section platforms; the bench's sample window (plan §3.10, E14).
The Lab: A Hand-Back, Performed
The flash test of the hook, with the pin mux left at its reset value. All pads are released, so the SPI controller reaches no pad:
#include "hal.h"
#include "tb.h"
#include "drivers/spi.h"
int main(void)
{
reg_write32(SYSCTL_PINMUX, 0);
unsigned id = spi_transfer(0x9f);
tb_puts("flash id "); tb_put_hex(id); tb_putc('\n');
return id == 0xc0ffee ? 0 : 1;
}
| Platform | Pads released (PINMUX 0) | Pads serial (PINMUX 0xAAA) |
|---|---|---|
| Virtual platform | flash id 00c0ffee: pass | flash id 00c0ffee: pass |
| Hybrid | flash id 00000000: fail | flash id 00c0ffee: pass |
| Chip RTL | flash id 00000000: fail | flash id 00c0ffee: pass |
Rule 3 at work. The VP passed, because its SPI model answers whatever the pads do. The hybrid and RTL failed the same way. A difference between the VP and two RTL-backed platforms points at something the VP does not model: the pads.
Rule 4: hand it back to RTL with waves. The bench recorded pads IO2 to IO5 for the same test, over the same cycles. One run had the pads set, one released:
Recorded on ap_soc v1.5 (Verilator 5.052 2026-09-05), from cycle 196. One column is two cycles.
With the pads serial, the select falls and the clock toggles. The command goes out on IO4 and the identity comes back on IO3. With the pads released, IO2 to IO5 never move. The fix is one line: PINMUX = 0xAAA. The table above shows it passing on all three.
Why It Is Built This Way
Why not run everything on RTL and skip the choice? Because a boot or a driver stack would take hours or days there. The fast platforms exist to make those runs possible at all.
Why not trust the fast platform's failure and fix the code from its report? Because it shows only what it models. Here the VP showed nothing wrong, and the hybrid showed zeros with no cause. Only RTL showed the pads.
Why is a model's pass not enough? A model that accepts more than the chip lets wrong software through. Every image that passes on a fast platform is worth running on RTL now and then.
Traps
The first trap is blaming the platform that fails. Here the hybrid failed and was right; the VP passed and was blind.
The second is a hand-back that changes the test. If the image or its inputs differ on RTL, the failure may vanish for a different reason. Hand back the exact image.
The third is reaching for a fast platform where none is needed. A block with no software is faster to verify with a bench of agents than with any co-verification setup.
At Scale
This section looks ahead.
A plan per phase
Large projects write down which platform each test runs on, phase by phase, and how failures come back.
Regressions on every rung
Nightly regressions run on simulation; weekly ones on emulators and prototypes.
Silicon
After tape-out the same images run on the chip, and the hand-back goes from silicon to RTL.
Try It
Run it: four jobs, each with the detail it needs, against our three platforms and a 600 s budget.
Which job has no platform inside the budget? What would a real team use for it?
Shrink the budget to 60 s. Which choice changes?
driver bring-up vp 2 s pin mux and pads hybrid 101 s cycle-exact interrupt verilator 50 s boot an OS no platform inside the budgetCheck Yourself
Common Mistakes
Wrong Trust the platform that passes.
A model can pass what the chip fails.
Fix When platforms differ, find out which one models the thing at fault.
Wrong Debug a failure on the fast platform that found it.
It shows little of the cause.
Fix Hand the exact image back to RTL and read the waves.
Wrong Use a fast platform for a block that runs no software.
It adds cost and shows nothing new.
Fix Verify the block with agents on its bench.
Remember
- Choose by the detail a job needs, then by speed.
- A difference between platforms is a finding: a model, the firmware or the RTL is wrong.
- Hand failures back to RTL with the exact image, and read them in the waves.
- No software, no co-verification: block-level agents are enough.