OFS / opae-sdk

Open Programmable Acceleration Engine
https://ofs.github.io
BSD 3-Clause "New" or "Revised" License
251 stars 84 forks source link

xfpga: metrics: fix multiplier for board power sensor #3122

Closed pcolberg closed 3 months ago

pcolberg commented 3 months ago

The hwmon sysfs interface provides power values in microwatt.

Link: https://github.com/OFS/linux-dfl/issues/25

pcolberg commented 3 months ago

Tested with https://github.com/OFS/linux-dfl-backport/pull/118:

# fpgainfo bmc
Intel Acceleration Development Platform N6001
Board Management Controller NIOS FW version: 3.15.0 
Board Management Controller Build version: 3.15.0 
//****** BMC SENSORS ******//
Interface                        : DFL
Object Id                        : 0xF300000
PCIe s:b:d.f                     : 0000:37:00.0
Vendor Id                        : 0x8086
Device Id                        : 0xBCCE
SubVendor Id                     : 0x8086
SubDevice Id                     : 0x1771
Socket Id                        : 0x00
Ports Num                        : 01
Bitstream Id                     : 0x501020273968E4D
Bitstream Version                : 5.0.1
Pr Interface Id                  : 615d37da-041b-5543-a669-206f0e83a9ae
( 1) MAX10 & Board CLK PWR 3V3 Inlet Current            : 0.97 Amps
( 2) CVL Core Voltage Rail Current                      : N/A
( 3) Board 3V3 VR Current                               : 1.06 Amps
( 4) QSFP 3V3 Rail Current                              : 0.07 Amps
( 5) Inlet 12V PCIe Rail Current                        : 2.02 Amps
( 6) Inlet 12V Aux Rail Current                         : 0.03 Amps
( 7) Inlet 3V3 PCIe Rail Current                        : 1.04 Amps
( 8) FPGA Core Voltage Rail Current                     : 8.61 Amps
( 9) FPGA VCCH Rail Current                             : 3.60 Amps
(10) FPGA VCC_1V2 Rail Current                          : 2.90 Amps
(11) FPGA VCCH_GXER_1V1, VCCA_1V8 Current               : 0.56 Amps
(12) FPGA VCCIO_1V2 Current                             : 3.08 Amps
(13) CVL Non Core Rails Inlet Current                   : N/A
(14) Inlet 12V PCIe Rail Voltage                        : 12.21 Volts
(15) CVL Core Voltage Rail Voltage                      : N/A
(16) Board 3V3 VR Voltage                               : 3.35 Volts
(17) QSFP 3V3 Rail Voltage                              : 3.34 Volts
(18) QSFP (Primary) Supply Rail Voltage                 : N/A
(19) QSFP (Secondary) Supply Rail Voltage               : N/A
(20) VCCCLK_GXER_2V5 Voltage                            : 2.50 Volts
(21) AVDDH_1V1_CVL Voltage                              : N/A
(22) VDDH_1V8_CVL Voltage                               : N/A
(23) VCCA_PLL Voltage                                   : 1.20 Volts
(24) VCCRT_GXER_0V9 Voltage                             : 0.91 Volts
(25) Inlet 12V Aux Rail Voltage                         : 12.18 Volts
(26) VCCRT_GXPL_0V9 Voltage                             : 0.90 Volts
(27) VCCH_GXPL_1V8 Voltage                              : 1.80 Volts
(28) VCCPT_1V8 Voltage                                  : 1.80 Volts
(29) VCC_3V3_M10 Voltage                                : 3.32 Volts
(30) VCC_1V8_M10 Voltage                                : 1.80 Volts
(31) VCC_1V2_EMIF1_2_3 Voltage                          : 1.21 Volts
(32) VCC_1V2_EMIF4_5 Voltage                            : 1.21 Volts
(33) VCCA_1V8 Voltage                                   : 1.80 Volts
(34) VCCH_GXER_1V1 Voltage                              : 1.13 Volts
(35) AVDD_ETH_0V9_CVL Voltage                           : N/A
(36) Inlet 3V3 PCIe Rail Voltage                        : 3.34 Volts
(37) AVDD_PCIE_0V9_CVL Voltage                          : N/A
(38) FPGA Core Voltage Rail Voltage                     : 0.81 Volts
(39) FPGA VCCH Rail Voltage                             : 0.90 Volts
(40) FPGA VCC_1V2 Rail Voltage                          : 1.20 Volts
(41) FPGA VCCH_GXER_1V1, VCCA_1V8 Voltage               : 3.34 Volts
(42) FPGA VCCIO_1V2 Voltage                             : 1.21 Volts
(43) CVL Non Core Rails Inlet Voltage                   : N/A
(44) MAX10 & Board CLK PWR 3V3 Inlet Voltage            : 3.34 Volts
(45) Board Power                                        : 28.44 Watts
(46) FPGA FABRIC Digital Temperature #5                 : 42.00 Celsius
(47) FPGA FABRIC Remote Digital Temperature #1          : 42.00 Celsius
(48) FPGA FABRIC Remote Digital Temperature #2          : 41.00 Celsius
(49) FPGA FABRIC Remote Digital Temperature #3          : 40.50 Celsius
(50) FPGA FABRIC Remote Digital Temperature #4          : 41.00 Celsius
(51) Board Top Near FPGA Temperature                    : 38.50 Celsius
(52) Board Bottom Near CVL Temperature                  : 31.00 Celsius
(53) Board Top East Near VRs Temperature                : 36.00 Celsius
(54) Columbiaville Die Temperature                      : N/A
(55) Board Rear Side Temperature                        : 36.50 Celsius
(56) FPGA E-TILE Temperature #1                         : 0.00 Celsius
(57) Board Front Side Temperature                       : 34.50 Celsius
(58) QSFP1 Case Temperature                             : N/A
(59) QSFP2 Case Temperature                             : N/A
(60) FPGA Core Voltage Phase 0 VR Temperature           : 45.00 Celsius
(61) FPGA Core Voltage Phase 1 VR Temperature           : 45.00 Celsius
(62) FPGA Core Voltage Phase 2 VR Temperature           : N/A
(63) FPGA Core Voltage VR Controller Temperature        : 45.50 Celsius
(64) FPGA VCCH VR Temperature                           : 43.00 Celsius
(65) FPGA VCC_1V2 VR Temperature                        : 43.00 Celsius
(66) FPGA VCCH, VCC_1V2 VR Controller Temperature       : 36.00 Celsius
(67) FPGA E-TILE Temperature #2                         : 0.00 Celsius
(68) 3V3 VR Temperature                                 : 49.00 Celsius
(69) CVL Core Voltage VR Temperature                    : N/A
(70) FPGA P-Tile Temperature [Remote]                   : 40.00 Celsius
(71) FPGA E-Tile Temperature [Remote]                   : 42.00 Celsius
(72) FPGA SDM Temperature [Remote]                      : 37.00 Celsius
(73) FPGA Corner Temperature [Remote]                   : 37.00 Celsius
(74) FPGA E-TILE Temperature #3                         : 0.00 Celsius
(75) FPGA E-TILE Temperature #4                         : 0.00 Celsius
(76) FPGA P-TILE Temperature                            : 43.50 Celsius
(77) FPGA FABRIC Digital Temperature #1                 : 43.50 Celsius
(78) FPGA FABRIC Digital Temperature #2                 : 41.50 Celsius
(79) FPGA FABRIC Digital Temperature #3                 : 42.00 Celsius
(80) FPGA FABRIC Digital Temperature #4                 : 41.50 Celsius
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9193002777

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/plugins/xfpga/metrics/metrics_max10.c 4 10 40.0%
<!-- Total: 4 10 40.0% -->
Totals Coverage Status
Change from base Build 9192943036: -0.009%
Covered Lines: 15826
Relevant Lines: 24483

💛 - Coveralls
pcolberg commented 3 months ago

Documentation fails to build:

++ python3 --version
++ cut -d ' ' -f2
+ PYTHON_VERSION=3.12.3
+ python3 -m pip install --user -r doc/sphinx/requirements.txt
WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ '[' 1 '!=' 0 ']'
+ echo 'failed to install Python requirements'
+ exit 1
failed to install Python requirements
pcolberg commented 3 months ago

Documentation fails to build:

This is resolved in https://github.com/OFS/opae-sdk/pull/3123.