diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-07-12 17:22:29 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-07-12 17:22:29 +0200 |
commit | a436035424368b3d424822c7b72f99044c93dafd (patch) | |
tree | 9bbf888bc6db482b42677656f4ee3fd4357355e8 /common/nextpnr.h | |
parent | 1245eb6343f272b6aeb096b0d41407c5ea6bc5cd (diff) | |
download | nextpnr-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.h | 19 |
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 |