This project describes how to read the PMBUS metrics on the following Avnet platforms:
This guide provides instructions on how to read the PMBUS metrics on the following Avnet Vitis 2020.1 platforms:
- Ultra96-V2 Development Board
- UltraZed-EV SOM (7EV) + FMC Carrier Card
- UltraZed-EG SOM (3EG) + IO Carrier Card
- UltraZed-EG SOM (3EG) + PCIEC Carrier Card
This project made use of the following Vitis-AI 1.2 designs as a starting point:
SetupThe first requirement for this project is the lm-sensors package, which includes the "sensors" utility.
Here is an example output for the ULTRA96V2 board, using the Vitis-AI 1.2 design:
$ sensors
ir38060-i2c-6-45
Adapter: i2c-0-mux (chan_id 4)
vin: 12.25 V (min = +0.50 V, crit max = +24.00 V)
vout1: 5.05 V (crit min = +4.00 V, min = +4.25 V)
(max = +5.75 V, crit max = +6.00 V)
temp1: +63.0 C (high = +120.0 C, crit = +128.0 C)
pout1: 5.00 W
iout1: 1000.00 mA (max = +5.50 A, crit max = +6.00 A)
irps5401-i2c-6-43
Adapter: i2c-0-mux (chan_id 4)
vin1: 5.03 V (min = +4.12 V, crit max = +5.50 V)
vin2: 5.03 V (min = +4.12 V, crit max = +5.50 V)
vin3: 5.06 V (min = +4.12 V, crit max = +5.50 V)
vin4: 5.03 V (min = +4.12 V, crit max = +5.50 V)
vin5: 4.98 V (min = +0.00 V, crit max = +6.00 V)
vout1: 1.80 V (crit min = +1.65 V, min = +1.70 V)
(max = +1.90 V, crit max = +1.95 V)
vout2: 1.20 V (crit min = +1.10 V, min = +1.15 V)
(max = +1.25 V, crit max = +1.30 V)
vout3: 1.10 V (crit min = +1.00 V, min = +1.05 V)
(max = +1.15 V, crit max = +1.20 V)
vout4: 851.00 mV (crit min = +0.65 V, min = +0.74 V)
(max = +0.99 V, crit max = +1.00 V)
vout5: 3.31 V (crit min = +2.48 V, min = +2.90 V)
(max = +3.73 V, crit max = +4.14 V)
temp1: +55.0 C (high = +120.0 C, crit = +128.0 C)
temp2: +55.0 C (high = +120.0 C, crit = +128.0 C)
temp3: +56.0 C (high = +120.0 C, crit = +128.0 C)
temp4: +56.0 C (high = +125.0 C, crit = +128.0 C)
temp5: +56.0 C (high = +120.0 C, crit = +128.0 C)
pin1: 187.50 mW
pin2: 0.00 W
pin3: 93.75 mW
pin4: 1.31 W
pin5: 0.00 W
pout1: 187.50 mW
pout2: 0.00 W
pout3: 93.75 mW
pout4: 1.22 W
pout5: 0.00 W
iin1: 39.00 mA
iin2: 0.00 A
iin3: 23.00 mA
iin4: 257.00 mA
iout1: 109.00 mA (max = +1.75 A, crit max = +2.00 A)
iout2: 0.00 A (max = +1.91 A, crit max = +2.50 A)
iout3: 109.00 mA (max = +3.91 A, crit max = +4.00 A)
iout4: 1.45 A (max = +4.75 A, crit max = +5.25 A)
iout5: 0.00 A (max = +0.72 A, crit max = +0.72 A)
iio_hwmon-isa-0000
Adapter: ISA adapter
in1: 1.19 V
in2: 1.80 V
in3: 840.00 mV
in4: 838.00 mV
in5: 1.80 V
in6: 1.80 V
in7: 843.00 mV
in8: 839.00 mV
in9: 841.00 mV
in10: 1.80 V
in11: 1.10 V
temp1: +64.1 C
temp2: +64.4 C
irps5401-i2c-6-44
Adapter: i2c-0-mux (chan_id 4)
vin1: 5.06 V (min = +4.12 V, crit max = +5.50 V)
vin2: 5.00 V (min = +4.12 V, crit max = +5.50 V)
vin3: 5.12 V (min = +4.12 V, crit max = +5.50 V)
vin4: 5.09 V (min = +4.12 V, crit max = +5.50 V)
vin5: 4.98 V (min = +4.50 V, crit max = +5.50 V)
vout1: 1.80 V (crit min = +1.65 V, min = +1.70 V)
(max = +1.90 V, crit max = +1.95 V)
vout2: 851.00 mV (crit min = +0.75 V, min = +0.80 V)
(max = +0.90 V, crit max = +0.95 V)
vout3: 3.33 V (crit min = +3.10 V, min = +3.15 V)
(max = +3.45 V, crit max = +3.50 V)
vout4: 851.00 mV (crit min = +0.75 V, min = +0.80 V)
(max = +0.90 V, crit max = +0.95 V)
vout5: 1.19 V (crit min = +0.90 V, min = +1.05 V)
(max = +1.35 V, crit max = +1.50 V)
temp1: +57.0 C (high = +120.0 C, crit = +128.0 C)
temp2: +57.0 C (high = +120.0 C, crit = +128.0 C)
temp3: +57.0 C (high = +120.0 C, crit = +128.0 C)
temp4: +57.0 C (high = +120.0 C, crit = +128.0 C)
temp5: +57.0 C (high = +120.0 C, crit = +128.0 C)
pin1: 281.25 mW
pin2: 250.00 mW
pin3: 500.00 mW
pin4: 656.25 mW
pin5: 156.25 mW
pout1: 281.25 mW
pout2: 250.00 mW
pout3: 500.00 mW
pout4: 625.00 mW
pout5: 31.25 mW
iin1: 62.00 mA
iin2: 46.00 mA
iin3: 101.00 mA
iin4: 125.00 mA
iout1: 156.00 mA (max = +1.97 A, crit max = +2.00 A)
iout2: 296.00 mA (max = +1.97 A, crit max = +2.00 A)
iout3: 156.00 mA (max = +3.91 A, crit max = +4.00 A)
iout4: 750.00 mA (max = +3.91 A, crit max = +4.00 A)
iout5: 32.00 mA (max = +0.72 A, crit max = +0.72 A)
For the UZ3EG platforms, if you do not get any output with the "sensors" utility, ensure that the following two jumpers are installed on the SOM:
- PMBUS SCL
- PMBUS SDA
The python scripts used in this project make use of the "PySensors" and "matplotlib" packages, which need to be installed as follows:
- pip3 install pysensors
- pip3 install matplotlib
If you get an error when running pip3 install, this could be caused by any or both of the following two causes:
- invalid ethernet connection (refer to the board's Getting Started Guide)
- invalid date (use the "date" command, as described below)
To configure a valid date use the following command:
$ date MMDDHHMM
where MMDDHHMM should correspond to the current month/day/hour/minute.
Running the ScriptsBefore running the scripts, ensure that the DISPLAY environment variable is declared:
$ export DISPLAY=:0.0
The scripts can be run generically as follows:
$ python3 pmbus_plot_power_bars.py
The scripts can be run with ULTRA96V2 specific labels as follows:
$ python3 pmbus_plot_power_bars.py -t ULTRA96V2 -m 10000
The scripts can be run with UZ7EV_EVCC specific labels as follows:
$ python3 pmbus_plot_power_bars.py -t UZ7EV_EVCC -m 15000
The scripts can be run with UZ3EG_IOCC specific labels as follows:
$ python3 pmbus_plot_power_bars.py -t UZ3EG_IOCC -m 5000
The scripts can be run with UZ3EG_PCIEC specific labels as follows:
$ python3 pmbus_plot_power_bars.py -t UZ3EG_PCIEC -m 5000
The previous animated GIFs contain a video that was accelerated 4x, which ran for a 45 second period, during which the middle 30 seconds ran the resnet50 performance application as follows:
$ cd ~/Vitis-AI/vitis_ai_library/samples/classification/
$ ./test_performance_classification resnet50 ./test_performance_classification.list
Known IssuesIn the scripts, I am not calling the plt.show(). Instead, I have used an alternate (less efficient) method, which converts the matplotlib canvas to a BGR image, which is then displayed with OpenCV's cv.imshow() function.
The scripts should probably be using matplotlib's animate functionnality. If anyone knows how to do this, please share your knowledge :)
ConclusionI hope this tutorial was helpful to you.
If there is anything else you would like to see implemented, or if you have a more efficient implementation, please share your knowledge with the community.
Comments