LAT Communication Board Driver

Software Architecture and Interfaces

Curt Brune

Stanford Linear Accelerator Center (SLAC)
GLAST LAT Flight Software

March 17, 2003

LAT-TD-01380-02
Revision History
Revision 0.503-17-2003
Revision 0.401-21-2003
Revision 0.3July 25, 2002
Revision 0.2July 18, 2002
Revision 0.1July 11, 2002

This document provides detailed descriptions of the software architecture and interfaces for the LCB Driver (LCBD). The hardware interface driver is described first, followed by a discussion of the external interfaces to the software driver.

This document is also available in the following formats:


Table of Contents
Introduction
1. LCB Primer
2. LCBD Overview
1. Hardware Interface Driver
1.1. External Library Dependencies
1.2. Register Model
1.2.1. PCI Configuration Space Registers
1.2.2. PCI I/O Space Registers
1.2.3. PCI Memory Space Registers
1.3. Initialization and Configuration
1.3.1. Initialization
1.3.2. Default Configuration
1.4. LCB Statistics
1.4.1. Hardware Statistics
1.4.2. LATp I/O Statistics
2. Interrupt Mode Driver
2.1. Driver Libraries
2.2. Overview of Operation
2.3. Result Dispatch
2.3.1. Command/Response Data
2.3.2. Unsolicited Data
2.4. Command/Response Interface
2.4.1. Asynchronous Command and Response Interface
2.4.2. Synchronous Command and Response Interface
2.5. Unsolicited Data Interfaces
2.5.1. Registering Call Back Handlers
2.5.2. Navigating Unsolicited Data
2.5.3. Freeing Unsolicited Data
2.5.4. Example Handlers
3. Polled Mode Driver
3.1. Driver Libraries
3.2. Driver Interface
3.2.1. Driver Initialization
3.2.2. Dispatching Results
3.2.3. Sending Bulk Data
3.3. Example Driver
3.3.1. Initialization
3.3.2. Polled Event Loop
3.3.3. Sending Bulk Data
References
List of Tables
2-1. LIOX Handle States
2-2. LIOX List Memory Attributes
2-3. Deallocating Memory
3-1. polled mode LCBD Memory Attributes
List of Figures
1-1. PCI Bus and cPCI Modules.
2-1. Interrupt Mode Driver Architecture.
2-2. Interrupt Mode Driver Libraries.
2-3. Result Dispatch ISR
2-4. Overview of LIOX data structure.
2-5. LIOX State Transitions.
3-1. Polled Mode Driver Architecture.
3-2. Polled Mode Driver Library.
List of Examples
2-1. Reading A Calorimeter DAC
2-2. Reading a Calorimeter DAC – Continued
2-3. Read Calorimeter DAC – Synchronous Interface