Skip to content

Commit cfc05fc

Browse files
Merge pull request #3 from muditbhargava66/v1.4.1
Release v1.4.1: REST API Framework and Jupyter Dashboard
2 parents 4f2832c + 389dc0d commit cfc05fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+11662
-44
lines changed

CHANGELOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,70 @@ All notable changes to the SerDes Validation Framework will be documented in thi
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.4.1] - 2025-07-28
9+
10+
### Added
11+
- **REST API Framework** 🌐
12+
- Complete FastAPI-based REST API for remote access
13+
- Eye diagram analysis endpoints with mask compliance checking
14+
- Waveform analysis and signal quality assessment
15+
- Asynchronous stress testing with real-time status monitoring
16+
- Test fixture control and environmental monitoring
17+
- System status and health monitoring endpoints
18+
- Comprehensive request/response models with validation
19+
- CLI client for command-line API interaction
20+
- OpenAPI/Swagger documentation at `/docs`
21+
- CORS and compression middleware support
22+
23+
- **Loopback Stress Testing** 🔄
24+
- Complete loopback stress test implementation (TX → RX → back to TX)
25+
- Progressive signal degradation simulation over multiple cycles
26+
- Automatic eye height, jitter, and SNR tracking
27+
- CSV logging for cycle-by-cycle data analysis
28+
- Interactive plots showing degradation trends over time
29+
- Configurable thresholds for pass/fail criteria
30+
- Support for all protocols (USB4, PCIe, Ethernet)
31+
- Waveform saving for failed cycles
32+
- Comprehensive logging and error handling
33+
34+
### Enhanced
35+
- **Dual Stress Testing Systems** 🆕
36+
- **Loopback Stress Testing Module** (`stress_testing/`)
37+
- `LoopbackStressTest` class for automated stress testing
38+
- `StressTestConfig` for flexible test configuration
39+
- `StressTestResults` with comprehensive metrics and statistics
40+
- Progressive degradation modeling with realistic effects
41+
- Multi-protocol support with protocol-specific parameters
42+
- **USB4-Specific Stress Testing** (`protocols/usb4/stress_testing.py`)
43+
- `USB4StressTester` for protocol-aware stress scenarios
44+
- Thermal stress testing with temperature monitoring
45+
- Error injection and recovery testing
46+
- Power cycling and bandwidth saturation stress
47+
- Multi-device stress testing capabilities
48+
49+
- **Jupyter Dashboard Module** (`jupyter_dashboard/`) 🆕
50+
- `EyeDiagramDashboard` for interactive eye diagram visualization
51+
- `WaveformAnalyzer` for comprehensive signal analysis
52+
- `InteractivePlotter` with real-time controls and widgets
53+
- Support for captured waveforms and pass/fail annotations
54+
- Multi-lane analysis with protocol-specific features
55+
- Professional visualizations with matplotlib and plotly
56+
- Export capabilities for results and plots
57+
58+
### Scripts & Examples
59+
- **`scripts/run_loopback_stress_test.py`**: Command-line stress testing tool
60+
- **`examples/loopback_stress_test_example.py`**: Comprehensive usage examples
61+
- **`examples/jupyter_dashboard_example.py`**: Jupyter dashboard demonstration 🆕
62+
- **`examples/jupyter_eye_diagram_dashboard.ipynb`**: Interactive Jupyter notebook 🆕
63+
- Support for quick tests, protocol comparison, and CSV analysis
64+
- Interactive dashboard examples with multi-protocol support
65+
66+
### Performance
67+
- Efficient signal generation with configurable degradation models
68+
- Optimized for long-running tests (1000+ cycles)
69+
- Memory-efficient waveform processing
70+
- Real-time progress monitoring and logging
71+
872
## [1.4.0] - 2025-07-27
973

1074
### Added

README.md

Lines changed: 115 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# 🚀 SerDes Validation Framework
44

5-
![serdes-validation-framework Version](https://img.shields.io/badge/version-1.4.0-blue)
5+
![serdes-validation-framework Version](https://img.shields.io/badge/version-1.4.1-blue)
66
![Production Ready](https://img.shields.io/badge/status-production%20ready-brightgreen)
77
[![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)
88
[![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)
@@ -32,7 +32,37 @@
3232
- 🎛️ **Universal Instrument Control:** GPIB/USB interface for multi-vendor support
3333
- 📋 **Flexible Test Sequences:** Customizable, reusable test automation
3434

35-
### 🆕 Latest Features in v1.4.0
35+
### 🆕 Latest Features in v1.4.1
36+
- 🌐 **REST API Framework:** Complete web API for remote access and integration
37+
- **FastAPI-based REST API:** Modern, async API with automatic OpenAPI documentation
38+
- **Eye Diagram Analysis:** Remote eye diagram analysis with mask compliance checking
39+
- **Waveform Analysis:** Signal quality assessment via HTTP endpoints
40+
- **Stress Testing API:** Asynchronous stress test execution with real-time monitoring
41+
- **Test Fixture Control:** Remote control of test equipment and environmental monitoring
42+
- **CLI Client:** Command-line interface for API interaction
43+
- **Interactive Documentation:** Swagger UI at `/docs` for API exploration
44+
45+
- 🔄 **Dual Stress Testing Systems:** Comprehensive stress testing with two complementary approaches
46+
- **Loopback Stress Testing:** General-purpose TX → RX → TX simulation with progressive degradation tracking
47+
- Multi-cycle testing (1000+ cycles) with real-time monitoring
48+
- Signal quality tracking over time (eye height, jitter, SNR, BER)
49+
- CSV data export and interactive plots
50+
- Multi-protocol support (USB4, PCIe, Ethernet)
51+
- **USB4-Specific Stress Testing:** Protocol-aware stress scenarios for USB4/Thunderbolt
52+
- Thermal stress testing with temperature monitoring
53+
- Error injection and recovery testing
54+
- Power cycling and bandwidth saturation stress
55+
- Multi-device stress testing scenarios
56+
57+
- 📊 **Jupyter Dashboard System:** Interactive eye diagram visualization in Jupyter notebooks
58+
- **Captured Waveform Analysis:** Direct integration with SVF analyzers
59+
- **Eye Diagram Dashboards:** Professional-grade eye diagram visualization
60+
- **Pass/Fail Annotations:** Automatic measurement annotations from SVF
61+
- **Interactive Controls:** Real-time parameter adjustment with widgets
62+
- **Multi-Protocol Support:** USB4, PCIe, Ethernet dashboard templates
63+
- **Export Capabilities:** Save results and plots in multiple formats
64+
65+
### 🔥 Major Features in v1.4.0
3666
- 🔌 **Complete USB4/Thunderbolt 4 Support:** Full 40 Gbps dual-lane validation with tunneling protocols
3767
- 🔒 **Thunderbolt 4 Certification Suite:** Intel-compliant certification with security validation and DMA protection
3868
- 🌐 **Multi-Protocol Tunneling:** PCIe, DisplayPort, and USB 3.2 tunneling validation with integrity checking
@@ -382,6 +412,29 @@ bandwidth_result = viz.plot_tunnel_bandwidth(
382412
)
383413
```
384414

415+
#### Loopback Stress Testing (NEW in v1.4.1)
416+
```python
417+
from serdes_validation_framework.stress_testing import LoopbackStressTest, create_stress_test_config
418+
419+
# Create stress test configuration
420+
config = create_stress_test_config(
421+
protocol="USB4",
422+
num_cycles=1000,
423+
output_dir="usb4_stress_results"
424+
)
425+
426+
# Run stress test
427+
stress_test = LoopbackStressTest(config)
428+
results = stress_test.run_stress_test()
429+
430+
# Analyze results
431+
print(f"Success Rate: {results.success_rate:.1%}")
432+
print(f"Max Degradation: {results.max_degradation:.1f}%")
433+
print(f"Final Eye Height: {results.final_eye_height:.4f}V")
434+
435+
# Results automatically saved to CSV and plots generated
436+
```
437+
385438
#### Traditional Test Sequencer
386439
```python
387440
from serdes_validation_framework.test_sequence import PCIeTestSequencer
@@ -406,6 +459,66 @@ results = sequencer.run_sequence([
406459
print(f"Test completed: {results['status']}")
407460
```
408461

462+
#### REST API Usage (NEW in v1.4.1)
463+
```python
464+
# Start the API server
465+
from serdes_validation_framework.api import create_app
466+
import uvicorn
467+
468+
app = create_app()
469+
uvicorn.run(app, host="0.0.0.0", port=8000)
470+
471+
# Or use the CLI
472+
# python -m serdes_validation_framework.api.cli server --host 0.0.0.0 --port 8000
473+
```
474+
475+
```python
476+
# Use the API client
477+
import requests
478+
import numpy as np
479+
480+
# Analyze eye diagram via API
481+
signal_data = np.random.randn(1000) * 0.4
482+
response = requests.post("http://localhost:8000/api/v1/eye-diagram/analyze", json={
483+
"signal_data": signal_data.tolist(),
484+
"sample_rate": 40e9,
485+
"protocol": "USB4",
486+
"show_mask": True
487+
})
488+
489+
result = response.json()
490+
print(f"Eye Height: {result['eye_height']:.4f}V")
491+
print(f"Q-Factor: {result['q_factor']:.2f}")
492+
print(f"Mask Compliance: {result['mask_analysis']['compliance_level']}")
493+
494+
# Start stress test asynchronously
495+
stress_response = requests.post("http://localhost:8000/api/v1/stress-test/start", json={
496+
"protocol": "USB4",
497+
"num_cycles": 100,
498+
"cycle_duration": 1.0
499+
})
500+
501+
test_id = stress_response.json()["test_id"]
502+
503+
# Monitor test progress
504+
status_response = requests.get(f"http://localhost:8000/api/v1/test/{test_id}/status")
505+
print(f"Test Status: {status_response.json()['status']}")
506+
```
507+
508+
```bash
509+
# Use the CLI client
510+
python -m serdes_validation_framework.api.cli analyze-eye \
511+
--signal-file signal_data.csv \
512+
--protocol USB4 \
513+
--sample-rate 40e9 \
514+
--output results.json
515+
516+
python -m serdes_validation_framework.api.cli start-stress-test \
517+
--protocol PCIe \
518+
--cycles 500 \
519+
--duration 2.0
520+
```
521+
409522
## 📁 Examples & Scripts
410523

411524
### 🎯 Interactive Examples

docs/README.md

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Documentation
1+
# Documentation v1.4.1
22

3-
This directory contains the documentation for the SerDes Validation Framework.
3+
This directory contains the comprehensive documentation for the SerDes Validation Framework, including new REST API and Jupyter Dashboard documentation.
44

55
## Building the Documentation
66

@@ -23,7 +23,8 @@ This directory contains the documentation for the SerDes Validation Framework.
2323

2424
```
2525
docs/
26-
├── api/ # API documentation
26+
├── api/ # 🆕 Enhanced API documentation (v1.4.1)
27+
│ ├── rest-api.md # 🆕 Complete REST API reference
2728
│ ├── index.md
2829
│ ├── mock_controller.md # Mock controller docs
2930
│ ├── instrument_control.md # Instrument control docs
@@ -34,29 +35,51 @@ docs/
3435
│ ├── mock_testing.md # Mock testing tutorial
3536
│ ├── 224g_validation.md # 224G validation guide
3637
│ └── pam4_analysis.md # PAM4 analysis guide
37-
├── guides/ # User guides
38+
├── guides/ # 🆕 Enhanced user guides (v1.4.1)
3839
│ ├── installation.md # Installation guide
39-
│ ├── testing.md # Comprehensive testing guide (91+ tests)
40+
│ ├── testing.md # Comprehensive testing guide (130+ tests)
4041
│ ├── troubleshooting.md # Troubleshooting guide
41-
│ └── cicd.md # CI/CD integration guide
42-
├── examples/ # Code examples
42+
│ ├── cicd.md # CI/CD integration guide
43+
│ ├── jupyter_dashboard_guide.md # 🆕 Jupyter Dashboard guide
44+
│ └── stress_testing_overview.md # 🆕 Stress testing guide
45+
├── examples/ # 🆕 Enhanced code examples (v1.4.1)
46+
│ ├── api_examples.md # 🆕 REST API usage examples
4347
│ ├── mock_controller_examples.md
4448
│ ├── testing_examples.md
4549
│ ├── protocol_detection_examples.md
4650
│ └── integration_testing_examples.md
47-
├── CHANGELOG.md # Detailed changelog with v1.4.0 improvements
51+
├── CHANGELOG.md # 🆕 Detailed changelog with v1.4.1 improvements
4852
├── CONTRIBUTING.md # Contribution guide
4953
├── INSTALL.md # Installation guide
50-
└── USAGE.md # Usage guide
54+
└── USAGE.md # 🆕 Updated usage guide with API examples
5155
```
5256

57+
## 🆕 New Documentation in v1.4.1
58+
59+
### REST API Documentation
60+
- **Complete API Reference** (`api/rest-api.md`) - All 8 endpoints documented
61+
- **Usage Examples** (`examples/api_examples.md`) - Comprehensive API usage patterns
62+
- **Interactive Documentation** - Available at `/docs` when API server is running
63+
64+
### Jupyter Dashboard Documentation
65+
- **Dashboard Guide** (`guides/jupyter_dashboard_guide.md`) - Interactive eye diagram analysis
66+
- **Usage Examples** - Multi-protocol dashboard examples
67+
- **Integration Guide** - How to integrate with existing workflows
68+
69+
### Stress Testing Documentation
70+
- **Stress Testing Overview** (`guides/stress_testing_overview.md`) - Dual stress testing systems
71+
- **Loopback Testing** - Progressive degradation simulation
72+
- **USB4-Specific Testing** - Protocol-aware stress scenarios
73+
5374
## Documentation Standards
5475

5576
1. Use Markdown syntax
5677
2. Include type hints in code examples
5778
3. Validate floating-point numbers
5879
4. Provide clear error messages
5980
5. Include example usage
81+
6. 🆕 Include API endpoint documentation with request/response examples
82+
7. 🆕 Provide interactive dashboard usage patterns
6083

6184
## Adding New Documentation
6285

docs/USAGE.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,75 @@ report_path = reporter.generate_compliance_report(session.session_id)
4848
print(f"Report generated: {report_path}")
4949
```
5050

51+
### 3. REST API Usage (NEW in v1.4.1)
52+
53+
#### Starting the API Server
54+
55+
```bash
56+
# Start the API server
57+
python -m serdes_validation_framework.api.cli server --host 0.0.0.0 --port 8000
58+
59+
# Or use the run script
60+
python run_api_server.py
61+
```
62+
63+
#### Using the API
64+
65+
```python
66+
import requests
67+
import numpy as np
68+
69+
# API base URL
70+
BASE_URL = "http://localhost:8000/api/v1"
71+
72+
# Generate test signal
73+
signal_data = np.random.randn(1000) * 0.4
74+
75+
# Analyze eye diagram via API
76+
response = requests.post(f"{BASE_URL}/eye-diagram/analyze", json={
77+
"signal_data": signal_data.tolist(),
78+
"sample_rate": 40e9,
79+
"protocol": "USB4",
80+
"show_mask": True
81+
})
82+
83+
if response.status_code == 200:
84+
result = response.json()
85+
print(f"Eye Height: {result['eye_height']:.4f}V")
86+
print(f"Q-Factor: {result['q_factor']:.2f}")
87+
print(f"Mask Compliance: {result['mask_analysis']['compliance_level']}")
88+
89+
# Start stress test
90+
stress_response = requests.post(f"{BASE_URL}/stress-test/start", json={
91+
"protocol": "USB4",
92+
"num_cycles": 100,
93+
"cycle_duration": 1.0
94+
})
95+
96+
test_id = stress_response.json()["test_id"]
97+
print(f"Started stress test: {test_id}")
98+
```
99+
100+
#### CLI Client Usage
101+
102+
```bash
103+
# Analyze eye diagram
104+
python -m serdes_validation_framework.api.cli analyze-eye \
105+
--signal-file signal_data.csv \
106+
--protocol USB4 \
107+
--sample-rate 40e9 \
108+
--output results.json
109+
110+
# Start stress test
111+
python -m serdes_validation_framework.api.cli start-stress-test \
112+
--protocol PCIe \
113+
--cycles 500 \
114+
--duration 2.0
115+
116+
# Get system status
117+
python -m serdes_validation_framework.api.cli status
118+
```
119+
51120
### 3. Mock Mode for Development
52121

53122
```python

0 commit comments

Comments
 (0)