Definition in file lib_ocm.c.
#include "edtinc.h"
#include "edt_bitload.h"
#include "edt_ocm.h"
#include "edt_ocx.h"
#include "edt_oc192.h"
Go to the source code of this file.
Functions | |
int | edt_msdv_load_default_mezzanine (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_msdv_lock_clocks (EdtDev *edt_p, int timeout) |
int | edt_net10g_channel_lock_frontend (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_net10g_channel_setup (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_net10g_has_mezz_bitfile (EdtDev *edt_p, const char *bitfile_name) |
int | edt_net10g_load_default_mezzanine (EdtDev *edt_p, EdtOCConfig *cfg) |
char * | edt_net10g_mezz_filename (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_oc192_channel_lock_frontend (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_oc192_channel_setup (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_oc192_check_rate (EdtDev *edt_p, EdtOCConfig *cfg, EdtLineRate rate) |
int | edt_oc192_clear_demux (EdtDev *edt_p) |
int | edt_oc192_demux_chan_enable (EdtDev *edt_p, int channel, int enable) |
int | edt_oc192_demux_get (EdtDev *edt_p, EdtLineRate line_rate, u_char *onoff) |
int | edt_oc192_demux_get_chan_enabled (EdtDev *edt_p, int channel) |
int | edt_oc192_demux_set (EdtDev *edt_p, EdtLineRate line_rate, u_char *onoff) |
int | edt_oc192_enable_laser (EdtDev *edt_p, EdtOCConfig *cfg) |
double | edt_oc192_get_measured_frequency (EdtDev *edt_p, int clock) |
int | edt_oc192_get_overrun (EdtDev *edt_p) |
EdtLineRate | edt_oc192_get_rate (EdtDev *edt_p, EdtOCConfig *in_cfg) |
int | edt_oc192_get_underrun (EdtDev *edt_p) |
int | edt_oc192_has_mezz_bitfile (EdtDev *edt_p, const char *bitfile_name) |
int | edt_oc192_laser_on (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_oc192_load_default_mezzanine (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_oc192_lock_clocks (EdtDev *edt_p, int timeout) |
void | edt_oc192_mdio_dump (EdtDev *edt_p) |
void | edt_oc192_mdio_init (EdtDev *edt_p) |
void | edt_oc192_mdio_loopback (EdtDev *edt_p, int on) |
unsigned char | edt_oc192_mdio_read (EdtDev *edt_p, unsigned char address) |
void | edt_oc192_mdio_set_clock (EdtDev *edt_p) |
void | edt_oc192_mdio_set_prbs23 (EdtDev *edt_p, int on) |
void | edt_oc192_mdio_set_prbs31 (EdtDev *edt_p, int on) |
void | edt_oc192_mdio_set_swap (EdtDev *edt_p, int on) |
void | edt_oc192_mdio_standard (EdtDev *edt_p) |
void | edt_oc192_mdio_write (EdtDev *edt_p, unsigned char address, unsigned char value) |
char * | edt_oc192_mezz_filename (EdtDev *edt_p, EdtOCConfig *cfg) |
char * | edt_oc192_mezz_filename_gs (EdtDev *edt_p, EdtOCConfig *cfg) |
void | edt_oc192_reset_liu (EdtDev *edt_p) |
int | edt_oc192_set_clock_select (EdtDev *edt_p, EdtLineRate line_rate) |
void | edt_oc192_set_framer (EdtDev *edt_p, int flags) |
int | edt_oc192_set_liu (EdtDev *edt_p, int mode) |
void | edt_oc192_set_merged_mezz (EdtDev *edt_p, int state) |
int | edt_oc192_set_tagging (EdtDev *edt_p, int state, int tagid) |
int | edt_oc192_speed_capable (int channel, EdtLineRate line_rate) |
int | edt_oc192_wait_for_frame (EdtDev *edt_p, int timeout) |
int | edt_ocm_channel_lock_frontend (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocm_channel_setup (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocm_check_channel_lock_frontend (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocm_check_rate (EdtDev *edt_p, EdtOCConfig *cfg, EdtLineRate rate) |
int | edt_ocm_demux_chan_enable (EdtDev *edt_p, int channel, int enable) |
int | edt_ocm_demux_get (EdtDev *edt_p, EdtLineRate line_rate, u_char *onoff) |
int | edt_ocm_demux_get_chan_enabled (EdtDev *edt_p, int channel) |
int | edt_ocm_demux_set (EdtDev *edt_p, EdtLineRate line_rate, u_char *onoff) |
int | edt_ocm_has_mezz_bitfile (EdtDev *edt_p, const char *bitfile_name) |
int | edt_ocm_load_default_mezzanine (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocm_lock_clocks (EdtDev *edt_p, int timeout) |
const char * | edt_ocm_mezz_filename (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocm_set_clock_select (EdtDev *edt_p, EdtLineRate line_rate) |
int | edt_ocm_speed_capable (int channel, EdtLineRate line_rate) |
int | edt_ocm_wait_for_frame (EdtDev *edt_p, int timeout) |
int | edt_ocx_adjust_phase (EdtDev *edt_p, int value) |
int | edt_ocx_base_init (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocx_channel_lock_frontend (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocx_channel_set_rate (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocx_channel_setup (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocx_channel_signal_detect (EdtDev *edt_p, int timeout) |
checks SIG_DET bit | |
int | edt_ocx_channel_start (EdtDev *edt_p) |
int | edt_ocx_channel_start_cfg (EdtDev *edt_p, EdtOCConfig *cfg, int n) |
int | edt_ocx_check_interface (EdtDev *edt_p, char *target_file, int force_load) |
int | edt_ocx_check_mezz_bitfile (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocx_clear_demux (EdtOcxDemux *demux) |
int | edt_ocx_configure (EdtDev *edt_p, EdtOCConfig *cfg) |
char * | edt_ocx_default_bitfile (int mezz_id) |
int | edt_ocx_demux_chan_enable (EdtDev *edt_p, int channel, u_char enable) |
int | edt_ocx_demux_get (EdtDev *edt_p, EdtLineRate line_rate, u_char *onoff) |
int | edt_ocx_demux_get_chan_enabled (EdtDev *edt_p, int channel) |
int | edt_ocx_demux_nbits (EdtLineRate line_rate) |
int | edt_ocx_demux_print (EdtOcxDemux *demux) |
int | edt_ocx_demux_reset (EdtDev *edt_p, EdtLineRate line_rate) |
int | edt_ocx_demux_set (EdtDev *edt_p, EdtLineRate line_rate, u_char *onoff) |
void | edt_ocx_enable_framing_errors (EdtDev *edt_p, int state) |
double | edt_ocx_get_data_rate (EdtLineRate rate) |
int | edt_ocx_get_framing_errors (EdtDev *edt_p, EdtOCXFrameErrors *err_p) |
int | edt_ocx_has_mezz_bitfile (EdtDev *edt_p, const char *bitfile_name) |
int | edt_ocx_is_demuxable (EdtLineRate line_rate) |
int | edt_ocx_load_default_mezzanine (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocx_lock_channel_clock (EdtDev *edt_p, int channel, int timeout) |
int | edt_ocx_lock_clocks (EdtDev *edt_p, int timeout) |
int | edt_ocx_lock_local_clock (EdtDev *edt_p, int timeout) |
const char * | edt_ocx_mezz_filename (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocx_parse_demux (EdtOcxDemux *demux, const char *word, char *errorstr) |
int | edt_ocx_post_start (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocx_prepare_for_dma (EdtDev *edt_p, EdtOCConfig *cfg) |
int | edt_ocx_print_auto_phase (EdtDev *edt_p) |
char * | edt_ocx_print_byte_array (u_char *pvec, EdtLineRate rate, char *buf) |
const char * | edt_ocx_rate_name (EdtLineRate line_rate) |
int | edt_ocx_read_frequency (EdtDev *edt_p, EdtOCConfig *cfg) |
void | edt_ocx_reset_sys_en (EdtDev *edt_p, int channel) |
int | edt_ocx_rx_clk_phase (EdtDev *edt_p, int change) |
void | edt_ocx_set_channel_direction (EdtDev *edt_p, int channel, int do_write) |
void | edt_ocx_set_channel_enable (EdtDev *edt_p, int channel, int state) |
int | edt_ocx_set_clock_select (EdtDev *edt_p, EdtLineRate line_rate) |
void | edt_ocx_set_lsbfirst (EdtDev *edt_p, int channel, int state) |
int | edt_ocx_speed_capable (EdtDev *edt_p, EdtLineRate line_rate) |
int | edt_ocx_wait_for_frame (EdtDev *edt_p, int timeout) |
int edt_msdv_load_default_mezzanine | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
int edt_msdv_lock_clocks | ( | EdtDev * | edt_p, | |
int | timeout | |||
) |
int edt_net10g_channel_lock_frontend | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
edt_p | pointer to device structure | |
cfg | Configuration parameters |
Called by edt_ocx_channel_setup
int edt_net10g_channel_setup | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
edt_p | pointer to device structure | |
cfg | Configuration parameters |
Called by edt_ocx_channel_setup
int edt_net10g_has_mezz_bitfile | ( | EdtDev * | edt_p, | |
const char * | bitfile_name | |||
) |
int edt_net10g_load_default_mezzanine | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
char* edt_net10g_mezz_filename | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
int edt_oc192_channel_lock_frontend | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
edt_p | pointer to device structure | |
cfg | Configuration parameters |
Called by edt_ocx_channel_setup
int edt_oc192_channel_setup | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
edt_p | pointer to device structure | |
cfg | Configuration parameters |
Called by edt_ocx_channel_setup
int edt_oc192_clear_demux | ( | EdtDev * | edt_p | ) |
int edt_oc192_demux_chan_enable | ( | EdtDev * | edt_p, | |
int | channel, | |||
int | enable | |||
) |
edt_p | pointer to device structure | |
channel | which channel to enable/disable | |
enable | A value of 0 or 1 to indicate whether to enable this column in the input. 0 means off, 1 means enabled (this is the inverse of the actual bit state). |
int edt_oc192_demux_get | ( | EdtDev * | edt_p, | |
EdtLineRate | line_rate, | |||
u_char * | onoff | |||
) |
edt_p | pointer to device structure | |
line_rate | Line Rate constant - must be OC192_RATE or STM64_RATE | |
onoff | An array of 0 or 1 to indicate whether column is active. (In the register the bits are actually the inverse of this.) The length of the array should be 192 for OC192 |
int edt_oc192_demux_get_chan_enabled | ( | EdtDev * | edt_p, | |
int | channel | |||
) |
int edt_oc192_demux_set | ( | EdtDev * | edt_p, | |
EdtLineRate | line_rate, | |||
u_char * | onoff | |||
) |
edt_p | pointer to device structure | |
line_rate | Line Rate constant | |
onoff | An array of 0 or 1 to indicate whether column is active. (In the register the bits are actually the inverse of this.) The length of the array shouldhe length of the array should be 192 for OC192. |
int edt_oc192_has_mezz_bitfile | ( | EdtDev * | edt_p, | |
const char * | bitfile_name | |||
) |
int edt_oc192_load_default_mezzanine | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
edt_p | pointer to device structure | |
line_rate | rate constant for the channel. If 0 use default OC192_RATE | |
mezz_0 | Optional alternate mezzanine bitfile name. Defaults to OC192 | |
mezz_1 | Ignored |
int edt_oc192_lock_clocks | ( | EdtDev * | edt_p, | |
int | timeout | |||
) |
void edt_oc192_mdio_dump | ( | EdtDev * | edt_p | ) |
void edt_oc192_mdio_init | ( | EdtDev * | edt_p | ) |
void edt_oc192_mdio_loopback | ( | EdtDev * | edt_p, | |
int | on | |||
) |
unsigned char edt_oc192_mdio_read | ( | EdtDev * | edt_p, | |
unsigned char | address | |||
) |
void edt_oc192_mdio_set_clock | ( | EdtDev * | edt_p | ) |
void edt_oc192_mdio_set_prbs23 | ( | EdtDev * | edt_p, | |
int | on | |||
) |
void edt_oc192_mdio_set_prbs31 | ( | EdtDev * | edt_p, | |
int | on | |||
) |
void edt_oc192_mdio_set_swap | ( | EdtDev * | edt_p, | |
int | on | |||
) |
void edt_oc192_mdio_standard | ( | EdtDev * | edt_p | ) |
void edt_oc192_mdio_write | ( | EdtDev * | edt_p, | |
unsigned char | address, | |||
unsigned char | value | |||
) |
char* edt_oc192_mezz_filename_gs | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
void edt_oc192_reset_liu | ( | EdtDev * | edt_p | ) |
int edt_oc192_set_clock_select | ( | EdtDev * | edt_p, | |
EdtLineRate | line_rate | |||
) |
void edt_oc192_set_framer | ( | EdtDev * | edt_p, | |
int | flags | |||
) |
int edt_oc192_set_liu | ( | EdtDev * | edt_p, | |
int | mode | |||
) |
int edt_oc192_set_tagging | ( | EdtDev * | edt_p, | |
int | state, | |||
int | tagid | |||
) |
edt_p | pointer to device structure | |
state | turn on or off | |
tagid | # between 0 and 3 to set which piece of STM64 stream to capture |
int edt_oc192_speed_capable | ( | int | channel, | |
EdtLineRate | line_rate | |||
) |
int edt_oc192_wait_for_frame | ( | EdtDev * | edt_p, | |
int | timeout | |||
) |
int edt_ocm_channel_lock_frontend | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
int edt_ocm_channel_setup | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
edt_p | pointer to device structure | |
cfg | Configuration parameters |
Called by edt_ocx_channel_setup
int edt_ocm_check_channel_lock_frontend | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
int edt_ocm_demux_chan_enable | ( | EdtDev * | edt_p, | |
int | channel, | |||
int | enable | |||
) |
edt_p | pointer to device structure | |
channel | which channel to enable/disable | |
enable | A value of 0 or 1 to indicate whether to enable this column in the input. 0 means off, 1 means enabled (this is the inverse of the actual bit state). |
int edt_ocm_demux_get | ( | EdtDev * | edt_p, | |
EdtLineRate | line_rate, | |||
u_char * | onoff | |||
) |
edt_p | pointer to device structure | |
line_rate | Line Rate constant - Currently must OC48_RATE or STM16_RATE | |
onoff | An array of 0 or 1 to indicate whether column is active. (In the register the bits are actually the inverse of this.) The length of the array should be the equivalent OC number - 3 for OC3, 12 for OC12, etc. |
int edt_ocm_demux_get_chan_enabled | ( | EdtDev * | edt_p, | |
int | channel | |||
) |
int edt_ocm_demux_set | ( | EdtDev * | edt_p, | |
EdtLineRate | line_rate, | |||
u_char * | onoff | |||
) |
edt_p | pointer to device structure | |
line_rate | Line Rate constant | |
onoff | An array of 0 or 1 to indicate whether column is active. (In the register the bits are actually the inverse of this.) The length of the array should correspond to the OC line rate - 12 for OC12, 48 for OC48, etc. (STM rates should be multiplied by 3). |
int edt_ocm_has_mezz_bitfile | ( | EdtDev * | edt_p, | |
const char * | bitfile_name | |||
) |
int edt_ocm_load_default_mezzanine | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
edt_p | pointer to device structure | |
line_rate | rate constant for the channel. If 0 use default | |
mezz_0 | Optional alternate mezzanine bitfile names | |
mezz_1 | Defaults to ocm48 and ocm12 |
int edt_ocm_lock_clocks | ( | EdtDev * | edt_p, | |
int | timeout | |||
) |
const char* edt_ocm_mezz_filename | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
int edt_ocm_set_clock_select | ( | EdtDev * | edt_p, | |
EdtLineRate | line_rate | |||
) |
int edt_ocm_speed_capable | ( | int | channel, | |
EdtLineRate | line_rate | |||
) |
int edt_ocm_wait_for_frame | ( | EdtDev * | edt_p, | |
int | timeout | |||
) |
int edt_ocx_base_init | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
edt_p | pointer to device structure | |
cfg | uses flags and intfc Flags referred to : EDT_OCX_SKIP_LOAD won't load bitfile even if incorrect EDT_OCX_SWAP turns on BYTE_SWAP/SHORT_SWAP |
int edt_ocx_channel_lock_frontend | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
int edt_ocx_channel_set_rate | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
int edt_ocx_channel_setup | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
int edt_ocx_channel_signal_detect | ( | EdtDev * | edt_p, | |
int | timeout | |||
) |
checks SIG_DET bit
edt_p | pointer to device structure |
Note - as of 2/28/07, this bit isn't available on OC192 channel 0 yet, so it always returns 1;
int edt_ocx_channel_start | ( | EdtDev * | edt_p | ) |
int edt_ocx_check_interface | ( | EdtDev * | edt_p, | |
char * | target_file, | |||
int | force_load | |||
) |
edt_p | pointer to device structure | |
target_file | file name of bitfile desired | |
force_load | Allow loading the correct bitfile in place of current one. |
int edt_ocx_check_mezz_bitfile | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
int edt_ocx_configure | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
edt_p | pointer to device structure | |
cfg | EdtOCConfig configuration parameters |
On completion and a return value of 0, the board is ready to start DMA on this channel.
char* edt_ocx_default_bitfile | ( | int | mezz_id | ) |
int edt_ocx_demux_chan_enable | ( | EdtDev * | edt_p, | |
int | channel, | |||
u_char | enable | |||
) |
edt_p | pointer to device structure | |
channel | which channel to enable/disable | |
enable | A value of 0 or 1 to indicate whether to enable this column in the input. 0 means off, 1 means enabled (this is the inverse of the actual bit state). |
int edt_ocx_demux_get | ( | EdtDev * | edt_p, | |
EdtLineRate | line_rate, | |||
u_char * | onoff | |||
) |
edt_p | pointer to device structure | |
line_rate | Line Rate constant - This parameter determines the length of the onoff array. (Currently must OC48_RATE or STM16_RATE for the OCM board.) | |
onoff | An array of 0 or 1 to indicate whether column is active. (In the register the bits are actually the inverse of this.) The length of the array should be the equivalent OC number - 3 for OC3, 12 for OC12, etc. |
int edt_ocx_demux_get_chan_enabled | ( | EdtDev * | edt_p, | |
int | channel | |||
) |
int edt_ocx_demux_set | ( | EdtDev * | edt_p, | |
EdtLineRate | line_rate, | |||
u_char * | onoff | |||
) |
edt_p | pointer to device structure | |
line_rate | Line Rate constant -this is used to determine the length of the array. | |
onoff | An array of bytes set to 0 or 1 to indicate whether column is active. (In the register the bits are actually the inverse of this.) The length of the array should correspond to the OC line rate - 12 for OC12, 48 for OC48, etc. (STM rates should be multiplied by 3). |
void edt_ocx_enable_framing_errors | ( | EdtDev * | edt_p, | |
int | state | |||
) |
int edt_ocx_get_framing_errors | ( | EdtDev * | edt_p, | |
EdtOCXFrameErrors * | err_p | |||
) |
int edt_ocx_has_mezz_bitfile | ( | EdtDev * | edt_p, | |
const char * | bitfile_name | |||
) |
int edt_ocx_load_default_mezzanine | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
edt_p | pointer to device structure | |
line_rate | rate constant for the channel. If 0 use default | |
mezz_0 | Optional alternate mezzanine bitfile name | |
mezz_1 | Optional alternate mezzanine bitfile name |
int edt_ocx_lock_channel_clock | ( | EdtDev * | edt_p, | |
int | channel, | |||
int | timeout | |||
) |
int edt_ocx_lock_clocks | ( | EdtDev * | edt_p, | |
int | timeout | |||
) |
int edt_ocx_lock_local_clock | ( | EdtDev * | edt_p, | |
int | timeout | |||
) |
const char* edt_ocx_mezz_filename | ( | EdtDev * | edt_p, | |
EdtOCConfig * | cfg | |||
) |
void edt_ocx_reset_sys_en | ( | EdtDev * | edt_p, | |
int | channel | |||
) |
void edt_ocx_set_channel_enable | ( | EdtDev * | edt_p, | |
int | channel, | |||
int | state | |||
) |
int edt_ocx_set_clock_select | ( | EdtDev * | edt_p, | |
EdtLineRate | line_rate | |||
) |
void edt_ocx_set_lsbfirst | ( | EdtDev * | edt_p, | |
int | channel, | |||
int | state | |||
) |
int edt_ocx_speed_capable | ( | EdtDev * | edt_p, | |
EdtLineRate | line_rate | |||
) |
int edt_ocx_wait_for_frame | ( | EdtDev * | edt_p, | |
int | timeout | |||
) |