From a59faa8df0b615f8d09e703c93743a26e3c35823 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 12 Oct 2019 12:06:17 +0200 Subject: Add output wires --- ecp5/arch.cc | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/ecp5/arch.cc b/ecp5/arch.cc index 31e3e1fa..ec9004c7 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -762,6 +762,41 @@ std::vector Arch::getDecalGraphics(DecalId decal) const el.y2 = el.y1; ret.push_back(el); } + + + if (tilewire >= TILE_WIRE_F7 && tilewire <=TILE_WIRE_F0) + { + int group = (tilewire - TILE_WIRE_F7) / 4; + int part = (tilewire - TILE_WIRE_F7) % 4; + GraphicElement el; + 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 * (7 *(4-group)-part)); + el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_F7_SLICE - TILE_WIRE_DUMMY_100 + 1 + part) + (3 - group )*slice_pitch; + el.y2 = el.y1; + ret.push_back(el); + + if (part == 0 || part == 3) { + GraphicElement el2; + el2.type = GraphicElement::TYPE_LINE; + el2.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE; + el2.x1 = el.x1; + el2.x2 = el.x1; + el2.y1 = el.y1; + el2.y2 = el.y1 + 0.0017f * (part==3 ? -1 : 1); + ret.push_back(el2); + } + + el.x1 = el.x2; + el.y2 = el.y1 - (0.0017f * (30 *(3-group) + (3-part)*2 + 10)); + ret.push_back(el); + + el.x1 = x + switchbox_x2; + el.y1 = el.y2; + ret.push_back(el); + + } } if (decal.type == DecalId::TYPE_BEL) { BelId bel; -- cgit v1.2.3