diff options
author | David Shah <davey1576@gmail.com> | 2018-06-16 17:09:41 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-16 17:09:41 +0200 |
commit | bb92dc09a8d3450a7d356edf0ac2e9971083cf2f (patch) | |
tree | b57ea93eab5dee41bddc3921c464155a1fbed562 /ice40/arch_place.cc | |
parent | c4241db1177b6caf1d5c44d83d434136c16e3dd4 (diff) | |
download | nextpnr-bb92dc09a8d3450a7d356edf0ac2e9971083cf2f.tar.gz nextpnr-bb92dc09a8d3450a7d356edf0ac2e9971083cf2f.tar.bz2 nextpnr-bb92dc09a8d3450a7d356edf0ac2e9971083cf2f.zip |
ice40: Promote reset signal
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/arch_place.cc')
-rw-r--r-- | ice40/arch_place.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ice40/arch_place.cc b/ice40/arch_place.cc index 492ed846..19c95816 100644 --- a/ice40/arch_place.cc +++ b/ice40/arch_place.cc @@ -99,6 +99,20 @@ bool isValidBelForCell(Design *design, CellInfo *cell, BelId bel) return logicCellsCompatible(cells); } else if (cell->type == "SB_IO") { return design->chip.getBelPackagePin(bel) != ""; + } else if (cell->type == "SB_GB") { + bool is_reset = false, is_cen = false; + assert(cell->ports.at("GLOBAL_BUFFER_OUTPUT").net != nullptr); + for (auto user : cell->ports.at("GLOBAL_BUFFER_OUTPUT").net->users) { + if (is_reset_port(user)) + is_reset = true; + } + IdString glb_net = chip.getWireName( + chip.getWireBelPin(bel, PIN_GLOBAL_BUFFER_OUTPUT)); + int glb_id = std::stoi(std::string("") + glb_net.str().back()); + if (is_reset) + return (glb_id % 2) == 0; + else + return true; } else { // TODO: IO cell clock checks return true; |