cms-gem-daq-project / reg_utils

0 stars 9 forks source link

Bug Report: sca.py unable to set gpio parameters #21

Closed bdorney closed 6 years ago

bdorney commented 6 years ago

Brief summary of issue

sca.py unable to set gpio parameters of the SCA.

Types of issue

Expected Behavior

Should not throw a ValueError.

Current Behavior

% sca.py eagle64 0x1 gpio-set-direction 0x0fffff8f 
Open pickled address table if available  /opt/cmsgemos/etc/maps/amc_address_table_top.pickle...

>>>>>>> HOLA, I'M SCA CONTROLLER TESTER :) <<<<<<<

Initial value to write: 1, register GEM_AMC.SLOW_CONTROL.SCA.MANUAL_CONTROL.LINK_ENABLE_MASK
Traceback (most recent call last):
  File "/opt/reg_utils/bin/sca.py", line 114, in <module>
    main()
  File "/opt/reg_utils/bin/sca.py", line 99, in main
    directionMask = parseInt(sys.argv[3])
  File "/usr/lib/python2.7/site-packages/reg_utils/reg_interface/common/reg_xml_parser.py", line 282, in parseInt
    return int(string)
ValueError: invalid literal for int() with base 10: 'gpio-set-direction'
% sca.py eagle64 0x1 gpio-set-output 0xf00000f0
Open pickled address table if available  /opt/cmsgemos/etc/maps/amc_address_table_top.pickle...

>>>>>>> HOLA, I'M SCA CONTROLLER TESTER :) <<<<<<<

Initial value to write: 1, register GEM_AMC.SLOW_CONTROL.SCA.MANUAL_CONTROL.LINK_ENABLE_MASK
Traceback (most recent call last):
  File "/opt/reg_utils/bin/sca.py", line 114, in <module>
    main()
  File "/opt/reg_utils/bin/sca.py", line 107, in main
    outputData = parseInt(sys.argv[3])
  File "/usr/lib/python2.7/site-packages/reg_utils/reg_interface/common/reg_xml_parser.py", line 282, in parseInt
    return int(string)
ValueError: invalid literal for int() with base 10: 'gpio-set-output'

Using a system install presently:

% which sca.py
/opt/reg_utils/bin/sca.py

Steps to Reproduce (for bugs)

  1. Login to gem904daq01
  2. execute following commands:
export LD_LIBRARY_PATH=/opt/xdaq/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/wiscrpcsvc/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/rwreg/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/xhal/lib:$LD_LIBRARY_PATH
export PATH=/opt/xhal/bin/:$PATH
export PATH=/opt/reg_utils/bin:$PATH
sca.py eagle64 0x1 gpio-set-direction 0x0fffff8f 
sca.py eagle64 0x1 gpio-set-output 0xf00000f0

Possible Solution (for bugs)

Dump the position sensitive argument list and use an instance of the OptParser class.

Context (for feature requests)

The SCA controls the vfat3 reset lines now. These outputs must be properly set or the VFATs will be held in hard reset otherwise.

Your Environment

mexanick commented 6 years ago

The fix for this issue has been merged, right?

bdorney commented 6 years ago

Yes this was addressed in #22