dcmi_get_soc_sensor_info Prototype
Syntax
int dcmi_get_soc_sensor_info(int card_id, int device_id, int sensor_id, union tag_sensor_info *sensor_info)
Function
Queries the NDIE ID of a specified chip.
Parameter Description
Parameter |
Input/Output |
Type |
Description |
---|---|---|---|
card_id |
Input |
int |
ID of the Atlas 300T training card (model 9000). Query the supported IDs by referring todcmi_get_card_num_list Prototype. |
device_id |
Input |
int |
Chip ID. The value is 0 (there is only one chip). Query the actually supported range by referring to dcmi_get_device_num_in_card Prototype. |
sensor_id |
Output |
int |
Sensor ID. The IDs are defined as follows: enum dmanager_tsensor_id { CLUSTER_TEMP_ID = 0, PERI_TEMP_ID = 1, AICORE0_TEMP_ID, AICORE1_TEMP_ID, AICORE_LIMIT_ID, AICORE_TOTAL_PER_ID, AICORE_ELIM_PER_ID, AICORE_BASE_FREQ_ID, NPU_DDR_FREQ_ID, THERMAL_THRESHOLD_ID, NTC_TEMP_ID, SOC_TEMP_ID, FP_TEMP_ID, N_DIE_TEMP_ID, HBM_TEMP_ID, INVALID_TSENSOR_ID, }; Currently, only SOC_TEMP_ID, FP_TEMP_ID, N_DIE_TEMP_ID, and HBM_TEMP_ID are supported. |
sensor_info |
Output |
union tag_sensor_info * |
Structure information about the temperature sensor. union tag_sensor_info { unsigned char uchar; unsigned short ushort; unsigned int uint; signed int iint; signed char temp[2]; signed int ntc_tmp[4]; unsigned int data[16]; }; Currently, only signed int iint is supported. |
Return Value
Type |
Description |
---|---|
int |
Results:
|
Exception Handling
N/A
Constraints
N/A
Calling Example
...
int ret = 0;
int card_id = 0x3;
int device_id = 0;
int sensor_id = 0;
union tag_sensor_info sensor_info = {0};
ret = dcmi_get_soc_sensor_info(card_id, device_id, sensor_id, &sensor_info);
if(ret != 0) {
//todo: records logs
return ret;
}
...