aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r--common/nextpnr.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h
index 70af6c71..5704e258 100644
--- a/common/nextpnr.h
+++ b/common/nextpnr.h
@@ -288,7 +288,7 @@ struct ClockConstraint;
struct NetInfo : ArchNetInfo
{
IdString name;
- int32_t udata;
+ int32_t udata = 0;
PortRef driver;
std::vector<PortRef> users;
@@ -579,13 +579,23 @@ struct BaseCtx
const Context *getCtx() const { return reinterpret_cast<const Context *>(this); }
- template <typename T> const char *nameOf(const T *obj)
+ const char *nameOf(IdString name) const
+ {
+ return name.c_str(this);
+ }
+
+ template <typename T> const char *nameOf(const T *obj) const
{
if (obj == nullptr)
return "";
- return obj->name.c_str(getCtx());
+ return obj->name.c_str(this);
}
+ const char *nameOfBel(BelId bel) const;
+ const char *nameOfWire(WireId wire) const;
+ const char *nameOfPip(PipId pip) const;
+ const char *nameOfGroup(GroupId group) const;
+
// --------------------------------------------------------------
bool allUiReload = true;
@@ -657,6 +667,7 @@ struct Context : Arch, DeterministicRNG
delay_t getNetinfoRouteDelay(const NetInfo *net_info, const PortRef &sink) const;
// provided by router1.cc
+ bool checkRoutedDesign() const;
bool getActualRouteDelay(WireId src_wire, WireId dst_wire, delay_t *delay = nullptr,
std::unordered_map<WireId, PipId> *route = nullptr, bool useEstimate = true);