aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/cells.h
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-12 12:13:11 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-12 12:13:11 +0200
commit2f61a9b98a621a35aa4763abaaf27ca12bfbbefa (patch)
treee1d205548f38a14019d22b757b0bf11a58e7886b /ice40/cells.h
parent5f813410aabdae3de84e11861248dcd0699b41c2 (diff)
downloadnextpnr-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.h')
-rw-r--r--ice40/cells.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ice40/cells.h b/ice40/cells.h
index 1fa85413..a2d45df6 100644
--- a/ice40/cells.h
+++ b/ice40/cells.h
@@ -45,6 +45,11 @@ inline bool is_ff(const CellInfo *cell)
cell->type == "SB_DFFNESS" || cell->type == "SB_DFFNES";
}
+// Convert a SB_LUT primitive to (part of) an ICESTORM_LC, swapping ports
+// as needed. Set no_dff if a DFF is not being used, so that the output
+// can be reconnected
+void lut_to_lc(CellInfo *lut, CellInfo *lc, bool no_dff = true);
+
// Convert a SB_DFFx primitive to (part of) an ICESTORM_LC, setting parameters
// and reconnecting signals as necessary. If pass_thru_lut is True, the LUT will
// be configured as pass through and D connected to I0, otherwise D will be