diff options
author | Pepijn de Vos <pepijndevos@gmail.com> | 2019-11-08 15:54:27 +0100 |
---|---|---|
committer | Pepijn de Vos <pepijndevos@gmail.com> | 2019-11-08 15:54:27 +0100 |
commit | 7c362f292c0807b1e781922c79af94fd8b82477c (patch) | |
tree | 81d3f60003b967c46804f23a677fab7a5f25aaa8 /generic/cells.cc | |
parent | 21c09c8b8f5e0456cc4d7e8017c27d25dd676377 (diff) | |
download | nextpnr-7c362f292c0807b1e781922c79af94fd8b82477c.tar.gz nextpnr-7c362f292c0807b1e781922c79af94fd8b82477c.tar.bz2 nextpnr-7c362f292c0807b1e781922c79af94fd8b82477c.zip |
dedicated output for LUT in GENERIC_SLICE
Diffstat (limited to 'generic/cells.cc')
-rw-r--r-- | generic/cells.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/generic/cells.cc b/generic/cells.cc index 53886e33..3b754406 100644 --- a/generic/cells.cc +++ b/generic/cells.cc @@ -44,13 +44,13 @@ std::unique_ptr<CellInfo> create_generic_cell(Context *ctx, IdString type, std:: if (type == ctx->id("GENERIC_SLICE")) { new_cell->params[ctx->id("K")] = std::to_string(ctx->args.K); new_cell->params[ctx->id("INIT")] = 0; - new_cell->params[ctx->id("FF_USED")] = 0; for (int i = 0; i < ctx->args.K; i++) add_port(ctx, new_cell.get(), "I[" + std::to_string(i) + "]", PORT_IN); add_port(ctx, new_cell.get(), "CLK", PORT_IN); + add_port(ctx, new_cell.get(), "F", PORT_OUT); add_port(ctx, new_cell.get(), "Q", PORT_OUT); } else if (type == ctx->id("GENERIC_IOB")) { new_cell->params[ctx->id("INPUT_USED")] = 0; @@ -80,18 +80,16 @@ void lut_to_lc(const Context *ctx, CellInfo *lut, CellInfo *lc, bool no_dff) } if (no_dff) { - replace_port(lut, ctx->id("Q"), lc, ctx->id("Q")); - lc->params[ctx->id("FF_USED")] = 0; + replace_port(lut, ctx->id("Q"), lc, ctx->id("F")); } } void dff_to_lc(const Context *ctx, CellInfo *dff, CellInfo *lc, bool pass_thru_lut) { - lc->params[ctx->id("FF_USED")] = 1; replace_port(dff, ctx->id("CLK"), lc, ctx->id("CLK")); if (pass_thru_lut) { - lc->params[ctx->id("INIT")] = 2; + lc->params[ctx->id("INIT")] = 0xAAAA; replace_port(dff, ctx->id("D"), lc, ctx->id("I[0]")); } |