From a436035424368b3d424822c7b72f99044c93dafd Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 12 Jul 2018 17:22:29 +0200 Subject: Add Groups API Signed-off-by: Clifford Wolf --- common/nextpnr.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'common') 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 belUiReload; std::unordered_set wireUiReload; std::unordered_set pipUiReload; + std::unordered_set 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 getGroupGraphics(GroupId group) const { + std::vector 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 -- cgit v1.2.3