aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch_place.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-07-25 11:04:26 +0000
committerDavid Shah <davey1576@gmail.com>2018-07-25 11:04:26 +0000
commit9bcdf2000901a49d96b3ccd16fcb154ff7abc7b3 (patch)
treeaddeb0d07b00e7206c0a9bc3810025f199919f85 /ice40/arch_place.cc
parente39290b71299843eff858fb51543b99a06178a1d (diff)
parent2c34a50a7c45d3718629ada8691816497447afe4 (diff)
downloadnextpnr-9bcdf2000901a49d96b3ccd16fcb154ff7abc7b3.tar.gz
nextpnr-9bcdf2000901a49d96b3ccd16fcb154ff7abc7b3.tar.bz2
nextpnr-9bcdf2000901a49d96b3ccd16fcb154ff7abc7b3.zip
Merge branch 'q3k/pll-pads' into 'master'
ice40: PLL40_*_PAD support See merge request SymbioticEDA/nextpnr!21
Diffstat (limited to 'ice40/arch_place.cc')
-rw-r--r--ice40/arch_place.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/ice40/arch_place.cc b/ice40/arch_place.cc
index 59e1807d..b3404d6c 100644
--- a/ice40/arch_place.cc
+++ b/ice40/arch_place.cc
@@ -124,12 +124,16 @@ bool Arch::isValidBelForCell(CellInfo *cell, BelId bel) const
}
// Is there a PLL that shares this IO buffer?
if (pll_bel.index != -1) {
+ auto pll_cell = getBoundBelCell(pll_bel);
// Is a PLL placed in this PLL bel?
- if (!checkBelAvail(pll_bel)) {
+ if (pll_cell != IdString()) {
// Is the shared port driving a net?
- auto pll_cell = getBoundBelCell(pll_bel);
auto pi = cells.at(pll_cell)->ports[portPinToId(pll_bel_pin)];
if (pi.net != nullptr) {
+ // Are we perhaps a PAD INPUT Bel that can be placed here?
+ if (cells.at(pll_cell)->attrs[id("BEL_PAD_INPUT")] == getBelName(bel).str(this)) {
+ return true;
+ }
return false;
}
}