clsim_lib.h File Reference


Detailed Description

Camera Link Simulator Library header file, for use with PCI DV CLS and PCIe DV C-Link with Simulator FPGA loaded.

Definition in file clsim_lib.h.

Go to the source code of this file.

Defines

#define PDV_CLS_DEFAULT_FREQ   20.0
#define PDV_CLS_DEFAULT_HGAP   300
#define PDV_CLS_DEFAULT_HGAP   300
#define PDV_CLS_DEFAULT_VGAP   400
#define PDV_CLS_DEFAULT_VGAP   400

Functions

int pdv_cls_dep_sanity_check (PdvDev *pdv_p)
void pdv_cls_dump_geometry (PdvDev *pdv_p)
void pdv_cls_dump_state (PdvDev *pdv_p)
 Prints board state to stdout.
double pdv_cls_frame_time (PdvDev *pdv_p)
int pdv_cls_get_hgap (PdvDev *pdv_p)
int pdv_cls_get_vgap (PdvDev *pdv_p)
void pdv_cls_init_serial (PdvDev *pdv_p)
void pdv_cls_set_clock (EdtDev *edt_p, double freq)
 Set MPC9230 PLL on PCI CD-CLSIM to 3.5 times the requested pixclk freq.
void pdv_cls_set_datacnt (PdvDev *pdv_p, int state)
int pdv_cls_set_dep (PdvDev *pdv_p)
void pdv_cls_set_fill (PdvDev *pdv_p, u_char left, u_char right)
 Sets the left and right fill values.
void pdv_cls_set_firstfc (PdvDev *pdv_p, int state)
void pdv_cls_set_height (PdvDev *pdv_p, int rasterlines, int vblank)
void pdv_cls_set_intlven (PdvDev *pdv_p, int enable)
 Enables or disables interleave.
void pdv_cls_set_led (PdvDev *pdv_p, int power_state)
 Controls state of LED.
void pdv_cls_set_line_timing (PdvDev *pdv_p, int width, int taps, int Hfvstart, int Hfvend, int Hlvstart, int Hlvend, int Hrvstart, int Hrvend)
void pdv_cls_set_linescan (PdvDev *pdv_p, int state)
void pdv_cls_set_lvcont (PdvDev *pdv_p, int state)
void pdv_cls_set_readvalid (PdvDev *pdv_p, u_short HrvStart, u_short HrvEnd)
 Sets the horizontal start and end positions of the ReadValid signal.
void pdv_cls_set_rven (PdvDev *pdv_p, int enable)
 Enables or disables ReadValid Enable (RVEN).
void pdv_cls_set_size (PdvDev *pdv_p, int taps, int depth, int width, int height, int hblank, int totalwidth, int vblank, int totalheight)
void pdv_cls_set_smallok (PdvDev *pdv_p, int state)
void pdv_cls_set_trigframe (PdvDev *pdv_p, int state)
void pdv_cls_set_trigline (PdvDev *pdv_p, int state)
void pdv_cls_set_trigpol (PdvDev *pdv_p, int state)
void pdv_cls_set_trigsrc (PdvDev *pdv_p, int state)
void pdv_cls_set_uartloop (PdvDev *pdv_p, int state)
void pdv_cls_set_width (PdvDev *pdv_p, int width, int hblank)
void pdv_cls_setup_interleave (PdvDev *pdv_p, short tap0start, short tap0delta, short tap1start, short tap1delta, short tap2start, short tap2delta, short tap3start, short tap3delta)
 Sets the start address and delta for each tap.
void pdv_cls_sim_start (PdvDev *pdv_p)
void pdv_cls_sim_stop (PdvDev *pdv_p)


Function Documentation

void pdv_cls_dump_state ( PdvDev pdv_p  ) 

Prints board state to stdout.

Parameters:
pdv_p pointer to pdv device structure returned by pdv_open

Definition at line 623 of file clsim_lib.c.

void pdv_cls_set_fill ( PdvDev pdv_p,
u_char  left,
u_char  right 
)

Sets the left and right fill values.

Parameters:
pdv_p pointer to pdv device structure returned by pdv_open
left the 8 bit left fill value (FillA in CLSIM docs)
right the 8 bit right fill value (FillB in CLSIM docs)

Definition at line 427 of file clsim_lib.c.

void pdv_cls_set_intlven ( PdvDev pdv_p,
int  enable 
)

Enables or disables interleave.

To use interleave, first set up the interleave scheme using pdv_cls_setup_interleave.

Parameters:
pdv_p pointer to pdv device structure returned by pdv_open
enable true to turn on interleave, false to disable it.
See also:
pdv_cls_setup_interleave

Definition at line 212 of file clsim_lib.c.

void pdv_cls_set_led ( PdvDev pdv_p,
int  power_state 
)

Controls state of LED.

Parameters:
pdv_p pointer to pdv device structure returned by pdv_open
power_state true (non-zero) to turn on LED, false to turn it off.

Definition at line 233 of file clsim_lib.c.

void pdv_cls_set_readvalid ( PdvDev pdv_p,
u_short  HrvStart,
u_short  HrvEnd 
)

Sets the horizontal start and end positions of the ReadValid signal.

Note that these values have no effect unless RVEN is true. See also pdv_cls_set_rven.

Parameters:
pdv_p pointer to pdv device structure returned by pdv_open
HrvStart start postion
HrvEnd end position

Definition at line 435 of file clsim_lib.c.

void pdv_cls_set_rven ( PdvDev pdv_p,
int  enable 
)

Enables or disables ReadValid Enable (RVEN).

When RVEN is set, then the start and end margins of each raster are filled with the values from the FillA and FillB registers respectively, the positions of the margins are determined by HrvStart and HrvEnd. When RVEN is cleared, the entire raster is filled with valid data. HrvStart and HrvEnd can be set with pdv_cls_set_readvalid().

Parameters:
pdv_p pointer to pdv device structure returned by pdv_open
enable true to enable ReadValid so data in margins comes from Fill values.

Definition at line 191 of file clsim_lib.c.

void pdv_cls_setup_interleave ( PdvDev pdv_p,
short  tap0start,
short  tap0delta,
short  tap1start,
short  tap1delta,
short  tap2start,
short  tap2delta,
short  tap3start,
short  tap3delta 
)

Sets the start address and delta for each tap.

The start address is the 12-bit address of an 8-bit pixel within the 4096 pixel raster. The delta is the amount added to the pixel address with each pixel clock.

Parameters:
pdv_p pointer to pdv device structure returned by pdv_open
tap0start the start address for tap 0
tap0delta the delta for tap 0
tap1start the start address for tap 1
tap1delta the delta for tap 1
tap2start the start address for tap 2
tap2delta the delta for tap 2
tap3start the start address for tap 3
tap3delta the delta for tap 3

Definition at line 444 of file clsim_lib.c.


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