GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCBD / V1-5-2 > test_lcbb / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

lcb_display.c File Reference

Displays various aspects of the LCB hardware. More...

#include <ptd/lcb_display.h>
#include <LCBD/LCB.h>
#include <LCBD/LCB_cr.h>
#include <stdio.h>

Classes

struct  _DRF_fld
 Description of a register field. More...

Defines

#define DRF_FLD(_fldoff, _fldsiz, _label)   { _fldoff, _fldsiz, sizeof(_label), _label }
 Fills up one register field data descriptor.

Typedefs

typedef struct _DRF_fld DRF_fld
 Typedef for struct _DRF_fld.

Functions

void lcb_pciCsr_display (unsigned int csr)
 Displays the value of the PCI CSR.
void lcb_pciIrq_display (unsigned int irq)
 Displays the value of the PCI IRQ register.
void lcb_pciFab_display (unsigned int fab)
 Displays the value of the PCI Fabric Select register.
void lcb_latpCsr_display (unsigned int csr)
 Displays the value of the LATp CSR.
void lcb_latpCsr2_display (unsigned int prv_ui, unsigned int cur_ui)
 Displays the value of the LATp CSR both before and after a CSR access.
void lcb_latpFaults_display (unsigned int csr)
 Displays the value of the LATp FAULTS FIFO register.
void lcb_latpFaults2_display (unsigned int prv_ui, unsigned int cur_ui)
 Displays the value of the LATp FAULTS both before and after a FAULTSaccess.
void lcb_latpRxstats_display (unsigned int rxstats)
 Displays the value of the LATp Receive Statistics/Status register.
void lcb_latpRxstats2_display (unsigned int prv_ui, unsigned int cur_ui)
 Displays the value of the LATp Receive Statistics/Status register both before and after a RXSTATS access.
static void display1 (const char *name, const DRF_fld *flds, int cnt, const char *fill, int margin, unsigned int reg_ui)
 Display the value of one register.
static void display2 (const char *name, const DRF_fld *flds, int cnt, const char *fill, int margin, unsigned int prv_ui, unsigned int cur_ui)
 Display the previous and current values of a register.


Detailed Description

Displays various aspects of the LCB hardware.

Author:
JJRussell -- russell@slac.stanford.edu
  CVS $Id

Define Documentation

#define DRF_FLD ( _fldoff,
_fldsiz,
_label   )     { _fldoff, _fldsiz, sizeof(_label), _label }

Fills up one register field data descriptor.

Parameters:
_fldoff The right justified bit offset
_fldsiz The field size, in bits
_label The field name


Function Documentation

void display1 ( const char *  name,
const DRF_fld flds,
int  cnt,
const char *  fill,
int  margin,
unsigned int  reg_ui 
) [static]

Display the value of one register.

Parameters:
name The name of the register
flds Description of the fields to display
fill Specifies the fill trail character in the label field.
cnt The number of fields to display
margin Width of the label field (must be equal or greater than the longest label
reg_ui The value of the register to display

References _DRF_fld::label, _DRF_fld::len, _DRF_fld::offset, and _DRF_fld::size.

Referenced by lcb_latpCsr_display(), lcb_latpFaults_display(), lcb_latpRxstats_display(), lcb_pciCsr_display(), lcb_pciFab_display(), and lcb_pciIrq_display().

void display2 ( const char *  name,
const DRF_fld flds,
int  cnt,
const char *  fill,
int  margin,
unsigned int  prv_ui,
unsigned int  cur_ui 
) [static]

Display the previous and current values of a register.

Parameters:
name The name of the register
flds Description of the fields to display
cnt The number of fields to display
fill Specifies the fill trail character in the label field.
margin Width of the label field (must be equal or greater than the longest label
prv_ui The 'previous' value of the register to display
cur_ui The 'current' value of the register to display

References _DRF_fld::label, _DRF_fld::len, _DRF_fld::offset, and _DRF_fld::size.

Referenced by lcb_latpCsr2_display(), lcb_latpFaults2_display(), and lcb_latpRxstats2_display().

lcb_latpCsr2_display ( unsigned int  prv_ui,
unsigned int  cur_ui 
)

Displays the value of the LATp CSR both before and after a CSR access.

Parameters:
prv_ui The value of the LATp CSR before the access
cur_ui The value of the LATp CSR after the access

References display2().

Referenced by main(), and test_lcbb_csr_read().

lcb_latpCsr_display ( unsigned int  csr  ) 

Displays the value of the LATp CSR.

Parameters:
csr The value of the LATp CSR to display

References display1().

Referenced by main().

lcb_latpFaults2_display ( unsigned int  prv_ui,
unsigned int  cur_ui 
)

Displays the value of the LATp FAULTS both before and after a FAULTSaccess.

Parameters:
prv_ui The value of the LATp FAULTS before the access
cur_ui The value of the LATp FAULTS after the access

References display2().

Referenced by main(), and test_lcbb_faults_read().

lcb_latpFaults_display ( unsigned int  csr  ) 

Displays the value of the LATp FAULTS FIFO register.

Parameters:
csr The value of the LATp FAULTS to display

References display1().

Referenced by main().

lcb_latpRxstats2_display ( unsigned int  prv_ui,
unsigned int  cur_ui 
)

Displays the value of the LATp Receive Statistics/Status register both before and after a RXSTATS access.

Parameters:
prv_ui The value of the LATp FAULTS before the access
cur_ui The value of the LATp FAULTS after the access

References display2().

Referenced by main(), and test_lcbb_rxstats_read().

lcb_latpRxstats_display ( unsigned int  rxstats  ) 

Displays the value of the LATp Receive Statistics/Status register.

Parameters:
rxstats The value of the LATp Receive Statistics/Status register to display

References display1().

Referenced by main().

lcb_pciCsr_display ( unsigned int  csr  ) 

Displays the value of the PCI CSR.

Parameters:
csr The value of the PCI CSR to display

References display1().

Referenced by main(), and test_lcbb_pci_csr_read().

lcb_pciFab_display ( unsigned int  fab  ) 

Displays the value of the PCI Fabric Select register.

Parameters:
fab The value of the PCI Fabric Select register to display

References display1().

Referenced by main(), and test_lcbb_pci_fab_read().

lcb_pciIrq_display ( unsigned int  irq  ) 

Displays the value of the PCI IRQ register.

Parameters:
irq The value of the PCI IRQ register to display

References display1().

Referenced by main(), and test_lcbb_pci_irq_read().


Generated on Tue Nov 29 19:41:12 2011 by  doxygen 1.5.8