What the Block Bench Already Proved

A block that passed its own bench can still fail inside the chip. Learn what carries over from block level, what was never checked, and what the chip level must never redo.

You Will Be Able To

  • Say what a block bench proves and what it cannot see.
  • Sort a check into block level, chip level, or a gap to raise.
  • Explain why a chip test checks joins, not the insides of a block.
Lesson
V1.1
Time
22 min
Runs on
Your browser
Check
5 questions

UART0 passed four thousand block tests on Friday. On Monday it sits inside the chip, the first smoke test enables its interrupt, and the handler never runs. Nothing inside UART0 changed, so what did the block bench miss?

The Same Block, Two BenchesStep through. On the left, the block bench holds every pin. On the right, the same block sits inside the chip. The chip bench reaches it only through the pads and the bus.
  • Test
  • Peripheral
  • Pads
  • Processor
  • Control / FSM
  • Clock / reset
  • Data
  • Interrupt
  • Clock
The Same Block, Two BenchesStep through. On the left, the block bench holds every pin. On the right, the same block sits inside the chip. The chip bench reaches it only through the pads and the bus. test Block bench drives and sees everypin peripheral UART0 alone every register, everycorner test Chip bench owns only the pads pads Pads the only way in processor Core or busmanager reaches UART0 overthe bus peripheral UART0 in the chip same block, newneighbours control Interruptcontroller input 1 is UART0 clock reset Clock and reset decides when UART0runs all pinspads onlybusrequest wireclock, resettransmit line
  1. test Block benchdrives and sees every pin
    • all pins → UART0 alone
  2. peripheral UART0 aloneevery register, every corner
  3. test Chip benchowns only the pads
    • pads only → Pads
  4. pads Padsthe only way in
  5. processor Core or bus managerreaches UART0 over the bus
    • bus → UART0 in the chip
  6. control Interrupt controllerinput 1 is UART0
  7. clock reset Clock and resetdecides when UART0 runs
    • clock, reset → UART0 in the chip
  8. peripheral UART0 in the chipsame block, new neighbours
    • request wire → Interrupt controller
    • transmit line → Pads
  1. The block bench

    It can drive any pin in any order and see every output. It proves UART0 against its own specification.

  2. The chip bench

    It owns only the pads. Everything inside must be reached through the chip, as a board and its software will reach it.

  3. What is new

    The bus path, the request wire, the clock and reset, the pad. None of these existed on the block bench.

Read the diagram as text
  • Block bench: drives and sees every pin
  • UART0 alone: every register, every corner
  • Chip bench: owns only the pads
  • Pads: the only way in
  • Core or bus manager: reaches UART0 over the bus
  • UART0 in the chip: same block, new neighbours
  • Interrupt controller: input 1 is UART0
  • Clock and reset: decides when UART0 runs
  • Block bench → UART0 alone: all pins
  • Chip bench → Pads: pads only
  • Core or bus manager → UART0 in the chip: bus
  • UART0 in the chip → Interrupt controller: request wire
  • Clock and reset → UART0 in the chip: clock, reset
  • UART0 in the chip → Pads: transmit line

An architecture drawing of one block in two settings. The arrows name the joins the chip level must check.

Before You Start

If SoC verification is new to you, start with An SoC as a Verifier Sees It.

You should know what an SoC is: From Board to Chip. You should know how one access crosses it: One Access, End to End. You should know how an interrupt travels from a device to the core: The Interrupt Path. A first look at a layered bench helps: From a Layered Bench to UVM.

The labs of this module are small slices. They use the real addresses and interrupt numbers of ap_soc v1.5, and each page says so. The whole chip runs from module V2 on, and in the guided run of the fundamentals module.

Five questions this page answers
Question
1What does a block bench prove, and what can it never see?
2What changes when the same block sits inside a chip?
3Which checks must the chip level make, and which must it leave alone?
4What happens to a check that no bench ever made?
5How does a tiny lab show a block passing alone and failing in the chip?

The Idea: The Block Was Right and the Chip Was Wrong

A block bench owns every pin of its block. It can drive the inputs in any order and watch every output. So it is the best place to prove what the block does. That means every divider value, every parity case, every state of its queue. When it passes, the block meets its own specification.

What it cannot see is the world around the block. It does not know which wire carries the interrupt request, or which clock the chip will give. It cannot know when reset will lift, or which pad the transmit line reaches. The block bench supplied all of those itself, perfectly. The chip supplies them for real, and the chip was built by someone else.

So the question at chip level changes. It is no longer "does UART0 work?" The new question is whether the blocks work together, as the chip specification and the software expect. That question is the point of view of this whole track.

New Words

New words on this page
WordMeaning
Block benchA test bench built around one block. It drives and observes every pin of that block.
Chip benchA test bench built around the whole chip. It owns only the pads and reaches the inside through them.
IntegrationJoining blocks into one chip: the bus, the wires between blocks, the clocks, the resets and the pads.
JoinAny place where two separately made things must agree: a wire, an address, a clock, a register the software uses.
Smoke testA short first test that shows the chip is alive at all: it boots, it talks, one interrupt arrives.
GapA behaviour that no bench has checked. It must be raised with its owner, never quietly absorbed.

What Carries over, and What Never Existed

One block, two benches
Block benchChip bench
Reaches the block throughEvery pin, directlyThe pads, the core or a bus manager, and the bus
ProvesThe block against its own specificationThe blocks together, against the chip specification and the software
Clock, reset, powerSupplied by the bench, always rightSupplied by the chip, possibly wrong
FindsFunction and rare casesWiring, map, clock and reset, software agreement, pads

Read the table as a handover. Everything in the first column is finished work. The chip level takes it as a fact, the way you trust a library you did not write. Everything in the second column is new, because it did not exist until the blocks were joined.

The Rules

  1. Rule 1: Trust passed block work.

    A function proved on its block bench is not checked again at chip level.

  2. Rule 2: Check every join.

    Wires, addresses, clocks, resets, pads and the registers software uses are chip-level work.

  3. Rule 3: Use one example per join.

    One byte through the UART proves its path. The rare cases of the UART stay on its bench.

  4. Rule 4: Raise gaps.

    If no bench covered a behaviour, report it to the block team. Do not hide it inside a chip test.

Sources for These Rules

Mehta, ASIC/SoC Functional Design Verification, sections 1.1 and 1.2: why verification fails and where bugs come from.

Mehta, section 2.2: subsystems are built from blocks, and block work is imported to subsystem level.

The rule that the chip level never redoes a block's insides is this track's point of view (docs/soc-verification-plan.md section 2.1). It is common practice; no single source states it as a rule.

Now Run It: One Block, Two Benches

The lab at the end of this page holds uart_lite, a cut-down UART0 transmitter. It has TXDATA, a STATUS bit called ROOM, and an IRQ ENABLE bit. Its request irq is high while the interrupt is enabled and the transmitter has room. The lab checks it twice, in one run.

First, a block bench drives its pins directly. Then a small chip, mini_chip, joins the same block to an interrupt controller with four inputs. In the map, UART0 is source 1. The chip bench enables the interrupt through the bus and asks the controller which source is pending.

Printed by the lab (Icarus). The first four rows come from the block bench, the last two from the chip bench.
block bench: ROOM drops after a write
block bench: ROOM back after 3 clocks
block bench: irq follows ROOM
block bench: PASS 3 of 3
chip smoke: UART0 interrupt enabled, transmitter idle
chip smoke: FAIL claim 2, but UART0 is source 1

Walk the output. The block bench reports three of three: ROOM drops after the write of 41, returns after three clocks, and irq follows it. UART0 is correct. Then the chip smoke test reads claim 2, but UART0 is source 1. The request reached the controller on the wrong input.

Open the lab and find the line irq_ctl u_irq (.req({2'b00, uart_irq, 1'b0}), .claim);. The integrator put the wire on bit 1, which the controller reports as source 2. No block bench could see that line, because it is not inside any block.

The Trap: Testing the Block Again Through the Chip

A new chip team often writes its first chip tests as block tests driven through the bus. It tries every divider, every parity case and every queue depth. Each one takes a boot and a long run, and each one passes, because the block bench already proved them. Weeks go by and the plan looks busy.

Meanwhile nobody has checked the request wire, the clock gate or the pad. The trap costs twice: time spent on proved behaviour, and real chip bugs left unfound until silicon. Ask of every chip test: which join does this prove?

The opposite trap is quieter. A behaviour that no bench checked does not become chip-level work just because someone noticed it. Raise it as a gap, so the owner of the block fixes their bench.

At Scale

ap_soc~12 blocks
Phone-class SoChundreds of blocks

ap_soc has about a dozen blocks. A large chip has hundreds, many bought from outside.

  1. Bought blocks

    A bought block arrives with its supplier's bench results. The chip team reads that record before planning, to know what is already proved.

  2. Reuse, not repeat

    Block monitors and checkers come up to the chip and run passively. Their drivers stay behind. Module V3 shows how.

Try It

Run the lab. Read the four block-bench rows, then the two chip rows.

Change the request wire to {3'b000, uart_irq}. Predict the last row before you run it.

Change the block so ROOM returns after 5 clocks instead of 3. Predict which block-bench row changes.

RUNIcarus Verilog · in your browser
Edit the code, then run it
Expected: block bench: ROOM drops after a write block bench: ROOM back after 3 clocks block bench: irq follows ROOM block bench: PASS 3 of 3 chip smoke: UART0 interrupt enabled, transmitter idle chip smoke: FAIL claim 2, but UART0 is source 1

Check Yourself

Predict the outputThe integrator moves the request to {3'b000, uart_irq}. What is the last line the lab prints?
// uart_lite: a cut-down UART0 transmitter. TXDATA at 0x0, STATUS at 0x4 (bit 0 ROOM),
// IRQ ENABLE at 0x8. A taken byte keeps ROOM low for 3 clocks. irq = IRQ ENABLE and ROOM.
module uart_lite (input logic clk, rst_n, sel, wr, input logic [3:0] addr,
                  input logic [7:0] wdata, output logic [7:0] rdata, output logic irq);
  int busy;
  logic irq_en;
  always_ff @(posedge clk or negedge rst_n)
    if (!rst_n) begin busy <= 0; irq_en <= 0; end
    else begin
      if (busy > 0) busy <= busy - 1;
      if (sel && wr && addr == 4'h0 && busy == 0) busy <= 3;
      if (sel && wr && addr == 4'h8) irq_en <= wdata[0];
    end
  assign rdata = (addr == 4'h4) ? {7'd0, busy == 0} : 8'd0;
  assign irq = irq_en && busy == 0;
endmodule

// irq_ctl: four request inputs; a claim returns the lowest pending source number (1 to 4), or 0.
module irq_ctl (input logic [3:0] req, output logic [2:0] claim);
  always_comb begin
    claim = 0;
    for (int i = 3; i >= 0; i--) if (req[i]) claim = i + 1;
  end
endmodule

// mini_chip: the integrator joins UART0 to the interrupt controller. UART0 is source 1 in the map.
module mini_chip (input logic clk, rst_n, sel, wr, input logic [3:0] addr,
                  input logic [7:0] wdata, output logic [7:0] rdata, output logic [2:0] claim);
  logic uart_irq;
  uart_lite u_uart (.clk, .rst_n, .sel, .wr, .addr, .wdata, .rdata, .irq(uart_irq));
  irq_ctl u_irq (.req({3'b000, uart_irq}), .claim);
endmodule

module tb;
  logic clk = 0, rst_n = 0, sel = 0, wr = 0;
  logic [3:0] addr; logic [7:0] wdata, rdata, b_rdata; logic b_irq; logic [2:0] claim;
  int pass = 0;
  always #5 clk = ~clk;
  // The block bench owns every pin of uart_lite.
  uart_lite blk (.clk, .rst_n, .sel, .wr, .addr, .wdata, .rdata(b_rdata), .irq(b_irq));
  // The chip bench reaches UART0 only through the chip.
  mini_chip chip (.clk, .rst_n, .sel, .wr, .addr, .wdata, .rdata, .claim);
  task automatic write(input logic [3:0] a, input logic [7:0] d);
    @(negedge clk) begin sel = 1; wr = 1; addr = a; wdata = d; end
    @(negedge clk) begin sel = 0; wr = 0; end
  endtask
  initial begin
    repeat (2) @(negedge clk); rst_n = 1;
    write(4'h8, 8'h01);
    write(4'h0, 8'h41); addr = 4'h4;
    #1 if (b_rdata[0] == 0 && b_irq == 0) begin pass++; $display("block bench: ROOM drops after a write"); end
    repeat (3) @(negedge clk);
    #1 if (b_rdata[0] == 1) begin pass++; $display("block bench: ROOM back after 3 clocks"); end
    if (b_irq == 1) begin pass++; $display("block bench: irq follows ROOM"); end
    $display("block bench: PASS %0d of 3", pass);
    $display("chip smoke: UART0 interrupt enabled, transmitter idle");
    if (claim == 1) $display("chip smoke: PASS claim %0d is UART0", claim);
    else $display("chip smoke: FAIL claim %0d, but UART0 is source 1", claim);
    $finish;
  end
endmodule
ConceptWhat can a block bench never see?
ConceptWhich check belongs at chip level?
ConceptA chip engineer notices that the UART0 bench never tested a break on the receive line. What should happen?
ConceptIn the lab, why does the block bench pass while the chip smoke test fails?

Common Mistakes

Wrong Repeat every block case through the chip.

They were proved on the block bench, and each chip run costs a boot.

Fix Check one example per join and leave the rest to the block bench.

Wrong Take a passing block bench as proof the block works in the chip.

The block bench supplied its own clock, reset and wires, perfectly.

Fix Check every join the chip adds: wires, map, clock, reset, pads, software.

Wrong Quietly add a missing block check to a chip test.

The block team never learns its bench has a hole.

Fix Raise it as a gap with the block's owner.

Remember

  • A block bench owns every pin and proves the block against its own specification.
  • It cannot see the wires, map, clocks, resets, pads or software around the block.
  • The chip level checks joins between blocks, one example per join.
  • Passed block work is trusted, never repeated; unchecked behaviour is a gap to raise.

Practice

Report a problem with this page