A comprehensive framework for validating high-speed SerDes protocols with automated data collection, advanced signal analysis, and multi-vendor instrument control.
- ๐ Automated Data Collection: Seamless data gathering from lab instruments
- ๐ Advanced Analysis: Comprehensive signal processing and visualization
- ๐๏ธ Universal Instrument Control: GPIB/USB interface for multi-vendor support
- ๐ Flexible Test Sequences: Customizable, reusable test automation
- ๐ Mock Testing Support: Development and testing without physical hardware
- ๐ก 224G Ethernet Support: Complete validation suite for 224G interfaces
- ๐ PAM4 Analysis: Advanced PAM4 signal processing capabilities
- ๐ฌ Enhanced Scope Control: High-bandwidth oscilloscope integration
from serdes_validation_framework import get_instrument_controller
# Auto-detects available hardware
controller = get_instrument_controller()
# For development/testing without hardware:
os.environ['SVF_MOCK_MODE'] = '1'
# For specific hardware testing:
os.environ['SVF_MOCK_MODE'] = '0'
# Example usage (works in both modes):
controller.connect_instrument('GPIB::1::INSTR')
response = controller.query_instrument('GPIB::1::INSTR', '*IDN?')
print(f"Operating in {controller.get_mode()} mode") # 'mock' or 'real'
from serdes_validation_framework.protocols.ethernet_224g import (
Ethernet224GTestSequence,
ComplianceSpecification
)
# Initialize test sequence
sequence = Ethernet224GTestSequence()
# Run link training
training_results = sequence.run_link_training_test(
scope_resource="GPIB0::7::INSTR",
pattern_gen_resource="GPIB0::10::INSTR"
)
# Run compliance tests
compliance_results = sequence.run_compliance_test_suite(
scope_resource="GPIB0::7::INSTR",
pattern_gen_resource="GPIB0::10::INSTR"
)
print(f"Training status: {training_results.convergence_status}")
print(f"Compliance status: {compliance_results.test_status}")
from serdes_validation_framework.data_analysis import PAM4Analyzer
# Initialize analyzer
analyzer = PAM4Analyzer({
'time': time_data,
'voltage': voltage_data
})
# Analyze signal
levels = analyzer.analyze_level_separation()
evm = analyzer.calculate_evm()
eye = analyzer.analyze_eye_diagram()
print(f"RMS EVM: {evm.rms_evm_percent:.2f}%")
print(f"Worst Eye Height: {eye.worst_eye_height:.3f}")
The framework intelligently adapts between hardware and mock modes:
Mode | Description | Use Case |
---|---|---|
๐ Auto | Automatically detects available hardware | Default behavior |
๐ฎ Mock | Simulates hardware responses | Development & testing |
๐ง Real | Uses physical instruments | Production validation |
Configure via environment:
# Development without hardware
export SVF_MOCK_MODE=1
# Force hardware mode
export SVF_MOCK_MODE=0
# Auto-detect (default)
unset SVF_MOCK_MODE
# Mock mode provides realistic data simulation:
def generate_pam4_waveform():
"""Generate synthetic PAM4 data"""
levels = np.array([-3.0, -1.0, 1.0, 3.0])
symbols = np.random.choice(levels, size=num_points)
noise = np.random.normal(0, 0.05, num_points)
return symbols + noise
# Auto-switching between real/mock:
def capture_waveform(scope):
"""Capture waveform data"""
if scope.controller.get_mode() == 'mock':
return generate_pam4_waveform()
else:
return scope.query_waveform()
- Python 3.9+ (recommended 3.10)
- Git
- VISA Library (optional, for hardware control)
# Clone repository
git clone https://github.com/muditbhargava66/serdes-validation-framework.git
cd serdes-validation-framework
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
from serdes_validation_framework import get_instrument_controller
# Initialize controller (auto-detects mock/real mode)
controller = get_instrument_controller()
# Connect to instrument
controller.connect_instrument('GPIB::1::INSTR')
# Basic operations
controller.send_command('GPIB::1::INSTR', '*RST')
response = controller.query_instrument('GPIB::1::INSTR', '*IDN?')
# Install dev dependencies
pip install -r requirements-dev.txt
# Run tests
python -m unittest discover -s tests
# Run linter
ruff check src tests
# Test all Python versions
tox
Enable mock mode for development without hardware:
# Enable mock mode
export SVF_MOCK_MODE=1
# Run examples
python examples/mock_testing_example.py
Feature | Mock Mode | Hardware Mode |
---|---|---|
๐ Setup Speed | Instant | Requires calibration |
๐ Data Quality | Simulated | Real measurements |
๐ Automation | Full support | Full support |
๐ Analysis | All features | All features |
๐ Execution Time | Fast | Hardware-dependent |
๐ง Requirements | None | VISA, hardware |
-
Install development dependencies:
pip install -r requirements-dev.txt
-
Run tests:
python -m unittest discover -s tests
-
Run linter:
ruff check src tests
-
Run Tox for testing across multiple environments:
tox
serdes-validation-framework/
โโโ .github/ # [Existing] GitHub specific files
โโโ docs/
โ โโโ api/
โ โ โโโ index.md
โ โ โโโ usage.md
โ โ โโโ eth_224g.md # [New] 224G Ethernet API documentation
โ โ โโโ pam4_analysis.md # [New] PAM4 analysis documentation
โ โโโ images/
โ โโโ tutorials/
โ โ โโโ getting_started.md
โ โ โโโ 224g_validation.md # [New] 224G validation tutorial
โ โ โโโ pam4_analysis.md # [New] PAM4 analysis tutorial
โ โโโ CONTRIBUTING.md
โ โโโ INSTALL.md
โ โโโ USAGE.md
โโโ examples/
โ โโโ test_sequence_example.py
โ โโโ data_analysis_example.py
โ โโโ eth_224g_example.py # [New] 224G testing example
โ โโโ pam4_analysis_example.py # [New] PAM4 analysis example
โโโ scripts/
โ โโโ data_collection.py
โ โโโ data_analysis.py
โ โโโ instrument_control.py
โ โโโ test_sequence.py
โ โโโ eth_224g_validation.py # [New] 224G validation script
โโโ src/
โ โโโ serdes_validation_framework/
โ โโโ __init__.py
โ โโโ data_collection/ # [Existing] Base data collection
โ โ โโโ __init__.py
โ โ โโโ data_collector.py
โ โโโ data_analysis/
โ โ โโโ __init__.py
โ โ โโโ analyzer.py
โ โ โโโ pam4_analyzer.py # [New] PAM4 signal analysis
โ โโโ instrument_control/
โ โ โโโ __init__.py
โ โ โโโ controller.py
โ โ โโโ mock_controller.py
โ โ โโโ scope_224g.py # [New] High-bandwidth scope control
โ โโโ test_sequence/
โ โ โโโ __init__.py
โ โ โโโ sequencer.py
โ โ โโโ eth_224g_sequence.py # [New] 224G test sequences
โ โโโ protocols/ # [New] Protocol-specific modules
โ โโโ __init__.py
โ โโโ ethernet_224g/
โ โโโ __init__.py
โ โโโ constants.py # Protocol constants
โ โโโ compliance.py # Compliance specifications
โ โโโ training.py # Link training patterns
โโโ tests/
โ โโโ test_data_collection.py
โ โโโ test_data_analysis.py
โ โโโ test_instrument_control.py
โ โโโ test_test_sequence.py
โ โโโ test_pam4_analyzer.py # [New] PAM4 analyzer tests
โ โโโ test_eth_224g_sequence.py # [New] 224G sequence tests
โ โโโ test_scope_224g.py # [New] Scope control tests
โโโ .gitignore
โโโ LICENSE
โโโ README.md # [Update] Add 224G features
โโโ requirements.txt # [Update] Add new dependencies
โโโ setup.py # [Update] Add new modules
โโโ CHANGELOG.md
โโโ tox.ini
We welcome contributions! See our Contributing Guide for details on:
- Code Style
- Development Process
- Submission Guidelines
- Testing Requirements
For any questions, issues, or contributions, please open an issue on the GitHub repository. Contributions and feedback are always welcome.
Distributed under the MIT License. See LICENSE
for more information.
Enjoy using the SerDes Validation Framework?
โญ๏ธ Star the repo and consider contributing!
๐ซ Contact: @muditbhargava66 ๐ Report Issues: Issue Tracker
ยฉ 2025 Mudit Bhargava. MIT License