dsmi_get_board_info
Prototype
int dsmi_get_board_info(int device_id, struct dsmi_board_info_stru *pboard_info)
Description
Obtains board information, including board_id, pcb_id, bom_id, and slot_id.
For Ascend 310 AI Processors, mini modules (EP) and standard PCIe cards (board_id and slot_id only) are supported.
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
device_id |
Input |
Device ID For the Ascend 310 AI Processor, the value range is 0–63. Obtain the actual device ID by calling dsmi_list_device. |
pboard_info |
Output |
struct dsmi_board_info_stru {
unsigned int board_id;//board_id of the PCIe card
unsigned int pcb_id;
unsigned int bom_id;
unsigned int slot_id;//slot_id for scenarios where the board has more than one the Ascend AI Processor
};
|
Returns
Type |
Description |
---|---|
int |
0 on success; else, failure |
Restrictions
None
Example
int ret = 0; struct dsmi_board_info_stru board_info = {0}; ret = dsmi_get_board_info(0,&board_info); if(ret != 0) { //To-do: records logs. return ret; } ...