Configuration Referenceο
This document provides comprehensive information about configuring the SerDes Validation Framework.
Environment Variablesο
Core Configurationο
SVF_MOCK_MODEο
Type: Boolean (0/1, true/false, yes/no)
Default:
0(disabled)Description: Enables mock mode for testing without hardware
Example:
export SVF_MOCK_MODE=1
SVF_LOG_LEVELο
Type: String
Default:
INFOOptions:
DEBUG,INFO,WARNING,ERROR,CRITICALDescription: Sets the logging level for the framework
Example:
export SVF_LOG_LEVEL=DEBUG
SVF_CONFIG_PATHο
Type: Path
Default:
~/.svf/config.yamlDescription: Path to the main configuration file
Example:
export SVF_CONFIG_PATH=/path/to/config.yaml
SVF_DATA_PATHο
Type: Path
Default:
~/.svf/dataDescription: Directory for storing test data and results
Example:
export SVF_DATA_PATH=/data/svf
SVF_CACHE_PATHο
Type: Path
Default:
~/.svf/cacheDescription: Directory for caching processed data
Example:
export SVF_CACHE_PATH=/tmp/svf_cache
USB4/Thunderbolt Configurationο
SVF_USB4_DEFAULT_MODEο
Type: String
Default:
GEN3_X2Options:
GEN2_X2,GEN3_X2,ASYMMETRICDescription: Default USB4 signal mode for validation
Example:
export SVF_USB4_DEFAULT_MODE=GEN2_X2
SVF_USB4_SSC_ENABLEDο
Type: Boolean
Default:
trueDescription: Enable spread spectrum clocking by default
Example:
export SVF_USB4_SSC_ENABLED=false
SVF_THUNDERBOLT_SECURITY_LEVELο
Type: String
Default:
HIGHOptions:
LOW,MEDIUM,HIGHDescription: Default Thunderbolt security level
Example:
export SVF_THUNDERBOLT_SECURITY_LEVEL=MEDIUM
Instrument Configurationο
SVF_INSTRUMENT_TIMEOUTο
Type: Integer (milliseconds)
Default:
30000Description: Default timeout for instrument communication
Example:
export SVF_INSTRUMENT_TIMEOUT=60000
SVF_INSTRUMENT_RETRY_COUNTο
Type: Integer
Default:
3Description: Number of retries for failed instrument operations
Example:
export SVF_INSTRUMENT_RETRY_COUNT=5
SVF_SCOPE_ADDRESSο
Type: String
Default:
NoneDescription: Default oscilloscope VISA address
Example:
export SVF_SCOPE_ADDRESS="TCPIP::192.168.1.100::INSTR"
Reporting Configurationο
SVF_REPORT_OUTPUT_DIRο
Type: Path
Default:
./reportsDescription: Default directory for generated reports
Example:
export SVF_REPORT_OUTPUT_DIR=/reports/usb4
SVF_REPORT_FORMATο
Type: String
Default:
HTMLOptions:
HTML,PDF,JSON,XMLDescription: Default report format
Example:
export SVF_REPORT_FORMAT=PDF
SVF_REPORT_INCLUDE_CHARTSο
Type: Boolean
Default:
trueDescription: Include charts in reports by default
Example:
export SVF_REPORT_INCLUDE_CHARTS=false
Performance Configurationο
SVF_PARALLEL_PROCESSINGο
Type: Boolean
Default:
trueDescription: Enable parallel processing for analysis
Example:
export SVF_PARALLEL_PROCESSING=false
SVF_MAX_WORKERSο
Type: Integer
Default:
4Description: Maximum number of worker processes
Example:
export SVF_MAX_WORKERS=8
SVF_MEMORY_LIMITο
Type: String
Default:
4GBDescription: Memory limit for processing large datasets
Example:
export SVF_MEMORY_LIMIT=8GB
Configuration Filesο
Main Configuration Fileο
The main configuration file is located at ~/.svf/config.yaml by default.
# SerDes Validation Framework Configuration
# Core settings
core:
mock_mode: false
log_level: INFO
data_path: ~/.svf/data
cache_path: ~/.svf/cache
parallel_processing: true
max_workers: 4
# USB4/Thunderbolt settings
usb4:
default_mode: GEN3_X2
ssc_enabled: true
max_lane_skew_ps: 20
eye_mask_margin: 0.1
jitter_tolerance: 0.05
thunderbolt:
security_level: HIGH
dma_protection: true
device_authentication: true
max_daisy_devices: 6
certification_mode: false
# Instrument settings
instruments:
timeout_ms: 30000
retry_count: 3
auto_detect: true
oscilloscope:
default_address: null
sample_rate: 100e9
record_length: 1000000
bandwidth: 50e9
pattern_generator:
default_address: null
output_amplitude: 0.8
rise_time: 10e-12
power_meter:
default_address: null
measurement_range: auto
# Reporting settings
reporting:
output_directory: ./reports
default_format: HTML
include_charts: true
include_raw_data: false
auto_open: false
templates:
compliance:
sections: [summary, results, recommendations]
include_charts: true
certification:
sections: [cover, summary, results, appendix]
include_charts: true
include_raw_data: true
# Visualization settings
visualization:
output_directory: ./plots
default_format: PNG
dpi: 300
figure_size: [12, 8]
color_scheme: default
interactive: false
# Performance settings
performance:
memory_limit: 4GB
cache_enabled: true
cache_size: 1GB
compression: true
# Development settings
development:
debug_mode: false
profiling: false
test_data_path: ./test_data
mock_data_seed: 42
Protocol-Specific Configurationο
USB4 Configuration (~/.svf/usb4_config.yaml)ο
# USB4 Protocol Configuration
signal_modes:
GEN2_X2:
data_rate: 20e9 # 20 Gbps
ui_period: 50e-12 # 50 ps
voltage_swing: 1.2 # V
GEN3_X2:
data_rate: 40e9 # 40 Gbps
ui_period: 25e-12 # 25 ps
voltage_swing: 1.2 # V
compliance_limits:
eye_height_min: 0.65
eye_width_min: 0.65
jitter_rms_max: 0.025
jitter_pp_max: 0.15
lane_skew_max: 20e-12 # 20 ps
spread_spectrum:
enabled: true
frequency: 33000 # Hz
deviation: 0.005 # 0.5%
tunneling:
pcie:
max_bandwidth_allocation: 0.8
latency_requirement: 1e-6 # 1 ΞΌs
displayport:
max_displays: 2
max_resolution: "4K"
max_refresh_rate: 60
usb32:
backward_compatibility: true
enumeration_timeout: 5.0 # seconds
Thunderbolt Configuration (~/.svf/thunderbolt_config.yaml)ο
# Thunderbolt 4 Configuration
certification:
intel_requirements: true
security_mandatory: true
power_delivery_required: true
security:
dma_protection: true
iommu_required: true
device_authentication: true
user_authorization: true
daisy_chain:
max_devices: 6
bandwidth_management: dynamic
topology_validation: true
power_delivery:
max_power: 100 # W
voltage_levels: [5, 9, 15, 20] # V
current_limits: [3, 3, 3, 5] # A
displays:
max_4k_displays: 2
max_8k_displays: 1
dp_version: "1.4a"
Instrument Configurationο
Oscilloscope Configuration (~/.svf/instruments/scope_config.yaml)ο
# Oscilloscope Configuration
default_settings:
sample_rate: 100e9 # 100 GSa/s
record_length: 1000000
bandwidth: 50e9 # 50 GHz
input_impedance: 50 # Ohms
coupling: DC
channels:
lane0:
channel: 1
scale: 0.2 # V/div
offset: 0.0 # V
lane1:
channel: 2
scale: 0.2 # V/div
offset: 0.0 # V
clock:
channel: 3
scale: 0.5 # V/div
offset: 0.0 # V
triggers:
usb4:
type: edge
source: lane0
level: 0.0 # V
slope: positive
measurements:
eye_diagram:
persistence: 1000
mask_test: true
jitter:
measurement_type: TIE
reference_clock: recovered
supported_models:
- "Keysight DSAZ634A"
- "Tektronix DPO77002SX"
- "Rohde & Schwarz RTO2064"
Configuration Managementο
Loading Configurationο
from serdes_validation_framework.config import ConfigManager
# Load default configuration
config = ConfigManager()
# Load custom configuration file
config = ConfigManager(config_path="/path/to/custom_config.yaml")
# Access configuration values
mock_mode = config.get('core.mock_mode', False)
usb4_mode = config.get('usb4.default_mode', 'GEN3_X2')
Runtime Configurationο
# Update configuration at runtime
config.set('core.log_level', 'DEBUG')
config.set('usb4.ssc_enabled', False)
# Save configuration
config.save()
# Reload configuration
config.reload()
Environment Overrideο
Environment variables take precedence over configuration files:
import os
# Environment variable overrides config file
os.environ['SVF_LOG_LEVEL'] = 'DEBUG'
# This will use DEBUG level regardless of config file
config = ConfigManager()
log_level = config.get_log_level() # Returns 'DEBUG'
Validation and Defaultsο
Configuration Validationο
# Validate configuration
validation_result = config.validate()
if not validation_result.is_valid:
for error in validation_result.errors:
print(f"Configuration error: {error}")
Default Valuesο
# Get value with default
timeout = config.get('instruments.timeout_ms', 30000)
# Check if value exists
if config.has('usb4.custom_setting'):
custom_value = config.get('usb4.custom_setting')
Best Practicesο
Configuration Organizationο
Use separate files for different protocols
Group related settings together
Use descriptive names for settings
Include units in setting names where applicable
Security Considerationsο
Donβt store sensitive information in config files
Use environment variables for secrets
Restrict file permissions on config files
Validate all configuration inputs
Performance Optimizationο
Cache frequently accessed settings
Use appropriate data types
Avoid deep nesting in configuration
Consider memory usage for large configurations
Development vs Productionο
Use different configurations for development and production
Enable debug features only in development
Use mock mode for CI/CD environments
Monitor configuration changes in production
Troubleshootingο
Common Issuesο
Configuration Not Foundο
# Check if config file exists
ls -la ~/.svf/config.yaml
# Create default configuration
svf-config --create-default
Invalid Configurationο
# Validate configuration
from serdes_validation_framework.config import validate_config
result = validate_config('/path/to/config.yaml')
if not result.valid:
for error in result.errors:
print(f"Error: {error}")
Environment Variable Issuesο
# Check environment variables
env | grep SVF_
# Clear all SVF environment variables
unset $(env | grep '^SVF_' | cut -d= -f1)
Debug Configurationο
# Enable configuration debugging
import logging
logging.getLogger('serdes_validation_framework.config').setLevel(logging.DEBUG)
# Print current configuration
config = ConfigManager()
config.print_config()
For more configuration examples, see the examples directory and tutorials.