GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > CTDB / V5-2-1

Constituent: sumt_bc_sib     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

SUMT_bc.h File Reference

Summit 1553 Bus Controller Drvier. More...

#include "CTDB/CO1553_bc.h"
#include "PBS/TOC.h"
#include "PBS/TASK.h"
#include "MSG/MSG_pubdefs.h"

Include dependency graph for SUMT_bc.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Data Structures

struct  _SUMT_BC_Bus_Cmd
struct  _SUMT_BC_Bus_Config
struct  _SUMT_BC_Bus_Frame
struct  _SUMT_BC_Pkt_Config
struct  _SUMT_BC_Task_Config

Device Control Functions

unsigned int SUMT_bcSizeof (void)
 Get the size of a bus controller driver descriptor.

SUMT_BCSUMT_bcGet (void)
 Get a pointer to the bus controller driver static descriptor.

unsigned int SUMT_bcInit (SUMT_BC *bc, const SUMT_BC_Bus_Config *busConfig, const SUMT_BC_Pkt_Config *pktConfig, const SUMT_BC_Task_Config *taskConfig)
 Intialize a bus controller driver and 1553 device hardware.

unsigned int SUMT_bcStart (SUMT_BC *bc)
 Start the bus controller processing 1553 bus commands.

unsigned int SUMT_bcStop (SUMT_BC *bc)
unsigned int SUMT_bcExit (SUMT_BC *bc)
 Shutdown a bus controller driver and 1553 device hardware.


Packet Queue Functions

unsigned int SUMT_bcPktTelemRecv (SUMT_BC *bc, void **pkt, const TOC *timeout)
 Receive a CCSDS telemetry packet.

unsigned int SUMT_bcPktTelemFree (SUMT_BC *bc, void *pkt)
 Free a CCSDS telemtry packet.

unsigned int SUMT_bcPktCmdTxRecv (SUMT_BC *bc, void **pkt, const TOC *timeout)
 Receive a CCSDS telecommand transmit packet.

unsigned int SUMT_bcPktCmdTxFree (SUMT_BC *bc, void *pkt)
 Free a CCSDS telecommand transmit packet.

unsigned int SUMT_bcPktCmdRxSend (SUMT_BC *bc, void *pkt, SUMT_BC_Pkt_Free *freeHandler, void *freeArg, const TOC *timeout)
 Send a CCSDS telecommand receive packet.


Defines

#define SUMT_BC_NUM_BUS_CMD   32
#define SUMT_BC_NUM_BUS_FRAME   5

Typedefs

typedef _SUMT_BC SUMT_BC
typedef enum _SUMT_BC_Subaddr SUMT_BC_Subaddr
typedef enum _SUMT_BC_Bus_Flags SUMT_BC_Bus_Flags
typedef _SUMT_BC_Bus_Cmd SUMT_BC_Bus_Cmd
typedef _SUMT_BC_Bus_Frame SUMT_BC_Bus_Frame
typedef _SUMT_BC_Bus_Config SUMT_BC_Bus_Config
typedef _SUMT_BC_Pkt_Config SUMT_BC_Pkt_Config
typedef _SUMT_BC_Task_Config SUMT_BC_Task_Config
typedef void SUMT_BC_Pkt_Free (void *pkt, void *arg)

Enumerations

enum  _SUMT_BC_Subaddr {
  SUMT_BC_SUBADDR_CMD_RX = 0x0001,
  SUMT_BC_SUBADDR_CMD_TX = 0x0002,
  SUMT_BC_SUBADDR_TELEM_DATA = 0x0004,
  SUMT_BC_SUBADDR_TELEM_END = 0x0008
}
enum  _SUMT_BC_Bus_Flags {
  SUMT_BC_BUS_FLAG_SKIP = 0x0001,
  SUMT_BC_BUS_FLAG_BCAST = 0x0002
}
enum  _SUMT_BC_Bus_Side {
  SUMT_BC_BUS_SIDE_A = 0,
  SUMT_BC_BUS_SIDE_B = 1
}

Variables

enum _SUMT_BC_Bus_Side SUMT_BC_Bus_Side

Detailed Description

Summit 1553 Bus Controller Drvier.

This driver provides a 1553 bus controller interface through a UTMC Summit controller device. The user is provided function to initialize, control, and transfer data on the 1553 bus. The interface for sending data is through CCSDS packet queues.

The driver recognizes a set of subaddress types. Each type can transfer one packet. The recognized subaddress types are shown below,

Subaddress Direction Description
Command Receive (CmdRx) Receive (BC->RT) Telecommand input
Command Transmit(CmdTx) Transmit (RT->BC) Telecommand output
Telemetry (Telem) Transmit (RT->BC) Low rate telemetry

Each subaddress is provided with queues and callback mechanisms to transfer packets to and from the 1553 bus controller.

The Summit BC drivers are supported for different target boards.

Library Board Tags
libsumt_bc_pmc1553.o Alphi PMC-1553B mv2304 mcp750
libsumt_bc_sib.o LAT SIB rad750 mcp750

LAT SIB Board

The Summit driver for the LAT SIB board assumes that the PCI configuration header of the board has been setup by the PCI autoconfig process or something similar. The driver will obtain the PCI MEM address from the SIB/sib constituent function SIB_queury(). The driver will invoke pciIntConnect() to setup the interrupt handler based.

Alphi PMC-1553B Board

The Summit driver for the PMC1553 board assumes that the PCI configuration header of the board has been setup by the PCI autoconfig process or something similar. The driver will obtain the PCI MEM addresses from the config Base Address registers #0, #1, and #3. The driver will call sysPciToLocalAdrs() to map the BAR values into local address space. The driver will invoke pciIntConnect() to setup the interrupt handler based on the value contained in the config Interrupt Line register.

Driver Memory Usage

The Summit driver requires a small amount of memory for internal data objects. The primary memory requirements, however, derive from the packet queue buffers. The Summit remote terminal driver memory requirements are summarized below:

Driver data structures < 1 KB
Telecommand packet input queue queue size * 72 bytes
Telecommand packet output queue queue size * 24 bytes
Telemetry packet input queue queue size * 850 bytes
Telemetry block buffer 960 bytes
BC event service task Stack 8192 bytes
BC event service task queue 1792 bytes


Define Documentation

#define SUMT_BC_NUM_BUS_CMD   32
 

The maximum number of bus commands supported by the #_CO1553_BC_CONFIG configuration structure. This is the number of commands for a 40 msec bus frame.

#define SUMT_BC_NUM_BUS_FRAME   5
 

The number 40 msec bus frames in each bus frame cycle.


Typedef Documentation

SUMT_BC
 

An interrupt mode driver bus controller descriptor. The driver interface functions will take a pointer to an instance of one of these structures as a parameter.

SUMT_BC_Bus_Cmd
 

The typedef for _SUMT_BC_Bus_Cmd.

SUMT_BC_Bus_Config
 

The typedef for _SUMT_BC_Bus_Config.

SUMT_BC_Bus_Flags
 

Configuration bitmask values for the flags member of #_CO1553_BC_Bus_Cmd.

SUMT_BC_Bus_Frame
 

The typedef for #_CO1553_BC_Bus_Frame.

SUMT_BC_Pkt_Config
 

The typedef for _SUMT_BC_Pkt_Config.

SUMT_BC_Pkt_Free
 

The definition of a packet buffer memory free callback function. These callbacks are employeed when users are sending packets on a transmit queue. The packet memory is borrowed while the packet is on the queue. When the packet contents have been transmitted, the free handler is called with a user supplied argument.

        void SUMT_BC_Pkt_Free(void *pkt, void *arg)

Parameters:
pkt A pointer to the packet buffer to release.
arg The user defined argument.

SUMT_BC_Subaddr
 

The typedef for #__SUMT_BC_Subaddr.

SUMT_BC_Task_Config
 

The typedef for #_CO1553_BC_Task_Config.


Enumeration Type Documentation

enum _SUMT_BC_Bus_Flags
 

Enumeration values:
SUMT_BC_BUS_FLAG_SKIP  The bus command slot is to be skipped, but with delay.
SUMT_BC_BUS_FLAG_BCAST  The bus command should be broadcast.

enum _SUMT_BC_Bus_Side
 

Codes to indicate 1553 bus side A or B as primary.

Enumeration values:
SUMT_BC_BUS_SIDE_B  Use the A side as the primary bus.

enum _SUMT_BC_Subaddr
 

Subaddress ID values.

Enumeration values:
SUMT_BC_SUBADDR_CMD_RX  Input telecommands.
SUMT_BC_SUBADDR_CMD_TX  Output telecommands.
SUMT_BC_SUBADDR_TELEM_DATA  The low-rate telemetry subaddress data (Tx).
SUMT_BC_SUBADDR_TELEM_END  The low-rate telemetry subaddress completion (Rx).


Function Documentation

unsigned int SUMT_bcExit SUMT_BC bc  ) 
 

Shutdown a bus controller driver and 1553 device hardware.

Stops the bus contoller from sending 1553 bus commands and releases system resources claimed by the driver. The bus contoller event service task will be deleted.

Parameters:
bc A device descriptor.
Returns:
A CTDB MSG code.

SUMT_BC * SUMT_bcGet void   ) 
 

Get a pointer to the bus controller driver static descriptor.

Returns a pointer to a static instance of the driver descriptor. This pointer may be passed in as the first paramter to all of the other driver functions. SUMT_bcInit() must be called before use.

Returns:
A pointer to the BC driver descriptor.

unsigned int SUMT_bcInit SUMT_BC bc,
const SUMT_BC_Bus_Config busConfig,
const SUMT_BC_Pkt_Config pktConfig,
const SUMT_BC_Task_Config taskConfig
 

Intialize a bus controller driver and 1553 device hardware.

Intializes the Summit bus controller device descriptor and device hardware. The device and associated software structures are configured according to the contents of the busConfig, boardConfig, pktConfig, and cbConfig structures.

Parameters:
bc An uninitialized device descriptor.
busConfig The configuration values for the 1553 bus schedule.
pktConfig The configuration values for the application packet interface.
taskConfig The configuration values for the BC service task.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int SUMT_bcPktCmdRxSend SUMT_BC bc,
void *  pkt,
SUMT_BC_Pkt_Free freeHandler,
void *  freeArg,
const TOC *  timeout
 

Send a CCSDS telecommand receive packet.

Places a CCSDS telecommand receive packet on the bus controller output queue. The packet will be sent when bandwidth becomes available.

Parameters:
bc A device descriptor.
pkt A pointer to the packet to send. The packet buffer should start with a properly formatted CCSDS packet header.
freeHandler The function to be called after the packet has been sent.
freeArg A user argument to be passed to the freeHandler function.
timeout The time to wait for a packet on the queue.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int SUMT_bcPktCmdTxFree SUMT_BC bc,
void *  pkt
 

Free a CCSDS telecommand transmit packet.

Returns a CCSDS telecommand transmit packet buffer to the driver. This function should be called for every telecommand packet received from the function SUMT_bcPktCmdTxRecv().

Parameters:
bc A device descriptor.
pkt A pointer to the packet buffer to free.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int SUMT_bcPktCmdTxRecv SUMT_BC bc,
void **  pkt,
const TOC *  timeout
 

Receive a CCSDS telecommand transmit packet.

Waits for a new CCSDS telecommand transmit packet on the bus controller input queue. The function will place a pointer to the new packet buffer in pkt. The user should return the packet buffer to the driver by calling SUMT_bcPktCmdTxFree().

Parameters:
bc A device descriptor.
pkt Holds a pointer to the telecommand packet.
timeout The time to wait for a packet on the queue.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int SUMT_bcPktTelemFree SUMT_BC bc,
void *  pkt
 

Free a CCSDS telemtry packet.

Returns a CCSDS telemetry packet buffer to the driver. This function should be called for every telemetry packet received from the function SUMT_bcPktTelemRecv().

Parameters:
bc A device descriptor.
pkt A pointer to the packet buffer to free.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int SUMT_bcPktTelemRecv SUMT_BC bc,
void **  pkt,
const TOC *  timeout
 

Receive a CCSDS telemetry packet.

Waits for a new CCSDS telemetry packet on the bus controller input queue. The function will place a pointer to the new packet buffer in pkt if everything is working correctly. The user should return the packet buffer to the driver by calling SUMT_bcPktTelemFree().

Parameters:
bc A device descriptor.
pkt Holds a pointer to the telemetry packet.
timeout The time to wait for a packet on the queue.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int SUMT_bcSizeof void   ) 
 

Get the size of a bus controller driver descriptor.

Returns the size of a Summit bus controller driver descriptor. The user is responsible for allocating this memory before calling SUMT_bcInit().

This function is obsolete. Use SUMT_bcGet() to provide an instance of the simulator descriptor instead.

Returns:
The size in bytes of the device descriptor.

unsigned int SUMT_bcStart SUMT_BC bc  ) 
 

Start the bus controller processing 1553 bus commands.

Starts the bus controller processing bus commands to send to the remote terminal. A 40 millisecond second frame timer is also started, so that once the current list of bus commands is processed, the BCRTM device is restarted the next frame tick with a new command list.

Parameters:
bc A device descriptor.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int SUMT_bcStop SUMT_BC bc  ) 
 

Stops the bus controller from sending 1553 bus commands. In actuallity, the device is not stopped immediately, but simply will not be restarted for the next one second frame.

Parameters:
bc A device descriptor.
Returns:
A CTDB MSG code.


Variable Documentation

SUMT_BC_Bus_Side
 

The typedef for _SUMT_BC_Bus_Side.


Generated on Tue Mar 22 21:00:05 2005 by doxygen 1.3.3