Doxygen Documentation

Main Index

Package Index

Package:

TPG

Version:

V0-0-0

Marked:

(not marked)

Constituent:

tpg

Tag:

linux-gcc


Interface   Compound List   File List   Compound Members   File Members  

tpg.h File Reference

Trigger Pattern Generator command-line user interface. More...


Typedefs

typedef _TPG TPG
typedef enum _temTrg temTrg

Enumerations

enum  _temTrg {
  TPG_BUSY = 0,
  TPG_TIAR = 1,
  TPG_CALHI = 2,
  TPG_CALLO = 3,
  TPG_N_TRG = 4
}

Functions

TPGTPGnew (unsigned *commAddr)
 Calls calloc to allocate memory for the struct and associated buffers then sets the buffer pointers to the correct offsets.

void TPGclear (TPG *this)
 Sets all the buffers to 0.

void TPGclearBuf (TPG *this, unsigned bufferId)
 Sets the buffer indicated by bufferId to 0.

unsigned TPGsetTEM (TPG *this, unsigned tem_id, temTrg trg, unsigned start, unsigned pattern, unsigned pat_len, unsigned repetitions)
unsigned TPGsetVETO (TPG *this, unsigned free_id, unsigned veto_id, unsigned start, unsigned pattern, unsigned pat_len, unsigned repetitions)
unsigned TPGsetCNO (TPG *this, unsigned free_id, unsigned start, unsigned pattern, unsigned pat_len, unsigned repetitions)
unsigned TPGsetTEMv (TPG *this, unsigned tem_id, temTrg trg, unsigned start, unsigned *pattern, unsigned pat_len, unsigned repetitions)
unsigned TPGsetVETOv (TPG *this, unsigned free_id, unsigned veto_id, unsigned start, unsigned *pattern, unsigned pat_len, unsigned repetitions)
unsigned TPGsetCNOv (TPG *this, unsigned free_id, unsigned start, unsigned *pattern, unsigned pat_len, unsigned repetitions)
unsigned TPGstart (TPG *this, unsigned char *clkDelay)
unsigned TPGdump (TPG *this, unsigned bufferId)
int TPGmsgInit (void)

Variables

unsigned TPG_LASTWORD


Detailed Description

Trigger Pattern Generator command-line user interface.

Author:
James Swain -- jswain@slac.stanford.edu

Typedef Documentation

temTrg
 

enums representing the four different TEM trigger signals

TPG
 

typedef for the TPG structure containing pattern buffers and gnatHandles for the COMM boards


Enumeration Type Documentation

enum _temTrg
 

Enumeration values:
TPG_BUSY  TEM Busy signal
TPG_TIAR  TEM Three-In-A-Row
TPG_CALHI  TEM CAL HI
TPG_CALLO  TEM CAL LO
TPG_N_TRG  Number of Trigger inputs from a TEM


Function Documentation

void TPGclear TPG this  ) 
 

Sets all the buffers to 0.

void TPGclear(TPG* this)

Parameters:
this TPG structure to clear

void TPGclearBuf TPG this,
unsigned  bufferId
 

Sets the buffer indicated by bufferId to 0.

void TPGclearBuf(TPG* this, unsigned bufferId)

Parameters:
this TPG structure containing buffer to clear
bufferId ID of the buffer to clear

unsigned TPGdump TPG this,
unsigned  bufferId
 

unsigned TPGdump(TPG* this, unsigned bufferId)

Parameters:
this TPG struct to use to configure COMM I/O boards
bufferId Buffer to dump, 0 ... TPG_N_BOARDS
Returns:
One of TPG_msgs, TPG_SUCCESS if all goes well. Print out the bit patterns in the buffer

int TPGmsgInit void   ) 
 

int TPGmsgInit(void)

Returns:
0 on success, -1 on failure Starts a simple printf MSG processor

TPG* TPGnew unsigned *  commAddr  ) 
 

Calls calloc to allocate memory for the struct and associated buffers then sets the buffer pointers to the correct offsets.

TPG* TPGnew(unsigned* commAddr)

Parameters:
commAddr Array of addresses (TPG_N_BOARDS long) of the COMM I/O boards
Returns:
Ptr to a new TPG structure containing ptrs to buffers and gnatHandles

unsigned TPGsetCNO TPG this,
unsigned  free_id,
unsigned  start,
unsigned  pattern,
unsigned  pat_len,
unsigned  repetitions
 

unsigned TPGsetCNO(TPG* this, unsigned free_id, unsigned start, unsigned pattern, unsigned pat_len, unsigned repetitions)

Parameters:
this TPG structure being modified
free_id FREE being targeted (gives tgt board), 0 ... 3
start Start bit for the pattern, 0 ... (32*1024)-1
pattern Up to 32 bit pattern to use (LSB first)
pat_len Pattern length 1 ... 32
repetitions Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth
Returns:
One of TPG_msgs, TPG_SUCCESS if all goes well. Places the pat_len LSBs of pattern into the channel and buffer indicated by free_id and veto_id

unsigned TPGsetCNOv TPG this,
unsigned  free_id,
unsigned  start,
unsigned *  pattern,
unsigned  pat_len,
unsigned  repetitions
 

unsigned TPGsetCNOv(TPG* this, unsigned free_id, unsigned start, unsigned pattern, unsigned pat_len, unsigned repetitions)

Parameters:
this TPG structure being modified
free_id FREE being targeted (gives tgt board), 0 ... 3
start Start bit for the pattern, 0 ... (32*1024)-1
pattern Up to 32 bit pattern to use (LSB first)
pat_len Pattern length 1 ... (32*1024) - 1
repetitions Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth
Returns:
One of TPG_msgs, TPG_SUCCESS if all goes well. Places the pat_len LSBs of pattern into the channel and buffer indicated by free_id and veto_id

unsigned TPGsetTEM TPG this,
unsigned  tem_id,
temTrg  trg,
unsigned  start,
unsigned  pattern,
unsigned  pat_len,
unsigned  repetitions
 

unsigned TPGsetTEM(TPG* this, unsigned tem_id, temTrg trg, unsigned start, unsigned pattern, unsigned pat_len, unsigned repetitions)

Parameters:
this TPG structure being modified
tem_id TEM being targeted (gives channel range), 0 ... 3
trg TEM trg being targeted, (gives channel number), 0 ... 3, use temTrg
start Start bit for the pattern, 0 ... (32*1024)-1
pattern Up to 32 bit pattern to use (LSB first)
pat_len Pattern length 1 ... 32
repetitions Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth
Returns:
One of TPG_msgs, TPG_SUCCESS if all goes well. Places the pat_len LSBs of pattern into the channel and buffer indicated by tem_id and trg

unsigned TPGsetTEMv TPG this,
unsigned  tem_id,
temTrg  trg,
unsigned  start,
unsigned *  pattern,
unsigned  pat_len,
unsigned  repetitions
 

unsigned TPGsetTEMv(TPG* this, unsigned tem_id, temTrg trg, unsigned start, unsigned* pattern, unsigned pat_len, unsigned repetitions)

Parameters:
this TPG structure being modified
tem_id TEM being targeted (gives channel range), 0 ... 3
trg TEM trg being targeted, (gives channel number), 0 ... 3, use temTrg
start Start bit for the pattern, 0 ... (32*1024)-1
pattern Up to 32 bit pattern to use (LSB first)
pat_len Pattern length 1 ... (32*1024) - 1
repetitions Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth
Returns:
One of TPG_msgs, TPG_SUCCESS if all goes well. Places the pat_len LSBs of pattern into the channel and buffer indicated by tem_id and trg

unsigned TPGsetVETO TPG this,
unsigned  free_id,
unsigned  veto_id,
unsigned  start,
unsigned  pattern,
unsigned  pat_len,
unsigned  repetitions
 

unsigned TPGsetVETO(TPG* this, unsigned free_id, unsigned veto_id, unsigned start, unsigned pattern, unsigned pat_len, unsigned repetitions)

Parameters:
this TPG structure being modified
free_id FREE being targeted (gives tgt board), 0 ... 3
veto_id VETO bit being targeted, (gives channel number), 0 ... 17
start Start bit for the pattern, 0 ... (32*1024)-1
pattern Up to 32 bit pattern to use (LSB first)
pat_len Pattern length 1 ... 32
repetitions Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth
Returns:
One of TPG_msgs, TPG_SUCCESS if all goes well. Places the pat_len LSBs of pattern into the channel and buffer indicated by free_id and veto_id

unsigned TPGsetVETOv TPG this,
unsigned  free_id,
unsigned  veto_id,
unsigned  start,
unsigned *  pattern,
unsigned  pat_len,
unsigned  repetitions
 

unsigned TPGsetVETOv(TPG* this, unsigned free_id, unsigned veto_id, unsigned start, unsigned* pattern, unsigned pat_len, unsigned repetitions)

Parameters:
this TPG structure being modified
free_id FREE being targeted (gives tgt board), 0 ... 3
veto_id VETO bit being targeted, (gives channel number), 0 ... 17
start Start bit for the pattern, 0 ... (32*1024)-1
pattern Up to 32 bit pattern to use (LSB first)
pat_len Pattern length 1 ... (32*1024) - 1
repetitions Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth
Returns:
One of TPG_msgs, TPG_SUCCESS if all goes well. Places the pat_len LSBs of pattern into the channel and buffer indicated by free_id and veto_id

unsigned TPGstart TPG this,
unsigned char *  clkDelay
 

unsigned TPGstart(TPG* this, unsigned char* clkDelay)

Parameters:
this TPG struct to use to configure COMM I/O boards
clkDelay Array of (6 bit) clock delays (TPG_N_BOARDS long) for the COMM I/O boards, to remove clock skew.
Returns:
One of TPG_msgs, TPG_SUCCESS if all goes well. Use Programmed I/O to fill the COMM board FIFOs, then start the sequence


Variable Documentation

unsigned TPG_LASTWORD  ) 
 

first bit of last word of a pattern


Generated on Sat Nov 15 15:27:25 2003 by doxygen 1.3.3