Skip to content

An automated system validation framework to test high-speed SerDes protocols (e.g., Ethernet, PCIe) using open-source tools and technologies. The framework includes test sequences, data collection, and result analysis capabilities.

License

Notifications You must be signed in to change notification settings

muditbhargava66/serdes-validation-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ SerDes Validation Framework

CI Lint CodeQL License: MIT Python Versions Code Coverage Documentation Last Commit Contributors

A comprehensive framework for validating high-speed SerDes protocols with automated data collection, advanced signal analysis, and multi-vendor instrument control.

Banner

โœจ Key Features

Core Capabilities

  • ๐Ÿ”„ 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

New Features in v1.2.0

  • ๐Ÿ” 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

๐ŸŽฎ Intelligent Hardware/Mock Adaptation

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'

๐Ÿ“ก 224G Ethernet Validation

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}")

๐Ÿ“Š PAM4 Signal Analysis

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}")

๐Ÿ”„ Automatic Mode Selection

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

๐Ÿ“ˆ Real vs Mock Data Comparison

# 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()

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.9+ (recommended 3.10)
  • Git
  • VISA Library (optional, for hardware control)

Installation

# 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

Basic Usage

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?')

๐Ÿ› ๏ธ Development

Setup Development Environment

# 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

Mock Testing

Enable mock mode for development without hardware:

# Enable mock mode
export SVF_MOCK_MODE=1

# Run examples
python examples/mock_testing_example.py

๐Ÿ“Š Feature Comparison

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

๐Ÿ“š Documentation

Getting Started

API Reference

Guides & Tutorials

Development Setup

  1. Install development dependencies:

    pip install -r requirements-dev.txt
  2. Run tests:

    python -m unittest discover -s tests
  3. Run linter:

    ruff check src tests
  4. Run Tox for testing across multiple environments:

    tox

Project Structure

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

๐Ÿค Contributing

We welcome contributions! See our Contributing Guide for details on:

  • Code Style
  • Development Process
  • Submission Guidelines
  • Testing Requirements

Community and Support

For any questions, issues, or contributions, please open an issue on the GitHub repository. Contributions and feedback are always welcome.

๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.

Star History

Star History Chart

Enjoy using the SerDes Validation Framework?
โญ๏ธ Star the repo and consider contributing!

๐Ÿ“ซ Contact: @muditbhargava66 ๐Ÿ› Report Issues: Issue Tracker

ยฉ 2025 Mudit Bhargava. MIT License

About

An automated system validation framework to test high-speed SerDes protocols (e.g., Ethernet, PCIe) using open-source tools and technologies. The framework includes test sequences, data collection, and result analysis capabilities.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages