Excluded and Illegal Cross Products
Remove impossible cross products, make forbidden ones errors, guard a cross with iff, and keep it small enough to close.
You Will Be Able To
- Exclude impossible products from a cross with
ignore_binsand a select expression. - Mark forbidden products with
illegal_binsand say which wins when a product is both ignored and illegal. - Guard a cross with
iffand predict its effect on the coverpoints. - Shrink a cross by coarser coverpoint bins and coverpoint exclusions.
- Lesson
- C18
- Time
- 25 min
- Runs on
- Coverage build
- Check
- 4 questions
A 4-lane by 4-command cross stayed at 87.5% in every regression. Two of its products could never happen: configuration only ever travels on lanes 0 and 1. The fix was one ignore_bins line, and the review learned that a cross must be told which products are impossible.
| lane \ cmd | nop | rd | wr | cfg |
|---|---|---|---|---|
| 0 | bin | bin | bin | bin |
| 1 | bin | bin | bin | bin |
| 2 | bin | bin | bin | ignore_bins |
| 3 | bin | bin | illegal_bins | ignore_bins |
The example's cross: 16 products, 2 impossible and 1 forbidden. 13 bins remain in the number.
ignore_bins on a Cross
In a cross, ignore_bins name = select_expression; removes every product the expression selects (IEEE 1800-2023 19.6.2). The selection uses the same binsof, intersect and operators as user cross bins.
Ignored Products Leave User Bins Too
An ignored product is excluded even if a user cross bin also selects it (19.6.2). The user bin keeps its other products. In the formula of 19.11.2, ignored products count among those user bins take. They never come back as automatic bins.
bins one = binsof(a) intersect {1} and ignore_bins ig = binsof(b) intersect {1}. Arrows show where the shared product <1,1> goes.- Neutral
- Data
- The ignore wins
<1,1> is selected by both. It is ignored, so it does not count for
one. - Count the cross
onekeeps 3 products and is one bin. The 7 products taken byoneorigleave 9 automatic bins: 10 in all.
Read the diagram as text
- <a=1, b=1>: in both selections
- bins one: <1,0> <1,2> <1,3> left
- ignore_bins ig: 4 products
- automatic: 16 - 7 = 9 bins
- <a=1, b=1> → ignore_bins ig: ignored
- <a=1, b=1> → bins one: not counted here
A sample of a = 1, b = 1 covers nothing in this cross.
illegal_bins on a Cross
illegal_bins name = select_expression; removes products and makes a hit a run-time error. It takes precedence over everything, even an ignore_bins that selects the same product (19.6.3).
iff on a Cross
x: cross a, b iff (en) ignores the cross at any sample where en is false (19.6). The coverpoints are not affected: they count every sample unless they have guards of their own.
The example's three transfers. The first is during link training, so only the coverpoints see it.
A per-bin guard, bins x = select iff (en), guards one cross bin instead (19.6).
Keeping a Cross Small Enough to Close
A cross has as many products as its coverpoints' bin counts multiplied together. Three 16-bin coverpoints make 4,096 products, and random stimulus will not visit them all. Shrink the cross before trying to close it.
| Technique | Effect on a 16 x 16 cross |
|---|---|
| Coarser coverpoint bins: 4 classes instead of 16 values | 16 products instead of 256 |
ignore_bins in a coverpoint | removes a whole row or column of products |
ignore_bins in the cross | removes only the combinations that are impossible |
| Cross only the pairs the plan asks about | two small crosses instead of one large one |
Each product should be a combination the design treats differently.
Excluding a value inside a coverpoint shrinks every cross built on it. Crosses use only the counted bins of their coverpoints (19.6).
Try It
The cross has 16 - 2 - 1 = 13 bins. The training transfer counts for ln and cm (1 of 4 each) but not the cross: (25 + 25 + 0) / 3.
The second transfer is the same pair with the link up, so the cross gets 1 of 13. The third adds a lane, a command and a product. Predict the output of a write on lane 3 with the link down.
lane=0 cmd=3 up=0: 16.67% lane=0 cmd=3 up=1: 19.23% lane=2 cmd=1 up=1: 38.46%Check Yourself
Common Mistakes
Wrong Leave impossible combinations in a cross and accept a number below 100%.
Nobody can tell a real hole from an impossible product, so real holes go unnoticed.
Fix Remove each impossible product with a cross ignore_bins, written from the rule that makes it impossible.
x: cross ln, cm;x: cross ln, cm {
ignore_bins cfg_high = binsof(cm.cfg)
&& binsof(ln) intersect {[2:3]};
}Wrong Put the link-up guard on a coverpoint when only the cross should wait for it.
The coverpoint then misses training traffic the plan wanted counted.
Fix Guard the cross: cross ln, cm iff (link_up).
Wrong Cross every coverpoint with every other "to be safe".
The products multiply into thousands that no regression can close.
Fix Cross only the pairs the plan asks about, with coarse bins.
Remember
- A cross
ignore_binsremoves the products its select expression names, even from user bins. - A cross
illegal_binsremoves products and makes a hit an error, ahead of any ignore. cross ... iff (expr)skips the cross at a sample; the coverpoints still count.- Excluding a coverpoint value removes its row from every cross on that coverpoint.
- Keep crosses small: coarse bins, exclusions and only the pairs the plan needs.