Skip to content

Commit

Permalink
addresses cms-gem-daq-project#297, bits [31:16] of HW_CHIP_ID are set…
Browse files Browse the repository at this point in the history
… to zero if rawID is False
  • Loading branch information
Brian Dorney committed Jul 10, 2019
1 parent c69f04a commit f4cdcdb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gempython/tools/vfat_user_functions_xhal.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ def getAllChipIDs(self, mask=0x0, rawID=False):
Returns the chipIDs for all VFATs not in mask.
mask - vfatMask, up to a 24 bit number, 1 in the N^th bit means skip this VFAT
rawID - If true returns the rawID and does not apply the Reed-Muller decoding
rawID - If True returns the rawID and does not apply the Reed-Muller decoding;
if False bits [31:16] of HW_CHIP_ID will be always zero in an attempt
to suppress errors from bit flips in non Reed-Muller Encoded VFATs.
"""

chipIDData = (c_uint32 * vfatsPerGemVariant[self.gemType])()
Expand All @@ -132,6 +134,11 @@ def getAllChipIDs(self, mask=0x0, rawID=False):
if rpcResp != 0:
raise Exception("RPC response was non-zero, failed to get chipID data for OH{0}".format(self.parentOH.link))

# Suppress any potential bit flips in chipID (e.g. in non-reed muller encoded chips)
if rawID == False:
for vfat in len(chipIDData):
chipIDData[vfat] = chipIDData[vfat] & 0xffff

return chipIDData

def getAllChannelRegisters(self, mask=0x0):
Expand Down

0 comments on commit f4cdcdb

Please sign in to comment.