The Chip-Level Verification Plan

A chip-level plan is a table with one row per feature: its risk, its test, its mode, its check and its coverage. Learn to write rows, rank them by risk, and let the regression close them.

You Will Be Able To

  • Write a plan row with feature, risk, test, mode, check and coverage.
  • Rank rows by risk when time is short.
  • Read a plan against a regression to see what is still open.
Lesson
V1.4
Time
22 min
Runs on
Your browser
Check
5 questions

Six weeks before tape-out, your manager asks one question: "What have we not verified?" A folder of tests cannot answer it. A plan, with a row for every feature and a column saying how each row closes, answers it in one line.

A Plan Row Grows from Left to RightStep through the columns of one plan row. Each column answers one question, and the last one tells you when the row is done.
  • Design
  • Measure
  • Step
  • Processor
  • Scoreboard
  • Result
  • Data
A Plan Row Grows From Left to RightStep through the columns of one plan row. Each column answers one question, and the last one tells you when the row is done. design Feature UART echo throughthe handler measure Risk how likely, how bad step Test uart_echo processor Mode with CPU scoreboard Check scoreboard at thepads result Coverage bytes 00 to ff, bothdirections rankplandrivedecideclose
  1. design FeatureUART echo through the handler
    • rank → Risk
  2. measure Riskhow likely, how bad
    • plan → Test
  3. step Testuart_echo
    • drive → Mode
  4. processor Modewith CPU
    • decide → Check
  5. scoreboard Checkscoreboard at the pads
    • close → Coverage
  6. result Coveragebytes 00 to ff, both directions
  1. Feature

    What the chip must do, in words the chip specification uses.

  2. Risk

    How likely a bug is, and how bad it would be. It decides the order of work.

  3. Test

    The test that exercises the feature.

  4. Mode

    With CPU, without CPU, or both.

  5. Check

    What proves the result: firmware, a monitor, the pads, formal or a model.

  6. Coverage

    What must have happened before the row counts as closed.

Read the diagram as text
  • Feature: UART echo through the handler
  • Risk: how likely, how bad
  • Test: uart_echo
  • Mode: with CPU
  • Check: scoreboard at the pads
  • Coverage: bytes 00 to ff, both directions
  • Feature → Risk: rank
  • Risk → Test: plan
  • Test → Mode: drive
  • Mode → Check: decide
  • Check → Coverage: close

One row of a chip-level plan. A real plan has hundreds of rows, and a regression reads them every night.

Before You Start

Read Three Ways to Drive a Chip first. It gives the mode column. What Coverage Measures explains what coverage measures. The SoC Design Flow and Who Owns What shows who owns what in a chip project.

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 is a chip-level verification plan for?
2What goes in each column of a plan row?
3How do you rank rows when time is short?
4How does a regression close a row?
5What is the trap of a plan that lists tests, not features?

The Idea: Features Come First

A plan starts from what the chip must do, never from the tests you happen to have. Each feature gets a row. Then the row grows to the right. It says how risky the feature is and which test exercises it, in which mode. It names what checks the result, and what must have happened before you call it done.

Because the plan lists features, it can show what is missing. A row with no test is a hole you can see. A row whose test passed but whose coverage is empty is a test that ran without proving much. Mehta builds plans the same way, starting from subsystems and their stimulus and response.

New Words

New words on this page
WordMeaning
Verification planA table of every feature to verify, with how each one will be tested, checked and closed.
Plan rowOne feature of the plan with its risk, test, mode, check and coverage.
RiskHow likely a bug is, times how much it would hurt. It sets the order of work.
ClosedA row whose test passed and whose coverage goal was met.
RegressionThe full set of tests, run again and again, usually every night.

Writing and Ranking Rows

Three rows of the ap_soc plan
FeatureRiskTestModeCheckCoverage
Reset to main in both boot modesHighboot_romWith CPUFirmware reports through the benchBoth strap values
Every hole of the map answers with an errorMediummap_walkWithout CPUBus monitor sees the error responseEvery hole probed
No pad drives out after resetMediumpads_resetWithout CPUA pad sampler sees every pad releasedAll sixteen IO pads

Illustrative rows. The full plan of this track is written in module V12.

When time runs short, risk decides. Score each feature by how likely a bug is and how much it would hurt, and work from the top. A boot failure stops every board; a slow status bit annoys one driver. Mehta's plan items ask the same questions: which subsystems, what stimulus, how will the response be checked.

The Rules

  1. Rule 1: Start from features.

    Rows come from the chip specification, not from the tests you already have.

  2. Rule 2: Fill every column.

    A row without a check or a coverage goal cannot close honestly.

  3. Rule 3: Rank by risk.

    Likelihood times impact sets the order when time is short.

  4. Rule 4: Let the regression close rows.

    The plan is read against last night's results, row by row.

Sources for These Rules

Mehta, ASIC/SoC Functional Design Verification, section 2.2: the outline of a complete plan.

Mehta, section 16.2: a plan for a whole SoC, step by step.

Mehta, section 15.5.1: the test plan comes from the design specification and says how each function is tested and measured.

Risk as likelihood times impact is common practice in project planning; the numbers on this page are exercise values.

Now Run It: The Plan Reads the Regression

The lab holds a six-row plan as data: a feature, a risk score, the test that closes it, and its mode. It also holds the list of tests that passed last night. For each row, it looks up the test and prints closed or OPEN, then adds up the risk still open.

Printed by the lab (Icarus). Risk scores are exercise values.
Boot from ROM   risk 20  boot_rom   CPU    closed
UART echo       risk  9  uart_echo  CPU    closed
Memory map      risk 16  map_walk   no CPU closed
DMA copy        risk 12  dma_copy   both   OPEN
Timer interrupt risk  8  timer_irq  CPU    OPEN
Watchdog reset  risk 10  wdog_reset CPU    OPEN
plan: 3 of 6 rows closed, open risk 30

Read the last line first: three of six rows closed, and 30 points of risk still open. The OPEN rows are DMA copy (12), timer interrupt (8) and watchdog reset (10). That is the answer to the manager's question, in one line, and it names the three tests to fix first.

Notice that the lab never looks inside a test. It only joins two tables by name. In a real project the same join runs across hundreds of rows and thousands of tests. The coverage column joins in the coverage database too.

The Trap: A Plan That Lists Tests

Some plans are a list of test names with a status column. They always look complete, because every listed test exists. What they cannot show is the feature nobody wrote a test for, because it has no row at all.

That missing row is where the escape comes from. Write rows from the chip specification, one per feature, and only then attach tests. An empty test column is the most useful thing a plan can show you.

Try It

Run the lab. Find the three OPEN rows and add their risk scores yourself.

Change the passed list to '{"dma_copy", "timer_irq", "boot_rom"}. Predict the last line.

Add a seventh row with no test that will ever pass. Watch what the last line says.

RUNIcarus Verilog · in your browser
Edit the code, then run it
Expected: Boot from ROM risk 20 boot_rom CPU closed UART echo risk 9 uart_echo CPU closed Memory map risk 16 map_walk no CPU closed DMA copy risk 12 dma_copy both OPEN Timer interrupt risk 8 timer_irq CPU OPEN Watchdog reset risk 10 wdog_reset CPU OPEN plan: 3 of 6 rows closed, open risk 30

Check Yourself

Predict the outputLast night only dma_copy, timer_irq and boot_rom passed. What is the last line the lab prints?
// A chip-level plan as data, and last night's regression. Each row names the test that closes it.
module tb;
  string feature [6], test [6], mode [6], passed [3];
  int risk [6];
  task automatic row(input int i, input string f, t, m, input int r);
    feature[i] = f; test[i] = t; mode[i] = m; risk[i] = r;
  endtask
  int open_risk = 0, closed = 0;
  string state;
  initial begin
    row(0, "Boot from ROM", "boot_rom", "CPU", 20);      row(1, "UART echo", "uart_echo", "CPU", 9);
    row(2, "Memory map", "map_walk", "no CPU", 16);      row(3, "DMA copy", "dma_copy", "both", 12);
    row(4, "Timer interrupt", "timer_irq", "CPU", 8);    row(5, "Watchdog reset", "wdog_reset", "CPU", 10);
    passed[0] = "dma_copy"; passed[1] = "timer_irq"; passed[2] = "boot_rom";   // tests that passed last night
    foreach (feature[i]) begin
      bit done;
      done = 0;
      foreach (passed[j]) if (passed[j] == test[i]) done = 1;
      if (done) begin closed++; state = "closed"; end
      else begin open_risk += risk[i]; state = "OPEN"; end
      $display("%-15s risk %2d  %-10s %-6s %s", feature[i], risk[i], test[i], mode[i], state);
    end
    $display("plan: %0d of 6 rows closed, open risk %0d", closed, open_risk);
  end
endmodule
ConceptWhat should a plan start from?
ConceptWhich column tells you when a row is done?
ConceptWith little time left, which row comes first?
ConceptIn the lab, what does the plan compare with the regression?

Common Mistakes

Wrong Write the plan from the tests you already have.

A feature with no test then has no row, so the hole is invisible.

Fix Write one row per feature from the specification, then attach tests.

Wrong Call a row closed because its test passes.

The test may never reach the feature.

Fix Close a row only when its coverage goal is met too.

Wrong Work through rows in table order when time is short.

Low-risk rows can eat the days a boot test needed.

Fix Rank by likelihood times impact and work from the top.

Remember

  • A chip-level plan has one row per feature: risk, test, mode, check, coverage.
  • Rows come from the chip specification, so a missing test is visible.
  • Risk is likelihood times impact, and it orders the work.
  • A row closes when its test passes and its coverage goal is met.

Practice

Report a problem with this page