diff options
author | myrtle <gatecat@ds0.me> | 2022-08-11 07:26:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-11 07:26:20 +0100 |
commit | b653e39991429dc3350447f8b69030c454dd2ba7 (patch) | |
tree | b6bc6fe3cecc6962e12e61b9febb5c85e06960ed /ecp5/arch_place.cc | |
parent | a20d21bd135aceb9155eaee714488d1d76c60898 (diff) | |
parent | c60fb94b6c45ca74632e972995555170063b3a03 (diff) | |
download | nextpnr-b653e39991429dc3350447f8b69030c454dd2ba7.tar.gz nextpnr-b653e39991429dc3350447f8b69030c454dd2ba7.tar.bz2 nextpnr-b653e39991429dc3350447f8b69030c454dd2ba7.zip |
Merge pull request #1012 from YosysHQ/gatecat/refactor-id-in
refactor: Use IdString::in instead of || chains
Diffstat (limited to 'ecp5/arch_place.cc')
-rw-r--r-- | ecp5/arch_place.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ecp5/arch_place.cc b/ecp5/arch_place.cc index afe9aca0..fed9c055 100644 --- a/ecp5/arch_place.cc +++ b/ecp5/arch_place.cc @@ -187,7 +187,7 @@ bool Arch::isBelLocationValid(BelId bel) const CellInfo *cell = getBoundBelCell(bel); if (cell == nullptr) { return true; - } else if (cell->type == id_DCUA || cell->type == id_EXTREFB || cell->type == id_PCSCLKDIV) { + } else if (cell->type.in(id_DCUA, id_EXTREFB, id_PCSCLKDIV)) { return args.type != ArchArgs::LFE5U_25F && args.type != ArchArgs::LFE5U_45F && args.type != ArchArgs::LFE5U_85F; } else { @@ -203,8 +203,7 @@ void Arch::setup_wire_locations() CellInfo *ci = cell.second.get(); if (ci->bel == BelId()) continue; - if (ci->type == id_MULT18X18D || ci->type == id_DCUA || ci->type == id_DDRDLL || ci->type == id_DQSBUFM || - ci->type == id_EHXPLLL) { + if (ci->type.in(id_MULT18X18D, id_DCUA, id_DDRDLL, id_DQSBUFM, id_EHXPLLL)) { for (auto &port : ci->ports) { if (port.second.net == nullptr) continue; |