cms-gem-daq-project / reg_utils

0 stars 9 forks source link

In repeated_reg_read.py, set a lower limit on the allowed sleeptime #39

Closed AndrewLevin closed 5 years ago

AndrewLevin commented 6 years ago

@bdorney recommended a lower limit of 250 microseconds in this mattermost post: https://mattermost.web.cern.ch/cms-gem-daq/pl/japgeibh6fdub8j78f9dfmj85c

Description

Types of changes

Motivation and Context

This change was requested in https://github.com/AndrewLevin/sw_utils/pull/1#pullrequestreview-173962680

How Has This Been Tested?

Yes, the terminal output from running

python repeated_reg_read.py GEM_AMC.OH.OH0.GEB.VFAT1.HW_CHIP_ID 100 249 -f my_filename.txt --cardName eagle64  

is

Open pickled address table if available  /opt/cmsgemos/etc/maps/amc_address_table_top.pickle...
This script is not running on an eagle machine. rpc_connect("eagle64") will be called.
Initial value to write: 1, register GEM_AMC.GEM_SYSTEM.CTRL.LINK_RESET
|        | CRC_ERROR_CNT | PACKET_ERROR_CNT | BITSTUFFING_ERROR_CNT | TIMEOUT_ERROR_CNT | AXI_STROBE_ERROR_CNT | TRANSACTION_CNT |
|:------ | :------------ | :--------------- | :-------------------- | :---------------- | :------------------- | :-------------- |
| before | 0x00000000  | 0x00000000 | 0x00000000 | 0x00000000 | 0x00000000 | 0x00000000 |
Warning, sleeptime will be increased to 250 microseconds
| after | 0x00000000  | 0x00000000 | 0x00000000 | 0x00000000 | 0x00640000 | 0x00640000 |
| delta | 0  | 0 | 0 | 0 | 6553600 | 6553600 |
{'0x000012e2': 8, '0x000112e2': 92}

Screenshots (if appropriate):

Checklist:

bdorney commented 6 years ago

While we are at it, in the interest of standardisation can you change:

    parser.add_argument('--card',metavar='card',type=str,help='CTP7 hostname (has no effect if you are running on a hostname that starts with eagle)',default="eagle26")

to

    parser.add_argument('-c','--cardName',metavar='card',type=str,help='CTP7 hostname (has no effect if you are running on a hostname that starts with eagle)',default="eagle26")

I missed this earlier; this will help standardize the option parameters to be more "familiar" to the user. I missed this earlier...but since you opened a new PR... :D

AndrewLevin commented 6 years ago

The card argument has been changed.