cms-gem-daq-project / reg_utils

0 stars 9 forks source link

Bug Report: run_sysmon() generates IndexError if mask is not sequential #17

Closed bdorney closed 6 years ago

bdorney commented 6 years ago

Brief summary of issue

The run_sysmon() of sca_utils.py will generate an IndexError if the ohMask is not sequential.

Related too: https://github.com/cms-gem-daq-project/xhal/issues/75

Types of issue

Expected Behavior

An IndexError should not be created.

Current Behavior

Consider following block:

https://github.com/cms-gem-daq-project/reg_utils/blob/5cd2e893db30db1a5f7535515ed79c3356a8f1ab/python/reg_interface/common/sca_utils.py#L57-L60

if there are two OH's and the mask 0x1 is used ohList will be [ 0 ] and adcX container (for X = 1, 2 or 3) will have len == 1 starting at 0. If 0x3 is used then ohList will be [ 0, 1]; adcX will have len == 2 and have indices 0 and 1.

However if mask 0x2 is used ohList will be [ 1 ] and adcX container will have len == 1 starting at index 0. So this will generate an IndexError.

Steps to Reproduce (for bugs)

  1. Have at least one OHv3, then
  2. Place this OHv3 on link 1, then
  3. Call sca.py eagle63 0x2 sysmon

Possible Solution (for bugs)

Investigating.

Context (for feature requests)

Your Environment

bdorney commented 6 years ago

I guess this is also a potential bug with anything that calls jtagCommand()?