EDT PCD SDK Documentation 6.1.0
edt_threep.h File Reference

(git 48f9bac2, 2023-10-20)

Declares the EDT ThreeP (3P) register definitions. More...

#include "edt_si5326.h"
#include "edt_si570.h"
#include "edt_s19250.h"
#include "edt_ocx.h"
Include dependency graph for edt_threep.h:

Macros

#define THREEP_DATA_PATH   0x0101004A
 

Functions

int edt_threep_configure_clks (EdtDev edt_p, EdtThreePClocks *clocks)
 Configure all three port clocks. More...
 
void edt_threep_amcc_chk_enable (EdtDev edt_p, int mode)
 Unreset and setup for default receive (RX) and transmit (TX) operation. More...
 
void edt_threep_amcc_local_loop (EdtDev edt_p, int set)
 Set local loopback. More...
 
void edt_threep_amcc_remote_loop (EdtDev edt_p, int set)
 Set remote loopback. More...
 
void edt_threep_amcc_set_tx_prbs (EdtDev edt_p, int code)
 Set the transmit PRBS mode. More...
 
int edt_threep_amcc_clk_mode (double freq)
 Get the ThreeP clock mode. More...
 
void edt_threep_amcc_config_tx (EdtDev edt_p, int mode)
 Set AMCC transmit (TX) mode, then reset TX. More...
 
void edt_threep_amcc_config_rx (EdtDev edt_p, int mode)
 Set AMCC receive (RX) mode and clock rate, then reset RX. More...
 
int edt_threep_configure_clock (EdtDev edt_p, double frequency, int port, EdtSI570 *clock_values)
 Configure an individual ports clock. More...
 
unsigned char edt_threep_amcc_reg_read (EdtDev edt_p, u_int address)
 Read from AMCC S19250 10G Serdes. More...
 
double edt_threep_v6_temp (EdtDev edt_p)
 Retrieve the temperature of the ThreeP mezzanine. More...
 

Detailed Description

Declares the EDT ThreeP (3P) register definitions.

Macro Definition Documentation

◆ THREEP_DATA_PATH

#define THREEP_DATA_PATH   0x0101004A

Register names the CH<N>, have been renamed to P<N>, etc. to indicate that these are "ports" and not channels, because the DMA channels don't easily map to the ports on the 3P. The input channels are 0,1,2 for the three ports, but the output channels are 3,1,2 respectively.

Function Documentation

◆ edt_threep_configure_clks()

int edt_threep_configure_clks ( EdtDev  edt_p,
EdtThreePClocks *  clocks 
)

Configure all three port clocks.

Parameters
edt_pThe open EDT device handle.
clocksStructure containing all of the clock values to assign during configuration.
Returns
0 on success.
Here is the call graph for this function:

◆ edt_threep_amcc_chk_enable()

void edt_threep_amcc_chk_enable ( EdtDev  edt_p,
int  mode 
)

Unreset and setup for default receive (RX) and transmit (TX) operation.

Parameters
edt_pThe open EDT device handle.
modeThe AMCC compatible Optical Networking Standard (THREEP_MODE_*) to use.

The AMCC has to be unreset before you can talk to it via the serial port.

Here is the call graph for this function:

◆ edt_threep_amcc_local_loop()

void edt_threep_amcc_local_loop ( EdtDev  edt_p,
int  set 
)

Set local loopback.

Parameters
edt_pThe open EDT device handle.
setEnable (1) or disable (0) local loopback.

◆ edt_threep_amcc_remote_loop()

void edt_threep_amcc_remote_loop ( EdtDev  edt_p,
int  set 
)

Set remote loopback.

Parameters
edt_pThe open EDT device handle.
setEnable (1) or disable (0) remote loopback.

◆ edt_threep_amcc_set_tx_prbs()

void edt_threep_amcc_set_tx_prbs ( EdtDev  edt_p,
int  code 
)

Set the transmit PRBS mode.

Parameters
edt_pThe open EDT device handle.
codeA byte to select the PRBS mode.

◆ edt_threep_amcc_clk_mode()

int edt_threep_amcc_clk_mode ( double  freq)

Get the ThreeP clock mode.

Parameters
freqThe desired clock frequency, in either GHz or Hz.
Returns
The AMCC compatible Optical Networking Standard (THREEP_MODE_*) or -1 on error.

◆ edt_threep_amcc_config_tx()

void edt_threep_amcc_config_tx ( EdtDev  edt_p,
int  mode 
)

Set AMCC transmit (TX) mode, then reset TX.

Parameters
edt_pThe open EDT device handle.
modeThe AMCC compatible Optical Networking Standard (THREEP_MODE_*) to use.

Call this after the transmit clock chips have been set for selected clock

Here is the call graph for this function:

◆ edt_threep_amcc_config_rx()

void edt_threep_amcc_config_rx ( EdtDev  edt_p,
int  mode 
)

Set AMCC receive (RX) mode and clock rate, then reset RX.

Parameters
edt_pThe open EDT device handle.
modeThe AMCC compatible Optical Networking Standard (THREEP_MODE_*) to use.

Call this after the receive clock chips have been set for selected clock.

Here is the call graph for this function:

◆ edt_threep_configure_clock()

int edt_threep_configure_clock ( EdtDev  edt_p,
double  frequency,
int  port,
EdtSI570 *  clock_values 
)

Configure an individual ports clock.

@pram edt_p The open EDT device handle.

Parameters
frequencyThe desired clock frequency for the specified port.
portThe port to use; valid values are 0, 1, 2.
clock_valuesTiming specific values for the specified port.
Returns
0 on success.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ edt_threep_amcc_reg_read()

unsigned char edt_threep_amcc_reg_read ( EdtDev  edt_p,
u_int  address 
)

Read from AMCC S19250 10G Serdes.

Parameters
edt_pThe open EDT device handle.
addressThe register address to read from.
Returns
Data read from the device.

Net10g AMCC S19250 10G Serdes is written and read as a serial device like the clocks and transceivers. It has 256 register address space but the MDIO interface can only address 64 registers at a time. The part implements a page scheme which is always in register 0 of each page. The top three bits of the page register are the top three bits of the 8 bit register address. We will always write the page register for each register access. The AMCC part has many reserved bits that must be preserved on writes. The part will always be written with a "set_bits" routine to preserve unaffected bits.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ edt_threep_v6_temp()

double edt_threep_v6_temp ( EdtDev  edt_p)

Retrieve the temperature of the ThreeP mezzanine.

Parameters
edt_pThe open EDT device handle.
Returns
The temperature, in degrees Celsius.
Note
Process tree terminates with 1 on failure.