diff options
| author | David Shah <dave@ds0.me> | 2020-08-12 10:11:52 +0100 | 
|---|---|---|
| committer | David Shah <dave@ds0.me> | 2020-08-12 10:11:52 +0100 | 
| commit | e313d051a87f28778c80ea79b14956351360bb0c (patch) | |
| tree | 2790f000955457a3073ade8e1620e722b7bcfefa | |
| parent | fbe486df459909065d6852a7495a212dfd2accef (diff) | |
| download | nextpnr-e313d051a87f28778c80ea79b14956351360bb0c.tar.gz nextpnr-e313d051a87f28778c80ea79b14956351360bb0c.tar.bz2 nextpnr-e313d051a87f28778c80ea79b14956351360bb0c.zip | |
Add a warning when floorplan constraint doesn't match
Signed-off-by: David Shah <dave@ds0.me>
| -rw-r--r-- | common/nextpnr.cc | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/common/nextpnr.cc b/common/nextpnr.cc index f6d873f0..c44cec02 100644 --- a/common/nextpnr.cc +++ b/common/nextpnr.cc @@ -537,15 +537,21 @@ void BaseCtx::addBelToRegion(IdString name, BelId bel) { region[name]->bels.inse  void BaseCtx::constrainCellToRegion(IdString cell, IdString region_name)  {      // Support hierarchical cells as well as leaf ones +    bool matched = false;      if (hierarchy.count(cell)) {          auto &hc = hierarchy.at(cell);          for (auto &lc : hc.leaf_cells)              constrainCellToRegion(lc.second, region_name);          for (auto &hsc : hc.hier_cells)              constrainCellToRegion(hsc.second, region_name); +        matched = true;      } -    if (cells.count(cell)) +    if (cells.count(cell)) {          cells.at(cell)->region = region[region_name].get(); +        matched = true; +    } +    if (!matched) +        log_warning("No cell matched '%s' when constraining to region '%s'\n", nameOf(cell), nameOf(region_name));  }  DecalXY BaseCtx::constructDecalXY(DecalId decal, float x, float y)  { | 
