diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-08-19 16:58:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-19 16:58:27 +0200 |
commit | 91c60ac66715de07c6980e753bbb906b0cf15a29 (patch) | |
tree | 1cae2e18895d0e9a7bd4efbd46d117bda2c82b32 /ice40/arch.cc | |
parent | 45bd0a8c723daad8718e38b0f563966e9da1ed34 (diff) | |
parent | b7d4c7afd97f88642552179965d964e34f8639b9 (diff) | |
download | nextpnr-91c60ac66715de07c6980e753bbb906b0cf15a29.tar.gz nextpnr-91c60ac66715de07c6980e753bbb906b0cf15a29.tar.bz2 nextpnr-91c60ac66715de07c6980e753bbb906b0cf15a29.zip |
Merge pull request #58 from YosysHQ/ice40ui
Add iCE40 gfx for span wires between IO tiles, including corners
Diffstat (limited to 'ice40/arch.cc')
-rw-r--r-- | ice40/arch.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc index 91dc5d66..c05eeee3 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -226,9 +226,12 @@ PortType Arch::getBelPinType(BelId bel, IdString pin) const return PORT_INOUT; } -std::vector<std::pair<IdString, std::string>> Arch::getBelAttrs(BelId) const +std::vector<std::pair<IdString, std::string>> Arch::getBelAttrs(BelId bel) const { std::vector<std::pair<IdString, std::string>> ret; + + ret.push_back(std::make_pair(id("INDEX"), stringf("%d", bel.index))); + return ret; } @@ -342,7 +345,7 @@ std::vector<std::pair<IdString, std::string>> Arch::getWireAttrs(WireId wire) co std::vector<std::pair<IdString, std::string>> ret; auto &wi = chip_info->wire_data[wire.index]; - ret.push_back(std::make_pair(id("INDEX"), stringf("%d", wi.netidx))); + ret.push_back(std::make_pair(id("INDEX"), stringf("%d", wire.index))); ret.push_back(std::make_pair(id("GRID_X"), stringf("%d", wi.x))); ret.push_back(std::make_pair(id("GRID_Y"), stringf("%d", wi.y))); @@ -402,9 +405,12 @@ IdString Arch::getPipName(PipId pip) const IdString Arch::getPipType(PipId pip) const { return IdString(); } -std::vector<std::pair<IdString, std::string>> Arch::getPipAttrs(PipId) const +std::vector<std::pair<IdString, std::string>> Arch::getPipAttrs(PipId pip) const { std::vector<std::pair<IdString, std::string>> ret; + + ret.push_back(std::make_pair(id("INDEX"), stringf("%d", pip.index))); + return ret; } @@ -723,7 +729,7 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const GraphicElement::style_t style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE; for (int i = 0; i < n; i++) - gfxTileWire(ret, p[i].x, p[i].y, GfxTileWireId(p[i].index), style); + gfxTileWire(ret, p[i].x, p[i].y, chip_info->width, chip_info->height, GfxTileWireId(p[i].index), style); } if (decal.type == DecalId::TYPE_PIP) { |