diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-09-25 18:21:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-25 18:21:56 +0200 |
commit | 07cf349ee46a8c8a3163d2f8a146beab02e6b487 (patch) | |
tree | a43f9f922d2af2ecb5ab59c1981acf5b2ab47405 /ice40/cells.cc | |
parent | 1eb7411fb0b814c524b83dc3c16715a814db8f5d (diff) | |
parent | dea87e46c4f316a950425504cadda56aaeeab280 (diff) | |
download | nextpnr-07cf349ee46a8c8a3163d2f8a146beab02e6b487.tar.gz nextpnr-07cf349ee46a8c8a3163d2f8a146beab02e6b487.tar.bz2 nextpnr-07cf349ee46a8c8a3163d2f8a146beab02e6b487.zip |
Merge pull request #79 from YosysHQ/ice40lvds
ice40: Adding LVDS input support
Diffstat (limited to 'ice40/cells.cc')
-rw-r--r-- | ice40/cells.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ice40/cells.cc b/ice40/cells.cc index 1c1e7a05..886dae2a 100644 --- a/ice40/cells.cc +++ b/ice40/cells.cc @@ -314,7 +314,7 @@ void dff_to_lc(const Context *ctx, CellInfo *dff, CellInfo *lc, bool pass_thru_l replace_port(dff, ctx->id("Q"), lc, ctx->id("O")); } -void nxio_to_sb(Context *ctx, CellInfo *nxio, CellInfo *sbio) +void nxio_to_sb(Context *ctx, CellInfo *nxio, CellInfo *sbio, std::unordered_set<IdString> &todelete_cells) { if (nxio->type == ctx->id("$nextpnr_ibuf")) { sbio->params[ctx->id("PIN_TYPE")] = "1"; @@ -341,12 +341,16 @@ void nxio_to_sb(Context *ctx, CellInfo *nxio, CellInfo *sbio) sbio->params[ctx->id("PIN_TYPE")] = "41"; replace_port(tbuf, ctx->id("A"), sbio, ctx->id("D_OUT_0")); replace_port(tbuf, ctx->id("E"), sbio, ctx->id("OUTPUT_ENABLE")); - ctx->nets.erase(donet->name); - if (!donet->users.empty()) + + if (donet->users.size() > 1) { + for (auto user : donet->users) + log_info(" remaining tristate user: %s.%s\n", user.cell->name.c_str(ctx), user.port.c_str(ctx)); log_error("unsupported tristate IO pattern for IO buffer '%s', " "instantiate SB_IO manually to ensure correct behaviour\n", nxio->name.c_str(ctx)); - ctx->cells.erase(tbuf->name); + } + ctx->nets.erase(donet->name); + todelete_cells.insert(tbuf->name); } } |