This page maps the current package structure and common imports.
Core packages
opentestability.core.common: shared circuit representation and gate classifierCircuitIndex: integer-indexed, CSR-backed circuit graph (signal names → ints, fan-in/fan-out CSR arrays, topological order, levelization)GateCode/classify(gtype): canonical gate-type codes computed once per gate; eliminates per-iteration string matching
opentestability.core.cop: COP analysis (runtime:cop/vectorized.py)opentestability.core.scoap: SCOAP analysis (runtime:scoap/accelerated.py→ Cython_kernels.pyx)opentestability.core.dag: DAG construction helpersopentestability.core.reconvergence: fanout/reconvergence detectionopentestability.core.testpoint: native Yosys-JSON test-point insertion (insert_testpoints_yosys) plus pluggable candidate-selection algorithms (registry)
Common imports
from opentestability.core.cop import run_cop
from opentestability.core.scoap import run as run_scoap
from opentestability.core.dag import create_dag_from_netlist
from opentestability.core.reconvergence import ReconvergenceIntegrator
from opentestability.core.testpoint import insert_testpoints_yosys, resolve_algorithm
Typical use
from opentestability.core.cop import run_cop
run_cop(
input_filename="circuit.txt",
output_filename="cop_results.txt",
reconvergence_algorithm="auto",
auto_parallel=True,
)
Test-point insertion on a Yosys JSON netlist (given a SCOAP/COP metrics file):
from opentestability.core.testpoint import insert_testpoints_yosys, resolve_algorithm
success, report = insert_testpoints_yosys(
yosys_json_path="design.json",
metrics_json_path="design_scoap.json",
output_json_path="design_tp.json",
max_points=10,
algorithm=resolve_algorithm("greedy_cone"), # or omit for the default heuristic
)
Detailed module pages
Developer note
Prefer package-level imports from __init__.py where available. Move to internal module imports only when you need behavior not exposed in package-level APIs.