diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-06-12 14:25:12 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-06-12 14:25:12 +0200 |
commit | d62e341d5a3183d6fdb7168afb978068a396e9a4 (patch) | |
tree | 6371f1e406aa80c41fcec87270ed815b8eb35605 /common | |
parent | 391d49c13ec675e263115d18481d4b842622b712 (diff) | |
parent | 9ee6a6e1149e35bcca3c1781f6ce84b11dc80296 (diff) | |
download | nextpnr-d62e341d5a3183d6fdb7168afb978068a396e9a4.tar.gz nextpnr-d62e341d5a3183d6fdb7168afb978068a396e9a4.tar.bz2 nextpnr-d62e341d5a3183d6fdb7168afb978068a396e9a4.zip |
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr
Diffstat (limited to 'common')
-rw-r--r-- | common/design_utils.h | 4 | ||||
-rw-r--r-- | common/place.cc | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/common/design_utils.h b/common/design_utils.h index b57c1cb6..2acc7d20 100644 --- a/common/design_utils.h +++ b/common/design_utils.h @@ -40,6 +40,8 @@ template <typename F1> CellInfo *net_only_drives(NetInfo *net, F1 cell_pred, IdString port, bool exclusive = false) { + if (net == nullptr) + return nullptr; if (exclusive && (net->users.size() != 1)) { return nullptr; } else { @@ -57,6 +59,8 @@ CellInfo *net_only_drives(NetInfo *net, F1 cell_pred, IdString port, template <typename F1> CellInfo *net_driven_by(NetInfo *net, F1 cell_pred, IdString port) { + if (net == nullptr) + return nullptr; if (cell_pred(net->driver.cell) && net->driver.port == port) { return net->driver.cell; } else { diff --git a/common/place.cc b/common/place.cc index eba71a50..e8fadd16 100644 --- a/common/place.cc +++ b/common/place.cc @@ -28,6 +28,7 @@ #include <string.h> #include <vector> +#include "arch_place.h" #include "log.h" #include "place.h" @@ -104,7 +105,8 @@ void place_design(Design *design) while ((bi != blist.end()) && ((design->chip.getBelType(*bi) != bel_type || - !design->chip.checkBelAvail(*bi)))) + !design->chip.checkBelAvail(*bi)) || + !isValidBelForCell(design, cell, *bi))) bi++; if (bi == blist.end()) log_error("Too many \'%s\' used in design\n", |