Provided a local and non-local versions of function getmonOHSysmon() which monitors exposed sysmon registers in OH FW with direct register access rather than using JTAG path (bad). This function will read the following error conditions:
eagle26 > kw GEM_AMC.OH.OH2.FPGA.ADC.CTRL
0x65084000 None GEM_AMC.OH.OH2.FPGA.ADC.CTRL
0x65084000 r GEM_AMC.OH.OH2.FPGA.ADC.CTRL.OVERTEMP 0x00000000
0x65084000 r GEM_AMC.OH.OH2.FPGA.ADC.CTRL.VCCAUX_ALARM 0x00000000
0x65084000 r GEM_AMC.OH.OH2.FPGA.ADC.CTRL.VCCINT_ALARM 0x00000000
And their number of occurrences:
0x6508401c r GEM_AMC.OH.OH2.FPGA.ADC.CTRL.CNT_OVERTEMP 0x00000000
0x6508401c r GEM_AMC.OH.OH2.FPGA.ADC.CTRL.CNT_VCCAUX_ALARM 0x00000000
0x6508401c r GEM_AMC.OH.OH2.FPGA.ADC.CTRL.CNT_VCCINT_ALARM 0x00000000
Along with reading the FPGA core temperature, voltage, and I/O voltage.
After discussion with @mexanick I've broken include/amc.h and corresponding *.cpp file into two files:
include/daq_monitor.h, and
include/amc.h.
In the former case all monitoring functions from the old amc.h are now located here.
Changes to Makefile have been included.
Providing ohMask parameter for all monitoring functions
We may find in the future that monitoring is required on an AMC in which the number of valid OH's is not sequential, e.g. OH7 may be non-operable and this would need to be masked for whatever reason. In this case I've provided all monitoring functions the ability to have an ohMask. This mask follows the convention of the current sca.py tool, e.g. a 1 in the N^th bit means use the N^th OH.
Additionally to maintain backwards compatibility all monitoring functions will first check if the ohMask key exists in the RPC request. If it does, it will be set using the get_word method, if the key does not exist a default value of 0xfff will be set. This will ensure that all OH's are considered. This should maintain current functionality.
Documentation
All function documentation has been preserved in header file. For new function getmonOHSysmon(), local and non-local versions, please see function documentation in include/daq_monitor.h.
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[X] Breaking change (fix or feature that would cause existing functionality to change)
Breaking change because any method in xhal/cmsgemos that was previously looking for monitoring functions in amc.so will now need to look in daq_monitor.so.
Motivation and Context
Trying to access sysmon information of FPGA using JTAG path is not reliable and causes problems. Here dedicated register reads are used.
In the future ability to mask an OH from monitoring may be desireable. Functionality is included here.
Finally wanted to compartmentalise libraries, e.g. providing monitoring in dedicated monitoring library and amc functionality in dedicated amc library.
How Has This Been Tested?
In progress.
Checklist:
[X] My code follows the code style of this project.
[X] My change requires a change to the documentation.
Description
Provided a local and non-local versions of function
getmonOHSysmon()
which monitors exposed sysmon registers in OH FW with direct register access rather than using JTAG path (bad). This function will read the following error conditions:And their number of occurrences:
Along with reading the FPGA core temperature, voltage, and I/O voltage.
Supporting Changes
Creating Dedicated Monitoring Library:
daq_monitor.so
After discussion with @mexanick I've broken
include/amc.h
and corresponding*.cpp
file into two files:include/daq_monitor.h
, andinclude/amc.h
.In the former case all monitoring functions from the old
amc.h
are now located here.Changes to
Makefile
have been included.Providing
ohMask
parameter for all monitoring functionsWe may find in the future that monitoring is required on an AMC in which the number of valid OH's is not sequential, e.g. OH7 may be non-operable and this would need to be masked for whatever reason. In this case I've provided all monitoring functions the ability to have an
ohMask
. This mask follows the convention of the currentsca.py
tool, e.g. a 1 in the N^th bit means use the N^th OH.Additionally to maintain backwards compatibility all monitoring functions will first check if the
ohMask
key exists in the RPC request. If it does, it will be set using theget_word
method, if the key does not exist a default value of0xfff
will be set. This will ensure that all OH's are considered. This should maintain current functionality.Documentation
All function documentation has been preserved in header file. For new function
getmonOHSysmon()
, local and non-local versions, please see function documentation ininclude/daq_monitor.h
.Types of changes
Breaking change because any method in
xhal/cmsgemos
that was previously looking for monitoring functions inamc.so
will now need to look indaq_monitor.so
.Motivation and Context
Trying to access sysmon information of FPGA using JTAG path is not reliable and causes problems. Here dedicated register reads are used.
In the future ability to mask an OH from monitoring may be desireable. Functionality is included here.
Finally wanted to compartmentalise libraries, e.g. providing monitoring in dedicated monitoring library and amc functionality in dedicated amc library.
How Has This Been Tested?
In progress.
Checklist: