Skip to content

Commit

Permalink
Merge pull request #42631 from sroychow/sipixelErrorCheckerGPU_132X
Browse files Browse the repository at this point in the history
[13.2.X] Fixed channel decoding for the timeout error in SiPixelRawToClusterGPUKernel
  • Loading branch information
cmsbuild authored Sep 5, 2023
2 parents 1df39e5 + a2b7125 commit 2630874
Showing 1 changed file with 3 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ namespace pixelgpudetails {
case (29): {
if constexpr (debug)
printf("Timeout on a channel (errorType = 29)\n");
if ((errorWord >> sipixelconstants::OMIT_ERR_shift) & sipixelconstants::OMIT_ERR_mask) {
if (!((errorWord >> sipixelconstants::OMIT_ERR_shift) & sipixelconstants::OMIT_ERR_mask)) {
if constexpr (debug)
printf("...first errorType=29 error, this gets masked out\n");
printf("...2nd errorType=29 error, skip\n");
}
errorFound = true;
break;
Expand Down Expand Up @@ -253,6 +253,7 @@ namespace pixelgpudetails {

switch (errorType) {
case 25:
case 29:
case 30:
case 31:
case 36:
Expand All @@ -264,39 +265,6 @@ namespace pixelgpudetails {
rID = rID_temp;
break;
}
case 29: {
int chanNmbr = 0;
const int DB0_shift = 0;
const int DB1_shift = DB0_shift + 1;
const int DB2_shift = DB1_shift + 1;
const int DB3_shift = DB2_shift + 1;
const int DB4_shift = DB3_shift + 1;
const uint32_t DataBit_mask = ~(~uint32_t(0) << 1);

int CH1 = (errWord >> DB0_shift) & DataBit_mask;
int CH2 = (errWord >> DB1_shift) & DataBit_mask;
int CH3 = (errWord >> DB2_shift) & DataBit_mask;
int CH4 = (errWord >> DB3_shift) & DataBit_mask;
int CH5 = (errWord >> DB4_shift) & DataBit_mask;
int BLOCK_bits = 3;
int BLOCK_shift = 8;
uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
int BLOCK = (errWord >> BLOCK_shift) & BLOCK_mask;
int localCH = 1 * CH1 + 2 * CH2 + 3 * CH3 + 4 * CH4 + 5 * CH5;
if (BLOCK % 2 == 0)
chanNmbr = (BLOCK / 2) * 9 + localCH;
else
chanNmbr = ((BLOCK - 1) / 2) * 9 + 4 + localCH;
if ((chanNmbr < 1) || (chanNmbr > 36))
break; // signifies unexpected result

uint32_t roc = 1;
uint32_t link = chanNmbr;
uint32_t rID_temp = getRawId(cablingMap, fedId, link, roc).rawId;
if (rID_temp != gpuClustering::invalidModuleId)
rID = rID_temp;
break;
}
case 37:
case 38: {
uint32_t roc = sipixelconstants::getROC(errWord);
Expand Down

0 comments on commit 2630874

Please sign in to comment.