Docs / Algorithms

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

  1. Start with simple for almost all production runs.
  2. Use basic for speed when rough trend data is enough.
  3. Escalate to advanced only 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):

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).

  1. Command Reference
  2. Reconvergence Integration
  3. Test Point Insertion Guide