EDT PCD SDK Documentation 6.1.0
edt_optstring.h File Reference

(git 708176af, 2023-10-06)

This graph shows which files directly or indirectly include this file:

Functions

int edt_get_board_description (EdtDev edt_p, int force_mezzanine)
 Get board description. More...
 
void edt_print_board_description (EdtDev edt_p)
 Prints all known fields from an EdtDev device. More...
 
const char * edt_mezz_name (int mezz_id)
 Get identifier for board associated with mezz_id. More...
 
int edt_is_test_file_loaded (EdtDev edt_p)
 Check the current bitfile to see if it's a test file. More...
 
int edt_read_option_string (EdtDev edt_p)
 Read a new-type option string from the FPGA and copy it into the EDT device handle's internal bitfile descriptor. More...
 
int edt_parse_option_string (char *s, EdtBitfileDescriptor *bfd)
 Parse option string and populate fields in bitfile descriptor. More...
 
const EdtBitfileDescriptor * edt_bitfile_get_descriptor (EdtDev edt_p)
 Get read-only access to the EdtBitfileDescriptor structure in the device handle. More...
 
const EdtMezzDescriptor * edt_bitfile_get_mezz_descriptor (EdtDev edt_p)
 Get read-only access to the EdtMezzDescriptor structure in the device handle. More...
 
const char * edt_bitfile_option_string (EdtDev edt_p)
 Get the last EdtBitfileDescriptor.optionstr read from device. More...
 
uint16_t edt_bitfile_revision (EdtDev edt_p)
 Get the last bitfile EdtBitfileDescriptor.revision_register value read from device. More...
 

Detailed Description

Function Documentation

◆ edt_get_board_description()

int edt_get_board_description ( EdtDev  edt_p,
int  force_mezzanine 
)

Get board description.

This attempts to learn as much as possible about the board referred to by edt_p. If the bitfile that's loaded has an option string defined, fill it in and parse its fields if possible. If edt_p is not channel 0, channel 0 is opened, examined, and its fields copied to edt_p. The bfd structure within the EdtDev structure is filled in as much as possible.

Parameters
edt_pThe open EDT device handle.
force_mezzanineAttempt to load a bitfile to characterize the mezzanine board if no bitfile is loaded.
Returns
0 on success, -1 on failure
Here is the call graph for this function:

◆ edt_print_board_description()

void edt_print_board_description ( EdtDev  edt_p)

Prints all known fields from an EdtDev device.

Parameters
edt_pThe open EDT device handle.
Here is the call graph for this function:

◆ edt_mezz_name()

const char * edt_mezz_name ( int  mezz_id)

Get identifier for board associated with mezz_id.

Parameters
mezz_idThe mezzanine id returned by edt_get_board_id.
Returns
A static string identifying the board associated with mezz_id.
Here is the caller graph for this function:

◆ edt_is_test_file_loaded()

int edt_is_test_file_loaded ( EdtDev  edt_p)

Check the current bitfile to see if it's a test file.

Parameters
edt_pThe open EDT device handle.
Returns
1 if test file, 0 otherwise
Here is the call graph for this function:

◆ edt_read_option_string()

int edt_read_option_string ( EdtDev  edt_p)

Read a new-type option string from the FPGA and copy it into the EDT device handle's internal bitfile descriptor.

EdtBitfileDescriptor.optionstr and EdtBitfileDescriptor.revision_register members.

Parameters
edt_pThe open EDT device handle.
Returns
0 for success, -1 for failure (string not present)
See also
edt_get_esn(), edt_get_osn(), edt_get_sns(), edt_parse_devinfo()
Here is the call graph for this function:

◆ edt_parse_option_string()

int edt_parse_option_string ( char *  s,
EdtBitfileDescriptor *  bfd 
)

Parse option string and populate fields in bitfile descriptor.

Parameters
sOption string.
bfdBitfile descriptor to populate.
Returns
0 on success, -1 on failure

◆ edt_bitfile_get_descriptor()

const EdtBitfileDescriptor * edt_bitfile_get_descriptor ( EdtDev  edt_p)

Get read-only access to the EdtBitfileDescriptor structure in the device handle.

Precondition
Call edt_get_board_description() first, to read information from the FPGA and parse it into the bitfile descriptor structure.
Parameters
edt_pThe open EDT device handle.
Returns
Bitfile descriptor (bfd) pointer or NULL on failure.

◆ edt_bitfile_get_mezz_descriptor()

const EdtMezzDescriptor * edt_bitfile_get_mezz_descriptor ( EdtDev  edt_p)

Get read-only access to the EdtMezzDescriptor structure in the device handle.

Precondition
Call edt_get_full_board_id() or edt_get_board_id() first, to read information from the FPGA and parse it into the descriptor structure.
Parameters
edt_pThe open EDT device handle.
Returns
Mezzanine bitfile descriptor pointer or NULL on failure.

◆ edt_bitfile_option_string()

const char * edt_bitfile_option_string ( EdtDev  edt_p)

Get the last EdtBitfileDescriptor.optionstr read from device.

Precondition
Call edt_read_option_string() first, to read the option string from the FPGA.
Parameters
edt_pThe open EDT device handle.
Returns
Bitfile option string.
See also
edt_parse_devinfo()

◆ edt_bitfile_revision()

uint16_t edt_bitfile_revision ( EdtDev  edt_p)

Get the last bitfile EdtBitfileDescriptor.revision_register value read from device.

Precondition
Call edt_read_option_string() first, to read the bitfile revision from the FPGA.
Parameters
edt_pThe open EDT device handle.
Returns
Bitfile revision string.
See also
edt_get_esn(), edt_parse_devinfo()