diff options
author | David Shah <davey1576@gmail.com> | 2018-07-24 16:38:35 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-07-24 16:38:35 +0200 |
commit | 3931c84fedc568e24c7e7e98132ec5757cdb29ab (patch) | |
tree | 0c821ca82aff597d9167103a3b7a4f3824515e5d /ecp5/arch.cc | |
parent | 974ca143e80ac48b0e87054001a48b0d6597c6fa (diff) | |
download | nextpnr-3931c84fedc568e24c7e7e98132ec5757cdb29ab.tar.gz nextpnr-3931c84fedc568e24c7e7e98132ec5757cdb29ab.tar.bz2 nextpnr-3931c84fedc568e24c7e7e98132ec5757cdb29ab.zip |
ecp5: Architecture testing and fixing
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5/arch.cc')
-rw-r--r-- | ecp5/arch.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc index ea8abc0e..5507d1e3 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -202,7 +202,10 @@ BelRange Arch::getBelsByTile(int x, int y) const br.e.cursor_index = chip_info->locations[chip_info->location_type[br.b.cursor_tile]].num_bels - 1; br.b.chip = chip_info; br.e.chip = chip_info; - ++br.e; + if (br.e.cursor_index == -1) + ++br.e.cursor_index; + else + ++br.e; return br; } @@ -278,6 +281,7 @@ PipId Arch::getPipByName(IdString name) const Location loc; std::string basename; std::tie(loc.x, loc.y, basename) = split_identifier_name(name.str(this)); + ret.location = loc; const LocationTypePOD *loci = locInfo(ret); for (int i = 0; i < loci->num_pips; i++) { PipId curr; @@ -285,6 +289,8 @@ PipId Arch::getPipByName(IdString name) const curr.index = i; pip_by_name[getPipName(curr)] = curr; } + if (pip_by_name.find(name) == pip_by_name.end()) + NPNR_ASSERT_FALSE_STR("no pip named " + name.str(this)); return pip_by_name[name]; } |