diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2019-03-18 13:35:54 -0700 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2019-03-18 13:35:54 -0700 |
commit | b94db546645e624b752203a4c4d2395dc84dff0c (patch) | |
tree | b357d0c64078d25d4f4165501f5f37c0a2a8c9d3 /passes/techmap | |
parent | d6d9ef0fee3a187b884cbfd0b9a97da935666189 (diff) | |
download | yosys-b94db546645e624b752203a4c4d2395dc84dff0c.tar.gz yosys-b94db546645e624b752203a4c4d2395dc84dff0c.tar.bz2 yosys-b94db546645e624b752203a4c4d2395dc84dff0c.zip |
shiftx NULL pointer check
Diffstat (limited to 'passes/techmap')
-rw-r--r-- | passes/techmap/shregmap.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/passes/techmap/shregmap.cc b/passes/techmap/shregmap.cc index 179a331fd..f3153b400 100644 --- a/passes/techmap/shregmap.cc +++ b/passes/techmap/shregmap.cc @@ -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; } |