diff options
author | William D. Jones <thor0505@comcast.net> | 2020-11-26 05:01:14 -0500 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-02-12 10:36:59 +0000 |
commit | da6204442fb2635ec82621c00cdf4f7e3dfa3499 (patch) | |
tree | e747a5ed98058f2815e7216bb5e4c0bff5e4ef8b /machxo2/cells.h | |
parent | f2a240550e14184041d3f0cfd7526386d985f27c (diff) | |
download | nextpnr-da6204442fb2635ec82621c00cdf4f7e3dfa3499.tar.gz nextpnr-da6204442fb2635ec82621c00cdf4f7e3dfa3499.tar.bz2 nextpnr-da6204442fb2635ec82621c00cdf4f7e3dfa3499.zip |
machxo2: Add LUT and FF packing functions.
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 |