aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch_place.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-16 15:25:03 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-16 15:25:03 +0200
commit4d14bc291447ebc5b33d5d1972d5837f66efc88f (patch)
tree0bbca3b4b28190a0811e38d01920ab13059d8cac /ice40/arch_place.cc
parent6acf23cf37285e16050b44370be6cbe7dd3e0dc5 (diff)
parentef2164708b66b55300f46cc39467eb032498717e (diff)
downloadnextpnr-4d14bc291447ebc5b33d5d1972d5837f66efc88f.tar.gz
nextpnr-4d14bc291447ebc5b33d5d1972d5837f66efc88f.tar.bz2
nextpnr-4d14bc291447ebc5b33d5d1972d5837f66efc88f.zip
Merge remote-tracking branch 'origin/master' into chipdbng
Diffstat (limited to 'ice40/arch_place.cc')
-rw-r--r--ice40/arch_place.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/ice40/arch_place.cc b/ice40/arch_place.cc
index c02add1c..492ed846 100644
--- a/ice40/arch_place.cc
+++ b/ice40/arch_place.cc
@@ -18,11 +18,12 @@
*/
#include "arch_place.h"
+#include "cells.h"
NEXTPNR_NAMESPACE_BEGIN
-static const NetInfo *
-get_net_or_nullptr(const CellInfo *cell, const IdString port)
+static const NetInfo *get_net_or_nullptr(const CellInfo *cell,
+ const IdString port)
{
auto found = cell->ports.find(port);
if (found != cell->ports.end())
@@ -45,9 +46,12 @@ static bool logicCellsCompatible(const std::vector<const CellInfo *> &cells)
clk = get_net_or_nullptr(cell, "CLK");
sr = get_net_or_nullptr(cell, "SR");
- locals.insert(cen);
- locals.insert(clk);
- locals.insert(sr);
+ if (!is_global_net(cen))
+ locals.insert(cen);
+ if (!is_global_net(clk))
+ locals.insert(clk);
+ if (!is_global_net(sr))
+ locals.insert(sr);
if (std::stoi(cell->params.at("NEG_CLK"))) {
dffs_neg = true;
@@ -93,7 +97,8 @@ bool isValidBelForCell(Design *design, CellInfo *cell, BelId bel)
cells.push_back(cell);
return logicCellsCompatible(cells);
-
+ } else if (cell->type == "SB_IO") {
+ return design->chip.getBelPackagePin(bel) != "";
} else {
// TODO: IO cell clock checks
return true;