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
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
op ordinary carry zero zero+carry
ADD 22 46 0 0
SUB 33 32 0 -
AND 78 - 5 -
XOR 83 - 1 -
| Code | Way to close a hole |
|---|---|
| 1 | Run more draws with the same constraints |
| 2 | Aim some draws at the hole with a new constraint |
| 3 | Write one directed case |
| 4 | Remove the bin from the model |
| Entry | Your decision |
|---|---|
| BINS | How many bins can happen? |
| IMPOSSIBLE | How many pairs are left out because they cannot happen? |
| HIT | How many bins have a count above 0? |
| HOLES | How many bins are empty? |
| PCT | Functional coverage in percent, rounded down. |
| ADD_ZC | Hits in ADD, zero with carry. |
| XOR_ZERO | Hits in XOR, zero. |
| CLOSE_ZC | Best way to close ADD, zero with carry? Enter its code. |
| CLOSE_ZERO | Best way to close ADD, zero with no carry, which only 0 + 0 reaches? Enter its code. |
| NOT_THIS | Which way never closes a hole that can happen? Enter its code. |
| MY_PCT | Another 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