44
55[ ![ CI] ( https://github.com/muditbhargava66/serdes-validation-framework/actions/workflows/ci.yml/badge.svg?branch=main )] ( https://github.com/muditbhargava66/serdes-validation-framework/actions/workflows/ci.yml )
66[ ![ Lint] ( https://github.com/muditbhargava66/serdes-validation-framework/actions/workflows/lint.yml/badge.svg?branch=main )] ( https://github.com/muditbhargava66/serdes-validation-framework/actions/workflows/lint.yml )
7+ [ ![ CodeQL] ( https://github.com/muditbhargava66/serdes-validation-framework/actions/workflows/github-code-scanning/codeql/badge.svg )] ( https://github.com/muditbhargava66/serdes-validation-framework/actions/workflows/github-code-scanning/codeql )
78[ ![ License: MIT] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://opensource.org/licenses/MIT )
89[ ![ Python Versions] ( https://img.shields.io/badge/python-3.9%20|%203.10%20|%203.11%20|%203.12-blue.svg )] ( https://www.python.org/ )
910[ ![ Code Coverage] ( https://img.shields.io/badge/coverage-98%25-green )] ( https://github.com/muditbhargava66/serdes-validation-framework/actions )
1718
1819</div >
1920
20- ## Features
21+ ## ✨ Key Features
2122
22- - ** Automated Data Collection:** Gather data from lab instruments seamlessly.
23- - ** Data Analysis and Visualization:** Analyze and visualize collected data with ease.
24- - ** Instrument Control via GPIB:** Control lab instruments using the General Purpose Interface Bus (GPIB).
25- - ** Customizable Test Sequences:** Define and run customizable test sequences.
23+ ### Core Capabilities
24+ - 🔄 ** Automated Data Collection:** Seamless data gathering from lab instruments
25+ - 📊 ** Advanced Analysis:** Comprehensive signal processing and visualization
26+ - 🎛️ ** Universal Instrument Control:** GPIB/USB interface for multi-vendor support
27+ - 📋 ** Flexible Test Sequences:** Customizable, reusable test automation
2628
27- ## Installation
29+ ### New Features in v1.2.0
30+ - 🔍 ** Mock Testing Support:** Development and testing without physical hardware
31+ - 📡 ** 224G Ethernet Support:** Complete validation suite for 224G interfaces
32+ - 📊 ** PAM4 Analysis:** Advanced PAM4 signal processing capabilities
33+ - 🔬 ** Enhanced Scope Control:** High-bandwidth oscilloscope integration
2834
29- ### Prerequisites
30- - Python 3.9+ (recommended 3.10)
31- - Git
32- - VISA Library (for instrument control)
35+ ### 🎮 Intelligent Hardware/Mock Adaptation
3336
34- ### Steps
37+ ``` python
38+ from serdes_validation_framework import get_instrument_controller
3539
36- 1 . ** Clone the repository:**
40+ # Auto-detects available hardware
41+ controller = get_instrument_controller()
3742
38- ``` bash
39- git clone https://github.com/muditbhargava66/serdes-validation-framework.git
40- ```
43+ # For development/testing without hardware:
44+ os.environ[' SVF_MOCK_MODE' ] = ' 1'
4145
42- 2. ** Navigate to the project directory:**
46+ # For specific hardware testing:
47+ os.environ[' SVF_MOCK_MODE' ] = ' 0'
4348
44- ` ` ` bash
45- cd serdes-validation-framework
46- ` ` `
49+ # Example usage (works in both modes):
50+ controller.connect_instrument(' GPIB::1::INSTR' )
51+ response = controller.query_instrument(' GPIB::1::INSTR' , ' *IDN?' )
52+ print (f " Operating in { controller.get_mode()} mode " ) # 'mock' or 'real'
53+ ```
4754
48- 3. ** Create and activate a virtual environment (optional but recommended): **
55+ ### 📡 224G Ethernet Validation
4956
50- ` ` ` bash
51- python -m venv venv
52- source venv/bin/activate # On Windows, use ` venv\S cripts\a ctivate`
53- ` ` `
57+ ``` python
58+ from serdes_validation_framework.protocols.ethernet_224g import (
59+ Ethernet224GTestSequence,
60+ ComplianceSpecification
61+ )
5462
55- 4. ** Install the dependencies:**
63+ # Initialize test sequence
64+ sequence = Ethernet224GTestSequence()
5665
57- ` ` ` bash
58- pip install -r requirements.txt
59- ` ` `
66+ # Run link training
67+ training_results = sequence.run_link_training_test(
68+ scope_resource = " GPIB0::7::INSTR" ,
69+ pattern_gen_resource = " GPIB0::10::INSTR"
70+ )
6071
61- # # Usage
72+ # Run compliance tests
73+ compliance_results = sequence.run_compliance_test_suite(
74+ scope_resource = " GPIB0::7::INSTR" ,
75+ pattern_gen_resource = " GPIB0::10::INSTR"
76+ )
6277
63- Refer to the [USAGE.md](docs/USAGE.md) for detailed usage instructions.
78+ print (f " Training status: { training_results.convergence_status} " )
79+ print (f " Compliance status: { compliance_results.test_status} " )
80+ ```
6481
65- # ## Quick Start
82+ ### 📊 PAM4 Signal Analysis
6683
67- 1. ** Run Data Collection Example:**
84+ ``` python
85+ from serdes_validation_framework.data_analysis import PAM4Analyzer
6886
69- ` ` ` bash
70- python examples/data_collection_example.py
71- ` ` `
87+ # Initialize analyzer
88+ analyzer = PAM4Analyzer({
89+ ' time' : time_data,
90+ ' voltage' : voltage_data
91+ })
7292
73- 2. ** Run Data Analysis Example:**
93+ # Analyze signal
94+ levels = analyzer.analyze_level_separation()
95+ evm = analyzer.calculate_evm()
96+ eye = analyzer.analyze_eye_diagram()
7497
75- ` ` ` bash
76- python examples/data_analysis_example.py
77- ` ` `
98+ print ( f " RMS EVM: { evm.rms_evm_percent :.2f } % " )
99+ print ( f " Worst Eye Height: { eye.worst_eye_height :.3f } " )
100+ ```
78101
79- 3. ** Run Instrument Control Example: **
102+ ### 🔄 Automatic Mode Selection
80103
81- ` ` ` bash
82- python examples/instrument_control_example.py
83- ` ` `
104+ The framework intelligently adapts between hardware and mock modes:
84105
85- 4. ** Run Test Sequence Example:**
106+ | Mode | Description | Use Case |
107+ | ------| -------------| ----------|
108+ | 🔍 ** Auto** | Automatically detects available hardware | Default behavior |
109+ | 🎮 ** Mock** | Simulates hardware responses | Development & testing |
110+ | 🔧 ** Real** | Uses physical instruments | Production validation |
86111
87- ` ` ` bash
88- python examples/test_sequence_example.py
89- ` ` `
112+ Configure via environment:
113+ ``` bash
114+ # Development without hardware
115+ export SVF_MOCK_MODE=1
116+
117+ # Force hardware mode
118+ export SVF_MOCK_MODE=0
119+
120+ # Auto-detect (default)
121+ unset SVF_MOCK_MODE
122+ ```
123+
124+ ### 📈 Real vs Mock Data Comparison
125+
126+ ``` python
127+ # Mock mode provides realistic data simulation:
128+ def generate_pam4_waveform ():
129+ """ Generate synthetic PAM4 data"""
130+ levels = np.array([- 3.0 , - 1.0 , 1.0 , 3.0 ])
131+ symbols = np.random.choice(levels, size = num_points)
132+ noise = np.random.normal(0 , 0.05 , num_points)
133+ return symbols + noise
134+
135+ # Auto-switching between real/mock:
136+ def capture_waveform (scope ):
137+ """ Capture waveform data"""
138+ if scope.controller.get_mode() == ' mock' :
139+ return generate_pam4_waveform()
140+ else :
141+ return scope.query_waveform()
142+ ```
90143
91- # # Documentation
144+ ## 🚀 Quick Start
92145
93- Detailed documentation is available in the ` docs/` folder:
146+ ### Prerequisites
147+ - Python 3.9+ (recommended 3.10)
148+ - Git
149+ - VISA Library (optional, for hardware control)
150+
151+ ### Installation
152+
153+ ``` bash
154+ # Clone repository
155+ git clone https://github.com/muditbhargava66/serdes-validation-framework.git
156+ cd serdes-validation-framework
157+
158+ # Create virtual environment (recommended)
159+ python -m venv venv
160+ source venv/bin/activate # Windows: venv\Scripts\activate
161+
162+ # Install dependencies
163+ pip install -r requirements.txt
164+ ```
165+
166+ ### Basic Usage
167+
168+ ``` python
169+ from serdes_validation_framework import get_instrument_controller
170+
171+ # Initialize controller (auto-detects mock/real mode)
172+ controller = get_instrument_controller()
173+
174+ # Connect to instrument
175+ controller.connect_instrument(' GPIB::1::INSTR' )
176+
177+ # Basic operations
178+ controller.send_command(' GPIB::1::INSTR' , ' *RST' )
179+ response = controller.query_instrument(' GPIB::1::INSTR' , ' *IDN?' )
180+ ```
94181
95- - [API Documentation](docs/api/index.md)
96- - [Usage Guide](docs/USAGE.md)
97- - [Installation Guide](docs/INSTALL.md)
98- - [Getting Started Tutorial](docs/tutorials/getting_started.md)
99- - [Contribution Guide](docs/CONTRIBUTING.md)
182+ ## 🛠️ Development
100183
101- # # Contributing
184+ ### Setup Development Environment
185+ ``` bash
186+ # Install dev dependencies
187+ pip install -r requirements-dev.txt
102188
103- We welcome contributions from the community. Please read our [contributing guide](docs/CONTRIBUTING.md) to get started.
189+ # Run tests
190+ python -m unittest discover -s tests
191+
192+ # Run linter
193+ ruff check src tests
194+
195+ # Test all Python versions
196+ tox
197+ ```
198+
199+ ### Mock Testing
200+ Enable mock mode for development without hardware:
201+ ``` bash
202+ # Enable mock mode
203+ export SVF_MOCK_MODE=1
204+
205+ # Run examples
206+ python examples/mock_testing_example.py
207+ ```
208+
209+ ## 📊 Feature Comparison
210+
211+ | Feature | Mock Mode | Hardware Mode |
212+ | ---------| -----------| ---------------|
213+ | 🚀 Setup Speed | Instant | Requires calibration |
214+ | 📊 Data Quality | Simulated | Real measurements |
215+ | 🔄 Automation | Full support | Full support |
216+ | 📈 Analysis | All features | All features |
217+ | 🕒 Execution Time | Fast | Hardware-dependent |
218+ | 🔧 Requirements | None | VISA, hardware |
219+
220+ ## 📚 Documentation
221+
222+ ### Getting Started
223+ - [ 📖 Installation Guide] ( docs/INSTALL.md )
224+ - [ 🎯 Usage Guide] ( docs/USAGE.md )
225+ - [ 🔰 Quick Start Tutorial] ( docs/tutorials/getting_started.md )
226+ - [ 🤝 Contributing Guide] ( docs/CONTRIBUTING.md )
227+
228+ ### API Reference
229+ - [ 🔌 Instrument Control] ( docs/api/instrument_control.md )
230+ - [ 🧪 Mock Testing] ( docs/api/mock_controller.md )
231+ - [ 📡 224G Ethernet] ( docs/api/eth_224g.md )
232+ - [ 📊 PAM4 Analysis] ( docs/api/pam4_analysis.md )
233+
234+ ### Guides & Tutorials
235+ - [ 🔧 Hardware Setup] ( docs/guides/instrument_setup.md )
236+ - [ 🏃 Mock Testing] ( docs/tutorials/mock_testing.md )
237+ - [ 📈 Signal Analysis] ( docs/tutorials/pam4_analysis.md )
238+ - [ ✅ Validation Guide] ( docs/tutorials/224g_validation.md )
104239
105240### Development Setup
106241
@@ -201,15 +336,26 @@ serdes-validation-framework/
201336└── tox.ini
202337` ` `
203338
339+ # # 🤝 Contributing
340+
341+ We welcome contributions! See our [Contributing Guide](docs/CONTRIBUTING.md) for details on:
342+ - Code Style
343+ - Development Process
344+ - Submission Guidelines
345+ - Testing Requirements
346+
204347# # Community and Support
348+
205349For any questions, issues, or contributions, please open an issue on the [GitHub repository](https://github.com/muditbhargava66/serdes-validation-framework/issues). Contributions and feedback are always welcome.
206350
207351# # 📄 License
352+
208353Distributed under the MIT License. See ` LICENSE` for more information.
209354
210355< div align=" center" >
211356
212357# # Star History
358+
213359< a href=" https://star-history.com/#muditbhargava66/serdes-validation-framework&Date" >
214360 < picture>
215361 < source media=" (prefers-color-scheme: dark)" srcset=" https://api.star-history.com/svg?repos=muditbhargava66/serdes-validation-framework&type=Date&theme=dark" />
@@ -219,12 +365,12 @@ Distributed under the MIT License. See `LICENSE` for more information.
219365< /a>
220366
221367---
222-
223368
224369** Enjoy using the SerDes Validation Framework?**
225370⭐️ Star the repo and consider contributing!
226371
227- 📫 ** Contact** : [@muditbhargava66](https://github.com/muditbhargava66)
372+ 📫 ** Contact** : [@muditbhargava66](https://github.com/muditbhargava66)
373+ 🐛 ** Report Issues** : [Issue Tracker](https://github.com/muditbhargava66/serdes-validation-framework/issues)
228374
229375© 2025 Mudit Bhargava. [MIT License](LICENSE)
230376< ! -- Copyright symbol using HTML entity for better compatibility -->
0 commit comments