cms-gem-daq-project / ctp7_modules

0 stars 13 forks source link

New Feature: Adding vfatMask argument to getVFAT3ChipIDsLocal and a check for sync #99

Closed bdorney closed 5 years ago

bdorney commented 5 years ago

Description

getVFAT3ChipIDsLocal(...) now takes a vfatMask argument which defaults to no vfat's masked. It will also check for sync before querying chipID. It will skip masked VFATs.

Types of changes

Motivation and Context

Need a way to skip VFATs that are incommunicado.

How Has This Been Tested?

Tested on QC7 setup with a vfatmask of 0x8

In [1]: from gempython.tools.vfat_user_functions_xhal import HwVFAT

In [2]: vfatBoard = HwVFAT("eagle60",4)
Open pickled address table if available  /opt/cmsgemos/etc/maps/amc_address_table_top.pickle...
Initializing AMC eagle60
In [5]: chipIDs = vfatBoard.getAllChipIDs(mask=0x8,rawID=False)

In [6]: for vfatN,ID in enumerate(chipIDs):
    print(vfatN,hex(ID))
   ...: 
(0, '0xfbbL')
(1, '0xc440L')
(2, '0xe200L')
(3, '0x0L')
(4, '0x1705L')
(5, '0x3300L')
(6, '0x4610L')
(7, '0x3300L')
(8, '0x2001078L')
(9, '0x3742L')
(10, '0x800f68L')
(11, '0x2ec0L')
(12, '0xd100L')
(13, '0x2ec0L')
(14, '0x401775L')
(15, '0xf69L')
(16, '0xea80L')
(17, '0x3300L')
(18, '0x4841L')
(19, '0xd748L')
(20, '0xd100L')
(21, '0x3300L')
(22, '0xd100L')
(23, '0x40afeL')

Checklist: