mbltml Python API#
|
mbltml Test Preview
mbltml — EN
|
Python API provides Mobilint NPU monitoring and telemetry. More...
Classes | |
| class | mbltml.mbltml.MBLTMLDriverNotFoundError |
| Raised when the required driver cannot be located. More... | |
| class | mbltml.mbltml.MBLTMLInvalidArgumentError |
| Raised when one or more arguments are invalid. More... | |
| class | mbltml.mbltml.MBLTMLUninitializedError |
| Raised when an API is called before initialization. More... | |
| class | mbltml.mbltml.MBLTMLNotSupportedError |
| Raised when the feature is not supported on the target device. More... | |
| class | mbltml.mbltml.MBLTMLInsufficientLengthError |
| Raised when the output buffer is too small to hold the result. More... | |
Functions | |
| None | mbltml.mbltml._loadLibrary () |
| None | mbltml.mbltml._mbltmlThrowError (mbltmlStatusCode_t ret) |
| None | mbltml.mbltml.mbltmlInit () |
| Initialize the mbltml library for all supported device types. | |
| None | mbltml.mbltml.mbltmlInitDevices (Set[mbltmlDeviceType_t] device_types) |
| Initialize the mbltml library for a selected set of device types. | |
| None | mbltml.mbltml.mbltmlShutdown () |
| Release all resources held by the mbltml library. | |
| int | mbltml.mbltml.mbltmlGetDeviceCount () |
| Get the total number of devices detected by the library. | |
| str | mbltml.mbltml.mbltmlGetDriverVersion (mbltmlDeviceType_t device_type) |
| Get the driver version string for a specific device family. | |
| int | mbltml.mbltml.mbltmlGetDriverRevision (mbltmlDeviceType_t device_type) |
| Get the driver revision number for a specific device family. | |
| str | mbltml.mbltml.mbltmlGetNodeName (int dev_no) |
| Get the node name of a device. | |
| mbltmlDeviceType_t | mbltml.mbltml.mbltmlGetDeviceType (int dev_no) |
| Get the device family type of a device. | |
| mbltmlHardwareVersion_t | mbltml.mbltml.mbltmlGetHardwareVersion (int dev_no) |
| Get the hardware version of a device. | |
| str | mbltml.mbltml.mbltmlGetFirmwareVersion (int dev_no) |
| Get the firmware version string of a device. | |
| int | mbltml.mbltml.mbltmlGetFirmwareRevision (int dev_no) |
| Get the firmware revision number of a device. | |
| int | mbltml.mbltml.mbltmlGetFirmwareCRC (int dev_no) |
| Get the CRC of the currently-loaded firmware image. | |
| int | mbltml.mbltml.mbltmlGetTemperature (int dev_no) |
| Get the current die temperature of a device. | |
| int | mbltml.mbltml.mbltmlGetSignalType (int dev_no) |
| Get the current signal-type indicator reported by the device. | |
| int | mbltml.mbltml.mbltmlGetNPUClock (int dev_no) |
| Get the current NPU clock frequency of a device. | |
| int | mbltml.mbltml.mbltmlGetBusClock (int dev_no) |
| Get the current bus clock frequency of a device. | |
| int | mbltml.mbltml.mbltmlGetFanDuty (int dev_no) |
| Get the current cooling-fan duty cycle of a device. | |
| int | mbltml.mbltml.mbltmlGetVendorId (int dev_no) |
| Get the PCIe vendor ID of a device. | |
| int | mbltml.mbltml.mbltmlGetDeviceId (int dev_no) |
| Get the PCIe device ID of a device. | |
| int | mbltml.mbltml.mbltmlGetSubVendorId (int dev_no) |
| Get the PCIe subsystem vendor ID of a device. | |
| int | mbltml.mbltml.mbltmlGetSubDeviceId (int dev_no) |
| Get the PCIe subsystem device ID of a device. | |
| int | mbltml.mbltml.mbltmlGetPcieGen (int dev_no) |
| Get the negotiated PCIe link generation of a device. | |
| int | mbltml.mbltml.mbltmlGetPcieLanes (int dev_no) |
| Get the negotiated PCIe link width (in lanes) of a device. | |
| int | mbltml.mbltml.mbltmlGetPcieRev (int dev_no) |
| Get the PCIe configuration-space revision ID of a device. | |
| int | mbltml.mbltml.mbltmlGetPcieClassCode (int dev_no) |
| Get the PCIe configuration-space class code of a device. | |
| float | mbltml.mbltml.mbltmlGetTotalPower (int dev_no) |
| Get the total instantaneous power consumption of a device (W). | |
| float | mbltml.mbltml.mbltmlGetTotalCurrent (int dev_no) |
| Get the total instantaneous current draw of a device (A). | |
| float | mbltml.mbltml.mbltmlGetTotalVoltage (int dev_no) |
| Get the total instantaneous supply voltage of a device (V). | |
| float | mbltml.mbltml.mbltmlGetExtraPmicPower (int dev_no) |
| Get the power consumption of the extra PMIC rail currently selected for the device (W). | |
| float | mbltml.mbltml.mbltmlGetExtraPmicCurrent (int dev_no) |
| Get the current of the extra PMIC rail currently selected for the device (A). | |
| float | mbltml.mbltml.mbltmlGetExtraPmicVoltage (int dev_no) |
| Get the voltage of the extra PMIC rail currently selected for the device (V). | |
| mbltmlExtraPmicId_t | mbltml.mbltml.mbltmlGetExtraPmicId (int dev_no) |
| Get the extra PMIC rail currently selected for the device. | |
| float | mbltml.mbltml.mbltmlGetTotalUtilization (int dev_no) |
| Get the overall NPU utilization of a device. | |
| int | mbltml.mbltml.mbltmlGetMemoryUsage (int dev_no) |
| Get the amount of device memory currently in use. | |
| int | mbltml.mbltml.mbltmlGetMemoryTotal (int dev_no) |
| Get the total amount of device memory available. | |
| List[mbltmlProcessInfo_t] | mbltml.mbltml.mbltmlGetProcessInfos (int dev_no) |
| Get per-process usage information for a device. | |
| List[mbltmlCoreInfo_t] | mbltml.mbltml.mbltmlGetCoreInfos (int dev_no) |
| Get per-core usage information for a device. | |
| None | mbltml.mbltml.mbltmlSetExtraPmicID (int dev_no, mbltmlExtraPmicId_t pmic_id) |
| Select which extra PMIC rail subsequent mbltmlGetExtraPmic*() queries refer to. | |
Variables | |
| int | mbltml.mbltml.MBLTML_DRIVER_VERSION_BUFFER_SIZE = 80 |
| Buffer size (bytes) guaranteed sufficient for mbltmlGetDriverVersion(). | |
| int | mbltml.mbltml.MBLTML_FIRMWARE_VERSION_BUFFER_SIZE = 80 |
| Buffer size (bytes) guaranteed sufficient for mbltmlGetFirmwareVersion(). | |
| int | mbltml.mbltml.MBLTML_NODE_NAME_BUFFER_SIZE = 80 |
| Buffer size (bytes) guaranteed sufficient for mbltmlGetNodeName(). | |
| mbltml.mbltml.mbltmlDeviceType_t = c_uint | |
| Identifier of a Mobilint NPU device family. | |
| int | mbltml.mbltml.MBLTML_DEVICE_ERROR = 0x0 |
| Invalid or uninitialized value. | |
| int | mbltml.mbltml.MBLTML_DEVICE_ARIES = 0x1 |
| Aries / Aries2 family. | |
| int | mbltml.mbltml.MBLTML_DEVICE_REGULUS = 0x2 |
| Regulus / Regulus2 (PCIe) family. | |
| int | mbltml.mbltml.MBLTML_DEVICE_REGULUS_USB = 0x4 |
| Regulus / Regulus2 USB-attached family. | |
| mbltml.mbltml.mbltmlHardwareVersion_t = c_uint | |
| Specific hardware revision of a Mobilint NPU. | |
| int | mbltml.mbltml.MBLTML_HARDWARE_VERSION_ARIES = 0x00000001 |
| Aries chip. | |
| int | mbltml.mbltml.MBLTML_HARDWARE_VERSION_REGULUS = 0x00000002 |
| Regulus chip. | |
| int | mbltml.mbltml.MBLTML_HARDWARE_VERSION_ARIES2 = 0x00000003 |
| Aries2 chip. | |
| int | mbltml.mbltml.MBLTML_HARDWARE_VERSION_REGULUS2 = 0x00000004 |
| Regulus2 chip. | |
| int | mbltml.mbltml.MBLTML_HARDWARE_VERSION_ERROR = 0x7FFFFFFF |
| Invalid or uninitialized value. | |
| mbltml.mbltml.mbltmlStatusCode_t = c_uint | |
| Status code returned by mbltml C APIs. | |
| int | mbltml.mbltml.MBLTML_SUCCESS = 0 |
| Operation completed successfully. | |
| int | mbltml.mbltml.MBLTML_DRIVER_NOT_FOUND = 2 |
| Required driver could not be located. | |
| int | mbltml.mbltml.MBLTML_INVALID_ARGUMENT = 3 |
| Invalid argument (NULL or out-of-range index). | |
| int | mbltml.mbltml.MBLTML_UNINITIALIZED = 1 |
| API used before initialization. | |
| int | mbltml.mbltml.MBLTML_NOT_SUPPORTED = 4 |
| Feature not supported on the target device. | |
| int | mbltml.mbltml.MBLTML_INSUFFICIENT_LENGTH = 5 |
| Output buffer is too small. | |
| mbltml.mbltml.mbltmlExtraPmicId_t = c_uint | |
| Identifier of an extra PMIC rail. | |
| int | mbltml.mbltml.MBLTML_EXTRA_PMIC_ID_NPU = 0 |
| NPU rail. | |
| int | mbltml.mbltml.MBLTML_EXTRA_PMIC_ID_DDR = 1 |
| DDR rail. | |
| int | mbltml.mbltml.MBLTML_EXTRA_PMIC_ID_PMIC = 2 |
| PMIC rail. | |
| int | mbltml.mbltml.MBLTML_EXTRA_PMIC_ID_GOLDFINGER = 3 |
| Goldfinger rail. | |
| mbltml.mbltml.mbltmlCluster_t = c_uint | |
| NPU cluster identifier within a device. | |
| int | mbltml.mbltml.MBLTML_CLUSTER_0 = 0x00010000 |
| Cluster 0. | |
| int | mbltml.mbltml.MBLTML_CLUSTER_1 = 0x00020000 |
| Cluster 1. | |
| int | mbltml.mbltml.MBLTML_CLUSTER_ERROR = 0x7FFF0000 |
| Represents an invalid or uninitialized state. | |
| mbltml.mbltml.mbltmlCore_t = c_uint | |
| NPU core identifier within a cluster. | |
| int | mbltml.mbltml.MBLTML_CORE_0 = 1 |
| Local core 0. | |
| int | mbltml.mbltml.MBLTML_CORE_1 = 2 |
| Local core 1. | |
| int | mbltml.mbltml.MBLTML_CORE_2 = 3 |
| Local core 2. | |
| int | mbltml.mbltml.MBLTML_CORE_3 = 4 |
| Local core 3. | |
| int | mbltml.mbltml.MBLTML_CORE_GLOBAL = 0x0000FFFE |
| Global (all cores aggregated). | |
| int | mbltml.mbltml.MBLTML_CORE_ERROR = 0x0000FFFF |
| Represents an invalid or uninitialized state. | |
| mbltml.mbltml._clib = None | |
Detailed Description
Python API provides Mobilint NPU monitoring and telemetry.
Function Documentation
◆ _loadLibrary()
◆ _mbltmlThrowError()
|
protected |
◆ mbltmlInit()
| None mbltml.mbltml.mbltmlInit | ( | ) |
Initialize the mbltml library for all supported device types.
Equivalent to calling mbltmlInitDevices() with every mbltmlDeviceType_t enabled. Must be called (directly or via mbltmlInitDevices()) before any other mbltml API.
- Exceptions
-
MBLTMLError on failure.
◆ mbltmlInitDevices()
| None mbltml.mbltml.mbltmlInitDevices | ( | Set[mbltmlDeviceType_t] | device_types | ) |
Initialize the mbltml library for a selected set of device types.
- Parameters
-
device_types Set of mbltmlDeviceType_t values indicating which device families to enumerate and monitor.
- Exceptions
-
MBLTMLError on failure.
◆ mbltmlShutdown()
| None mbltml.mbltml.mbltmlShutdown | ( | ) |
Release all resources held by the mbltml library.
After this call, any further API usage requires re-initialization via mbltmlInit() or mbltmlInitDevices().
- Exceptions
-
MBLTMLError on failure.
◆ mbltmlGetDeviceCount()
| int mbltml.mbltml.mbltmlGetDeviceCount | ( | ) |
◆ mbltmlGetDriverVersion()
| str mbltml.mbltml.mbltmlGetDriverVersion | ( | mbltmlDeviceType_t | device_type | ) |
◆ mbltmlGetDriverRevision()
| int mbltml.mbltml.mbltmlGetDriverRevision | ( | mbltmlDeviceType_t | device_type | ) |
◆ mbltmlGetNodeName()
| str mbltml.mbltml.mbltmlGetNodeName | ( | int | dev_no | ) |
Get the node name of a device.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The node name string.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetDeviceType()
| mbltmlDeviceType_t mbltml.mbltml.mbltmlGetDeviceType | ( | int | dev_no | ) |
Get the device family type of a device.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The mbltmlDeviceType_t of the device.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetHardwareVersion()
| mbltmlHardwareVersion_t mbltml.mbltml.mbltmlGetHardwareVersion | ( | int | dev_no | ) |
Get the hardware version of a device.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The mbltmlHardwareVersion_t of the device.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetFirmwareVersion()
| str mbltml.mbltml.mbltmlGetFirmwareVersion | ( | int | dev_no | ) |
Get the firmware version string of a device.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The firmware version string.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetFirmwareRevision()
| int mbltml.mbltml.mbltmlGetFirmwareRevision | ( | int | dev_no | ) |
Get the firmware revision number of a device.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The firmware revision.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetFirmwareCRC()
| int mbltml.mbltml.mbltmlGetFirmwareCRC | ( | int | dev_no | ) |
Get the CRC of the currently-loaded firmware image.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The firmware CRC.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetTemperature()
| int mbltml.mbltml.mbltmlGetTemperature | ( | int | dev_no | ) |
Get the current die temperature of a device.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The temperature reading.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetSignalType()
| int mbltml.mbltml.mbltmlGetSignalType | ( | int | dev_no | ) |
Get the current signal-type indicator reported by the device.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The signal-type value.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetNPUClock()
| int mbltml.mbltml.mbltmlGetNPUClock | ( | int | dev_no | ) |
Get the current NPU clock frequency of a device.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The NPU clock value.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetBusClock()
| int mbltml.mbltml.mbltmlGetBusClock | ( | int | dev_no | ) |
Get the current bus clock frequency of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The bus clock value.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetFanDuty()
| int mbltml.mbltml.mbltmlGetFanDuty | ( | int | dev_no | ) |
Get the current cooling-fan duty cycle of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The fan duty value.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetVendorId()
| int mbltml.mbltml.mbltmlGetVendorId | ( | int | dev_no | ) |
Get the PCIe vendor ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The vendor ID.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetDeviceId()
| int mbltml.mbltml.mbltmlGetDeviceId | ( | int | dev_no | ) |
Get the PCIe device ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The device ID.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetSubVendorId()
| int mbltml.mbltml.mbltmlGetSubVendorId | ( | int | dev_no | ) |
Get the PCIe subsystem vendor ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The subsystem vendor ID.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetSubDeviceId()
| int mbltml.mbltml.mbltmlGetSubDeviceId | ( | int | dev_no | ) |
Get the PCIe subsystem device ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The subsystem device ID.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetPcieGen()
| int mbltml.mbltml.mbltmlGetPcieGen | ( | int | dev_no | ) |
Get the negotiated PCIe link generation of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The PCIe generation.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetPcieLanes()
| int mbltml.mbltml.mbltmlGetPcieLanes | ( | int | dev_no | ) |
Get the negotiated PCIe link width (in lanes) of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The lane count.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetPcieRev()
| int mbltml.mbltml.mbltmlGetPcieRev | ( | int | dev_no | ) |
Get the PCIe configuration-space revision ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The revision value.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetPcieClassCode()
| int mbltml.mbltml.mbltmlGetPcieClassCode | ( | int | dev_no | ) |
Get the PCIe configuration-space class code of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The class code.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetTotalPower()
| float mbltml.mbltml.mbltmlGetTotalPower | ( | int | dev_no | ) |
Get the total instantaneous power consumption of a device (W).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The power reading.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetTotalCurrent()
| float mbltml.mbltml.mbltmlGetTotalCurrent | ( | int | dev_no | ) |
Get the total instantaneous current draw of a device (A).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The current reading.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetTotalVoltage()
| float mbltml.mbltml.mbltmlGetTotalVoltage | ( | int | dev_no | ) |
Get the total instantaneous supply voltage of a device (V).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The voltage reading.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetExtraPmicPower()
| float mbltml.mbltml.mbltmlGetExtraPmicPower | ( | int | dev_no | ) |
Get the power consumption of the extra PMIC rail currently selected for the device (W).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
The selected rail is controlled by mbltmlSetExtraPmicID() and can be queried via mbltmlGetExtraPmicId().
The firmware refreshes this reading once per second. After changing the selected rail with mbltmlSetExtraPmicID(), allow up to 1 second for the new rail's value to be reported.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The power reading.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetExtraPmicCurrent()
| float mbltml.mbltml.mbltmlGetExtraPmicCurrent | ( | int | dev_no | ) |
Get the current of the extra PMIC rail currently selected for the device (A).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
The firmware refreshes this reading once per second. After changing the selected rail with mbltmlSetExtraPmicID(), allow up to 1 second for the new rail's value to be reported.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The current reading.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetExtraPmicVoltage()
| float mbltml.mbltml.mbltmlGetExtraPmicVoltage | ( | int | dev_no | ) |
Get the voltage of the extra PMIC rail currently selected for the device (V).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
The firmware refreshes this reading once per second. After changing the selected rail with mbltmlSetExtraPmicID(), allow up to 1 second for the new rail's value to be reported.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The voltage reading.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetExtraPmicId()
| mbltmlExtraPmicId_t mbltml.mbltml.mbltmlGetExtraPmicId | ( | int | dev_no | ) |
Get the extra PMIC rail currently selected for the device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The selected mbltmlExtraPmicId_t value.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetTotalUtilization()
| float mbltml.mbltml.mbltmlGetTotalUtilization | ( | int | dev_no | ) |
Get the overall NPU utilization of a device.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The utilization value (typically a ratio in [0.0, 1.0] or a percentage).
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetMemoryUsage()
| int mbltml.mbltml.mbltmlGetMemoryUsage | ( | int | dev_no | ) |
Get the amount of device memory currently in use.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The in-use memory in bytes.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetMemoryTotal()
| int mbltml.mbltml.mbltmlGetMemoryTotal | ( | int | dev_no | ) |
Get the total amount of device memory available.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- The total memory in bytes.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetProcessInfos()
| List[mbltmlProcessInfo_t] mbltml.mbltml.mbltmlGetProcessInfos | ( | int | dev_no | ) |
Get per-process usage information for a device.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- List of mbltmlProcessInfo_t records; empty if no process is running.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlGetCoreInfos()
| List[mbltmlCoreInfo_t] mbltml.mbltml.mbltmlGetCoreInfos | ( | int | dev_no | ) |
Get per-core usage information for a device.
- Note
- Supported on all device types.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount().
- Returns
- List of mbltmlCoreInfo_t records.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
◆ mbltmlSetExtraPmicID()
| None mbltml.mbltml.mbltmlSetExtraPmicID | ( | int | dev_no, |
| mbltmlExtraPmicId_t | pmic_id ) |
Select which extra PMIC rail subsequent mbltmlGetExtraPmic*() queries refer to.
- Note
- Supported on Aries2 hardware (MBLTML_HARDWARE_VERSION_ARIES2) only.
The underlying readings are refreshed by firmware once per second; allow up to 1 second after this call before mbltmlGetExtraPmicPower(), mbltmlGetExtraPmicCurrent() and mbltmlGetExtraPmicVoltage() reflect the newly selected rail.
- Parameters
-
dev_no Device index. Total device count is obtained via mbltmlGetDeviceCount(). pmic_id Identifier of the extra PMIC rail to select.
- Exceptions
-
MBLTMLInvalidArgumentError if dev_nois out of range of the device count.MBLTMLError on other failures.
Variable Documentation
◆ MBLTML_DRIVER_VERSION_BUFFER_SIZE
| int mbltml.mbltml.MBLTML_DRIVER_VERSION_BUFFER_SIZE = 80 |
Buffer size (bytes) guaranteed sufficient for mbltmlGetDriverVersion().
◆ MBLTML_FIRMWARE_VERSION_BUFFER_SIZE
| int mbltml.mbltml.MBLTML_FIRMWARE_VERSION_BUFFER_SIZE = 80 |
Buffer size (bytes) guaranteed sufficient for mbltmlGetFirmwareVersion().
◆ MBLTML_NODE_NAME_BUFFER_SIZE
| int mbltml.mbltml.MBLTML_NODE_NAME_BUFFER_SIZE = 80 |
Buffer size (bytes) guaranteed sufficient for mbltmlGetNodeName().
◆ mbltmlDeviceType_t
| mbltml.mbltml.mbltmlDeviceType_t = c_uint |
Identifier of a Mobilint NPU device family.
Used to select a device family when calling family-scoped APIs such as mbltmlGetDriverVersion(), and to describe the family of an individual device returned by mbltmlGetDeviceType().
◆ MBLTML_DEVICE_ERROR
| int mbltml.mbltml.MBLTML_DEVICE_ERROR = 0x0 |
◆ MBLTML_DEVICE_ARIES
| int mbltml.mbltml.MBLTML_DEVICE_ARIES = 0x1 |
◆ MBLTML_DEVICE_REGULUS
| int mbltml.mbltml.MBLTML_DEVICE_REGULUS = 0x2 |
◆ MBLTML_DEVICE_REGULUS_USB
| int mbltml.mbltml.MBLTML_DEVICE_REGULUS_USB = 0x4 |
◆ mbltmlHardwareVersion_t
| mbltml.mbltml.mbltmlHardwareVersion_t = c_uint |
◆ MBLTML_HARDWARE_VERSION_ARIES
| int mbltml.mbltml.MBLTML_HARDWARE_VERSION_ARIES = 0x00000001 |
◆ MBLTML_HARDWARE_VERSION_REGULUS
| int mbltml.mbltml.MBLTML_HARDWARE_VERSION_REGULUS = 0x00000002 |
◆ MBLTML_HARDWARE_VERSION_ARIES2
| int mbltml.mbltml.MBLTML_HARDWARE_VERSION_ARIES2 = 0x00000003 |
◆ MBLTML_HARDWARE_VERSION_REGULUS2
| int mbltml.mbltml.MBLTML_HARDWARE_VERSION_REGULUS2 = 0x00000004 |
◆ MBLTML_HARDWARE_VERSION_ERROR
| int mbltml.mbltml.MBLTML_HARDWARE_VERSION_ERROR = 0x7FFFFFFF |
◆ mbltmlStatusCode_t
| mbltml.mbltml.mbltmlStatusCode_t = c_uint |
◆ MBLTML_SUCCESS
| int mbltml.mbltml.MBLTML_SUCCESS = 0 |
◆ MBLTML_DRIVER_NOT_FOUND
| int mbltml.mbltml.MBLTML_DRIVER_NOT_FOUND = 2 |
◆ MBLTML_INVALID_ARGUMENT
| int mbltml.mbltml.MBLTML_INVALID_ARGUMENT = 3 |
◆ MBLTML_UNINITIALIZED
| int mbltml.mbltml.MBLTML_UNINITIALIZED = 1 |
◆ MBLTML_NOT_SUPPORTED
| int mbltml.mbltml.MBLTML_NOT_SUPPORTED = 4 |
◆ MBLTML_INSUFFICIENT_LENGTH
| int mbltml.mbltml.MBLTML_INSUFFICIENT_LENGTH = 5 |
◆ mbltmlExtraPmicId_t
| mbltml.mbltml.mbltmlExtraPmicId_t = c_uint |
Identifier of an extra PMIC rail.
Selects which auxiliary PMIC rail is reported by mbltmlGetExtraPmic*(). The active selection is changed with mbltmlSetExtraPmicID() and can be queried via mbltmlGetExtraPmicId().
◆ MBLTML_EXTRA_PMIC_ID_NPU
◆ MBLTML_EXTRA_PMIC_ID_DDR
◆ MBLTML_EXTRA_PMIC_ID_PMIC
◆ MBLTML_EXTRA_PMIC_ID_GOLDFINGER
| int mbltml.mbltml.MBLTML_EXTRA_PMIC_ID_GOLDFINGER = 3 |
◆ mbltmlCluster_t
| mbltml.mbltml.mbltmlCluster_t = c_uint |
◆ MBLTML_CLUSTER_0
◆ MBLTML_CLUSTER_1
◆ MBLTML_CLUSTER_ERROR
| int mbltml.mbltml.MBLTML_CLUSTER_ERROR = 0x7FFF0000 |
◆ mbltmlCore_t
| mbltml.mbltml.mbltmlCore_t = c_uint |
◆ MBLTML_CORE_0
◆ MBLTML_CORE_1
◆ MBLTML_CORE_2
◆ MBLTML_CORE_3
◆ MBLTML_CORE_GLOBAL
| int mbltml.mbltml.MBLTML_CORE_GLOBAL = 0x0000FFFE |
◆ MBLTML_CORE_ERROR
| int mbltml.mbltml.MBLTML_CORE_ERROR = 0x0000FFFF |
◆ _clib
Generated by