130 likes | 150 Views
The Uniboard Exbox Correlator Control System. Des Small, JIVE. Contract no. 227290. Introduction. Control System Overview. Under construction. Output processing (we don't have output yet) Erlang control code (a thin layer on top of other components). Data Sources I.
E N D
The Uniboard Exbox Correlator Control System Des Small, JIVE Contract no. 227290
Under construction • Output processing (we don't have output yet) • Erlang control code (a thin layer on top of other components)
Data Sources I • Data mostly comes in as MkIV format • 32 track tape format • One or more tracks per channel (eg., sign/mag) • One or more channels per sample • Correlator based on VDIF data • One or two (pol.) multibit channels per “tread” • We use single-threaded streams • Need a translator • Mostly corner-turning
Data Source II • Hardware & FPGAs are good at corner-turning • Generic CPUs are bad at corner-turning • We have FPGAs around • so: • We do it in software. • Erlang infrastructure • JIT-compiled C code for each configuration • > 500 Mbit/s per node (3.0 GHz Pentium D) • The glorious dawn of DBBC era is almost upon us
Configuration DB • Experiment configuration (from Vex format); and • Job configuration (loosely coupled) • Mnesia is nice, but... • Relational database (MySQL) • Not everyone likes Erlang • Can easily write tools in Java/Python • Can easily write sophisticated queries • Some of them even work in MySQL • Some attention paid to normalization • Lots (>50) of tables
Queries I: Scheduling -- Find out which station aren't in a scan: select distinct station_id from sched_station except select station_id from sched_station where scan_id="No0017"; -- Unused stations for all scans: select * from (select distinct scan_id from sched_station) join (select distinct station_id from sched_station) except (select station_id, scan_id from sched_station); -- (NB: MySQL doesn't have 'except'. Sigh.)
Queries II: Updating a table • BEGIN TRANSACTION • update clock– bump version number • set version=(version+1) • where version=(select max(version) from clock); • update clock -- change field • set clock_early='7.749 usec' • where clock_id=(select clock_id from clock • join station_clock using (clock_id) • where station_id="Ef";) • and version=(select max(version) from clock); • END TRANSACTION
In conclusion • Compared to current system, new control system • Smaller and simpler • Not hard-real-time • Less “architecture” • Hasn't yet been used in anger • Erlang has proved its worth • Distributed glue language • Soft real time • Relational database schema design is • a bit dull • pretty important