Aug. 20, 2002 L.B.L. DSP Software Status The Task Manager The Event Manager (slaves) Overview of DSP Primitives & Tasks Common to Both DSP Types Slave.

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

I/O Organization popo.
Computer Architecture
INPUT-OUTPUT ORGANIZATION
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
A look at interrupts What are interrupts and why are they needed.
Computer System Overview
CS-334: Computer Architecture
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
 2004 Deitel & Associates, Inc. All rights reserved. 1 Chapter 3 – Process Concepts Outline 3.1 Introduction 3.1.1Definition of Process 3.2Process States:
DIRECT MEMORY ACCESS CS 147 Thursday July 5,2001 SEEMA RAI.
1 Computer System Overview OS-1 Course AA
Inter Process Communication:  It is an essential aspect of process management. By allowing processes to communicate with each other: 1.We can synchronize.
Chapter 1 and 2 Computer System and Operating System Overview
ROD DSP Software Overview of the DSP Software Architecture The List Manager The Task Manager The Event Manager (slaves) Text Buffer Handling 1) From VME.
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
The University of New Hampshire InterOperability Laboratory Serial ATA (SATA) Protocol Chapter 10 – Transport Layer.
1 ROD US ATLAS FDR, ROD Overview Atlas Wisconsin Group Khang Dao, Damon Fasching, Douglas Ferguson, Owen Hayes, Richard Jared, John Joseph, Krista Marks,
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
MICROPROCESSOR INPUT/OUTPUT
FINAL MPX DELIVERABLE Due when you schedule your interview and presentation.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Chapter 8 I/O. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 8-2 I/O: Connecting to Outside World So far,
Device Drivers CPU I/O Interface Device Driver DEVICECONTROL OPERATIONSDATA TRANSFER OPERATIONS Disk Seek to Sector, Track, Cyl. Seek Home Position.
The Alternative Larry Moore. 5 Nodes and Variant Input File Sizes Hadoop Alternative.
Lecture 14 Today’s topics MARIE Architecture Registers Buses
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Upgrade to the Read-Out Driver for ATLAS Silicon Detectors Atlas Wisconsin/LBNL Group John Joseph March 21 st 2007 ATLAS Pixel B-Layer Upgrade Workshop.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
Precomputation- based Prefetching By James Schatz and Bashar Gharaibeh.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
ECE 447 Fall 2009 Lecture 7: MSP430 Polling and Interrupts.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Lecture 1: Review of Computer Organization
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
IT3002 Computer Architecture
Embedded Systems Design 1 Lecture Set 8 MCS-51 Interrupts.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
John Hill ATLAS SCT Week2 October 2002 SCT ROD DAQ status and schedule John Hill University of Cambridge (with significant input from Tom Meyer)
Threshold Scan Inject various charges and histogram number of hits seen (occupancy plot) for each pixel Vcal (charge) from 0V to 200V (101 steps) For each.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
ATLAS SCT/Pixel Off Detector Workshop, UCL, 15 June ROD Test Stand Lukas Tomasek LBL
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview: Using Hardware.
Introduction to Exceptions 1 Introduction to Exceptions ARM Advanced RISC Machines.
ATLAS Pre-Production ROD Status SCT Version
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
Computer System Overview
Protocol Basics.
Module 2: Computer-System Structures
Operating Systems Chapter 5: Input/Output Management
Interrupts.
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Module 2: Computer-System Structures
Chapter 8 I/O.
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Chapter 13: I/O Systems.
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Aug. 20, 2002 L.B.L. DSP Software Status The Task Manager The Event Manager (slaves) Overview of DSP Primitives & Tasks Common to Both DSP Types Slave Primitives & Tasks Master Primitives & Tasks Douglas Ferguson UW-Madison & LBL US ATLAS SCT ROD FDR Histogramming Tasks Sequence New DSP Packages DSP-BIOS Update

DSP-BIOS New TI “operating system” for their DSPs. Upgraded twice within 1 year: 1.1 to 1.2 to 2.0. The DSPs are fully functional under version 1.2. Upgrade to 2.0 has been done; preliminary testing performed. Further testing planned in September. Status: Issues to be resolved: BIOS is resource intensive. Many functions are inserted in IPRAM, using ~26% of available memory; many of these do not need to be there but version 1.2 does not have a mechanism for their placement elsewhere. The DSP software would benefit if more could be placed in IPRAM. A similar situation exists for the IDRAM.

State Machines Idle List inserted? (host sets bit) ready to Run? no Executing : one primitive/ loop iteration yes (set busy, executing bits) Pause list? Finished/ Abort list? Abort? Resume? Paused yes no Prepare reply data Acknowledged Host cleared inList bit? yes no yes no Primitive List ExecutionText Buffer Sending Idle Buffer occupied? Waiting Frozen yes no read request? yes no Buffer read? (readReqest reset) no (clear buffer occupied bit) yes Two types: Host List & Inter-DSP List

DSP Packages Task Manager: Maintains a list of functions that execute continuously on DSP, and provides updates on their status. Coded & Tested. Slave DSPs: event-based functions. Master DSP: control functions Event Manager: Sequence: Coded & Tested. Functions are added/removed from list by primitives: startTask, taskOperation (inspection, pause, resume and stop). a) Copying of incoming event data frames into DSP memory (ISR). c) Event building and insertion onto queue for distribution. d) Removal of event from queue after processing. b) Buffer overflow handling.

Primitives vs. Tasks Primitives: o Generally are executed once. Primitives can return a value that requests that the primitive be repeated (say, for polling), but only one primitive executes at a time. o Return data via the reply list. Each primitive in the input list contributes a header block to the reply, and optionally adds data, which can either be structured or unstructured. o Generally are simple. A primitive list is a “program”, and primitives are its functions. Tasks: o Execute continuously, and together; all tasks are executed once per iteration of the main program loop. Several tasks will happily co-exist on a DSP. Tasks can be paused & aborted, just like primitive lists. o Return data asynchronously. When a task completes, it can send an info message to the host. Any output data can be transferred via a primitive. sendData will handle large chunks of data processed by tasks & primitives (events, histograms, fits etc.); taskOperation:stop or query return the task’s internal variables. Some tasks (histogramming) also report via registers. o Typically are more complex. Tasks can have several different internal states; the task manager will report the states of any running or completed/halted tasks in the running task register (idata).

Event Management Event Based Data Event based data allows the DMA ISR to complete its work quickly, since the event’s length is always found at the end of a frame. The expense is that small Events take up more space. Half-word 0x40ff should never occur in data; the router adds the event’s length to this to form the Trailer Marker Word. ISR fills in a set of “frame registers”, and an auxiliary set of “frame summary registers.” (discussed next)  These are located in slave IPRAM at an (~) fixed location, and can be monitored to keep track of the DSP’s activity. Any frames until trailer is found are marked in the event’s frame mask. Header is detected: new event, begin filling in its data. Trailer is detected: event goes onto event queue. Event queuing sequence: 2 frame event B0F00000 EE1234EE ………… ………… ………….. ………… ………… ………… 21008E91 9CF09EB0 ……….. ………… ………….. ………… ………… ………… ………….. E0F0000 ………… ………… ………….. ………… ………… ………… ………….. ………… 40FF0127 Word 27  Inserted by router  Beginning of Fragment (9 words total, 3 shown) Link HeaderLink Data End of Fragment (6 words, last shown) Trailer Marker Word (1 frame= 0x100 words):

Events in memory: 0x – 0x “burst buffer”, 0x – 0x020d2000 “external burst buffers” 8 frame sets, + 1 reserve. Frame set 0  IDRAM, all others are in SDRAM Event Management (cont) Each frame set contains 32 frames. Two register sets describe them: defined as 0xSSSD DDDD PPPP PETO FFFF FFFF IIII IIII 32 per frame set, used by the event manager to jump from one frame to the next when processing multi-frame events, and determine which tasks to give them to. Frame set registers: Internal IDEvt frame # Pending tasks Delta to Next within Frame set delta Overflow bit Trailer bit Frame summary registers: One per frame set, used by the DMA ISR to find where to put the next incoming data frame. Show at a glance the DSP’s burst buffer usage (one bit per frame). Error bit

The frame register sets are located in the “idata” memory section (0x ), for monitored program variables). If the IDRAM burst buffer fills up (with a giant event (typically), or many events arriving more quickly than they can be processed), a buffer overflow occurs. All IPRAM frames are copied into SDRAM, and re-organization must be done on the frame set registers, and event frame masks.  EXPENSIVE. Also in idata: Event Management (cont) Event Manager Control structure (small set of control & ISR variables). Overflows:

Common Primitives: Echo Set Err Msg Mask Pause List Event Trap Setup Set Memory Copy MemoryMemory TestSend Data Module MaskSet TriggerStart TaskTask OperationWrite Buffer Slave Primitives & Tasks: Start Event TrappingStop Event TrappingHistogram Setup Histogramming Event TrappingOccupancy Counting Error CountingLink Re-synchronization Set LED Flash LED Transmit Serial Data Start Slave Executing R/W Register Field R/W Slave Memory Send Slave List Build Stream Slave List Operation Send Stream Configure Slave Poll Register FieldR/W Module Data R/W FIFO Start Slave List Send Configuration Master Primitives & Tasks: Histogram ControlMemory MirroringTrap Request Monitoring Tasks:

Common Primitive Summaries: Echo: A primitive “ping”. Hands back as a reply whatever you give it. Useful for testing DSP response time, DSP buffers. Set Err Msg Mask: Sets the default mask for printing messages in the error buffer. Pause List: Pauses a primitive list when encountered during its execution. The list can be resumed by setting the Resume List bit in the command register. Set Memory, Copy Memory: Utility primitives for organizing DSP memory. They operate on DSP memory and do not return any data. Primitive:Summary:Status: Coded & Tested. Memory Test: Diagnostic primitive which uses some basic memory tests to check memory integrity. Coded & Tested.

Set Led, Flash Led: Diagnostic primitives which are used to visually verify the state of the ROD, can be used for precise timing tests as well. Write Buffer: Diagnostic primitive which writes the input data in the selected buffer. Primitive:Summary:Status: Coded & Tested. Start Task: Starts a task, using the input data. The task must not be currently running on the DSP. The order in which tasks run is determined by their priority (input). Task Operation: Perform an operation on a currently running task. Currently these are stop, pause, resume, query & reset. Querying a task returns its current data (internal variables). Stopping and resetting it also return data. Coded & Tested. Basic functionality coded & tested. Data return not fully tested. Common Primitive Summaries (cont):

Primitive:Summary:Status: Partially coded (coded as needed); text in red is not yet fully implememted. Send Data: Returns a block of data which has been processed by a primitive or task. The data is well defined, but with a variable length. If the data is large (histograms), returns a pointer to it; the host will then ask the master DSP to shut down commun- ications to the slave DSPs so that it can retrieve it (currently this is manual). Data types include: master DSP- mirror, router & stream data; slave DSPs- event, histogram, occupancy & fit data. Module Mask: Perform all the steps necessary to set the front-end module masks. Transmit information to slave DSPs. Partially coded, untested. Set Trigger: Primitive version of the histogram control task. Differ- ences between them are that set trigger only does a single bin, and can be set to send triggers at an input rate. Also runs locally on slave DSPs. Coded, being tested. Event Trap Setup: Initialize the event manager on the slave DSPs; the master DSP coordinates the slave DSP & the Router. Coded & Tested. Common Primitive Summaries (cont):

Slave Primitive Summaries: Primitive:Summary:Status: Start Event Trapping: Once Event Trap Setup has been run, this primitive is run to load the DMA engine, and enable the router’s Trap Enable flag (controlled by slave DSPs). Histogram Setup: Sets up histogramming variables (# and size of bins, placement of histograms, etc.), and initializes the histograms. Stop Event Trapping: Stops the DMA engine, and disables the router’s Trap Enable flag. Coded & Tested. Some revisions requested.

Master Primitive Summaries: Primitive:Summary:Status: Read & Write Used to set any of the of the ROD’s FPGA RRIF Register Field: Rod Register InterFace) registers. The ROD Operations Manual explains these. Poll Register Field: Some RRIF registers are self-clearing. This primitive monitors them to see when they have done so. Coded & Tested. Read & Write FIFO: Places data in any of the ROD’s on-board FIFOs; this is used in conjunction with R&W Reg. Field to trigger the FIFOs to play their data into the desired ROD FPGA (formatters, EFB, or Router). Start Slave Executing: After loading the slave’s IPRAM, IDRAM and external memories, SSE sets them running. Once running, the board must be reset to stop them! (the standard list does this). Configure Slave: Turn communications with a slave DSP on and off. Coded & Tested.

Master Primitive Summaries (cont): Primitive:Summary:Status: R/W Slave Memory: Reads from or writes to specific locations in the slave DSPs’ memory. The data length must be less than ~150KB, the size of the primitive list buffers. Start Slave List, When slave DSPs execute host lists, the master Send Slave List, DSP serves as the intermediary, doing all the Slave List Operation actual list coordination using these primitives. Transmit Serial Data: Transmit the input data out of serial port 0, 1 or both, and optionally capture the data in the ROD input memories. Coded & Tested.

Master Primitive Summaries (cont): Primitive:Summary:Status: Build Stream: Build up a command stream from input command & data lists, which can contain up to 6 commands at a time; also used to reset a stream buffer. Successive calls to buildStream will concatenate lists. Either of 2 stream buffers can be used, or both if data is to be transmitted from both serial ports. Commands can be any of the SCT delay, fast, slow, data or mask commands. Send Stream: Sends any data contained in the stream buffer(s) out of the requested serial port(s), with optional capture. Coded & Tested. Request for additional cmds. Add in equivalent Pixel commands. Coded & Tested. Read & Write Module Reads from or writes to a C structure, stored on Configuration: the master DSP, which contains all information necessary to configure an SCT module. Coded & Tested. Add in equivalent Pixel structure. Send Configuration: Sends a serial stream constructed using the structure information to the specified module(s). Two modules can be configured simultaneously. Coded & Tested. Add code for dual module config- uration.

Slave Task Summaries: Task:Summary:Status: Coded & Tested. Modify for Pixels. Event Trapping: Trap (copy) incoming events of the desired type into a trapping buffer. The router must be set properly beforehand. Occupancy counting: Creates occupancy maps for incoming events. Error counting: Counts & categorizes events with errors. Link Re-synchronization: Performs whatever corrective actions are necessary to bring links/events back into synchronization when a trigger is dropped. Histogramming: Create histograms from incoming events, either alone using pre-set binning, or in cooperation with the histogram control task (or Set Trigger). Currently the histogramming engine is written in C, and is too slow. I am re-writing it in assembly language to improve performance. Coded & Tested. Currently this is a stand-alone slave task; will be modified to cooperate with the master DSP in setting the router’s registers on the fly. Not Yet Coded.

Master Task Summaries: Task:Summary:Status: Histogram Control: Controls all aspects of a histogramming run. Needs some thought on fault tolerance. Coded, being extensively tested. Memory Mirroring: Mirror the slave DSPs’ memory (for example, their communication registers & idata); allowing slave monitoring without disrupting communications. Trap Request Monitoring: Monitor the slave DSPs trap request registers; when a request is made sets up that DSP’s router registers appropriately. Will cooperate with the slave DSP trapping task. Coded, needs testing. Not Yet Coded.

Histogramming: Registers Master DSP Slave DSPs Histogram CMD (really status) current binsetcurrent rep bits Histogram CMD binset# repetitions bits Histogram STAT 0: events received DSP DSP 2DSP 1DSP 0 Histogram STAT 0 bin set evt rec. events received D P E R R: Ready E: Expecting P: Processing D: Done Bit 8 Bit 2024 Histogram STAT 1: Processing time & event length

Histogramming: Task States Histogram Control Task Histogram Task INIT NEWBIN Task variable setup. Slave Polling (all states) Copy slave HSTAT 0,1 to local variables. Update own HSTAT 0. Zero HSTAT 0,1. Place current bin & set in HCMD. Place current bin set, # rep in all slave HCMD. Zero out current repetitions Create & send configuration command stream. Prepare trigger command stream. READY Wait for #repetitions in HCMD != 0. Then: Set bin, histogram set, # rep. this bin; copy bin & set to own HSTAT 0. Zero out events received variable. HSTAT 0 RDY bit HI Check HRDY in slaves. HSTAT 0 DONE LO, EXP HI. Clear HSTAT 0 events received. WAITEXP Wait for all slave HSTAT EXP HI. state  EXPECTING

Histogram Control Task Histogram Task PULSINGEXPECTING WAITING Wait for the # events received by all slaves == current rep per slave. (= curr. Rep./# slaves). Check for timeout. Then: Wait for events to arrive on queue. Then: Send out one trigger per slave, update current rep., HCMD. # rep Histogramming: Task States (cont) If Current repetitions < # rep. per bin, repeat. Wait for all slave HSTAT 0 DONE HI Histogram the event HSTAT 0 PROC LO. HSTAT 0 PROC HI. Increment events received, HSTAT 0 events received. HSTAT 0 PROC LO. If events received < #rep. this bin, repeat. Else: HSTAT 0 EXP LO, DONE HI Clear HCMD #repetitions. state  READY PREP If bins done == # points: state  DONE. Else: Increment # bins done. Increment the data variables of the configuration & trigger lists state  NEWBIN