aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ice40/arch.cc')
-rw-r--r--ice40/arch.cc49
1 files changed, 0 insertions, 49 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc
index 6679217a..5c632faa 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -806,53 +806,4 @@ void Arch::assignCellInfo(CellInfo *cell)
}
}
-std::unique_ptr<CellInfo> Arch::spliceLUT(CellInfo *ci, IdString portId, bool onlyNonLUTs)
-{
- auto port = ci->ports[portId];
-
- NPNR_ASSERT(port.net != nullptr);
-
-
- // Create pass-through LUT.
- std::unique_ptr<CellInfo> pt =
- create_ice_cell(getCtx(), id("ICESTORM_LC"), ci->name.str(this) + "$nextpnr_ice40_pack_pll_lc");
- pt->params[id("LUT_INIT")] = "255"; // output is always I3
-
- // Create LUT output net.
- std::unique_ptr<NetInfo> out_net = std::unique_ptr<NetInfo>(new NetInfo);
- out_net->name = id(ci->name.str(this) + "$nextnr_ice40_pack_pll_net");
- out_net->driver.cell = pt.get();
- out_net->driver.port = id("O");
- pt->ports.at(id("O")).net = out_net.get();
-
- // New users of the original cell's port
- std::vector<PortRef> new_users;
- for (const auto &user : port.net->users) {
- if (onlyNonLUTs && user.cell->type == id("ICESTORM_LC")) {
- new_users.push_back(user);
- continue;
- }
- // Rewrite pointer into net in user.
- user.cell->ports[user.port].net = out_net.get();
- // Add user to net.
- PortRef pr;
- pr.cell = user.cell;
- pr.port = user.port;
- out_net->users.push_back(pr);
- }
-
- // Add LUT to new users.
- PortRef pr;
- pr.cell = pt.get();
- pr.port = id("I3");
- new_users.push_back(pr);
- pt->ports.at(id("I3")).net = port.net;
-
- // Replace users of the original net.
- port.net->users = new_users;
-
- nets[out_net->name] = std::move(out_net);
- return pt;
-}
-
NEXTPNR_NAMESPACE_END