improve s27 test and comment
This commit is contained in:
1 parent
1647b41737
commit
6b99576f0b
1 file changed
+6
-5
@@ -150,7 +150,7 @@ def test_c17_output_fault_class(alg, c17_resolved):
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------- #
|
||||
# s27 fixture: exposes the exact-vs-optimistic difference between simulators.
|
||||
# s27 fixture: small sequential benchmark.
|
||||
# --------------------------------------------------------------------------- #
|
||||
|
||||
def _s27_setup(s27_bench, s27_resolved):
|
||||
@@ -158,7 +158,7 @@ def _s27_setup(s27_bench, s27_resolved):
|
||||
faults = list(fs.saf_equiv_classes.keys())
|
||||
rng = np.random.default_rng(1)
|
||||
pat = rng.choice([logic.ZERO, logic.ONE],
|
||||
size=(len(s27_resolved.s_nodes(KYUPY)), 64)).astype(np.uint8)
|
||||
size=(len(s27_resolved.s_nodes(KYUPY)), 8)).astype(np.uint8)
|
||||
return faults, pat
|
||||
|
||||
|
||||
@@ -172,9 +172,9 @@ def test_s27_exact_simulators_agree(s27_bench, s27_resolved):
|
||||
# The two exact simulators must classify every fault identically.
|
||||
assert simple['DS'] == incr['DS']
|
||||
assert simple['NO'] == incr['NO']
|
||||
# This deterministic pattern set leaves exactly one fault unobserved.
|
||||
assert len(simple['DS']) == 31
|
||||
assert len(simple['NO']) == 1
|
||||
# This deterministic pattern set leaves exactly 6 faults unobserved.
|
||||
assert len(simple['DS']) == 26
|
||||
assert len(simple['NO']) == 6
|
||||
|
||||
|
||||
def test_s27_ppsfp_matches_exact(s27_bench, s27_resolved):
|
||||
@@ -201,6 +201,7 @@ def test_ppsfp_multibranch_stem_observability(alg):
|
||||
r = classify(alg, c, [a_sa0], pat)
|
||||
assert r['DS'] == {a_sa0}
|
||||
|
||||
|
||||
@pytest.mark.parametrize('alg', [SAFSimIncremental, SAFSimPPSFP])
|
||||
def test_all_simprims(mydir, alg):
|
||||
c = verilog.load(mydir / 'all_kyupy_simprims.v')
|
||||
|
||||
Reference in new issue
Block a user