B1.1.1 Where Is a Bug Cheapest to Find?

EasyImplement12 minIcarus Verilog · serverReview the topic

Place each bug at the earliest stage a check could find it. Then say what the fix takes where it was really found.

Hardware context: A small chip project on the road from specification to silicon, with a 4-bit adder as its block. Deciding how much checking a block needs before it is handed on.

The stages are those of the road in the lesson. Some entries ask for a stage code (1 to 4), others for a fix code (5 to 7).

This worksheet uses named constants. The first three entries show how to record your decisions.

Replace each unresolved value of 255 with your result.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification
CodeStage
1Block verification (before tape-out)
2Chip-level verification (before tape-out)
3First silicon in the lab (after tape-out)
4In customers' hands
CodeWhat the fix takes
5Edit the RTL and rerun the tests
6New masks (a respin) or a software work-around
7A recall or a work-around in the field
EntryYour decision
FIFO_FULLEarliest stage: a FIFO's full flag rises one entry late.
IRQ_WIREEarliest stage: a timer's interrupt wire is connected to the wrong controller input.
FIX_LABFix: a design bug is first seen on first silicon.
ADDER_TERMEarliest stage: an adder inside an arithmetic block is missing one carry term.
FIX_BLOCKFix: the adder bug is found during block verification.
DRIVER_OFFSETEarliest stage: the firmware writes a peripheral register at the wrong offset.
FIX_CHIPFix: the wrong interrupt wire is found in chip-level verification.
COUNT_WRAPEarliest stage: a counter wraps after 10 instead of 9.
FIX_FIELDFix: a design bug is first reported by customers.
FIX_ATA design bug is first found at stage STAGE (the stage codes above). What does the fix take? Enter a fix code.

Examples

Example 1

FIFO FULL
Input
Earliest stage: a FIFO's full flag rises one entry late.
Output
matches = 1

The flag is inside one block. Its block bench drives every pin and sees it at once.

Example 2

IRQ WIRE
Input
Earliest stage: a timer's interrupt wire is connected to the wrong controller input.
Output
matches = 1

The wire lies between two blocks. No block bench has it; the chip does.

Example 3

FIX LAB
Input
Fix: a design bug is first seen on first silicon.
Output
matches = 1

After tape-out the design is glass and silicon. A design fix needs new masks, or software must avoid the bug.

Constraints and Contract

  • Keep the parameter and named constants. Use the numeric codes and units on this page.
  • For FIX_AT, enter a constant expression using STAGE. Only this entry changes with the parameter. The supported integer range is 1 through 4, inclusive.

Hints

Hint 1

Inside one block, block verification can see it. Between blocks, or between hardware and software, only the chip can.

Hint 2

Before, a fix is an edit. After, it needs masks or a work-around.

Hint 3

Once customers have it, every copy does.

What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.

14 checks on Icarus Verilog · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain your source only; samples require the simulation service. A passing result establishes the tested cases, not a proof for all possible inputs.

See all 1 problem on this path

Report a problem with this page

Your code SystemVerilogSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

FIFO FULL

Input
Earliest stage: a FIFO's full flag rises one entry late.
Expected output
matches = 1

The flag is inside one block. Its block bench drives every pin and sees it at once.

Run samples executes all 3 public checks. Check all tests runs 14 checks on the server.

Icarus Verilog · server