CODA 3.0 VTP/FADC streaming readout with automatic pedestal generation and dynamic configuration file management.
This system automatically generates FADC pedestals and creates runtime configuration files during the CODA download transition. It separates user-defined configuration parameters from runtime-generated configurations, ensuring proper ordering and parameter propagation.
User Config (input)
↓
Parse ALL parameters (VME + VTP)
↓
Validate required parameters
↓
Generate pedestals (fadc250peds)
↓
Generate runtime configs:
- vme_<rocname>.cnf (VME/FADC settings + pedestals)
- vtp_<rocname>.cnf (VTP streaming settings + dynamic payload enable)
↓
Use generated configs for runtime configuration
1. Parse Before Generate
- User config is parsed FIRST to extract all VME and VTP parameters
- All required parameters are validated before any file generation
- Ensures consistency and catches configuration errors early
2. Single Source of Truth
- All configuration parameters defined in user config file (
config/userConfig.txt) - No hardcoded values in runtime configuration generation
- Changes to user config automatically propagate to generated files
3. Generated Files for Runtime
- FADC configured using generated
$CODA_CONFIG/vme_<rocname>.cnf - VTP configured using generated
$CODA_CONFIG/vtp_<rocname>.cnf - User config is input only; runtime uses generated files
4. Dynamic Payload Configuration
- VTP payload ports configured based on
VTP_PAYLOAD_ENfrom config VTP_PAYLOAD_ENdynamically generated from active FADC slots in pedestals- Slot-to-payload translation ensures correct mapping
5. Correct ppmask Accumulation
- Payload mask (
ppmask) accumulated across ALL active payloads using|=operator - Ensures streaming event builder receives data from all configured payloads
- Critical for proper event synchronization
config/userConfig.txt- User-defined configuration (VME + VTP parameters)$CODA_CONFIG/vme_<rocname>.cnf- Generated FADC config (runtime)$CODA_CONFIG/vtp_<rocname>.cnf- Generated VTP config (runtime)$CODA_DATA/<hostname>_peds.txt- Generated pedestals
vme_rol/fadc_master_stream_vg.c- FADC master ROL with config generationrol/vtp_stream3_1udp_vg.c- VTP streaming ROL with dynamic payload config
vtp/vtpLib.{h,c}- VTP hardware interfacevtp/vtpConfig.{h,c}- VTP configuration parsing with streaming parametersfadc250/fadc250Config.{h,c}- FADC configuration parsing
export CODA=/path/to/coda
export CODA_DATA=/path/to/data
export CODA_CONFIG=/path/to/configCreate user config based on config/userConfig.txt template:
# VME/FADC parameters
FADC250_MODE 1
FADC250_W_OFFSET 1200
FADC250_DAC 3270
...
# VTP parameters
VTP_STREAMING_ROCID 0
VTP_STREAMING_DESTIP 129.57.177.25
VTP_STREAMING_MAC 0xCE 0xBA 0xF0 0x03 0x00 0x9d
...
cd vme_rol && make fadc_master_stream_vg.so
cd ../rol && make vtp_stream3_1udp_vg.soPoint CODA run control to your user config file. During download transition:
- System parses user config and validates parameters
- Executes
fadc250pedsto generate pedestals - Creates
vme_<rocname>.cnfandvtp_<rocname>.cnfin$CODA_CONFIG - FADC and VTP configured using generated files
- Automatic pedestal generation during download transition
- Dynamic payload configuration based on active FADC slots
- Parameter validation catches missing/invalid config early
- Comprehensive logging shows which files are used at each phase
- Fallback support for VTP if generated config missing
- ROC name discovery from pedestal file format
- CODA 3.0 framework
fadc250pedstool in$CODA/linuxvme/fadc-peds/- VTP firmware: streamingv3 with EJFAT support
- FADC250 modules in VME crate
VTP v3.10.2 with streaming configuration system