aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'ecp5/arch.h')
-rw-r--r--ecp5/arch.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/ecp5/arch.h b/ecp5/arch.h
index da86d4e2..1908f122 100644
--- a/ecp5/arch.h
+++ b/ecp5/arch.h
@@ -640,6 +640,21 @@ struct Arch : BaseCtx
return range;
}
+ IdString getWireBasename(WireId wire) const { return id(locInfo(wire)->wire_data[wire.index].name.get()); }
+
+ WireId getWireByLocAndBasename(Location loc, std::string basename) const
+ {
+ WireId wireId;
+ wireId.location = loc;
+ for (int i = 0; i < locInfo(wireId)->num_wires; i++) {
+ if (locInfo(wireId)->wire_data[i].name.get() == basename) {
+ wireId.index = i;
+ return wireId;
+ }
+ }
+ return WireId();
+ }
+
// -------------------------------------------------
PipId getPipByName(IdString name) const;
@@ -891,6 +906,14 @@ struct Arch : BaseCtx
}
NPNR_ASSERT_FALSE_STR("no tile at (" + std::to_string(col) + ", " + std::to_string(row) + ") with type in set");
}
+
+ GlobalInfoPOD globalInfoAtLoc(Location loc);
+
+ IdString id_trellis_slice;
+ IdString id_clk, id_lsr;
+ IdString id_clkmux, id_lsrmux;
+ IdString id_srmode, id_mode;
+
};
NEXTPNR_NAMESPACE_END