Why Simulation Is Too Slow: The Speed Ladder
Software needs billions of instructions; RTL simulation of this small chip runs about 109 thousand a second. This module climbs a ladder of faster platforms, each one giving up some detail. This site has no emulator and no FPGA board. Four rungs run live, emulators are explained and named, and the FPGA build report is real with nothing run on hardware.
You Will Be Able To
- Work out how long a job takes on a platform from instructions needed and instructions a second.
- Name the four rungs this site runs, and what each one gives up for speed.
- Explain why the same rung runs slower on device-heavy code.
- State what this module runs and what it only names.
- Lesson
- V13.1
- Time
- 24 min
- Runs on
- Your browser
- Check
- 5 questions
A team wants to boot its software on the new chip before tape-out. Each time they try, the RTL simulation is still in the boot loader when they go home.
- Tool
- Model
- External
- Data
- RTL, two ways
The same chip RTL on an interpreting simulator and on a compiling one.
- Replace the core
The hybrid runs the instruction-level model and keeps RTL peripherals.
- Replace everything
The virtual platform models every block in C.
- What we do not have
No emulator and no FPGA board. The FPGA build report is real; nothing ran on hardware.
Read the diagram as text
- Icarus RTL: 1,310 inst/s
- Verilator RTL: 108,631 inst/s
- Hybrid: 468,515 inst/s
- Virtual platform: 22,720,468 inst/s
- FPGA prototype: build report only
- Emulator: named only
- Icarus RTL → Verilator RTL: x82
- Verilator RTL → Hybrid: model core
- Hybrid → Virtual platform: model devices
Retired instructions a second, SRAM checksum loop: the median of three runs of at least 1 s. Measured on 2026-11-29 on 13th Gen Intel(R) Core(TM) i7-13645HX, WSL2, load average 4.8. Another machine gives other numbers.
The Honesty Rule of This Module
Every speed in this module was measured on one laptop, and each page says so. Every claim about emulators comes from a book, by section. When a number was neither measured nor found in the book, the page calls it an exercise value.
Before You Start
Read The Life of a C Test and Lockstep With an Instruction-Level Model first. The DPI pages Your First DPI-C Call and Calling Back Into the Testbench are needed from V13.3 on.
| Question | |
|---|---|
| 1 | How long does a job take on a platform? |
| 2 | Which platforms does this site run, and in what order of speed? |
| 3 | What does each faster platform give up? |
| 4 | Why do device-heavy programs run slower on the RTL and hybrid rungs? |
| 5 | What do the measured numbers say, and what do they not say? |
The Idea: Cycles Needed Against Cycles a Second
A chip is not finished until its software runs on it. Booting a boot loader, a driver stack or an operating system takes millions to billions of instructions. RTL simulation evaluates every signal of the chip on every clock, so it runs slowly.
So teams build faster stand-ins for the chip. Each one models less: the pipeline, then the bus, then the peripherals. Each step down in detail is a step up in speed. The choice is always a trade.
The arithmetic is one division. Time equals the instructions a job needs, divided by the instructions a platform runs each second. Everything else in this module is about what each platform leaves out.
New Words
| Word | Meaning |
|---|---|
| Platform | Anything that runs the chip's firmware: RTL in a simulator, a model in C, or hardware. |
| Rung | One platform on the speed ladder. |
| Instruction-level model | C or JavaScript that executes each instruction's effect, with no pipeline. ap_iss is ours. |
| Virtual platform (VP) | An instruction-level model plus C models of every device. ap_vp is ours. |
| Hybrid | The instruction-level model with the chip's RTL peripherals, joined by a transactor. |
| Transactor | Logic that turns one request, such as "read this address", into bus cycles, and back. |
| Retired instruction | An instruction that finished. Rates on this page count them per second of real time. |
| Emulator | Special hardware that runs a design mapped into it, much faster than simulation. Named only here. |
The Smallest Example: A Job on Each Rung
A job of 100 million instructions. On Verilator RTL at 108,631 a second, it takes 100,000,000 / 108,631 seconds. Work it out before you read the table.
| Platform | Instructions a second | Time |
|---|---|---|
| Icarus RTL | 1,310 | 76,335 s |
| Verilator RTL | 108,631 | 920 s |
| Virtual platform | 22,720,468 | 4 s |
| Hybrid | 468,515 | 213 s |
The VP runs the loop about 209 times faster than Verilator RTL. Verilator runs the same RTL about 82 times faster than Icarus.
Now a real job of this chip. The VP's own timed checksum run retired 25,000,114 instructions in 1.10 s (the median of three runs). The same instructions on each rung:
| Platform | Time for this job |
|---|---|
| Icarus RTL | 5 h |
| Verilator RTL | 3 min |
| Virtual platform | 1 s |
| Hybrid | 53 s |
The Rules
Rule 1: Count the job before choosing the platform.
Instructions or cycles needed, divided by the platform's rate, gives the time. Do this sum first.
Rule 2: Every rung up gives something away.
A compiled simulator gives nothing. The hybrid gives up the pipeline's timing. The VP also gives up bus cycles, pads and exact device timing.
Rule 3: Measure on your own workload.
Device-heavy code slows the RTL and hybrid rungs; local code does not. One number per platform is not enough.
Rule 4: The same image must run on every rung.
If the rungs disagree on the output, one of them, or the firmware, is wrong. That is the first check of any fast platform.
Rule 5: Quote speeds with the machine.
A rate belongs to one machine, one workload and one load. Without them it means little.
Sources for These Rules
Software needs billions of cycles and simulation is too slow for it: MEHTA-DV 12.1.
The kit and its gates: tools/soc/fast-platforms/README.md; plan §3.7 and §3.10 (E10).
The rates on this page: tools/probes/socv/record-v13-ladder.mjs, which runs the kit's ladder runner unchanged and keeps its output (v13-ladder.json).
The Lab: Four Rungs, One Image
The kit's ladder runner built six firmware images once and ran each on all four rungs. It took 114 s in all. Here is the smallest image, "text", on each rung:
| Rung | Console | SRAM checksum | Instructions | Clock ticks |
|---|---|---|---|---|
| Icarus RTL | "Hello, SoC!\n" | 3c5deae6 | 179 | 372 |
| Verilator RTL | "Hello, SoC!\n" | 3c5deae6 | 179 | 372 |
| Virtual platform | "Hello, SoC!\n" | 3c5deae6 | 176 | 176 |
| Hybrid | "Hello, SoC!\n" | 3c5deae6 | 176 | 253 |
Rule 4 at work: the console and the SRAM checksum agree on every rung, for all six images. Here the instruction counts differ by 3. The RTL bench counts the core's exit loop until it stops; the models stop at the pass word.
The counts differ more on images that poll a device. The SPI image retired 349 instructions on Verilator RTL and 571 on the VP. A poll costs each rung a different time, so the wait loop runs a different number of times. The result is the same; the path to it is not.
Then two steady loops were timed on each rung. One stays in SRAM. The other polls the SPI controller, so every few instructions cross into a device.
| Rung | SRAM checksum | SPI polling |
|---|---|---|
| Icarus RTL | 1,310 | 1,348 |
| Verilator RTL | 108,631 | 98,146 |
| Virtual platform | 22,720,468 | 23,580,327 |
| Hybrid | 468,515 | 197,208 |
Rule 3 at work: the VP hardly changed between the two loops. The hybrid fell from 468,515 to 197,208, because each device access runs real RTL bus cycles. V13.3 shows where that time goes.
steady checksum icarus iterations=650 inst=3364 ticks=6719 seconds=2.970,2.567,2.471 median_inst/s=1310 median_ticks/s=2617 iterations/s=253
steady checksum verilator iterations=50000 inst=250117 ticks=500222 seconds=2.698,2.302,2.259 median_inst/s=108631 median_ticks/s=217258 iterations/s=21716
steady checksum vp iterations=5000000 inst=25000114 ticks=25000114 seconds=1.218,1.100,1.077 median_inst/s=22720468 median_ticks/s=22720468 iterations/s=4544073
steady checksum hybrid iterations=250000 inst=1250114 ticks=1250143 seconds=2.772,2.668,2.532 median_inst/s=468515 median_ticks/s=468526 iterations/s=93694 steps=1250114 transfers=2 bus_ticks=8 ipc=1Rule 5: these runs shared the laptop with other jobs (load average 4.8 at the start). The kit manual's measurement of 2026-11-28 gives other numbers for the same loops. The order of the rungs is the same.
Why It Is Built This Way
Why not simply buy a faster computer? Because the gap is ratios, not percent. A machine twice as fast turns 20 hours into 10, not into minutes. Only a different kind of platform changes the ratio.
Why keep the slow rungs at all? Because only RTL is the chip. Every faster rung is a model that someone wrote, and a model can be wrong. The fast rungs find software bugs early; the slow rung has the final word.
Why measure instructions and not clock cycles? Because a clock tick means a different thing on each rung. The VP and the hybrid advance about one tick per instruction; Verilator RTL spent 2 clocks per instruction on the checksum. Retired instructions are counted the same way on every rung, so the ratio is fair.
Traps
The first trap is a speed quoted without its workload. In this lab the hybrid ran the checksum about 4 times faster than Verilator RTL. On the SPI loop it gained only about 2 times. Both numbers are true, for their own loop.
The second is trusting a fast rung because it agrees with RTL on one image. Agreement on six images is evidence; it is not proof. The next lessons show firmware that passes on one rung and fails on another.
At Scale
This section looks ahead. ap_soc is small; a phone chip is not.
Bigger chips, slower RTL
Simulation slows as the design grows; a large chip can run far fewer cycles a second than ours.
More rungs
Large teams add emulators and FPGA prototypes above the VP. V13.5 and V13.7 explain them.
One image everywhere
The same software image runs on every rung, so a failure can move down the ladder for debug.
Try It
Run it: the time of three jobs (a million, 100 million and 10 billion instructions) on each rung.
Find the job that takes days on Icarus RTL. How long does it take on the VP?
Change the rates to the SPI polling column of the lab. Which rung slows the most?
icarus 1310 inst/s: 12 min 21 h 88 days verilator 108631 inst/s: 9 s 15 min 25 h vp 22720468 inst/s: 0 s 4 s 7 min hybrid 468515 inst/s: 2 s 3 min 5 hCheck Yourself
Common Mistakes
Wrong Quote one speed for a platform.
Device-heavy code runs much slower on RTL and the hybrid than local code does.
Fix Measure on the workload you care about, and quote the machine.
Wrong Trust a fast platform because it is fast.
Every rung above RTL is a model, and a model can differ from the chip.
Fix Run the same image on RTL too, and compare the output.
Wrong Buy a faster computer to run software on RTL.
The gap is a ratio of hundreds or thousands, not a few per cent.
Fix Move the job to a faster kind of platform.
Remember
- Time on a platform = instructions needed / instructions a second.
- Four rungs run here: Icarus RTL, Verilator RTL, the hybrid and the VP. Emulators are named; the FPGA build is a report.
- Each faster rung models less: the pipeline, then the bus and devices.
- Speeds belong to a machine and a workload; device-heavy code slows the RTL and hybrid rungs.