aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.h
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2018-11-12 13:42:25 +0000
committerDavid Shah <dave@ds0.me>2018-11-12 14:03:58 +0000
commitfc5e6bec9ab8bf2c25b2b943de4013daf727dfb8 (patch)
tree1f3c4171cb20e3ec8123ceef576c383fa0034d24 /common/nextpnr.h
parent11579a1046640a21b79aa6a1f579d3464267d0a1 (diff)
downloadnextpnr-fc5e6bec9ab8bf2c25b2b943de4013daf727dfb8.tar.gz
nextpnr-fc5e6bec9ab8bf2c25b2b943de4013daf727dfb8.tar.bz2
nextpnr-fc5e6bec9ab8bf2c25b2b943de4013daf727dfb8.zip
timing: Add support for clock constraints
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r--common/nextpnr.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h
index 216e1532..70af6c71 100644
--- a/common/nextpnr.h
+++ b/common/nextpnr.h
@@ -297,7 +297,7 @@ struct NetInfo : ArchNetInfo
// wire -> uphill_pip
std::unordered_map<WireId, PipMap> wires;
- ClockConstraint *clkconstr = nullptr;
+ std::unique_ptr<ClockConstraint> clkconstr;
TimingConstrObjectId tmg_id;
@@ -627,6 +627,9 @@ struct BaseCtx
void addConstraint(std::unique_ptr<TimingConstraint> constr);
void removeConstraint(IdString constrName);
+
+ // Intended to simplify Python API
+ void addClock(IdString net, float freq);
};
NEXTPNR_NAMESPACE_END