shiftx NULL pointer check

This commit is contained in:
Eddie Hung 2019-03-18 13:35:54 -07:00
parent d6d9ef0fee
commit b94db54664
1 changed files with 10 additions and 8 deletions

View File

@ -165,15 +165,17 @@ struct ShregmapTechXilinx7 : ShregmapTech
}
}
// Cannot implement variable-length shift registers
// greater than 128 since Q31 cannot be output onto
// fabric
if (shiftx && GetSize(taps) > 128)
return false;
if (shiftx) {
// Cannot implement variable-length shift registers
// greater than 128 since Q31 cannot be output onto
// fabric
if (GetSize(taps) > 128)
return false;
// Only map if $shiftx exclusively covers the shift register
if (GetSize(taps) != shiftx->getParam("\\A_WIDTH").as_int())
return false;
// Only map if $shiftx exclusively covers the shift register
if (GetSize(taps) != shiftx->getParam("\\A_WIDTH").as_int())
return false;
}
return true;
}