diff options
author | David Shah <davey1576@gmail.com> | 2018-06-16 14:44:43 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-16 14:44:43 +0200 |
commit | ebad1fee65b21f9a9e0901bbc66a2b8e5f9f9b70 (patch) | |
tree | f9a8467373ffcfa41a4ba6eca745423873494ad1 /ice40/chip.cc | |
parent | 5d343a168b98826c80482c11376b1a95b9b0bbca (diff) | |
parent | 7ff1b7e02f7436e03aae6204e4b23f106369ca6b (diff) | |
download | nextpnr-ebad1fee65b21f9a9e0901bbc66a2b8e5f9f9b70.tar.gz nextpnr-ebad1fee65b21f9a9e0901bbc66a2b8e5f9f9b70.tar.bz2 nextpnr-ebad1fee65b21f9a9e0901bbc66a2b8e5f9f9b70.zip |
Merge branch 'simann'
Diffstat (limited to 'ice40/chip.cc')
-rw-r--r-- | ice40/chip.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ice40/chip.cc b/ice40/chip.cc index b40963bf..e24fb9ac 100644 --- a/ice40/chip.cc +++ b/ice40/chip.cc @@ -273,6 +273,15 @@ BelId Chip::getPackagePinBel(const std::string &pin) const return BelId(); } +std::string Chip::getBelPackagePin(BelId bel) const +{ + for (int i = 0; i < package_info->num_pins; i++) { + if (package_info->pins[i].bel_index == bel.index) { + return std::string(package_info->pins[i].name); + } + } + return ""; +} // ----------------------------------------------------------------------- bool Chip::estimatePosition(BelId bel, float &x, float &y) const |