aboutsummaryrefslogtreecommitdiffstats
path: root/nexus
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-05-20 14:54:23 +0100
committergatecat <gatecat@ds0.me>2021-05-20 14:54:23 +0100
commit1595c0726079e62313e0df82bdb31120b72bdc39 (patch)
tree0b8e243e8b72785bde9c4d1b3758aa5658ffa465 /nexus
parent5a41d2070c8a7c065d4e3fbfb70b3a3fbd19b319 (diff)
downloadnextpnr-1595c0726079e62313e0df82bdb31120b72bdc39.tar.gz
nextpnr-1595c0726079e62313e0df82bdb31120b72bdc39.tar.bz2
nextpnr-1595c0726079e62313e0df82bdb31120b72bdc39.zip
router2: Add heatmap by routing resource type
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'nexus')
-rw-r--r--nexus/arch.cc11
-rw-r--r--nexus/arch.h2
-rw-r--r--nexus/constids.inc2
3 files changed, 15 insertions, 0 deletions
diff --git a/nexus/arch.cc b/nexus/arch.cc
index f804cdd9..d5bb9deb 100644
--- a/nexus/arch.cc
+++ b/nexus/arch.cc
@@ -325,6 +325,17 @@ std::vector<std::pair<IdString, std::string>> Arch::getWireAttrs(WireId wire) co
return ret;
}
+IdString Arch::getWireType(WireId wire) const
+{
+ IdString basename(wire_data(wire).name);
+ const std::string &basename_str = basename.str(this);
+ // Interconnect - derive a type
+ if ((basename_str[0] == 'H' || basename_str[0] == 'V') && basename_str[1] == '0')
+ return id(basename_str.substr(0, 4));
+ else
+ return id_GENERAL;
+}
+
// -----------------------------------------------------------------------
PipId Arch::getPipByName(IdStringList name) const
diff --git a/nexus/arch.h b/nexus/arch.h
index 55e9becd..b3558413 100644
--- a/nexus/arch.h
+++ b/nexus/arch.h
@@ -1034,6 +1034,7 @@ struct Arch : BaseArch<ArchRanges>
// -------------------------------------------------
WireId getWireByName(IdStringList name) const override;
+
IdStringList getWireName(WireId wire) const override
{
NPNR_ASSERT(wire != WireId());
@@ -1043,6 +1044,7 @@ struct Arch : BaseArch<ArchRanges>
}
std::vector<std::pair<IdString, std::string>> getWireAttrs(WireId wire) const override;
+ IdString getWireType(WireId wire) const override;
DelayQuad getWireDelay(WireId wire) const override { return DelayQuad(0); }
diff --git a/nexus/constids.inc b/nexus/constids.inc
index 03b144a2..d75b6ea5 100644
--- a/nexus/constids.inc
+++ b/nexus/constids.inc
@@ -503,3 +503,5 @@ X(U2END2)
X(U3END3)
X(UED0THEN)
X(URXCKINE)
+
+X(GENERAL)