EVG-to-EVR Data Transfer (Dayle Kotturi)

Slides:



Advertisements
Similar presentations
INPUT-OUTPUT ORGANIZATION
Advertisements

Stephanie Allison LCLS Event System 14 June LCLS Event System Outline HW Block Diagram Timing Requirements Time Lines EVG.
EXTERNAL COMMUNICATIONS DESIGNING AN EXTERNAL 3 BYTE INTERFACE Mark Neil - Microprocessor Course 1 External Memory & I/O.
A look at interrupts What are interrupts and why are they needed.
Dirk Zimoch, EPICS Collaboration Meeting, Vancouver 2009 Real-Time Data Transfer using the Timing System (Original slides and driver code by Babak Kalantari)
Dayle Kotturi and Stephanie Allison Facility Advisory Committee Meeting April 20-21,
Stephanie Allison/John Dusatko EPICS Collaboration Meeting May 1, Timing and Event System for the LCLS Electron Accelerator*
A look at interrupts What are interrupts and why are they needed in an embedded system? Equally as important – how are these ideas handled on the Blackfin.
Stephanie Allison Integration with the SLC Control April 7, 2005 Introduction PNET Receiver VME Module SLC-Aware IOC Existing.
Stephanie Allison Facility Advisory Committee Meeting Apr 16, 2007 Timing and Event System S. Allison, M. Browne, B. Dalesio, J.
Stephanie Allison LCLS Integration with SLC October 12, 2004 Integration with SLC LCLS Facility Advisory Committee Oct 12, 2004 Introduction.
A look at interrupts What are interrupts and why are they needed.
Dayle Kotturi Facility Advisory Committee Meeting October 12, 2004 Injector/Linac Controls An overview of the status of each of.
Dayle Kotturi SLC April 29, 2004 Outline Motivation Key Components Status Update SLC / EPICS Timing Software Tasks Hardware.
INPUT-OUTPUT ORGANIZATION
What are Exception and Interrupts? MIPS terminology Exception: any unexpected change in the internal control flow – Invoking an operating system service.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview: Using Hardware.
SNS Integrated Control System EPICS Collaboration Meeting SNS Machine Protection System SNS Timing System Coles Sibley xxxx/vlb.
LCLS Timing Software and Plan 1 Controls Timing Workshop EPICS Collaboration Meeting SLAC LCLS Timing Software and Plan April Kukhee Kim.
Micro-Research Finland Oy Timing System Developments Jukka Pietarinen EPICS Collaboration Meeting Shanghai March 2008.
Micro-Research Finland Oy Timing System Modules Jukka Pietarinen EPICS Collaboration Meeting, Argonne, June 2006.
Micro-Research Finland Oy MRF Timing System Jukka Pietarinen Timing Workshop CERN February 2008.
Dayle Kotturi Lehman Review May 10-12, 2005 LCLS Timing Outline Scope SLC Master Pattern Generator Introducing the PNET VME receiver.
EPICS Collaboration Meeting Fall PAL October 22 ~ 26, 2012 LCLS-I/LCLS-II Timing System Low Level Kukhee Kim for LCLS Timing Team ICD Software,
1 Timo Korhonen PSI 1. Concepts revisited…again 3. New (Diamond) cards features and status 4. EPICS interface 5. Conclusions SLS & Diamond Timing System.
SNS Integrated Control System Timing Clients at SNS DH Thompson Epics Spring 2003.
EPICS Collaboration Meeting Fall PAL October 22 ~ 26, 2012 LCLS Timing System (pattern design, evGUI, and high level) Mike Zelazny for LCLS Timing.
EPICS Collaboration Meeting Timing Workshop April 24, 2012.
Fast Fault Finder A Machine Protection Component.
Stephanie Allison LCLS Controls Software Meeting Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes.
Dayle Kotturi System Concept Review/Preliminary Design Review November 16, 2005 Timing Outline System Concept Review Requirements.
Stephanie Allison SLC-Aware April 5, 2005 Introduction Description Issues Progress Plans for 2005 SLC-Aware IOC LCLS Collaboration,
Controls Test Stand Test stand proposal document review - Dayle. The activities can be prioritized according to which measurements we need to do first.
Debbie Rogind Diane Fairley SLC-Aware BSAC Facility Requirements Review May 26, 2005 SLC Aware IOC BSAC* Facility Requirements Review *Beam Synchronous.
LCLS MPS Upgrade Gasper Jansa, Luciano Piccoli, Jeff Olsen, Garth Brown, Sonya Hoobler, Stephen Norum, Stephanie Allison, Kim Kukhee Adding BSA.
Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 Beam Synchronous Acquisition for IOC Engineers Definition/Requirements.
ESS Timing System Plans Timo Korhonen Chief Engineer, Integrated Control System Division Nov.27, 2014.
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
SLAC I&C Division / EE Department
Outline Introduction to LCLS Some background on SLAC Timing
Beam-Synchronous Data Acquisition (BS-DAQ)
Timer and Interrupts.
SLC-Aware IOC LCLS Collaboration Jan 26, 2005
Introduction Functional Requirements (Stephanie) SLC Executive (Diane)
LCLS Timing Software and Plan
Interrupts In 8085 and 8086.
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Timing and Event System S. Allison, M. Browne, B. Dalesio, J
8085 Microprocessor Architecture
8085 Interrupts.
Instructor: Alexander Stoytchev
Event Displays for EVR IOCs
LCLS Timing Outline Scope The order of things
SLC Aware IOC BSAC* Facility Design Review July 14, 2005
LCLS Event System - Software
SLC-Aware IOC Review 2 Cluster Status and Test Service Feb 23, 2005
EPICS Collaboration Meeting
8085 Microprocessor Architecture
Timing and Event System for the LCLS Electron Accelerator
Accessing Services Through Interrupts
Interrupts.
LCLS Timing Outline Scope The order of things
Interrupts 1/18/2019.
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
SLS & Diamond Timing System update
Beam Synchronous Acquisition on IOC
Timing and Event System S. Allison, M. Browne, B. Dalesio, J
Breakout Session: Controls
LCLS Machine Protection System
Timing and Event System Status DOE Review of the LCLS Project SC5 - Controls Systems Breakout Session S. Allison, M. Browne, B. Dalesio, J. Dusatko,
Presentation transcript:

EVG-to-EVR Data Transfer (Dayle Kotturi)

EVG Event Time Line – 4 Fiducials 360Hz Fiducial F0 (n=0) F1 (n=1) F2 (n=2) F3 (n=3) Time (msec) 1.0 2.8 5.6 8.3 9.3 HW starts sending event codes, starting with fiducial event code R0 R1 R2 R3 Receive Fn+3 PNET, determine and send Fn+3 LCLS pattern, advance pipeline (n-2->n-1->n), set event codes in alternate RAM for FN=1 P0 P1 P2 P3 120Hz BEAM B-3 B0 HW finishes sending event codes, switch RAMs R0 R1 R2 R3

EVR Event Time Line – 4 Fiducials PATTERN n-3 PATTERN n-2 PATTERN n-1 PATTERN n P-1 P-2 P-3 P-4 P-1 P-2 P-3 P0 P-1 P-2 P-3 P0 P-1 P-2 P1 P0 P-1 P-2 P1 P0 P-1 P2 P1 P0 P-1 P2 P1 P0 P3 P2 P1 P0 360Hz Fiducial F0 (n=0) F1 (n=1) F2 (n=2) F3 (n=3) Time (msec) 2.8 5.6 8.3 9.3 HW starts receiving event codes, starting with fiducial event code R0 R1 R2 R3 Process Pn-3 pattern, advance pipeline (n-3->n-2->n-1->n), and prepare BSA based on the n records L0 L1 L2 L3 Receive Fn+3 LCLS pattern and copy into temporary storage P0 P1 P2 P3 120Hz BEAM B-3 B0 HW finishes receiving event codes R0 R1 R2 R3

Trigger Event Time Line – 1 Beam Pulse (B0) Record processing (event, interrupt) Hardware Triggers Receive pattern for 3 pulses ahead Post-Beam Acq Event Timestamp, pattern records, and BSA ready Beam Kly Standby Acq Trigger Last Event (255) Received Laser Control Fiducial Event (1) Received Fiducial F3 B0 30 500 1023 Time (usec) 0.3 Event Codes 1-111, 128-255

EVG 360 Hz Data Flow Diagram BSA Enable Records (2) Fiducial sub Record PULSEID Pattern n (120Hz) Record LNK1 LNK3 Advance Times Pattern (360Hz) Record first dbProcess BSA EDEF History/Snapshot Records LNK2 FLNK LCLS Time Stamps INP Pn – New Pattern Processing Pattern n-1 Record FLNK INP Sequence RAM Setup Records FLNK High Priority PNET Task Pattern n-2 Record INP FLNK FLNK second dbProcess Fanout Record En – Set Event Codes Write to Pipeline Pattern n-3 sub Record Event Event Task post_event BSA EDEF Check, Set, Init Records PNET Avail ISR FLNK FLNK Ln – Send Pattern Module720 Diagnostics Records Data Data Check sub Record INP VME PNET Data Space NTP Client System Time Stamp BSA EDEF Records Bunch Charge Determination Records

EVR 360 Hz Data Flow Diagram BSA Enable Records (2) Ln - Fiducial Event Processing PULSEID Fiducial sub Record Pattern n (120Hz) Record LNK3 LNK1 Advance Times Pattern (360Hz) Record SLC-Aware EVR Check Records Event ISR LNK2 Event LNK4 second dbProcess FLNK INP VME, PCI Pattern n-1 Record LCLS Time Stamps Wakeup INP FLNK FLNK High Priority EVR Task Pattern n-2 Record INP Fanout Record Write to Pipeline Pn - New Pattern Processing first dbProcess FLNK Data Avail ISR EDEF Meas Severity Record Pattern n-3 sub Record Modulo 720 Diagnostics Records Data post_event VME, PCI Pattern Data Space dbProcess Event Task BSA Reset Sequence Records

Pattern Subroutine Record C – Time slot (1 to 6) D,E,F,G,H – MODIFIER1 to 5: Beam Modifiers (4 for PNET, 1 for 20 EDEF active bits and 12 TBD bits) I – BUNCHCHARGE (in picoCoulombs, value normally between 200 to 1000) J – BEAMCODE decoded from MODIFIER1 by pattern sub record A, B – EDEF measurement severity masks used to create EDEF measurement severities K – EDEF average done mask L - PULSEID decoded from lower 17 bits in the LCLS timestamp by pattern sub record (0x1FFFF = invalid)

EVR Data Contents and Order EVG: 4 PNET 32 bit unsigned integers (MODIFIER1 to 4). EVR: 2 16 bit unsigned integers – header consisting of waveform type (pattern or TBD) and version number 1 LCLS 32 bit unsigned integer (MODIFIER5) 4 LCLS 32 bit EDEF masks: Average done Don’t use minor severity data in average Don’t use major severity data in average Initialize – rearm compress records and reset averages 2 LCLS timestamp 32 bit unsigned integers 1 bunch charge 32 bit unsigned integer (BUNCHCHARGE)

LCLS Pipeline Timestamps Table of 4 EPICS timestamps/status, protected by mutex. Each timestamp is 2 32bit integers and each status is 1 32bit integer: First timestamp integer: #secs since 1990 Second timestamp integer: #nsecs since last second but with the lower 17bits containing encoded pulse ID Status integer: 0 = OK, -1 = invalid Each timestamp/status is associated with an index: 0 = current pulse (Pn) 1 = next (upcoming) pulse (Pn-1) 2 = two pulses in the future (Pn-2) 3 = three pulses in the future (Pn-3) The table is initialized with system time and invalid status. The timestamp and status is updated at 360Hz during fiducial and pattern processing

LCLS Event Code Timestamps Table of 256 EPICS timestamps/status, protected by mutex. Each timestamp is 2 32bit integers and each status is 1 32bit integer: First timestamp integer: #secs since 1990 Second timestamp integer: #nsecs since last second but with the lower 17bits containing encoded pulse ID Status integer: 0 = OK, -1 = invalid Each timestamp/status is associated with an event code from the EVR. Event code 0 has the current timestamp updated at 120hz (only on the 2 time slots served by the IOC). The table is initialized with system time and invalid status. The timestamp and status is updated whenever an event code, with an enabled IRQ, is received by the EVR. All records on the IOC uses a timestamp from this table depending on the record’s TSE field. The default TSE is zero - these records use the event code 0 timestamp. If the status is invalid, the record timestamp will be system time with an encoded invalid pulse ID.

Common EVG and EVR Software Error Conditions Data/PNET Avail ISR: Overwrite message space – update counter No space available (space currently being readout by the task) – update counter Check sum error (EVR only for now) – update counter Task is busy (taking too much time) – update counter Data Processing (record set invalid): No data available (TIMEOUT) Other read error or version/type mismatch (INVALID_DATA) Error creating (EVG) or writing (EVR) LCLS timestamp (INVALID_TIME) Upstream MPG (EVG) or EVG (EVR) is unsynchronized (MPG_IPLING) Fiducial Subroutine Record Processing: Error advancing LCLS timestamps - set error flag. Pulse ID error (any invalid PULSEID or non-consecutive PULSEIDs) – set appropriate counters. Set error flag. If the upcoming 3 pulses are the same, set timestamp to invalid.

EVG-only Software Error Conditions PNET Data Check Subroutine Processing: Set record invalid and reset pulse ID and base rate modulo counter if any of these conditions is true: MPG is IPLing Time slot not synchronized with MPG Time slot pattern (SEQCHK) not synchronized with MPG Time slot and time slot pattern mismatch Modulo720 not synchronized with MPG Pulse ID not synchronized with MPG Pattern Creation Subroutine Processing: Error getting system time – set record and timestamp to invalid and don’t send pattern to EVRs. Any of the above errors – set record invalid but send pattern on to EVR with the MPG_IPLING bit set.

EVR Hardware Error Conditions (John Dusatko) Unplugged fiber: the EVR has a bit in its CSR called RX_VIO. This bit gets set when there is either a bit error or loss of signal. This toggles the CSR bit, lights up the red front panel "RX ERR" LED and also can be programmed to generate an interrupt. Binary input record is processed every 2 seconds to check this condition. The EVR also has a "heartbeat" mechanism which looks like it basically does a watchdog function: the EVG can send out a special heartbeat reset event code that resets the EVR's heartbeat counter. The counter seems to have a hard-wired timeout of 1.6 sec. The timeout condition sets a register bit as well as can be programmed to generate an interrupt. So it looks like they thought of some error checking mechanisms. Software ignores this condition since it detects missing fiducials within 0.06 sec instead and then sets records invalid (TIMEOUT error).

EVG Hardware Error Conditions No errors when fiducial or clock is missing PNET SDLC and other errors Ignored by software – will result in TIMEOUT and unsynchronized data errors. Loss of PNET (MPG down, cable disconnected, etc) Software times out in 0.04 sec, sets records invalid, and sends data to EVR with an invalid pulse ID and the MPG_IPLING bit set.