diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-06-16 15:25:03 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-06-16 15:25:03 +0200 |
commit | 4d14bc291447ebc5b33d5d1972d5837f66efc88f (patch) | |
tree | 0bbca3b4b28190a0811e38d01920ab13059d8cac /ice40/chip.cc | |
parent | 6acf23cf37285e16050b44370be6cbe7dd3e0dc5 (diff) | |
parent | ef2164708b66b55300f46cc39467eb032498717e (diff) | |
download | nextpnr-4d14bc291447ebc5b33d5d1972d5837f66efc88f.tar.gz nextpnr-4d14bc291447ebc5b33d5d1972d5837f66efc88f.tar.bz2 nextpnr-4d14bc291447ebc5b33d5d1972d5837f66efc88f.zip |
Merge remote-tracking branch 'origin/master' into chipdbng
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 db293f43..1255dfc8 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, int &x, int &y) const |