diff options
Diffstat (limited to 'ice40/cells.h')
-rw-r--r-- | ice40/cells.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ice40/cells.h b/ice40/cells.h index 660c7265..e5b4fa9c 100644 --- a/ice40/cells.h +++ b/ice40/cells.h @@ -51,7 +51,14 @@ inline bool is_ff(const CellInfo *cell) inline bool is_sb_io(const CellInfo *cell) { return cell->type == "SB_IO"; } // Return true if a cell is a global buffer -inline bool is_gbuf(const CellInfo *cell) {return cell->type == "SB_GB"; } +inline bool is_gbuf(const CellInfo *cell) { return cell->type == "SB_GB"; } + +// Return true if a cell is a RAM +inline bool is_ram(const CellInfo *cell) +{ + return cell->type == "SB_RAM40_4K" || cell->type == "SB_RAM40_4KNR" || + cell->type == "SB_RAM40_4KNW" || cell->type == "SB_RAM40_4KNRNW"; +} // 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 |