diff options
author | David Shah <davey1576@gmail.com> | 2018-08-19 14:04:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-19 14:04:01 +0100 |
commit | 45bd0a8c723daad8718e38b0f563966e9da1ed34 (patch) | |
tree | 2c792de98ca1b93f469b71c6f91e377dc1e510c2 /ecp5/arch.cc | |
parent | 26be6f9761bba9dff646c6b1d071b149bd26f950 (diff) | |
parent | 0b35cb4e60c114b3d84ae39d0462a20085ef2bd4 (diff) | |
download | nextpnr-45bd0a8c723daad8718e38b0f563966e9da1ed34.tar.gz nextpnr-45bd0a8c723daad8718e38b0f563966e9da1ed34.tar.bz2 nextpnr-45bd0a8c723daad8718e38b0f563966e9da1ed34.zip |
Merge pull request #54 from daveshah1/ecp5_speedup
ecp5: Improving placement speed
Diffstat (limited to 'ecp5/arch.cc')
-rw-r--r-- | ecp5/arch.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc index acf1b42e..b2ce4acb 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -92,6 +92,8 @@ Arch::Arch(ArchArgs args) : args(args) if (!package_info) log_error("Unsupported package '%s' for '%s'.\n", args.package.c_str(), getChipName().c_str()); + + bel_to_cell.resize(chip_info->height * chip_info->width * max_loc_bels, nullptr); } // ----------------------------------------------------------------------- @@ -432,7 +434,7 @@ DecalXY Arch::getBelDecal(BelId bel) const decalxy.decal.type = DecalId::TYPE_BEL; decalxy.decal.location = bel.location; decalxy.decal.z = bel.index; - decalxy.decal.active = bel_to_cell.count(bel) && (bel_to_cell.at(bel) != nullptr); + decalxy.decal.active = (bel_to_cell.at(getBelFlatIndex(bel)) != nullptr); return decalxy; } |