OpenTestability combines metric engines (COP/SCOAP) with reconvergence detection.
Metric engines
| Engine | Outputs | Typical use |
|---|---|---|
| COP | probabilistic controllability and observability | ranking signals for probability-aware test planning |
| SCOAP | CC0, CC1, CO structural testability metrics | fast baseline analysis and traditional DFT scoring |
Core formulas
COP uses probability transfer through gates. Example for two-input AND:
\[P(out=1)=P(a=1)\times P(b=1)\]SCOAP uses integer transfer. Example for two-input AND:
\[CC0(out)=\min(CC0(a),CC0(b))+1\] \[CC1(out)=CC1(a)+CC1(b)+1\]Reconvergence options
| Algorithm | Complexity | Recommended use |
|---|---|---|
basic |
O(n^2) |
quick checks |
simple |
O(n^2 log n) |
default production choice |
advanced |
O(n^3) |
deep debug and difficult circuits |
Selection guideline
- Start with
simplefor almost all production runs. - Use
basicfor speed when rough trend data is enough. - Escalate to
advancedonly for complex fanout interaction analysis.
Engine acceleration
Both metric engines use compiled acceleration backends rather than pure-Python fixpoint loops:
| Engine | Runtime backend | Technique |
|---|---|---|
| COP | core/cop/vectorized.py |
NumPy array ops; precomputed side-input products; single Jacobi sweep per iteration |
| SCOAP | core/scoap/_kernels.pyx (Cython) |
Integer int64 arrays; nogil inner loop; optional OpenMP prange for SoC scale |
The pure-Python reference implementations (controllability.py, observability.py) are retained as test oracles for correctness verification — they are not the runtime path.
Performance on picorv32a (~14 k gates):
- COP observability: 160 s (pure Python) → ~3 s (NumPy vectorized)
- SCOAP full analysis: ~130 s (pure Python) → ~0.15 s (Cython kernel)
Gate classification (core/common/gate_types.GateCode) is computed once per gate during index construction and shared across both engines, eliminating per-iteration string matching. XOR and XNOR are classified correctly (the historical substring bug that caused both to misclassify as OR/NOR has been fixed).