B3.6.1 Read the Hit Table

EasyImplement12 minIcarus Verilog · serverReview the topic

Read the hit table of the ALU's coverage model. Count bins, holes and coverage, and choose the right way to close each hole.

Hardware context: The ALU's operations crossed with the kinds of result. A coverage model for a datapath.

This hit table was recorded on Icarus 12 from 300 random ALU operations in the lesson. Rows are operations; columns are the kind of result. A dash is a pair that cannot happen.

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
Recorded by the lesson's lab (seed 5, 300 draws).
op   ordinary  carry  zero  zero+carry
ADD       22     46     0           0
SUB       33     32     0           -
AND       78      -     5           -
XOR       83      -     1           -
CodeWay to close a hole
1Run more draws with the same constraints
2Aim some draws at the hole with a new constraint
3Write one directed case
4Remove the bin from the model
EntryYour decision
BINSHow many bins can happen?
IMPOSSIBLEHow many pairs are left out because they cannot happen?
HITHow many bins have a count above 0?
HOLESHow many bins are empty?
PCTFunctional coverage in percent, rounded down.
ADD_ZCHits in ADD, zero with carry.
XOR_ZEROHits in XOR, zero.
CLOSE_ZCBest way to close ADD, zero with carry? Enter its code.
CLOSE_ZEROBest way to close ADD, zero with no carry, which only 0 + 0 reaches? Enter its code.
NOT_THISWhich way never closes a hole that can happen? Enter its code.
MY_PCTAnother run fills FILLED of the 11 bins. Enter its coverage in percent, rounded down.

Examples

Example 1

BINS
Input
How many bins can happen?
Output
matches = 1

Sixteen pairs, minus the five dashes.

Example 2

IMPOSSIBLE
Input
How many pairs are left out because they cannot happen?
Output
matches = 1

AND and XOR never carry: four pairs. A borrow never leaves zero: one more.

Example 3

HIT
Input
How many bins have a count above 0?
Output
matches = 1

Count the numbers above 0 in the table, ignoring dashes.

Constraints and Contract

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

Hints

Hint 1

Only the 11 bins that can happen count.

Hint 2

Each empty bin is a hole.

Hint 3

A rare region wants aimed draws; a single input wants a directed case.

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

15 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 2 problems 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

BINS

Input
How many bins can happen?
Expected output
matches = 1

Sixteen pairs, minus the five dashes.

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

Icarus Verilog · server