aboutsummaryrefslogtreecommitdiffstats
path: root/nexus/arch.cc
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/arch.cc
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/arch.cc')
-rw-r--r--nexus/arch.cc11
1 files changed, 11 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