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?

A Project Timeline with a Platform on Each PhaseFrom specification to silicon, each phase has a platform that fits it; failures move down to RTL for debug.
  • File
  • Model
  • Tool
  • External
  • Data
  • Debug
A Project Timeline With a Platform on Each PhaseFrom specification to silicon, each phase has a platform that fits it; failures move down to RTL for debug. file Specification registers defined model Virtual platform drivers, tests beforeRTL tool RTL simulation every signal; the finalword model Hybrid real devices, fastersoftware external Emulator named only external FPGA prototype build report only here external Silicon the same tests earlyRTL writtenhand backhand backstable RTLstable RTLtape-out
  1. file Specificationregisters defined
    • early → Virtual platform
    • RTL written → RTL simulation
  2. model Virtual platformdrivers, tests before RTL
    • hand back → RTL simulation
  3. tool RTL simulationevery signal; the final word
    • stable RTL → Emulator
    • stable RTL → FPGA prototype
  4. model Hybridreal devices, faster software
    • hand back → RTL simulation
  5. external Emulatornamed only
  6. external FPGA prototypebuild report only here
    • tape-out → Silicon
  7. external Siliconthe same tests
  1. Before RTL

    Only the VP exists: drivers and tests start there.

  2. RTL arrives

    RTL simulation checks everything; the hybrid runs software on real devices.

  3. Long runs

    Stable RTL goes into emulators and onto FPGAs for software and systems.

  4. 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.

Five questions this page answers
Question
1What decides the platform for a job?
2What does each of our platforms model, and at what speed?
3How is a failure handed back to RTL?
4What does a difference between platforms mean?
5When 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

New words on this page
WordMeaning
Hand-backMoving a failure seen on a fast platform to RTL simulation, to see it with every signal.
ReproducerThe smallest image and input that shows the failure.
Detail levelWhat a platform models: registers only, real devices and pads, or every cycle.
Co-verificationRunning 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.

What each platform answers
PlatformModelsInstructions a second (SPI loop)Good for
Virtual platformregisters and their effects23,580,327drivers before RTL, long software
Hybridreal devices and pads; a model core197,208software that needs real devices
Verilator RTLeverything, every cycle98,146cycles, pipeline, final checks, debug
Emulator (named)everything, in hardwarenot measured herebillions of cycles of final RTL

The Rules

  1. Rule 1: Choose by detail, then by speed.

    List what must be real, keep the platforms that model it, take the fastest.

  2. 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.

  3. 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.

  4. Rule 4: Debug on the slowest platform that still fails.

    It shows the most. RTL with waves is the end of the line.

  5. 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:

The test as it failed
#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;
}
PlatformPads released (PINMUX 0)Pads serial (PINMUX 0xAAA)
Virtual platformflash id 00c0ffee: passflash id 00c0ffee: pass
Hybridflash id 00000000: failflash id 00c0ffee: pass
Chip RTLflash id 00000000: failflash 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:

Pads IO2 to IO5 During the Identity Command
0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475IO5 select (serial)IO2 clock (serial)IO4 to flash (serial)IO3 from flash (serial)IO2 clock (released)IO5 select (released)
Scroll horizontally ↔

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

ap_soc~12 blocks
Phone-class SoChundreds of blocks

This section looks ahead.

  1. A plan per phase

    Large projects write down which platform each test runs on, phase by phase, and how failures come back.

  2. Regressions on every rung

    Nightly regressions run on simulation; weekly ones on emulators and prototypes.

  3. 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?

RUNIcarus Verilog · in your browser
Edit the code, then run it
Expected: 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 budget

Check Yourself

Predict the outputThe budget is now 60 s. What is the last line printed?
// Pick the fastest platform that has the detail a job needs and ends inside the budget (60 s).
module tb;
  string pname [0:2];
  longint prate [0:2];
  int pdetail [0:2];
  string jname [0:3];
  longint jinst [0:3];
  int jdetail [0:3];
  int pick; longint s;
  initial begin
    pname[0] = "vp"; prate[0] = 23580327; pdetail[0] = 1;
    pname[1] = "hybrid"; prate[1] = 197208; pdetail[1] = 2;
    pname[2] = "verilator"; prate[2] = 98146; pdetail[2] = 3;
    jname[0] = "driver bring-up"; jinst[0] = 50000000; jdetail[0] = 1;
    jname[1] = "pin mux and pads"; jinst[1] = 20000000; jdetail[1] = 2;
    jname[2] = "cycle-exact interrupt"; jinst[2] = 5000000; jdetail[2] = 3;
    jname[3] = "boot an OS"; jinst[3] = 5000000000; jdetail[3] = 2;
    for (int j = 0; j < 4; j++) begin
      pick = -1;
      for (int p = 0; p < 3; p++)          // the list runs fastest first
        if (pick < 0 && pdetail[p] >= jdetail[j] && jinst[j] / prate[p] <= 60) pick = p;
      if (pick < 0) $display("%-24s no platform inside the budget", jname[j]);
      else begin
        s = jinst[j] / prate[pick];
        $display("%-24s %-10s %0d s", jname[j], pname[pick], s);
      end
    end
    $finish;
  end
endmodule
ConceptWhat decides the platform for a job?
ConceptIn the lab, why did the VP pass with the pads released?
ConceptWhere did the cause become visible?
ConceptA cache subsystem runs no software. Which platform does the book say it needs?

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.

Practice

Report a problem with this page