diff options
author | David Shah <davey1576@gmail.com> | 2018-06-12 12:13:11 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-12 12:13:11 +0200 |
commit | 2f61a9b98a621a35aa4763abaaf27ca12bfbbefa (patch) | |
tree | e1d205548f38a14019d22b757b0bf11a58e7886b /ice40/cells.cc | |
parent | 5f813410aabdae3de84e11861248dcd0699b41c2 (diff) | |
download | nextpnr-2f61a9b98a621a35aa4763abaaf27ca12bfbbefa.tar.gz nextpnr-2f61a9b98a621a35aa4763abaaf27ca12bfbbefa.tar.bz2 nextpnr-2f61a9b98a621a35aa4763abaaf27ca12bfbbefa.zip |
ice40: Start working on a packer, currently not tested
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/cells.cc')
-rw-r--r-- | ice40/cells.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ice40/cells.cc b/ice40/cells.cc index 328b5f2d..db13a55f 100644 --- a/ice40/cells.cc +++ b/ice40/cells.cc @@ -64,6 +64,19 @@ CellInfo *create_ice_cell(Design *design, IdString type, IdString name) return new_cell; } +void lut_to_lc(CellInfo *lut, CellInfo *lc, bool no_dff) +{ + lc->params["LUT_INIT"] = lut->params["LUT_INIT"]; + replace_port(lut, "I0", lc, "I0"); + replace_port(lut, "I1", lc, "I1"); + replace_port(lut, "I2", lc, "I2"); + replace_port(lut, "I3", lc, "I3"); + if (no_dff) { + replace_port(lut, "O", lc, "O"); + lc->params["DFF_ENABLE"] = "0"; + } +} + void dff_to_lc(CellInfo *dff, CellInfo *lc, bool pass_thru_lut) { lc->params["DFF_ENABLE"] = "1"; |