aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2019-03-18 13:35:54 -0700
committerEddie Hung <eddieh@ece.ubc.ca>2019-03-18 13:35:54 -0700
commitb94db546645e624b752203a4c4d2395dc84dff0c (patch)
treeb357d0c64078d25d4f4165501f5f37c0a2a8c9d3
parentd6d9ef0fee3a187b884cbfd0b9a97da935666189 (diff)
downloadyosys-b94db546645e624b752203a4c4d2395dc84dff0c.tar.gz
yosys-b94db546645e624b752203a4c4d2395dc84dff0c.tar.bz2
yosys-b94db546645e624b752203a4c4d2395dc84dff0c.zip
shiftx NULL pointer check
-rw-r--r--passes/techmap/shregmap.cc18
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;
}