diff options
author | David Shah <davey1576@gmail.com> | 2018-06-23 16:12:52 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-23 16:12:52 +0200 |
commit | 1e8840b0f9400a1dc17ba6c7496314f82f0db2e1 (patch) | |
tree | 73e00ef273a99badcb10c08e28188ab4061d0f47 /ice40/cells.h | |
parent | 727f99267caf3de2d3884f00ac61fad1175705fc (diff) | |
download | nextpnr-1e8840b0f9400a1dc17ba6c7496314f82f0db2e1.tar.gz nextpnr-1e8840b0f9400a1dc17ba6c7496314f82f0db2e1.tar.bz2 nextpnr-1e8840b0f9400a1dc17ba6c7496314f82f0db2e1.zip |
Update from increased clangformat line length
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/cells.h')
-rw-r--r-- | ice40/cells.h | 76 |
1 files changed, 20 insertions, 56 deletions
diff --git a/ice40/cells.h b/ice40/cells.h index 29331445..7b5e63d9 100644 --- a/ice40/cells.h +++ b/ice40/cells.h @@ -30,89 +30,53 @@ NEXTPNR_NAMESPACE_BEGIN CellInfo *create_ice_cell(Context *ctx, IdString type, std::string name = ""); // Return true if a cell is a LUT -inline bool is_lut(const Context *ctx, const CellInfo *cell) -{ - return cell->type == ctx->id("SB_LUT4"); -} +inline bool is_lut(const Context *ctx, const CellInfo *cell) { return cell->type == ctx->id("SB_LUT4"); } // Return true if a cell is a flipflop inline bool is_ff(const Context *ctx, const CellInfo *cell) { - return cell->type == ctx->id("SB_DFF") || - cell->type == ctx->id("SB_DFFE") || - cell->type == ctx->id("SB_DFFSR") || - cell->type == ctx->id("SB_DFFR") || - cell->type == ctx->id("SB_DFFSS") || - cell->type == ctx->id("SB_DFFS") || - cell->type == ctx->id("SB_DFFESR") || - cell->type == ctx->id("SB_DFFER") || - cell->type == ctx->id("SB_DFFESS") || - cell->type == ctx->id("SB_DFFES") || - cell->type == ctx->id("SB_DFFN") || - cell->type == ctx->id("SB_DFFNE") || - cell->type == ctx->id("SB_DFFNSR") || - cell->type == ctx->id("SB_DFFNR") || - cell->type == ctx->id("SB_DFFNSS") || - cell->type == ctx->id("SB_DFFNS") || - cell->type == ctx->id("SB_DFFNESR") || - cell->type == ctx->id("SB_DFFNER") || - cell->type == ctx->id("SB_DFFNESS") || - cell->type == ctx->id("SB_DFFNES"); + return cell->type == ctx->id("SB_DFF") || cell->type == ctx->id("SB_DFFE") || cell->type == ctx->id("SB_DFFSR") || + cell->type == ctx->id("SB_DFFR") || cell->type == ctx->id("SB_DFFSS") || cell->type == ctx->id("SB_DFFS") || + cell->type == ctx->id("SB_DFFESR") || cell->type == ctx->id("SB_DFFER") || + cell->type == ctx->id("SB_DFFESS") || cell->type == ctx->id("SB_DFFES") || + cell->type == ctx->id("SB_DFFN") || cell->type == ctx->id("SB_DFFNE") || + cell->type == ctx->id("SB_DFFNSR") || cell->type == ctx->id("SB_DFFNR") || + cell->type == ctx->id("SB_DFFNSS") || cell->type == ctx->id("SB_DFFNS") || + cell->type == ctx->id("SB_DFFNESR") || cell->type == ctx->id("SB_DFFNER") || + cell->type == ctx->id("SB_DFFNESS") || cell->type == ctx->id("SB_DFFNES"); } -inline bool is_carry(const Context *ctx, const CellInfo *cell) -{ - return cell->type == ctx->id("SB_CARRY"); -} +inline bool is_carry(const Context *ctx, const CellInfo *cell) { return cell->type == ctx->id("SB_CARRY"); } -inline bool is_lc(const Context *ctx, const CellInfo *cell) -{ - return cell->type == ctx->id("ICESTORM_LC"); -} +inline bool is_lc(const Context *ctx, const CellInfo *cell) { return cell->type == ctx->id("ICESTORM_LC"); } // Return true if a cell is a SB_IO -inline bool is_sb_io(const Context *ctx, const CellInfo *cell) -{ - return cell->type == ctx->id("SB_IO"); -} +inline bool is_sb_io(const Context *ctx, const CellInfo *cell) { return cell->type == ctx->id("SB_IO"); } // Return true if a cell is a global buffer -inline bool is_gbuf(const Context *ctx, const CellInfo *cell) -{ - return cell->type == ctx->id("SB_GB"); -} +inline bool is_gbuf(const Context *ctx, const CellInfo *cell) { return cell->type == ctx->id("SB_GB"); } // Return true if a cell is a RAM inline bool is_ram(const Context *ctx, const CellInfo *cell) { - return cell->type == ctx->id("SB_RAM40_4K") || - cell->type == ctx->id("SB_RAM40_4KNR") || - cell->type == ctx->id("SB_RAM40_4KNW") || - cell->type == ctx->id("SB_RAM40_4KNRNW"); + return cell->type == ctx->id("SB_RAM40_4K") || cell->type == ctx->id("SB_RAM40_4KNR") || + cell->type == ctx->id("SB_RAM40_4KNW") || cell->type == ctx->id("SB_RAM40_4KNRNW"); } -inline bool is_sb_lfosc(const Context *ctx, const CellInfo *cell) -{ - return cell->type == ctx->id("SB_LFOSC"); -} +inline bool is_sb_lfosc(const Context *ctx, const CellInfo *cell) { return cell->type == ctx->id("SB_LFOSC"); } -inline bool is_sb_hfosc(const Context *ctx, const CellInfo *cell) -{ - return cell->type == ctx->id("SB_HFOSC"); -} +inline bool is_sb_hfosc(const Context *ctx, const CellInfo *cell) { return cell->type == ctx->id("SB_HFOSC"); } // 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(const Context *ctx, CellInfo *lut, CellInfo *lc, - bool no_dff = true); +void lut_to_lc(const Context *ctx, 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 // ignored -void dff_to_lc(const Context *ctx, CellInfo *dff, CellInfo *lc, - bool pass_thru_lut = false); +void dff_to_lc(const Context *ctx, CellInfo *dff, CellInfo *lc, bool pass_thru_lut = false); // Convert a nextpnr IO buffer to a SB_IO void nxio_to_sb(Context *ctx, CellInfo *nxio, CellInfo *sbio); |