The Levels: Block, Subsystem, Chip, System

A chip is verified in levels. First each block alone, then groups of blocks, then the whole chip, then the chip with its software. Learn what each level checks, what it may assume, and why the same bug costs more to find higher up.

You Will Be Able To

  • Name the four levels and what each one checks.
  • Say what a level may assume from the level below.
  • Explain why a bug is cheaper to find and debug at block level.
Lesson
B1.5
Time
18 min
Runs on
Your browser
Check
5 questions

A message leaves a processor as "HELLO, CHIP" and arrives as "HE CHIPCHIP". Somewhere in a dozen blocks, bytes were lost and others repeated. At block level, the same bug shows up in five clocks with one failing line. Where would you rather meet it?

Four Levels, Each Standing on the One BelowStep up the levels. Each level checks what only it can see, and trusts what the level below already showed.
  • External
  • Report
  • Processor
  • Design
  • DUT
  • Structure
  • Analysis
Four Levels, Each Standing on the One BelowStep up the levels. Each level checks what only it can see, and trusts what the level below already showed. external System chip, board andsoftware together report Checks use cases boot, apps, realtraffic processor Chip every block, wiredtogether report Checks joins wiring, addresses,clocks, firmware design Subsystem a few blocks with onejob report Checkscooperation blocks workingtogether dut Block one module, every pinreachable report Checks function every feature andcorner of one design trustedtrustedtrustedherehereherehere
  1. dut Blockone module, every pin reachable
    • trusted → Subsystem
    • here → Checks function
  2. report Checks functionevery feature and corner of one design
  3. design Subsystema few blocks with one job
    • trusted → Chip
    • here → Checks cooperation
  4. report Checks cooperationblocks working together
  5. processor Chipevery block, wired together
    • trusted → System
    • here → Checks joins
  6. report Checks joinswiring, addresses, clocks, firmware
  7. external Systemchip, board and software together
    • here → Checks use cases
  8. report Checks use casesboot, apps, real traffic
  1. Block

    One design alone. The bench reaches every pin, runs fast, and checks every feature.

  2. Subsystem

    A few blocks with one job, such as a memory path. Checks that they cooperate.

  3. Chip

    Everything wired together. Checks the joins: wires, addresses, clocks, resets, firmware.

  4. System

    The chip on its board with its software. Checks what users will do.

Read the diagram as text
  • System: chip, board and software together
  • Checks use cases: boot, apps, real traffic
  • Chip: every block, wired together
  • Checks joins: wiring, addresses, clocks, firmware
  • Subsystem: a few blocks with one job
  • Checks cooperation: blocks working together
  • Block: one module, every pin reachable
  • Checks function: every feature and corner of one design
  • Block → Subsystem: trusted
  • Subsystem → Chip: trusted
  • Chip → System: trusted
  • Block → Checks function: here
  • Subsystem → Checks cooperation: here
  • Chip → Checks joins: here
  • System → Checks use cases: here

Each level trusts the work below it and checks what only it can see. Higher levels run slower and are harder to debug.

Before You Start

Read What "Done" Means first: done is defined by a plan. A FIFO is a small buffer that hands bytes out in the order they came in.

Five questions this page answers
Question
1What are the four levels of verification?
2What does each level check that the one below cannot?
3What may a level assume from the level below?
4Why does chip level not repeat block-level tests?
5Where does software enter?

The Idea: Check Each Thing Where It Is Easiest to See

A chip is built from blocks, and each block is designed by one person or a small team. The easiest place to check a block is alone. The bench reaches every pin, a test runs in a blink, and a failure points straight at the block.

But some bugs exist only when blocks meet. Two designers can read one interface two ways. A wire can go to the wrong input. Software can use a register the way nobody designed. These bugs cannot appear in a block bench, because the other side is missing.

So verification climbs. Each level checks what only it can see, and trusts what the level below already showed. That trust is what keeps the higher levels affordable. They are slow, and they should not spend their time again on work that is already done.

New Words

New words on this page
WordMeaning
BlockOne design module, verified alone with a bench that drives all its pins.
SubsystemA few blocks that do one job together, such as a memory path, with clear inputs and outputs.
Chip levelThe whole chip, every block wired together, usually with its processor running code.
System levelThe chip on a board with its software, doing what users will do.
IntegrationJoining blocks together, and the bugs that live in those joins.
FIFOFirst in, first out: a buffer that hands out entries in the order they arrived.
FirmwareSmall programs that run on the chip's own processor. At chip level, many tests are firmware.

What Each Level Checks and Assumes

Four levels at a glance
LevelChecksAssumes from belowSpeed and debug
BlockEvery feature and corner of one designNothing: it is the bottomFast; a failure names the block
SubsystemBlocks cooperating on one jobEach block meets its specificationSlower; a failure names a few blocks
ChipJoins: wires, addresses, clocks, resets, firmwareSubsystems and blocks workSlow; a failure may be anywhere
SystemUse cases: boot, apps, real trafficThe chip works as specifiedSlowest, or real hardware; debug is hardest

Read the "assumes" column as an agreement between teams. Chip level does not try every FIFO depth again. It trusts the block bench for that, and checks that the FIFO is wired in and used correctly. If the block bench missed something, that is a gap to send back to the block team.

Software enters at chip level. Many chip tests are small programs that run on the chip's own processor. At system level the real software arrives: device drivers (the software that controls each block), an operating system, applications.

The Rules

  1. Rule 1: Check each feature at the lowest level that can see it.

    There it is fastest to run and easiest to debug.

  2. Rule 2: Each level trusts the one below.

    Higher levels check joins and use cases, never the insides of a block again.

  3. Rule 3: A gap found higher up goes back down.

    If a block bench missed a case, the block team fixes their bench.

  4. Rule 4: Software enters at chip level and grows at system level.

    Firmware tests the joins; real software tests the use cases.

Sources for These Rules

Spear and Tumbush (2012), section 1.1.1: bugs at block level, then at boundaries between blocks (integration), then at system level. Block simulations run fast. Higher levels run slower and take longer to debug.

Mehta (2018), section 2.2, item 1: identify subsystems; block-level work is imported to subsystem level. Section 16.3: a subsystem has clear stimulus inputs and response outputs.

Weste and Harris (2011), section 15.1.1: use the hierarchy of the design, and move up as lower modules are verified.

The Lab: One Bug, Two Levels

The lab's FIFO is four entries deep, with one bug: full rises at 5 entries instead of 4. So a fifth write is accepted and lands on top of the oldest unread byte.

The full flag of fifo4. The FIFO holds four entries.
assign full  = (count == 5);   // should be 4
assign empty = (count == 0);

The lab runs two benches at once. The block bench owns one FIFO's pins: it writes four times and checks full. The system bench owns no FIFO pins at all. A producer writes "HELLO, CHIP" whenever the FIFO is not full, and a slow consumer reads a byte every third clock.

Printed by the lab (Icarus).
block test, cycle 5: four writes, full is 0: FAIL
system test, cycle 34: sent "HELLO, CHIP", received "HE CHIPCHIP"

The block bench fails at cycle 5 with one clear line: four writes, and full is still 0. Rule 1 at work. The system bench reports at cycle 34 that the message came out as "HE CHIPCHIP". From that line alone you know only that bytes went wrong somewhere between producer and consumer.

Debugging the system result means tracing back through the producer, the FIFO and the consumer, clock by clock. In a real chip there are dozens of blocks to suspect. The block line names the FIFO and the flag at once.

Why Every Level Is Needed

A system test does what users do, so why not test only there? Because it is slow and blind. It runs far fewer cycles in the same time, and it reaches a block only through everything around it. Some block features are hard to reach from outside at all.

Why not test only blocks, then? Because joins and use cases do not exist at block level. Both are needed, and each level is worth only what it alone can see.

Traps

The first trap is the busy chip plan: hundreds of chip tests that are really block tests driven through the processor. They pass, they take weeks, and the wiring between blocks stays unchecked.

The second trap is the quiet gap. A chip engineer notices a case the block bench never tried and adds it to a chip test. The block team never hears of it, and the next chip reusing that block inherits the hole.

The third trap is the late block. When one block arrives late, a team is tempted to skip its block bench and "test it in the chip". Every bug it carries then costs chip-level debug time.

At Scale

ap_soc~12 blocks
Phone-class SoChundreds of blocks

This section looks ahead. Large chips have more levels, not fewer.

  1. Bought blocks

    Many blocks are bought from other companies with their own verification record. The chip team reads that record instead of redoing it.

  2. Reuse up the levels

    Checks written for a block are reused at higher levels, watching quietly while the chip runs.

Where This Goes Next

This lesson placed verification in levels. These lessons teach each level.

Where each idea is taught in depth
The idea from this pageWhere it is taught
A full block-level bench for a FIFOThe Complete Layered Testbench
Reusable bench parts that climb levelsFrom a Layered Bench to UVM
What a block bench already proved, from the chip's sideWhat the Block Bench Already Proved
The parts of any bench, at any levelThe Parts of a Testbench

Try It

Run the lab. Compare the cycle and the clarity of the two lines.

Fix the full flag (change 5 to 4). Predict both lines before you run it.

Make the consumer faster (read every clock). Does the system bench still see the bug, and why?

RUNIcarus Verilog · in your browser
Edit the code, then run it
Expected: block test, cycle 5: four writes, full is 0: FAIL system test, cycle 34: sent "HELLO, CHIP", received "HE CHIPCHIP"

Check Yourself

Predict the outputThe full flag is fixed: it rises at 4 entries. What is the last line the lab prints?
// fifo4: a first-in first-out buffer, four entries deep. dout shows the oldest entry.
module fifo4 (input logic clk, rst, push, pop, input logic [7:0] din,
              output logic [7:0] dout, output logic full, empty);
  logic [7:0] mem [0:3];
  logic [1:0] wp, rp;           // write and read pointers
  logic [2:0] count;            // entries held
  assign full  = (count == 4);
  assign empty = (count == 0);
  assign dout  = mem[rp];
  always_ff @(posedge clk)
    if (rst) begin wp <= 0; rp <= 0; count <= 0; end
    else begin
      if (push && !full)  begin mem[wp] <= din; wp <= wp + 1; end
      if (pop  && !empty) rp <= rp + 1;
      count <= count + (push && !full) - (pop && !empty);
    end
endmodule

module tb;
  logic clk = 0, rst = 1;
  always #1 clk = ~clk;
  int cycle = 0;
  always @(posedge clk) cycle++;

  // Block level: the bench owns every pin of one FIFO.
  logic bpush = 0, bpop = 0, bfull, bempty; logic [7:0] bdout;
  fifo4 blk (.clk, .rst, .push(bpush), .pop(bpop), .din(8'h00), .dout(bdout), .full(bfull), .empty(bempty));

  // A small system: a producer writes a message while the FIFO is not full;
  // a slow consumer takes one byte every third cycle. Nobody looks at the FIFO's pins.
  logic push, pop, full, empty; logic [7:0] din, dout;
  fifo4 sys (.clk, .rst, .push, .pop, .din, .dout, .full, .empty);
  logic [7:0] msg [0:10];
  initial begin msg[0] = "H"; msg[1] = "E"; msg[2] = "L"; msg[3] = "L"; msg[4] = "O"; msg[5] = ","; msg[6] = " "; msg[7] = "C"; msg[8] = "H"; msg[9] = "I"; msg[10] = "P"; end
  string got = "";
  int sent = 0;
  assign push = !rst && sent < 11;
  assign din  = (sent < 11) ? msg[sent] : 8'h00;
  assign pop  = !rst && !empty && (cycle % 3 == 0);
  always @(posedge clk) if (!rst) begin
    if (push && !full) sent <= sent + 1;
    if (pop) got = {got, $sformatf("%c", dout)};
  end

  initial begin
    @(negedge clk) rst = 0;
    bpush = 1; repeat (4) @(negedge clk); bpush = 0;
    if (bfull) $display("block test, cycle %0d: four writes, full is 1: PASS", cycle);
    else       $display("block test, cycle %0d: four writes, full is 0: FAIL", cycle);
    wait (got.len() == 11 || cycle > 60);
    $display("system test, cycle %0d: sent \"HELLO, CHIP\", received \"%s\"", cycle, got);
    $finish;
  end
endmodule
ConceptWhat does chip level check that block level cannot?
ConceptWhat may a subsystem bench assume?
ConceptIn the lab, why is the block-level failure easier to debug?
ConceptWhere does real software, such as an operating system, first run?

Common Mistakes

Wrong Test a block only inside the chip.

Chip runs are slow, and a failure there could be in any of dozens of blocks.

Fix Verify each block alone first, where its bugs are quick to find and name.

Wrong Repeat block tests at chip level.

It spends slow chip runs on work already done and leaves the joins unchecked.

Fix At chip level, check wiring, addresses, clocks, resets and firmware.

Wrong Quietly cover a block's missing case in a chip test.

The block team never learns of the gap, and reused blocks keep it.

Fix Send the gap back to the block team to fix in their bench.

Remember

  • Four levels: block, subsystem, chip, system; each checks what only it can see.
  • Each level trusts the one below; chip level checks joins, never block insides again.
  • The same bug is fast to find and name at block level, slow and vague higher up.
  • Software enters at chip level as firmware and at system level as real software.

Practice

Report a problem with this page