diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2019-10-12 13:47:01 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-10-20 09:41:48 +0200 |
commit | 74da9cc4241197b43d424ef039ed030fc602dc05 (patch) | |
tree | 83f4c3e1bcfbcb743f722f6005194378ee659a9d | |
parent | 4b79050ef4924045e8a7bc3356378340c0c773af (diff) | |
download | nextpnr-74da9cc4241197b43d424ef039ed030fc602dc05.tar.gz nextpnr-74da9cc4241197b43d424ef039ed030fc602dc05.tar.bz2 nextpnr-74da9cc4241197b43d424ef039ed030fc602dc05.zip |
wd wires
-rw-r--r-- | ecp5/arch.cc | 22 | ||||
-rw-r--r-- | ecp5/gfx.h | 11 |
2 files changed, 32 insertions, 1 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc index fec1084f..ac4326f2 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -798,8 +798,28 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const el.x1 = x + switchbox_x2; el.y1 = el.y2; ret.push_back(el); - } + if (tilewire >= TILE_WIRE_WD3 && tilewire <=TILE_WIRE_WD0) + { + GraphicElement el; + int part = (tilewire - TILE_WIRE_WD3) % 4; + int group = (tilewire - TILE_WIRE_WD3) / 2; + el.type = GraphicElement::TYPE_LINE; + el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE; + el.x1 = x + slice_x2 + 0.005f; + el.x2 = x + slice_x2 + 0.005f + 0.0017f *(4 - part); + el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_WDO3C_SLICE - TILE_WIRE_DUMMY_100 + 1 + part) + 3*slice_pitch; + el.y2 = el.y1; + ret.push_back(el); + + el.x1 = el.x2; + el.y2 = y + slice_y2 - 0.0017f * (TILE_WIRE_WD1B_SLICE - TILE_WIRE_DUMMY_100 + 1 + (part & 1)) + (3-group)*slice_pitch; + ret.push_back(el); + + el.x1 = x + slice_x2 + 0.005f; + el.y1 = el.y2; + ret.push_back(el); + } } if (decal.type == DecalId::TYPE_BEL) { BelId bel; @@ -377,6 +377,17 @@ enum GfxTileWireId TILE_WIRE_Q1, TILE_WIRE_Q0, TILE_WIRE_F0, + + + TILE_WIRE_WD3, + TILE_WIRE_WD2, + TILE_WIRE_WD1, + TILE_WIRE_WD0, + + TILE_WIRE_WAD3, + TILE_WIRE_WAD2, + TILE_WIRE_WAD1, + TILE_WIRE_WAD0 }; NEXTPNR_NAMESPACE_END |