diff options
author | Clifford Wolf <cliffordvienna@gmail.com> | 2018-07-11 12:04:53 +0000 |
---|---|---|
committer | Clifford Wolf <cliffordvienna@gmail.com> | 2018-07-11 12:04:53 +0000 |
commit | ce6afb5f7f7e2e26918c01d9b818bff9ceb93601 (patch) | |
tree | cb098c84c01655b15a02051d6fbbbdd368dba9ca /common | |
parent | 0d71ed76cbc80d6ef317a3ae743dcb92baca45ed (diff) | |
parent | 7081cca01654030f9a3b731cebf36e68590e3ed1 (diff) | |
download | nextpnr-ce6afb5f7f7e2e26918c01d9b818bff9ceb93601.tar.gz nextpnr-ce6afb5f7f7e2e26918c01d9b818bff9ceb93601.tar.bz2 nextpnr-ce6afb5f7f7e2e26918c01d9b818bff9ceb93601.zip |
Merge branch 'ice40gfx' into 'master'
Ice40gfx
See merge request SymbioticEDA/nextpnr!7
Diffstat (limited to 'common')
-rw-r--r-- | common/nextpnr.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h index 37e193b9..0b41ff81 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -155,6 +155,12 @@ NEXTPNR_NAMESPACE_END NEXTPNR_NAMESPACE_BEGIN +struct DecalXY +{ + DecalId decal; + float x = 0, y = 0; +}; + struct BelPin { BelId bel; @@ -273,6 +279,60 @@ struct Context : Arch // -------------------------------------------------------------- + std::vector<GraphicElement> getFrameGraphics() const __attribute__ ((deprecated)) { + std::vector<GraphicElement> ret; + DecalXY decalxy = getFrameDecal(); + 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; + } + + std::vector<GraphicElement> getBelGraphics(BelId bel) const __attribute__ ((deprecated)) { + std::vector<GraphicElement> ret; + DecalXY decalxy = getBelDecal(bel); + 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; + } + + std::vector<GraphicElement> getWireGraphics(WireId wire) const __attribute__ ((deprecated)) { + std::vector<GraphicElement> ret; + DecalXY decalxy = getWireDecal(wire); + 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; + } + + std::vector<GraphicElement> getPipGraphics(PipId pip) const __attribute__ ((deprecated)) { + std::vector<GraphicElement> ret; + DecalXY decalxy = getPipDecal(pip); + 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; + } + + // -------------------------------------------------------------- + uint64_t rngstate = 0x3141592653589793; uint64_t rng64() |