From 8c79044d43417790a2a8844ea09cfc038e6b239c Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 12 Oct 2019 19:07:54 +0200 Subject: more wires between switchboxes --- ecp5/arch.cc | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'ecp5/arch.cc') diff --git a/ecp5/arch.cc b/ecp5/arch.cc index 80dc8817..ce27e077 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -677,13 +677,49 @@ std::vector Arch::getDecalGraphics(DecalId decal) const GraphicElement el; el.type = GraphicElement::TYPE_LINE; el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE; - el.x1 = x + switchbox_x1 + 0.005f + 0.0017f * (tilewire - TILE_WIRE_V01N0001); + el.x1 = x + switchbox_x1 + 0.0017f*4 + 0.0017f * (tilewire - TILE_WIRE_V01N0001); el.x2 = el.x1; el.y1 = y + switchbox_y1; el.y2 = y + switchbox_y2 - 1; ret.push_back(el); } } + if (wire_type == id_WIRE_TYPE_H01) { + if (tilewire >= TILE_WIRE_H01E0001 && tilewire <=TILE_WIRE_H01W0100) + //if (tilewire >= TILE_WIRE_H01E0000 && tilewire <=TILE_WIRE_H01W0101) // not existing in trellis + { + GraphicElement el; + el.type = GraphicElement::TYPE_LINE; + el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE; + el.x1 = x + switchbox_x1; + el.x2 = x + switchbox_x2 - 1; + el.y1 = y + switchbox_y1 + 0.0017f*12 - 0.0017f * (tilewire - TILE_WIRE_H01E0001); + el.y2 = el.y1; + ret.push_back(el); + } + } + if (wire_type == id_WIRE_TYPE_HFI) { + // only TILE_WIRE_HFIE0000 + GraphicElement el; + el.type = GraphicElement::TYPE_LINE; + el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE; + el.x1 = x + switchbox_x1; + el.x2 = x + switchbox_x2 - 1; + el.y1 = y + switchbox_y1 + 0.0017f*1; + el.y2 = el.y1; + ret.push_back(el); + } + if (wire_type == id_WIRE_TYPE_HL7) { + // only TILE_WIRE_HL7W0001 + GraphicElement el; + el.type = GraphicElement::TYPE_LINE; + el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE; + el.x1 = x + switchbox_x2 - 1; + el.x2 = x + switchbox_x1; + el.y1 = y + switchbox_y1 + 0.0017f*20; + el.y2 = el.y1; + ret.push_back(el); + } if (wire_type == id_WIRE_TYPE_NONE) { if (tilewire >= TILE_WIRE_FCO && tilewire <=TILE_WIRE_FCI) { -- cgit v1.2.3