aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-09-13 19:01:26 +0100
committerGitHub <noreply@github.com>2019-09-13 19:01:26 +0100
commitbc6b47efe097b5086fd6aaf4fb8be51d97435719 (patch)
treed3d88bd0f0ce92817504754ac8670c107e2db417 /common/nextpnr.cc
parent3975424ff544406915a9e995ef14a0b060b30661 (diff)
parent95540763b972bc389b76000397d4e210d59fa4bf (diff)
downloadnextpnr-bc6b47efe097b5086fd6aaf4fb8be51d97435719.tar.gz
nextpnr-bc6b47efe097b5086fd6aaf4fb8be51d97435719.tar.bz2
nextpnr-bc6b47efe097b5086fd6aaf4fb8be51d97435719.zip
Merge pull request #329 from YosysHQ/dave/net_aliases
json: Add support for net aliases
Diffstat (limited to 'common/nextpnr.cc')
-rw-r--r--common/nextpnr.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc
index ab4601a6..d73c0c02 100644
--- a/common/nextpnr.cc
+++ b/common/nextpnr.cc
@@ -474,10 +474,10 @@ void BaseCtx::addClock(IdString net, float freq)
cc->period = getCtx()->getDelayFromNS(1000 / freq);
cc->high = getCtx()->getDelayFromNS(500 / freq);
cc->low = getCtx()->getDelayFromNS(500 / freq);
- if (!nets.count(net)) {
+ if (!net_aliases.count(net)) {
log_warning("net '%s' does not exist in design, ignoring clock constraint\n", net.c_str(this));
} else {
- nets.at(net)->clkconstr = std::move(cc);
+ getNetByAlias(net)->clkconstr = std::move(cc);
log_info("constraining clock net '%s' to %.02f MHz\n", net.c_str(this), freq);
}
}