diff options
Diffstat (limited to 'machxo2/cells.h')
-rw-r--r-- | machxo2/cells.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/machxo2/cells.h b/machxo2/cells.h index b2971bda..f129f762 100644 --- a/machxo2/cells.h +++ b/machxo2/cells.h @@ -24,17 +24,17 @@ NEXTPNR_NAMESPACE_BEGIN -// Create a generic arch cell and return it +// Create a MachXO2 arch cell and return it // Name will be automatically assigned if not specified std::unique_ptr<CellInfo> create_machxo2_cell(Context *ctx, IdString type, std::string name = ""); // Return true if a cell is a LUT -inline bool is_lut(const BaseCtx *ctx, const CellInfo *cell) { return false; } +inline bool is_lut(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == ctx->id("LUT4"); } // Return true if a cell is a flipflop -inline bool is_ff(const BaseCtx *ctx, const CellInfo *cell) { return false; } +inline bool is_ff(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == ctx->id("FACADE_FF"); } -inline bool is_lc(const BaseCtx *ctx, const CellInfo *cell) { return false; } +inline bool is_lc(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == ctx->id("FACADE_SLICE"); } // Convert a LUT primitive to (part of) an GENERIC_SLICE, swapping ports // as needed. Set no_dff if a DFF is not being used, so that the output |