diff options
author | gatecat <gatecat@ds0.me> | 2022-08-10 18:58:22 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2022-08-10 18:58:22 +0100 |
commit | c60fb94b6c45ca74632e972995555170063b3a03 (patch) | |
tree | b6bc6fe3cecc6962e12e61b9febb5c85e06960ed /ecp5/cells.h | |
parent | a20d21bd135aceb9155eaee714488d1d76c60898 (diff) | |
download | nextpnr-c60fb94b6c45ca74632e972995555170063b3a03.tar.gz nextpnr-c60fb94b6c45ca74632e972995555170063b3a03.tar.bz2 nextpnr-c60fb94b6c45ca74632e972995555170063b3a03.zip |
refactor: Use IdString::in instead of || chains
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'ecp5/cells.h')
-rw-r--r-- | ecp5/cells.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ecp5/cells.h b/ecp5/cells.h index 185b19ce..c79bf8cd 100644 --- a/ecp5/cells.h +++ b/ecp5/cells.h @@ -47,15 +47,13 @@ inline bool is_l6mux(const BaseCtx *ctx, const CellInfo *cell) { return cell->ty inline bool is_iologic_input_cell(const BaseCtx *ctx, const CellInfo *cell) { - return cell->type == id_IDDRX1F || cell->type == id_IDDRX2F || cell->type == id_IDDR71B || - cell->type == id_IDDRX2DQA || + return cell->type.in(id_IDDRX1F, id_IDDRX2F, id_IDDR71B, id_IDDRX2DQA) || (cell->type == id_TRELLIS_FF && bool_or_default(cell->attrs, id_syn_useioff) && (str_or_default(cell->attrs, id_ioff_dir, "") != "output")); } inline bool is_iologic_output_cell(const BaseCtx *ctx, const CellInfo *cell) { - return cell->type == id_ODDRX1F || cell->type == id_ODDRX2F || cell->type == id_ODDR71B || - cell->type == id_ODDRX2DQA || cell->type == id_ODDRX2DQSB || cell->type == id_OSHX2A || + return cell->type.in(id_ODDRX1F, id_ODDRX2F, id_ODDR71B, id_ODDRX2DQA, id_ODDRX2DQSB, id_OSHX2A) || (cell->type == id_TRELLIS_FF && bool_or_default(cell->attrs, id_syn_useioff) && (str_or_default(cell->attrs, id_ioff_dir, "") != "input")); } |