SRXL Library


Detailed Description

The SRXL Library provides routines and registers specific to the SRXL board.

For more information on the SRXL Satellite Tuner, please see the board's manual, available at http://www.edt.com/manuals/PCD/srxl.pdf

NOTE: To avoid conflict with other EDT software, registers defined in the SRXL software library prepend SRXL_ to the hardware register's names.


Defines

#define SRXL_AD_CAPTURE_CTRL   (INTFC_BYTE | 0x63)
#define SRXL_AD_READ_DATA   (INTFC_BYTE | 0x60)
#define SRXL_CLK_CTRL   (INTFC_BYTE | 0x5f)
#define SRXL_CONSTANT   0x0c
#define SRXL_DACA_LOW   (INTFC_BYTE | 0x58)
#define SRXL_DACB_LOW   (INTFC_BYTE | 0x5a)
#define SRXL_DDS_CTRL   (INTFC_BYTE | 0x50)
#define SRXL_DDS_DATA   (INTFC_BYTE | 0x51)
#define SRXL_GC_ADDR   (INTFC_BYTE | 0x64)
#define SRXL_GC_DATA   (INTFC_BYTE | 0x65)
#define SRXL_PLL_LOW   (INTFC_BYTE | 0x5c)
#define SRXL_SERIAL_CTRL   (INTFC_BYTE | 0x54)
#define SRXL_SERIAL_CTRL_XFER_BUSY   0x80
#define SRXL_X_CONST   0x43
#define SRXL_X_CTRL   (INTFC_BYTE | 0x41)
#define SRXL_X_CTRL_FIFO_EN   0x40
#define SRXL_X_CTRL_INIT   0x01
#define SRXL_X_CTRL_PROG   0x02
#define SRXL_X_CTRL_PROG_EN   0x20
#define SRXL_X_DATA   (INTFC_BYTE | 0x40)
#define SRXL_X_STAT   (INTFC_BYTE | 0x42)
#define SRXL_X_STAT_DONE   0x02
#define SRXL_X_STAT_FCNT_MSK   0xf0
#define SRXL_X_STAT_FCNT_SHFT   4
#define SRXL_X_STAT_FIFO_CNT(dev)   ((edt_reg_read((dev), SRXL_X_STAT)>>SRXL_X_STAT_FCNT_SHFT) & SRXL_X_STAT_FCNT_MSK)
#define SRXL_X_STAT_INIT   0x01

Functions

void srxl_gc_set_page (EdtDev *edt_p, int chip, int page)
 Sets which page of registers to use on the board's specified graychip.
void srxl_gc_write (EdtDev *edt_p, int chip, uint_t address, uint_t value)
 Writes the given value to the given address on specified graychip.
void srxl_serial_write (EdtDev *edt_p, uint_t desc, uint_t val)
 Uses the SRXL mezzanine board Xilinx FPGA's serial method to communicate with that board's devices.
int srxl_set_if_losc (EdtDev *edt_p, unsigned freq)
 Sets IF local oscillator frequency.
int srxl_set_lb_losc (EdtDev *edt_p, unsigned freq)
 Sets L-band local oscillator frequency.
int srxl_set_sample_clk (EdtDev *edt_p, float samp_freq)
 Sets sample clock frequency.


Function Documentation

void srxl_gc_set_page ( EdtDev edt_p,
int  chip,
int  page 
)

Sets which page of registers to use on the board's specified graychip.

Parameters:
chip Specifies which graychip to address, 0 for the first graychip, or 1 for the second chip.
page Specifies which page of registers to use on the given graychip. The value of the page is set in a register, and will be set until changed by caller.

Definition at line 56 of file lib_srxl.c.

void srxl_gc_write ( EdtDev edt_p,
int  chip,
uint_t  address,
uint_t  value 
)

Writes the given value to the given address on specified graychip.

Parameters:
chip Specifies which graychip to write to, 0 for the first chip, or 1 for the second chip.
address The address on the graychip to access
value The value to write to the given address.

Definition at line 34 of file lib_srxl.c.

void srxl_serial_write ( EdtDev edt_p,
uint_t  desc,
uint_t  val 
)

Uses the SRXL mezzanine board Xilinx FPGA's serial method to communicate with that board's devices.

This function simply waits for the XFER_BUSY bit of the SRXL_SERIAL_CTRL register to be low before doing a normal edt_reg_write(edt_p, desc, val).

Parameters:
desc The register description in the form that edt_reg_write() takes.
val the value to write to the specified register (desc).

Definition at line 17 of file lib_srxl.c.

int srxl_set_if_losc ( EdtDev edt_p,
unsigned  freq 
)

Sets IF local oscillator frequency.

Parameters:
freq Desired frequency in MHz (must be between 63 and 225, inclusive).
Returns:
0 on success, -1 on failure

Definition at line 144 of file lib_srxl.c.

int srxl_set_lb_losc ( EdtDev edt_p,
unsigned  freq 
)

Sets L-band local oscillator frequency.

Parameters:
freq Desired frequency in MHz (must be between 925 and 2175, inclusive).
Returns:
0 on success, -1 on failure

Definition at line 186 of file lib_srxl.c.

int srxl_set_sample_clk ( EdtDev edt_p,
float  samp_freq 
)

Sets sample clock frequency.

Parameters:
samp_freq Desired sample clock frequency in MHz; precision is limited to about 24 bits by float format. Frequency must be in range 1..65.
Returns:
0 on success, -1 on failure

Definition at line 73 of file lib_srxl.c.


Generated on Mon May 12 16:39:13 2008 by  doxygen 1.5.1