aboutsummaryrefslogtreecommitdiffstats
path: root/gowin/globals.cc
diff options
context:
space:
mode:
authormyrtle <gatecat@ds0.me>2022-08-11 07:26:20 +0100
committerGitHub <noreply@github.com>2022-08-11 07:26:20 +0100
commitb653e39991429dc3350447f8b69030c454dd2ba7 (patch)
treeb6bc6fe3cecc6962e12e61b9febb5c85e06960ed /gowin/globals.cc
parenta20d21bd135aceb9155eaee714488d1d76c60898 (diff)
parentc60fb94b6c45ca74632e972995555170063b3a03 (diff)
downloadnextpnr-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 'gowin/globals.cc')
-rw-r--r--gowin/globals.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/gowin/globals.cc b/gowin/globals.cc
index 1794dd4c..21ee722a 100644
--- a/gowin/globals.cc
+++ b/gowin/globals.cc
@@ -32,8 +32,7 @@ NEXTPNR_NAMESPACE_BEGIN
bool GowinGlobalRouter::is_clock_port(PortRef const &user)
{
- if ((user.cell->type == id_SLICE || user.cell->type == id_ODDR || user.cell->type == id_ODDRC) &&
- user.port == id_CLK) {
+ if ((user.cell->type.in(id_SLICE, id_ODDR, id_ODDRC)) && user.port == id_CLK) {
return true;
}
return false;