Goal
This page gives developers the minimum architecture map needed to extend OpenTestability safely.
Current core packages
src/opentestability/core/
├── cop/ # Probability-based controllability/observability
├── scoap/ # Classical CC0/CC1/CO metrics
├── dag/ # DAG build/save helpers
├── reconvergence/ # basic/simple/advanced/dominator (default) + integration
└── testpoint/ # native Yosys-JSON TPI (insert_testpoints_yosys) + pluggable selection
Main extension points
- Add a gate model:
- COP:
core/cop/gate_logic.py - SCOAP:
core/scoap/gate_logic.py
- COP:
- Add or tune reconvergence behavior:
core/reconvergence/dominator.py: the default, auto-selected detectorcore/reconvergence/basic.pycore/reconvergence/simple.pycore/reconvergence/advanced.py
- Extend TPI flow:
- candidate selection:
core/testpoint/heuristic_algorithm.py/greedy_algorithm.py/gradient_algorithm.py; subclassTPIAlgorithmand register it incore/testpoint/registry.py(or via theopentestability.tpi_algorithmsentry-point group) - insertion + report:
core/testpoint/main.py(insert_testpoints_yosys) - PDK cells / control-point style:
core/testpoint/tech_config.py
- candidate selection:
Compatibility note
Public imports are intentionally re-exported in package __init__.py files where possible. Prefer package-level imports unless you are intentionally targeting a specific internal module.
Safe-change checklist
- Validate the Yosys JSON input path for format-sensitive edits.
- Keep file/path handling through existing utilities, not hardcoded directories.
- Preserve output schema compatibility for metrics consumed by TPI.
- Run unit and integration tests for touched modules.