FA-89236 / Digital logic simulation / Open access
Unknown select corrupts every decoder line · case 01
A decoder with one unknown select bit drives x on lines that cannot be selected.
ROOT CAUSE
The unknown case does not restrict itself to candidate lines.
THE FAILURE
The unknown case does not restrict itself to candidate lines.
Unsuccessful approach: An unknown enable still spreads x onto non-candidate lines.
Case contract
Input [kind, sel, data]: sel is MSB-first over 0/1/x/z; an x or z select bit makes both values of that bit candidates. mux: the output is the common value of all candidate data inputs if they agree and are 0 or 1, else 'x'. dec: data[0] is the enable; enable 0 gives all '0'; otherwise candidate lines are '1' only when there is a single candidate and the enable is 1, else 'x'; non-candidate lines are '0'.
Why this case matters
Unknown-select pessimism rules in RTL simulation decide whether X on a control input corrupts datapath outputs.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(*args):
kind, sel, data = args
cands = [0]
for s in sel:
if s in '01':
cands = [c * 2 + int(s) for c in cands]
else:
cands = [c * 2 + b for c in cands for b in (0, 1)]
if kind == 'mux':
vals = sorted({data[c] for c in cands})
return vals[0] if len(vals) == 1 and vals[0] in '01' else 'x'
en = data[0]
out = []
for i in range(2 ** len(sel)):
if en == '0':
out.append('0')
elif len(cands) > 1 or en != '1':
out.append('x')
elif i in cands:
out.append('1')
else:
out.append('0')
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('mux unknown select differing data', ['mux', 'x', ['0', '1']], 'x'), ('mux unknown select agreeing data', ['mux', 'x', ['1', '1']], '1'), ('mux4 unknown low select bit', ['mux', '1x', ['0', '1', '1', '1']], '1'), ('mux4 unknown high select bit', ['mux', 'x1', ['0', '1', '0', '1']], '1'), ('mux unknown select floating data', ['mux', 'z', ['z', 'z']], 'x'), ('mux4 known select', ['mux', '10', ['0', '1', '1', '0']], '1'), ('decoder unknown select bit', ['dec', '1x', ['1']], ['0', '0', 'x', 'x']), ('decoder unknown enable', ['dec', '01', ['x']], ['0', 'x', '0', '0']), ('decoder enabled', ['dec', '10', ['1']], ['0', '0', '1', '0'])], [('mux unknown select differing data', ['mux', 'x', ['0', '1']], 'x'), ('mux unknown select agreeing data', ['mux', 'x', ['1', '1']], '1'), ('mux4 unknown low select bit', ['mux', '1x', ['0', '1', '1', '1']], '1'), ('mux4 unknown high select bit', ['mux', 'x0', ['1', '0', '1', '0']], '1'), ('mux unknown select floating data', ['mux', 'z', ['z', 'z']], 'x'), ('mux4 known select', ['mux', '01', ['0', '1', '1', '0']], '1'), ('decoder unknown select bit', ['dec', '1x', ['1']], ['0', '0', 'x', 'x']), ('decoder unknown enable', ['dec', '00', ['x']], ['x', '0', '0', '0']), ('decoder enabled', ['dec', '10', ['1']], ['0', '0', '1', '0'])], [('mux unknown select differing data', ['mux', 'x', ['0', '1']], 'x'), ('mux unknown select agreeing data', ['mux', 'x', ['1', '1']], '1'), ('mux4 unknown low select bit', ['mux', '1x', ['0', '1', '1', '1']], '1'), ('mux4 unknown high select bit', ['mux', 'x1', ['0', '1', '0', '1']], '1'), ('mux unknown select floating data', ['mux', 'z', ['z', 'z']], 'x'), ('mux4 known select', ['mux', '10', ['0', '1', '1', '0']], '1'), ('decoder unknown select bit', ['dec', '1x', ['1']], ['0', '0', 'x', 'x']), ('decoder unknown enable', ['dec', '01', ['x']], ['0', 'x', '0', '0']), ('decoder enabled', ['dec', '10', ['1']], ['0', '0', '1', '0'])], [('mux unknown select differing data', ['mux', 'x', ['0', '1']], 'x'), ('mux unknown select agreeing data', ['mux', 'x', ['1', '1']], '1'), ('mux4 unknown low select bit', ['mux', '1x', ['0', '1', '1', '1']], '1'), ('mux4 unknown high select bit', ['mux', 'x0', ['1', '0', '1', '0']], '1'), ('mux unknown select floating data', ['mux', 'z', ['z', 'z']], 'x'), ('mux4 known select', ['mux', '01', ['0', '1', '1', '0']], '1'), ('decoder unknown select bit', ['dec', '1x', ['1']], ['0', '0', 'x', 'x']), ('decoder unknown enable', ['dec', '00', ['x']], ['x', '0', '0', '0']), ('decoder enabled', ['dec', '10', ['1']], ['0', '0', '1', '0'])], [('mux unknown select differing data', ['mux', 'x', ['0', '1']], 'x'), ('mux unknown select agreeing data', ['mux', 'x', ['1', '1']], '1'), ('mux4 unknown low select bit', ['mux', '1x', ['0', '1', '1', '1']], '1'), ('mux4 unknown high select bit', ['mux', 'x1', ['0', '1', '0', '1']], '1'), ('mux unknown select floating data', ['mux', 'z', ['z', 'z']], 'x'), ('mux4 known select', ['mux', '10', ['0', '1', '1', '0']], '1'), ('decoder unknown select bit', ['dec', '1x', ['1']], ['0', '0', 'x', 'x']), ('decoder unknown enable', ['dec', '01', ['x']], ['0', 'x', '0', '0']), ('decoder enabled', ['dec', '10', ['1']], ['0', '0', '1', '0'])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| mux unknown select differing data | x | x | Passed |
| mux unknown select agreeing data | 1 | 1 | Passed |
| mux4 unknown low select bit | 1 | 1 | Passed |
| mux4 unknown high select bit | 1 | 1 | Passed |
| mux unknown select floating data | x | x | Passed |
| mux4 known select | 1 | 1 | Passed |
| decoder unknown select bit | ['x', 'x', 'x', 'x'] | ['0', '0', 'x', 'x'] | Failed |
| decoder unknown enable | ['x', 'x', 'x', 'x'] | ['0', 'x', '0', '0'] | Failed |
| decoder enabled | ['0', '0', '1', '0'] | ['0', '0', '1', '0'] | Passed |
SHA-256 / 228370b1c80770ff94c8fba344f8c658dd030f86413fa16bdb489ca7cdcf2077
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(*args):
kind, sel, data = args
cands = [0]
for s in sel:
if s in '01':
cands = [c * 2 + int(s) for c in cands]
else:
cands = [c * 2 + b for c in cands for b in (0, 1)]
if kind == 'mux':
vals = sorted({data[c] for c in cands})
return vals[0] if len(vals) == 1 and vals[0] in '01' else 'x'
en = data[0]
out = []
for i in range(2 ** len(sel)):
if en == '0':
out.append('0')
elif len(cands) > 1 and i in cands or en == 'x':
out.append('x')
elif i in cands:
out.append('1')
else:
out.append('0')
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('mux unknown select differing data', ['mux', 'x', ['0', '1']], 'x'), ('mux unknown select agreeing data', ['mux', 'x', ['1', '1']], '1'), ('mux4 unknown low select bit', ['mux', '1x', ['0', '1', '1', '1']], '1'), ('mux4 unknown high select bit', ['mux', 'x1', ['0', '1', '0', '1']], '1'), ('mux unknown select floating data', ['mux', 'z', ['z', 'z']], 'x'), ('mux4 known select', ['mux', '10', ['0', '1', '1', '0']], '1'), ('decoder unknown select bit', ['dec', '1x', ['1']], ['0', '0', 'x', 'x']), ('decoder unknown enable', ['dec', '01', ['x']], ['0', 'x', '0', '0']), ('decoder enabled', ['dec', '10', ['1']], ['0', '0', '1', '0'])], [('mux unknown select differing data', ['mux', 'x', ['0', '1']], 'x'), ('mux unknown select agreeing data', ['mux', 'x', ['1', '1']], '1'), ('mux4 unknown low select bit', ['mux', '1x', ['0', '1', '1', '1']], '1'), ('mux4 unknown high select bit', ['mux', 'x0', ['1', '0', '1', '0']], '1'), ('mux unknown select floating data', ['mux', 'z', ['z', 'z']], 'x'), ('mux4 known select', ['mux', '01', ['0', '1', '1', '0']], '1'), ('decoder unknown select bit', ['dec', '1x', ['1']], ['0', '0', 'x', 'x']), ('decoder unknown enable', ['dec', '00', ['x']], ['x', '0', '0', '0']), ('decoder enabled', ['dec', '10', ['1']], ['0', '0', '1', '0'])], [('mux unknown select differing data', ['mux', 'x', ['0', '1']], 'x'), ('mux unknown select agreeing data', ['mux', 'x', ['1', '1']], '1'), ('mux4 unknown low select bit', ['mux', '1x', ['0', '1', '1', '1']], '1'), ('mux4 unknown high select bit', ['mux', 'x1', ['0', '1', '0', '1']], '1'), ('mux unknown select floating data', ['mux', 'z', ['z', 'z']], 'x'), ('mux4 known select', ['mux', '10', ['0', '1', '1', '0']], '1'), ('decoder unknown select bit', ['dec', '1x', ['1']], ['0', '0', 'x', 'x']), ('decoder unknown enable', ['dec', '01', ['x']], ['0', 'x', '0', '0']), ('decoder enabled', ['dec', '10', ['1']], ['0', '0', '1', '0'])], [('mux unknown select differing data', ['mux', 'x', ['0', '1']], 'x'), ('mux unknown select agreeing data', ['mux', 'x', ['1', '1']], '1'), ('mux4 unknown low select bit', ['mux', '1x', ['0', '1', '1', '1']], '1'), ('mux4 unknown high select bit', ['mux', 'x0', ['1', '0', '1', '0']], '1'), ('mux unknown select floating data', ['mux', 'z', ['z', 'z']], 'x'), ('mux4 known select', ['mux', '01', ['0', '1', '1', '0']], '1'), ('decoder unknown select bit', ['dec', '1x', ['1']], ['0', '0', 'x', 'x']), ('decoder unknown enable', ['dec', '00', ['x']], ['x', '0', '0', '0']), ('decoder enabled', ['dec', '10', ['1']], ['0', '0', '1', '0'])], [('mux unknown select differing data', ['mux', 'x', ['0', '1']], 'x'), ('mux unknown select agreeing data', ['mux', 'x', ['1', '1']], '1'), ('mux4 unknown low select bit', ['mux', '1x', ['0', '1', '1', '1']], '1'), ('mux4 unknown high select bit', ['mux', 'x1', ['0', '1', '0', '1']], '1'), ('mux unknown select floating data', ['mux', 'z', ['z', 'z']], 'x'), ('mux4 known select', ['mux', '10', ['0', '1', '1', '0']], '1'), ('decoder unknown select bit', ['dec', '1x', ['1']], ['0', '0', 'x', 'x']), ('decoder unknown enable', ['dec', '01', ['x']], ['0', 'x', '0', '0']), ('decoder enabled', ['dec', '10', ['1']], ['0', '0', '1', '0'])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| mux unknown select differing data | x | x | Passed |
| mux unknown select agreeing data | 1 | 1 | Passed |
| mux4 unknown low select bit | 1 | 1 | Passed |
| mux4 unknown high select bit | 1 | 1 | Passed |
| mux unknown select floating data | x | x | Passed |
| mux4 known select | 1 | 1 | Passed |
| decoder unknown select bit | ['0', '0', 'x', 'x'] | ['0', '0', 'x', 'x'] | Passed |
| decoder unknown enable | ['x', 'x', 'x', 'x'] | ['0', 'x', '0', '0'] | Failed |
| decoder enabled | ['0', '0', '1', '0'] | ['0', '0', '1', '0'] | Passed |
SHA-256 / e212ae6f8599edbe9e6dd56863f4f3843e38a5bb93e68c03c3e1a9dae6b862d5
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 9 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
A deterministic bounded teaching model of one simulator rule set; the contract is stipulated and is not a claim of conformance to any HDL standard or commercial simulator. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:51:15.551955+00:00.
Case digest / eb9bea72a3e1766142e9d6df5ab8e3c5c8c88c4e7e409b1356f1bb52d750743b