Reconvergence Integration - Quick Start
Get started with reconvergence-aware testability analysis in minutes.
What is Reconvergence Integration?
Version 1.0.1 automatically detects reconvergent fanout in circuits and adjusts COP/SCOAP metrics for improved accuracy. No manual setup required!
5-Minute Quick Start
1. One-Line COP Analysis
opentest auto-cop -i circuit.txt
That’s it! The tool automatically:
- Creates DAG
- Detects reconvergence
- Runs COP with correlation adjustments
- Enables parallel mode if needed
2. One-Line SCOAP Analysis
opentest auto-scoap -i circuit.txt
Automatically:
- Creates DAG
- Extracts fanout points
- Runs SCOAP with reconvergence awareness
- Processes cones in parallel
3. Python API
from opentestability.core.cop import run_cop
# Everything automatic!
run_cop('circuit.txt', 'results.txt',
reconvergence_algorithm='auto',
auto_parallel=True)
Key Benefits
Improved Accuracy
- 98%+ accurate reconvergence detection
- Bayesian correlation adjustments
- Better testability metrics at fanout points
Better Performance
- 3-4x speedup on large circuits (>100k gates)
- Automatic parallel activation
- Concurrent processing of reconvergent cones
Zero Configuration
- Works out of the box
- Intelligent algorithm selection
- No manual DAG creation needed
Algorithm Selection
Auto (Recommended)
run_cop('circuit.txt', 'results.txt',
reconvergence_algorithm='auto') # Default
Let the tool choose the best algorithm.
Simple (Fast & Accurate)
run_cop('circuit.txt', 'results.txt',
reconvergence_algorithm='simple')
- 98%+ accuracy
- Fast execution
- Best for most circuits
Advanced (Research-Grade)
run_cop('circuit.txt', 'results.txt',
reconvergence_algorithm='advanced')
- 100% accuracy
- Complex pattern detection
- Best for pipelined designs
Parallel Computation
Automatic (Recommended)
run_cop('circuit.txt', 'results.txt',
auto_parallel=True) # Default
Parallel mode activates automatically for circuits >100,000 gates.
Manual Control
# Custom worker count
run_cop('circuit.txt', 'results.txt',
max_workers=8)
# Force sequential
run_cop('circuit.txt', 'results.txt',
auto_parallel=False)
Common Workflows
Workflow 1: Quick Analysis
# Simplest - let tool handle everything
opentest auto-cop -i circuit.txt
opentest auto-scoap -i circuit.txt
Workflow 2: Large Circuit
# Specify worker count for better performance
opentest auto-cop -i large_design.txt -w 8
opentest auto-scoap -i large_design.txt -w 8
Workflow 3: Research Analysis
# Use advanced algorithm for complete detection
opentest cop -i circuit.txt -r -a advanced
Workflow 4: Python Batch Processing
from opentestability.core.reconvergence.integration import integrate_with_cop
import glob
for circuit in glob.glob('data/parsed/*.txt'):
integrate_with_cop(
input_file=circuit,
output_file=circuit.replace('.txt', '_cop.txt'),
algorithm='auto',
auto_parallel=True
)
Performance Expectations
Small Circuits (< 100k gates)
- Sequential processing
- Sub-second analysis
- No parallel overhead
Large Circuits (> 100k gates)
- Automatic parallel activation
- 3-4x speedup
- Efficient multi-core utilization
Example Benchmarks
| Circuit | Gates | Algorithm | Time (Sequential) | Time (Parallel) | Speedup |
|---|---|---|---|---|---|
| ALU | 1,200 | Simple | 0.12s | N/A | 1.0x |
| Medium | 45,000 | Simple | 2.4s | N/A | 1.0x |
| SoC Block | 180,000 | Simple | 18.5s | 5.2s | 3.6x |
| ASIC | 520,000 | Simple | 95.2s | 24.1s | 3.9x |
Direct API Examples
Example 1: ReconvergenceIntegrator
from opentestability.core.reconvergence.integration import ReconvergenceIntegrator
integrator = ReconvergenceIntegrator('circuit_dag.json')
reconv_data = integrator.detect_reconvergence(algorithm='simple')
sites = integrator.extract_reconvergent_sites()
print(f"Found {len(sites)} reconvergent sites")
Example 2: Integration Functions
from opentestability.core.reconvergence.integration import (
integrate_with_cop,
integrate_with_scoap
)
# COP with reconvergence
integrate_with_cop('circuit.txt', 'cop_results.txt',
algorithm='auto', auto_parallel=True)
# SCOAP with reconvergence
integrate_with_scoap('circuit.txt', 'scoap_results.json',
algorithm='auto', auto_parallel=True)
Example 3: Parallel COP
from opentestability.core.cop.parallel import build_cop_with_parallel
C1, Obs = build_cop_with_parallel(
nets, inputs, outputs, gates,
reconvergent_sites=['node5', 'node12'],
max_workers=4
)
Comparison with Traditional Approach
Traditional (Multi-Step)
# Step 1: Parse Verilog
opentest parse -i circuit.v
# Step 2: Create DAG
opentest dag -i circuit.json
# Step 3: Detect reconvergence
opentest simple -i circuit_dag.json
# Step 4: Run analysis (manual reconvergence data)
opentest cop -i circuit.txt
New (Integrated)
# One command - everything automatic!
opentest auto-cop -i circuit.txt
Benefits:
- 4 commands → 1 command
- No manual file management
- Automatic optimization
- Better accuracy
Migration from v2.0.0
Old Code (Still Works!)
from opentestability.core.cop import run_cop
run_cop('circuit.txt', 'results.txt') # Works unchanged
New Code (Enhanced)
from opentestability.core.cop import run_cop
run_cop('circuit.txt', 'results.txt',
reconvergence_algorithm='auto', # Add this line
auto_parallel=True) # Add this line
No breaking changes - just add two parameters for enhanced features!
Command Line Cheat Sheet
# Quick analysis
auto-cop -i circuit.txt
auto-scoap -i circuit.txt
# With custom workers
auto-cop -i circuit.txt -w 8
auto-scoap -i circuit.txt -w 4
# Specific algorithm
cop -i circuit.txt -r -a simple
scoap -i circuit.txt -r -a advanced
# Verbose output
auto-cop -i circuit.txt -v
auto-scoap -i circuit.txt -v
# Run tests
test-reconv -v
Troubleshooting
Q: “DAG file not found”
A: Auto commands create DAG automatically. If using manual workflow, run:
opentest dag -i circuit.json
Q: “Reconvergence detection failed”
A: Try simple algorithm (most reliable):
opentest auto-cop -i circuit.txt -r -a simple
Q: “Parallel not improving performance”
A: Your circuit may be too small. Parallel activates at >100k gates. Check:
opentest auto-cop -i circuit.txt -v # See circuit size
Q: “How to disable parallel?”
A: Use Python API:
run_cop('circuit.txt', 'results.txt', auto_parallel=False)
Next Steps
Learn More:
Get Help:
Stay Updated: