The SoC Verification Toolbox

A chip team uses many tools: simulation with and without the core, a reference model, proofs, power-aware and gate-level runs, emulators. Learn what each is for, what it cannot see and what it costs. See which of them this site really runs.

You Will Be Able To

  • Name the main tools of SoC verification and what each one is for.
  • Say what each tool cannot see.
  • Read the chip's fault table and explain why no single tool is enough.
  • Say honestly which tools this site runs and which it only describes.
Lesson
VF.5
Time
24 min
Runs on
Your browser
Check
5 questions

A seeded bug in the core makes one instruction compute the wrong value. The firmware test still prints its lines and passes, the bus checkers see nothing wrong, and only one tool notices. Which tool, and why only that one?

The Chip and Its ToolsStep through the tools a chip team uses. Each one looks at the same chip from a different side, and each one is blind somewhere.
  • DUT
  • Processor
  • Driver
  • Model
  • Scoreboard
  • Power
  • Datapath
  • External
  • Data
  • Analysis
  • Power
The Chip and Its ToolsStep through the tools a chip team uses. Each one looks at the same chip from a different side, and each one is blind somewhere. dut ap_soc one chip, many views processor Simulation withfirmware C on the real core driver Simulation withoutthe core a bus manager in itsseat model Instruction-levelmodel predicts everyinstruction scoreboard Formal proofs wiring and crossings,for all inputs power Power-aware runs domains off and on datapath Gate-level runs the netlist, not theRTL external Emulators andprototypes fast hardware: namedhere, not run runsdrives the buscomparesprovesswitchessimulatesruns fast
  1. dut ap_socone chip, many views
  2. processor Simulation with firmwareC on the real core
    • runs → ap_soc
  3. driver Simulation without the corea bus manager in its seat
    • drives the bus → ap_soc
  4. model Instruction-level modelpredicts every instruction
    • compares → ap_soc
  5. scoreboard Formal proofswiring and crossings, for all inputs
    • proves → ap_soc
  6. power Power-aware runsdomains off and on
    • switches → ap_soc
  7. datapath Gate-level runsthe netlist, not the RTL
    • simulates → ap_soc
  8. external Emulators and prototypesfast hardware: named here, not run
    • runs fast → ap_soc
  1. Simulation, two ways

    With the core, firmware drives the chip. Without it, a bus manager sits in the core's seat and makes any transfer.

  2. A model beside the core

    An instruction-level model predicts each instruction, so a wrong result is caught even when the test passes.

  3. Proofs

    Formal tools prove a property for every input, such as every wire of the connection table.

  4. Power and gates

    Power-aware runs switch domains off and on. Gate-level runs simulate what synthesis built.

  5. Speed

    Emulators and FPGA prototypes run the design in hardware, fast enough for real software. This site has neither.

Read the diagram as text
  • ap_soc: one chip, many views
  • Simulation with firmware: C on the real core
  • Simulation without the core: a bus manager in its seat
  • Instruction-level model: predicts every instruction
  • Formal proofs: wiring and crossings, for all inputs
  • Power-aware runs: domains off and on
  • Gate-level runs: the netlist, not the RTL
  • Emulators and prototypes: fast hardware: named here, not run
  • Simulation with firmware → ap_soc: runs
  • Simulation without the core → ap_soc: drives the bus
  • Instruction-level model → ap_soc: compares
  • Formal proofs → ap_soc: proves
  • Power-aware runs → ap_soc: switches
  • Gate-level runs → ap_soc: simulates
  • Emulators and prototypes → ap_soc: runs fast

The tools of SoC verification around one chip. No single tool sees everything; the table below says what each one misses.

Before You Start

Read One Chip Test From Reset to Pass and The Flow From Hand-Off to Sign-Off first. The companion track places these tools for any design in The Toolbox and the Map of This Site.

Formal proofs are taught in the Formal track, starting at Simulation Covers Paths, Formal Covers States. Power intent is taught in the Low Power track, at UPF in One Picture.

Five questions this page answers
Question
1What tools does a chip team use, and what is each one for?
2What can each tool not see?
3Why is no single tool enough?
4What does each tool cost in time and setup?
5Which of these tools does this site run?

The Idea: Every Tool Is Blind Somewhere

A chip can be wrong in many ways. A wire, an address, an instruction, a clock crossing, a power switch or a synthesized gate can fail. No one tool looks at all of them. Each tool sees the chip from one side, and each side has its blind spots.

So a chip team carries a toolbox. It picks a tool by asking what the bug would need in order to show itself. A wrong instruction needs something that checks every instruction. A wrong wire needs something that looks at wires. Real software needs something fast.

This lesson walks the toolbox once, honestly. For each tool it says what it is for, what it misses and what it costs. It also says whether you can run it here.

New Words

New words on this page
WordMeaning
AssemblyThe processor's own instructions written as text, one line each.
UVMA standard SystemVerilog library for building benches from reusable parts.
Bus manager seatThe place of the core in the chip, taken by a bench model that makes any bus transfer.
Instruction-level modelA program that computes what each instruction should do, used to check the real core.
Model compareChecking every instruction the core retires against the instruction-level model.
Formal proofA tool that shows a property holds for every possible input, not only the ones a test tried.
Connectivity proofA formal proof that each wire of the connection table is really there.
Clock crossingA signal that moves from one clock domain to another and needs a synchronizer.
Power intentA file, written in a standard format called UPF, that says which power domains exist and how they switch.
Power-aware runA simulation that knows which domains are off. Isolation holds their outputs at safe values; retention keeps chosen state.
EmulatorSpecial hardware that runs a design many times faster than a simulator.
FPGA prototypeThe design built into programmable chips on a board, fast enough for real software.
Virtual platformA fast software model of the whole chip, with an instruction-level model as its core.
Seeded faultA bug put into a copy of the design on purpose, to see which tests find it.

The Toolbox in One Table

What each tool sees
ToolBest atCannot see
Simulation with firmwareBoot, interrupts, handlers, real use of the chipBus traffic the core never makes; anything no test runs
Simulation without the coreRegister sweeps, bus stress, illegal transfersAnything that needs real instructions
Instruction-level model compareEvery instruction the core retiresDevices: their answers are taken as given
Passive checkersBus rules and block monitors, on every runWhat no rule describes
Connectivity proofsEvery wire of the connection table, for every inputBehaviour over time; functions inside blocks
Clock-crossing checksMissing or wrong synchronizersWhether the logic does the right thing
Power-aware runsIsolation, retention and switching of power domainsAnything with all domains on
Gate-level runsWhat synthesis built: resets, unknown values, timingMost functions: only a few chosen tests run
Emulators and FPGA prototypesReal software: boot loaders, drivers, an operating systemMost internal signals; and a change needs a long rebuild
Virtual platformsSoftware long before the RTL is readyTiming and the RTL itself

No tool sees everything. The next table gives what each one costs.

What each tool costs, and whether this site runs it
ToolWhat it costsOn this site
Simulation with firmwareA boot in every test, and the whole chip simulated each cycleYes: C and assembly on ap_soc
Simulation without the coreThe same simulator speed; bench sequences to write instead of firmwareYes: tables, C on the host, UVM
Instruction-level model compareA model to keep in step with the core; here the chip runs at nearly the same speed with it onYes: in every graded run of the chip
Passive checkersWriting each rule once; little run timeYes
Connectivity proofsA formal tool and a correct connection table to prove againstYes: on the chip's generated wiring
Clock-crossing checksA structural tool, and review of every crossing it reportsPartly: the crossing list is generated and its wires proved; no full crossing tool runs on the chip
Power-aware runsA power intent file kept up to date, and extra runs for each power stateYes: on the chip with its power intent
Gate-level runsMuch slower than RTL, and the netlist arrives late in the projectOne netlist form: the boot ROM
Emulators and FPGA prototypesExpensive shared hardware, and a long compile of the design into itNo. The chip was synthesized for an FPGA once; nothing ran on a board
Virtual platformsA model of the whole chip to write and keep in step with the RTLYes: a C model of ap_soc, and a hybrid that joins it to the RTL of the devices

What this site runs is stated from the chip's records (docs/soc/ap_soc-facts.md 27.10 to 27.22). Emulators and boards are explained, never claimed.

Read the last column with care. This site simulates. It has no emulator and no FPGA board, so those rows are explained, not run. Everything else in the table has been run on ap_soc and is used by later modules.

The Smallest Example: Two Faults, Two Tools

The chip comes with 130 seeded faults, each tried with five kinds of check. A table records which check showed each fault on its reference test. Two rows tell the story of this lesson.

Two rows of the fault table
FaultFirmwareBus managerPassive checkerModel compareFormal
Q064: Pin mux/pads · The serial input samples the clock padyesyesyesnoyes
Q003: Core · XOR suppresses differing operand bitsnononoyesno

From docs/soc/fault-table.md, generated by npm run check:soc-faults. "Yes" means that kind of check showed the fault on the row's reference test.

Q064 breaks a pad: the SPI input listens to the wrong pad. Four kinds of check see it, because the wrong data shows at the pads, on the bus and in the wiring. The model compare misses it, because it takes device answers as given.

Q003 breaks the core's XOR. The program still runs, prints and passes; only its arithmetic is wrong. Only the model compare, which checks every instruction, sees it. That is the bug of the opening.

The Rules

  1. Rule 1: Pick the tool by what the bug needs.

    Instructions need the core, wires need a proof or the pads, software needs speed.

  2. Rule 2: Know each tool's blind spot.

    A passing result means only that this tool saw nothing.

  3. Rule 3: Use several tools on one chip.

    Faults one tool misses, another catches.

  4. Rule 4: Say what you ran and what you did not.

    A plan names each tool honestly, with its cost.

Sources for These Rules

Mehta, ASIC/SoC Functional Design Verification, chapter 12 (12.1): why software needs platforms faster than simulation. Chapters 8 to 10: clock crossings, low power and static formal methods. Sections 16.5 to 16.12: the tools of one SoC plan.

The fault table and its columns: docs/soc/fault-table.md, generated by npm run check:soc-faults.

What this site runs: docs/soc/ap_soc-facts.md 27.10 to 27.22.

Now Run It: The Fault Table by Column

The lab at the end of this page holds the whole fault table: 130 rows, one bit for each column. For each column it counts the faults that column caught, and how many of them nothing else caught.

Printed by the lab (Icarus 12). The page computes these lines from the table with the lab's own rules. The site's check runs the lab to confirm every line.
firmware         caught 105, 21 of them caught by nothing else
bus manager      caught 81, 6 of them caught by nothing else
passive checker  caught 33, 9 of them caught by nothing else
model compare    caught 8, 8 of them caught by nothing else
formal           caught 24, 0 of them caught by nothing else
caught by no column: 0 of 130

Rule 3 at work. Firmware caught 105 of 130, the most of any column, yet 25 escaped it. The model compare caught only 8, but all 8 of them were caught by nothing else. Every fault was caught by some column, because the set was chosen that way. A fault no check could show would teach nothing.

Now leave out the model compare, column 3, and run again. 8 faults are now caught by no column. Of those 8 faults, 6 change what the core computes, and 2 corrupt the core's own record of what it did. In each case the test still passes, because nothing the program checks or the bus shows is wrong.

Emulators and Prototypes, Explained

A simulator is a program. It computes every signal of the chip, one clock edge after another, on an ordinary computer. That is why it can show you any signal, and why it is slow. A large chip has far more logic to compute each cycle than ours, and booting an operating system takes billions of cycles.

An emulator is special hardware built for this job. The design is compiled into it, much as synthesis compiles RTL into cells, and then runs as hardware. It runs far faster than a simulator, though slower than the real chip. Parts of the bench can stay on an ordinary computer linked to it. An FPGA prototype goes one step further. The RTL is adapted and built into programmable chips on a board. It runs close to real speed, with real cables to real devices.

Both pay for speed with sight and with time to change. You see only the signals you chose to record, and every RTL change needs a long rebuild. Teams use them for software and long tests, after the RTL has settled. This site has neither, so it explains them and never claims to run them.

Why It Is Built This Way

Why not one perfect tool? Because the views pull in opposite directions. A proof covers every input but only a small property. A simulation runs the whole chip but only the inputs a test tried. Hardware platforms run real software but show little of the inside.

Cost decides the rest. The whole of ap_soc simulates at about three hundred thousand cycles a second on a laptop. That is fast only because the chip is small. A large chip simulates far more slowly, while real software still needs billions of cycles. That gap is why emulators and prototypes exist, and why teams pay for them. A later module, still being written, measures these ratios on our own chip.

Traps

The first trap is trusting one green tool. A firmware regression that passes everything has not seen Q003-like bugs. Ask what each tool was blind to before you call the chip done.

The second trap is the wrong tool for the question. A register sweep through firmware takes far longer to write than through a bus manager, and finds the same bug. A handler test through a bus manager is impossible, because there is no handler without a core.

The third trap is claiming tools you did not run. A plan that lists "emulation" without a machine, or "formal" without a property, misleads its readers. Write down what really ran.

At Scale

ap_soc~12 blocks
Phone-class SoChundreds of blocks

This section looks ahead. On ap_soc every tool above except the hardware ones runs in seconds or minutes.

  1. Big chips, big machines

    Large chips run billions of cycles of software on emulators and prototypes. Teams book that hardware like a shared lab.

  2. Proofs at scale

    Connectivity proofs over thousands of wires are routine. Proofs of deep behaviour stay small and targeted.

  3. Many columns

    Big teams measure their tools the way the fault table does: seed bugs, see which tool finds each.

Where This Goes Next

The next lesson is a map of the whole track. The first modules then compare the main tools on the real chip.

Where to go from here
LessonWhat it adds
Are You Ready? A Map and a CheckThe track as a map, and a readiness check.
Three Ways to Drive a ChipThree ways to drive a chip: with the core, with a bus manager, on a fast platform.
Lockstep With an Instruction-Level ModelLockstep with an instruction-level model: the model compare in depth.
Taking the Core OutTaking the core out, and testing with a bus manager in its seat.
Choosing the ModeChoosing the mode of each check from the whole fault table.
ConnectivityConnectivity proofs, in the Formal track.

Try It

Run the lab and read the five columns.

Set DROP to 3 to leave out the model compare, and predict the last line before you run it.

Set DROP to 0, the firmware column, and see which columns still catch faults that firmware caught.

RUNIcarus Verilog · in your browser
Edit the code, then run it
Expected: firmware caught 105, 21 of them caught by nothing else bus manager caught 81, 6 of them caught by nothing else passive checker caught 33, 9 of them caught by nothing else model compare caught 8, 8 of them caught by nothing else formal caught 24, 0 of them caught by nothing else caught by no column: 0 of 130

Check Yourself

Predict the outputThe lab leaves out column 3, the model compare. What is the last line it prints?
// The chip's qualification faults: 130 seeded bugs, each tried with five kinds of check. One five-bit row
// a fault, read from docs/soc/fault-table.md: bit 0 firmware, 1 bus manager, 2 passive checker, 3 model compare, 4 formal.
module tb;
  localparam int N = 130, DROP = 3;   // DROP: a column to leave out (-1 keeps all five)
  logic [4:0] row [N];
  logic [4:0] r;
  int count [5], alone [5], missed = 0;
  function automatic string tool(input int t);
    case (t)
      0: tool = "firmware";
      1: tool = "bus manager";
      2: tool = "passive checker";
      3: tool = "model compare";
      4: tool = "formal";
      default: tool = "?";
    endcase
  endfunction
  initial begin
    row[0] = 5'b01000;
    row[1] = 5'b01000;
    row[2] = 5'b01000;
    row[3] = 5'b01000;
    row[4] = 5'b01000;
    row[5] = 5'b01000;
    row[6] = 5'b00011;
    row[7] = 5'b00111;
    row[8] = 5'b00111;
    row[9] = 5'b00011;
    row[10] = 5'b00011;
    row[11] = 5'b00011;
    row[12] = 5'b00111;
    row[13] = 5'b00011;
    row[14] = 5'b00011;
    row[15] = 5'b00011;
    row[16] = 5'b00011;
    row[17] = 5'b00111;
    row[18] = 5'b00001;
    row[19] = 5'b00001;
    row[20] = 5'b00001;
    row[21] = 5'b00001;
    row[22] = 5'b00011;
    row[23] = 5'b00011;
    row[24] = 5'b00111;
    row[25] = 5'b00111;
    row[26] = 5'b00011;
    row[27] = 5'b00011;
    row[28] = 5'b00011;
    row[29] = 5'b00011;
    row[30] = 5'b00011;
    row[31] = 5'b00011;
    row[32] = 5'b00011;
    row[33] = 5'b00011;
    row[34] = 5'b00011;
    row[35] = 5'b00111;
    row[36] = 5'b00111;
    row[37] = 5'b00111;
    row[38] = 5'b00111;
    row[39] = 5'b00111;
    row[40] = 5'b00111;
    row[41] = 5'b00011;
    row[42] = 5'b00111;
    row[43] = 5'b00011;
    row[44] = 5'b00111;
    row[45] = 5'b00111;
    row[46] = 5'b00111;
    row[47] = 5'b00011;
    row[48] = 5'b00011;
    row[49] = 5'b00011;
    row[50] = 5'b00001;
    row[51] = 5'b00001;
    row[52] = 5'b00001;
    row[53] = 5'b00001;
    row[54] = 5'b00001;
    row[55] = 5'b00001;
    row[56] = 5'b00001;
    row[57] = 5'b00001;
    row[58] = 5'b00001;
    row[59] = 5'b00101;
    row[60] = 5'b10011;
    row[61] = 5'b10011;
    row[62] = 5'b10011;
    row[63] = 5'b10111;
    row[64] = 5'b00011;
    row[65] = 5'b00011;
    row[66] = 5'b00011;
    row[67] = 5'b00011;
    row[68] = 5'b00011;
    row[69] = 5'b00011;
    row[70] = 5'b00011;
    row[71] = 5'b10011;
    row[72] = 5'b10011;
    row[73] = 5'b10001;
    row[74] = 5'b10001;
    row[75] = 5'b10001;
    row[76] = 5'b10001;
    row[77] = 5'b00011;
    row[78] = 5'b00101;
    row[79] = 5'b10011;
    row[80] = 5'b00010;
    row[81] = 5'b00011;
    row[82] = 5'b00011;
    row[83] = 5'b00011;
    row[84] = 5'b00011;
    row[85] = 5'b00001;
    row[86] = 5'b10001;
    row[87] = 5'b10001;
    row[88] = 5'b10001;
    row[89] = 5'b00111;
    row[90] = 5'b00011;
    row[91] = 5'b00011;
    row[92] = 5'b00111;
    row[93] = 5'b10011;
    row[94] = 5'b10011;
    row[95] = 5'b10011;
    row[96] = 5'b10011;
    row[97] = 5'b00100;
    row[98] = 5'b00100;
    row[99] = 5'b01000;
    row[100] = 5'b01000;
    row[101] = 5'b00010;
    row[102] = 5'b00100;
    row[103] = 5'b00010;
    row[104] = 5'b00010;
    row[105] = 5'b10001;
    row[106] = 5'b00001;
    row[107] = 5'b00100;
    row[108] = 5'b00011;
    row[109] = 5'b00110;
    row[110] = 5'b00100;
    row[111] = 5'b00100;
    row[112] = 5'b00100;
    row[113] = 5'b00011;
    row[114] = 5'b00010;
    row[115] = 5'b00001;
    row[116] = 5'b00010;
    row[117] = 5'b00111;
    row[118] = 5'b00001;
    row[119] = 5'b00001;
    row[120] = 5'b00001;
    row[121] = 5'b00100;
    row[122] = 5'b00001;
    row[123] = 5'b00001;
    row[124] = 5'b10011;
    row[125] = 5'b10110;
    row[126] = 5'b10011;
    row[127] = 5'b10001;
    row[128] = 5'b10011;
    row[129] = 5'b00100;
    foreach (count[t]) begin count[t] = 0; alone[t] = 0; end
    for (int i = 0; i < N; i++) begin
      r = row[i];
      if (DROP >= 0) r[DROP] = 0;
      for (int t = 0; t < 5; t++) if (r[t]) begin count[t]++; if (r == (5'b1 << t)) alone[t]++; end
      if (r == 0) missed++;
    end
    for (int t = 0; t < 5; t++) $display("%-16s caught %0d, %0d of them caught by nothing else", tool(t), count[t], alone[t]);
    $display("caught by no column: %0d of %0d", missed, N);
  end
endmodule
ConceptWhy does the model compare miss Q064?
ConceptWhich of these does this site run?
ConceptWhat is a formal proof best at?
ConceptWhy do emulators and FPGA prototypes exist?

Common Mistakes

Wrong Call the chip done because one tool passes everything.

Every tool is blind somewhere: the fault table shows faults only one column caught.

Fix Use several tools and know what each one misses.

Wrong Test handlers through a bus manager.

There is no handler without the real core.

Fix Use firmware for anything that needs instructions.

Wrong List emulation or formal in a plan without running them.

The plan then claims evidence that does not exist.

Fix Write down only the tools that really ran.

Remember

  • Each tool sees the chip from one side and is blind somewhere.
  • Pick the tool by what the bug needs: the core, the bus, a proof, a model, speed.
  • The fault table shows faults that only one kind of check catches, so several tools are needed.
  • This site simulates; emulators and boards are explained, never claimed.

Practice

Report a problem with this page