aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2018-12-04 12:02:26 +0000
committerDavid Shah <dave@ds0.me>2018-12-04 12:02:26 +0000
commit0c93b55650a8a8919f2697cd6d6dbd373bf5ff19 (patch)
tree97979144e99d0e4cb567c7ccb78b0d6176a15487 /ice40
parent12aca1558f8827f491bb9a6370c1abb8774e5167 (diff)
downloadnextpnr-0c93b55650a8a8919f2697cd6d6dbd373bf5ff19.tar.gz
nextpnr-0c93b55650a8a8919f2697cd6d6dbd373bf5ff19.tar.bz2
nextpnr-0c93b55650a8a8919f2697cd6d6dbd373bf5ff19.zip
ice40: Include I3 connectivity in chain
Thanks @smunaut Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ice40')
-rw-r--r--ice40/chains.cc48
1 files changed, 25 insertions, 23 deletions
diff --git a/ice40/chains.cc b/ice40/chains.cc
index fb361d2d..07eb100b 100644
--- a/ice40/chains.cc
+++ b/ice40/chains.cc
@@ -163,29 +163,31 @@ class ChainConstrainer
void process_carries()
{
- std::vector<CellChain> carry_chains =
- find_chains(ctx, [](const Context *ctx, const CellInfo *cell) { return is_lc(ctx, cell); },
- [](const Context *ctx, const
-
- CellInfo *cell) {
- CellInfo *carry_prev =
- net_driven_by(ctx, cell->ports.at(ctx->id("CIN")).net, is_lc, ctx->id("COUT"));
- if (carry_prev != nullptr)
- return carry_prev;
- /*CellInfo *i3_prev = net_driven_by(ctx, cell->ports.at(ctx->id("I3")).net, is_lc,
- ctx->id("COUT")); if (i3_prev != nullptr) return i3_prev;*/
- return (CellInfo *)nullptr;
- },
- [](const Context *ctx, const CellInfo *cell) {
- CellInfo *carry_next = net_only_drives(ctx, cell->ports.at(ctx->id("COUT")).net, is_lc,
- ctx->id("CIN"), false);
- if (carry_next != nullptr)
- return carry_next;
- /*CellInfo *i3_next =
- net_only_drives(ctx, cell->ports.at(ctx->id("COUT")).net, is_lc, ctx->id("I3"),
- false); if (i3_next != nullptr) return i3_next;*/
- return (CellInfo *)nullptr;
- });
+ std::vector<CellChain> carry_chains = find_chains(
+ ctx, [](const Context *ctx, const CellInfo *cell) { return is_lc(ctx, cell); },
+ [](const Context *ctx, const
+
+ CellInfo *cell) {
+ CellInfo *carry_prev =
+ net_driven_by(ctx, cell->ports.at(ctx->id("CIN")).net, is_lc, ctx->id("COUT"));
+ if (carry_prev != nullptr)
+ return carry_prev;
+ CellInfo *i3_prev = net_driven_by(ctx, cell->ports.at(ctx->id("I3")).net, is_lc, ctx->id("COUT"));
+ if (i3_prev != nullptr)
+ return i3_prev;
+ return (CellInfo *)nullptr;
+ },
+ [](const Context *ctx, const CellInfo *cell) {
+ CellInfo *carry_next =
+ net_only_drives(ctx, cell->ports.at(ctx->id("COUT")).net, is_lc, ctx->id("CIN"), false);
+ if (carry_next != nullptr)
+ return carry_next;
+ CellInfo *i3_next =
+ net_only_drives(ctx, cell->ports.at(ctx->id("COUT")).net, is_lc, ctx->id("I3"), false);
+ if (i3_next != nullptr)
+ return i3_next;
+ return (CellInfo *)nullptr;
+ });
std::unordered_set<IdString> chained;
for (auto &base_chain : carry_chains) {
for (auto c : base_chain.cells)