aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r--common/nextpnr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h
index 177048bf..4f9f7f23 100644
--- a/common/nextpnr.h
+++ b/common/nextpnr.h
@@ -609,6 +609,9 @@ struct BaseCtx
std::unordered_map<IdString, std::unique_ptr<NetInfo>> nets;
std::unordered_map<IdString, std::unique_ptr<CellInfo>> cells;
+ // Aliases for nets, which may have more than one name due to assignments and hierarchy
+ std::unordered_map<IdString, IdString> net_aliases;
+
// Top-level ports
std::unordered_map<IdString, PortInfo> ports;
@@ -738,6 +741,8 @@ struct BaseCtx
TimingConstrObjectId timingCellObject(CellInfo *cell);
TimingConstrObjectId timingPortObject(CellInfo *cell, IdString port);
+ NetInfo *getNetByAlias(IdString alias) const { return nets.at(net_aliases.at(alias)).get(); }
+
void addConstraint(std::unique_ptr<TimingConstraint> constr);
void removeConstraint(IdString constrName);