updated b14 benchmark, update wavesim capture api, expand usage examples

This commit is contained in:
Stefan Holst committed 2020-11-29 22:32:47 +09:00
1 parent e1101b5b70
commit e6ae009969
11 files changed
+636 -103

No files matched your search

BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -2,8 +2,8 @@ from kyupy import stil
def test_b14(mydir):
s = stil.parse(mydir / 'b14.stil.gz')
s = stil.parse(mydir / 'b14.stuck.stil.gz')
assert 10 == len(s.signal_groups)
assert 1 == len(s.scan_chains)
assert 3259 == len(s.calls)
assert 2163 == len(s.calls)
+2 -3
View File
@@ -100,15 +100,14 @@ def compare_to_logic_sim(wsim):
tests.randomize()
wsim.assign(tests)
wsim.propagate(8)
cap = np.zeros((len(wsim.interface), wsim.sims))
wsim.capture(probabilities=cap)
cdata = wsim.capture()
resp = tests.copy()
for iidx, inode in enumerate(wsim.interface):
if len(inode.ins) > 0:
for vidx in range(wsim.sims):
resp.set_value(vidx, iidx, 0 if cap[iidx, vidx] < 0.5 else 1)
resp.set_value(vidx, iidx, 0 if cdata[iidx, vidx, 0] < 0.5 else 1)
lsim = LogicSim(wsim.circuit, len(tests), 3)
lsim.assign(tests)