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 if (shiftx) {
// greater than 128 since Q31 cannot be output onto // Cannot implement variable-length shift registers
// fabric // greater than 128 since Q31 cannot be output onto
if (shiftx && GetSize(taps) > 128) // fabric
return false; if (GetSize(taps) > 128)
return false;
// Only map if $shiftx exclusively covers the shift register // Only map if $shiftx exclusively covers the shift register
if (GetSize(taps) != shiftx->getParam("\\A_WIDTH").as_int()) if (GetSize(taps) != shiftx->getParam("\\A_WIDTH").as_int())
return false; return false;
}
return true; return true;
} }