aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-07-12 17:22:29 +0200
committerClifford Wolf <clifford@clifford.at>2018-07-12 17:22:29 +0200
commita436035424368b3d424822c7b72f99044c93dafd (patch)
tree9bbf888bc6db482b42677656f4ee3fd4357355e8 /common/nextpnr.h
parent1245eb6343f272b6aeb096b0d41407c5ea6bc5cd (diff)
downloadnextpnr-a436035424368b3d424822c7b72f99044c93dafd.tar.gz
nextpnr-a436035424368b3d424822c7b72f99044c93dafd.tar.bz2
nextpnr-a436035424368b3d424822c7b72f99044c93dafd.zip
Add Groups API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r--common/nextpnr.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h
index 09bd1554..a162b85c 100644
--- a/common/nextpnr.h
+++ b/common/nextpnr.h
@@ -271,6 +271,7 @@ struct BaseCtx
std::unordered_set<BelId> belUiReload;
std::unordered_set<WireId> wireUiReload;
std::unordered_set<PipId> pipUiReload;
+ std::unordered_set<GroupId> groupUiReload;
void refreshUi()
{
@@ -296,6 +297,11 @@ struct BaseCtx
{
pipUiReload.insert(pip);
}
+
+ void refreshUiGroup(GroupId group)
+ {
+ groupUiReload.insert(group);
+ }
};
NEXTPNR_NAMESPACE_END
@@ -368,6 +374,19 @@ struct Context : Arch
return ret;
}
+ NPNR_DEPRECATED std::vector<GraphicElement> getGroupGraphics(GroupId group) const {
+ std::vector<GraphicElement> ret;
+ DecalXY decalxy = getGroupDecal(group);
+ ret = getDecalGraphics(decalxy.decal);
+ for (auto &it : ret) {
+ it.x1 += decalxy.x;
+ it.x2 += decalxy.x;
+ it.y1 += decalxy.y;
+ it.y2 += decalxy.y;
+ }
+ return ret;
+ }
+
// --------------------------------------------------------------
// provided by router1.cc