diff options
author | gatecat <gatecat@ds0.me> | 2022-02-16 17:09:54 +0000 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2022-02-16 17:09:54 +0000 |
commit | 76683a1e3c123d28deff750c38467c6377936879 (patch) | |
tree | 379b38c06745919df0e87c1be1410e16793b0925 /machxo2/cells.h | |
parent | 9ef0bc3d3ad667d937ed803eba7b216a604d5624 (diff) | |
download | nextpnr-76683a1e3c123d28deff750c38467c6377936879.tar.gz nextpnr-76683a1e3c123d28deff750c38467c6377936879.tar.bz2 nextpnr-76683a1e3c123d28deff750c38467c6377936879.zip |
refactor: Use constids instead of id("..")
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'machxo2/cells.h')
-rw-r--r-- | machxo2/cells.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/machxo2/cells.h b/machxo2/cells.h index 409b68b1..7a9bab92 100644 --- a/machxo2/cells.h +++ b/machxo2/cells.h @@ -40,12 +40,12 @@ enum class LutType 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 cell->type == ctx->id("LUT4"); } +inline bool is_lut(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == id_LUT4; } // Return true if a cell is a flipflop -inline bool is_ff(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == ctx->id("FACADE_FF"); } +inline bool is_ff(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == id_FACADE_FF; } -inline bool is_lc(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == ctx->id("FACADE_SLICE"); } +inline bool is_lc(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == 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 |