aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/arch.cc
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-18 13:26:52 -0800
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-18 13:26:52 -0800
commit4766e889c0ecf50df5054b453a908b7a4c167355 (patch)
treef8231af4fed1eac0bae247cbd9aea5b669180b9d /fpga_interchange/arch.cc
parent532954847ae9c4643dc068786ea78957a6d9bb36 (diff)
downloadnextpnr-4766e889c0ecf50df5054b453a908b7a4c167355.tar.gz
nextpnr-4766e889c0ecf50df5054b453a908b7a4c167355.tar.bz2
nextpnr-4766e889c0ecf50df5054b453a908b7a4c167355.zip
Add some utility methods for site instance access.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'fpga_interchange/arch.cc')
-rw-r--r--fpga_interchange/arch.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpga_interchange/arch.cc b/fpga_interchange/arch.cc
index cce93844..71ba46e4 100644
--- a/fpga_interchange/arch.cc
+++ b/fpga_interchange/arch.cc
@@ -147,7 +147,7 @@ Arch::Arch(ArchArgs args) : args(args)
for (BelId bel : getBels()) {
auto &bel_data = bel_info(chip_info, bel);
- const SiteInstInfoPOD &site = chip_info->sites[chip_info->tiles[bel.tile].sites[bel_data.site]];
+ const SiteInstInfoPOD &site = get_site_inst(bel);
auto iter = site_bel_pads.find(SiteBelPair(site.site_name.get(), IdString(bel_data.name)));
if (iter != site_bel_pads.end()) {
pads.emplace(bel);
@@ -508,7 +508,7 @@ IdStringList Arch::getPipName(PipId pip) const
auto &pip_info = tile_type.pip_data[pip.index];
if (pip_info.site != -1) {
// This is either a site pin or a site pip.
- auto &site = chip_info->sites[tile.sites[pip_info.site]];
+ auto &site = get_site_inst(pip);
auto &bel = tile_type.bel_data[pip_info.bel];
IdString bel_name(bel.name);
if (bel.category == BEL_CATEGORY_LOGIC) {