Emulation, Honestly
An emulator runs a whole chip's RTL in special hardware, fast enough for software. This site has none, so this page explains how emulators are built and used, from the book, and runs nothing on one.
You Will Be Able To
- Explain what an emulator does that a simulator cannot, and what it costs.
- Name the three ways emulators are built, as the book describes them.
- Tell in-circuit, transaction-based, signal-level and stand-alone use apart.
- Explain why a long compile can make a fast box slower to debug with, and how a failure goes back to simulation.
- Lesson
- V13.5
- Time
- 22 min
- Runs on
- Your browser
- Check
- 5 questions
The final RTL must boot an operating system before tape-out. The VP boots it, but the VP is not the chip. Simulating the boot on the chip's RTL would take longer than the team has.
- File
- Tool
- External
- Test
- Pads
- Debug
- Data
- Transaction / TLM
- Debug
- Compile
The RTL is partitioned across the box's chips and synthesized into them. This takes far longer than a simulator's compile.
- Drive it
A bench on a workstation, a real target board, or a bench inside the box.
- See inside
The box captures signals for debug. The book's three ways of building an emulator pay for that in different ways.
Read the diagram as text
- Chip RTL: synthesizable
- Compile: partition, synthesize, place
- Emulator: many chips run the design
- Workstation bench: transactions or pins
- Target board: through a speed bridge
- Visibility: signals captured in the box
- Chip RTL → Compile: hours, not seconds
- Compile → Emulator: loaded
- Workstation bench → Emulator: acceleration
- Target board → Emulator: in-circuit
- Emulator → Visibility: waveforms
Drawn from MEHTA-DV 12.2 and 15.6. ASIC Point has no emulator: nothing on this page was run on one.
What This Page Can and Cannot Show
Before You Start
Read Hybrid: a Model Core With RTL Peripherals first: the transactor there is the same idea an emulator's link uses.
| Question | |
|---|---|
| 1 | What does an emulator do, and why is it fast? |
| 2 | How are emulators built? |
| 3 | What are the ways of driving a design in an emulator? |
| 4 | What do compile time and visibility cost? |
| 5 | How does a failure found on an emulator get debugged? |
The Idea: Run the RTL in Hardware Built for It
A simulator is a program that computes every signal, one after another, on a processor. An emulator turns the RTL into hardware: many chips, wired together, each running a piece of the design at once. Every clock of the design takes a fixed, short time.
The price is paid before the run. The RTL is split across the chips and synthesized into them, which takes far longer than compiling for a simulator. And seeing inside the design costs capture hardware or speed.
So an emulator wins on long runs of a stable design: software on the final RTL, billions of cycles. A simulator wins on short runs of a design that changes every hour.
New Words
| Word | Meaning |
|---|---|
| Emulator | Hardware that runs a design compiled into it, for verification, with means to see inside. |
| In-circuit emulation (ICE) | The real target system, such as a board, drives the design in the box. |
| Acceleration | A bench on a workstation drives the design in the box through a link. |
| Transaction-based | The link carries transactions to transactors in the box, not pin values each clock. |
| Stand-alone | A synthesizable bench goes into the box with the design; it stops only for new stimulus or to unload captured data. |
| Speed bridge | Hardware between a fast real interface and a slower emulated design: it buffers or slows the real side. |
| Visibility | How many internal signals can be seen, and at what cost. |
The Smallest Example: A Day of Debug
The book makes a point about compile time. On a small design, a one-hour simulation can do more than a ten-second emulation. The reason is the turn: change, compile, run, look.
| Platform | Compile | Run and look | Turns a day |
|---|---|---|---|
| Simulator | 5 min | 60 min | 7 |
| Emulator | 180 min | 5 min | 2 |
The emulator ran faster and still gave fewer turns. For a design that changes often, the compile decides.
The Rules
Rule 1: Count the turn, not only the run.
Compile, run and debug together decide how many changes a day you can test.
Rule 2: Match the mode to the job.
A real board drives in-circuit; a workstation bench drives through a link; a synthesizable bench runs stand-alone.
Rule 3: Cross the link in transactions.
A bench that exchanges pins every clock holds the box to the workstation's speed.
Rule 4: Bridge real interfaces.
The box runs slower than the real world, so a speed bridge buffers or slows the real side.
Rule 5: Debug in simulation when you can.
Run the failing snippet in simulation, where every signal is visible.
Sources for These Rules (MEHTA-DV, chapter 12 and 15.6)
MEHTA-DV 12.1: software needs billions of cycles. A virtual platform joined to RTL in simulation is possible but too slow for software.
MEHTA-DV 12.2.1: emulation maps the design into reconfigurable hardware. There are three architectures: commercial FPGAs, a custom emulator-on-chip, and custom processors.
The book names three commercial systems as examples. They are Veloce-2 of Mentor Graphics, Palladium of Cadence, and ZeBu Server-3 of Synopsys.
MEHTA-DV 12.2.2: compile time, and the one-hour simulation against the ten-second emulation.
MEHTA-DV 12.2.3: emulators aim at debug with full visibility. FPGA prototypes aim at speed, with little debug.
MEHTA-DV 12.2.4: in-circuit use, acceleration through PLI or DPI with limited speed-up, transaction-based acceleration, stand-alone use, embedded software.
MEHTA-DV 12.3: most emulators run at a few MHz. A speed bridge buffers the data or slows the real side.
MEHTA-DV 12.4: transactors join a virtual platform to the emulator, through SCE-MI. They must synthesize into the box.
MEHTA-DV 12.4.1: run the failing snippet in simulation-only mode, with full visibility.
MEHTA-DV 12.5: acceleration runs in kHz and emulation in MHz. Section 16.11 says acceleration reaches a few MHz at best.
The book is not consistent on that figure, so this page gives no number for it.
MEHTA-DV 15.6: emulation in the life cycle, and a scaled-down speed of the real system.
The Lab: Only Arithmetic
This page cannot run an emulator. It can do the sum. Verilator ran ap_soc at 217,258 system clocks a second on this laptop (measured, V13.1). For the emulator the slice uses 1 MHz. That is an exercise value, not a measurement: 12.3 says only that most emulators reach a few MHz.
Verilator RTL (measured) 217258 cycles/s: 4602 s (1 h)
emulator (assumed 1 MHz) 1000000 cycles/s: 1000 s (0 h)Rule 1 again: those hours are the run. The emulator's compile, and the time to bring a failure back to simulation, come on top.
Why It Is Built This Way
Why many chips and not one big processor? A processor computes signals one after another; hardware computes them all at once. Splitting the design across many chips keeps every clock short however big the design is.
Why is visibility hard? In a simulator a signal is a variable you can print. In an emulator it is a wire inside a chip. Capturing it needs extra hardware or costs speed. The book says an emulator built from commercial FPGAs trades speed for full visibility. A custom emulator chip builds the capture into its silicon.
Why transactions across the link? A link that carries pin values every clock makes the box wait for the workstation every clock. Transactions let the box run many clocks per message.
Traps
The first trap is moving a design to an emulator too early. The RTL still changes every day, each change costs a long compile, and the team does fewer turns than in simulation.
The second is keeping the old bench unchanged and linking it pin by pin. The box then runs at the speed of the workstation, and the money buys little.
The third is debugging in the box what could be debugged in simulation. The shortest path is often to replay a small piece of the failure in simulation, with every signal visible.
At Scale
This section looks ahead, from the book. None of it ran here.
Capacity
Large designs are split across many chips of the box; the split itself is part of the compile.
Power
The book notes emulation can record the switching activity of a whole chip for power estimates.
Virtual platforms joined to emulators
A VP runs the software and transactors join it to the RTL in the box; both run fast.
Try It
Run it: one billion cycles at the measured Verilator rate and at an assumed 1 MHz.
Which line is a measurement, and which is an assumption?
Change the job to a hundred billion cycles. Is either line now a day's work?
Verilator RTL (measured) 217258 cycles/s: 4602 s (1 h) emulator (assumed 1 MHz) 1000000 cycles/s: 1000 s (0 h)Check Yourself
Common Mistakes
Wrong Quote an emulator's speed as a fact without a source.
Rates depend on the product, the design and the visibility asked for; the book itself gives ranges.
Fix Cite the range and its source, or measure.
Wrong Link the old bench to the box pin by pin.
The box waits for the workstation every clock.
Fix Split the bench: transactors in the box, transactions across the link.
Wrong Choose emulation for a design that changes every hour.
Each change costs a long compile.
Fix Simulate until the RTL is stable; emulate the long runs.
Remember
- An emulator runs compiled RTL as hardware: fast per cycle, slow to compile, costly to see into.
- Modes: in-circuit, acceleration (pins or transactions), stand-alone with a synthesizable bench.
- A speed bridge joins a fast real interface to the slower box.
- Count the whole turn, and hand failures back to simulation. This site runs no emulator; everything here is from the book.