diff options
Diffstat (limited to 'ecp5/arch.cc')
-rw-r--r-- | ecp5/arch.cc | 63 |
1 files changed, 62 insertions, 1 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc index 3c56e057..947d0f93 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -701,7 +701,68 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const ret.push_back(el); } } - } + + if (tilewire >= TILE_WIRE_LSR1 && tilewire <=TILE_WIRE_CLK0) + { + GraphicElement el; + el.type = GraphicElement::TYPE_LINE; + el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE; + el.x1 = x + switchbox_x2; + el.x2 = x + switchbox_x2 + 0.0017f * (6-(tilewire-TILE_WIRE_LSR1)); + el.y1 = y + slice_y2 - 0.0017f * (tilewire - TILE_WIRE_LSR1 - 5) + 3*slice_pitch; + el.y2 = y + slice_y2 - 0.0017f * (tilewire - TILE_WIRE_LSR1 - 5) + 3*slice_pitch; + ret.push_back(el); + + if (tilewire == TILE_WIRE_LSR1 || tilewire==TILE_WIRE_LSR0) { + el.x1 = el.x2; + el.y2 = y + slice_y2 - 0.0017f * (TILE_WIRE_CE0 - TILE_WIRE_LSR1 - 5 + 1) + 3*slice_pitch; + ret.push_back(el); + if (tilewire == TILE_WIRE_LSR1) { + for (int i=0;i<2;i++){ + el.x2 = x + slice_x1 - 0.005f; + el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_CE0 - TILE_WIRE_LSR1 - 5 - 2) + (3+i)*slice_pitch; + el.y2 = el.y1; + ret.push_back(el); + } + } + } else { + el.x1 = el.x2; + el.y2 = y + slice_y2 - 0.0017f * (TILE_WIRE_CE0 - TILE_WIRE_LSR1 -5 + 2) + 3*slice_pitch; + ret.push_back(el); + if (tilewire == TILE_WIRE_CLK1) { + for (int i=0;i<2;i++){ + el.x2 = x + slice_x1 - 0.005f; + el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_CE0 - TILE_WIRE_LSR1 - 5 - 1) + (3+i)*slice_pitch; + el.y2 = el.y1; + ret.push_back(el); + } + } + + } + } + if (tilewire >= TILE_WIRE_MUXCLK3 && tilewire <=TILE_WIRE_MUXCLK0) + { + GraphicElement el; + el.type = GraphicElement::TYPE_LINE; + el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE; + el.x1 = x + switchbox_x2 + 0.0017f * 3; + el.x2 = x + slice_x1 - 0.005f; + el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_CE0 - TILE_WIRE_LSR1 - 5 + 2) + (3 + tilewire - TILE_WIRE_MUXCLK3)*slice_pitch; + el.y2 = el.y1; + ret.push_back(el); + } + if (tilewire >= TILE_WIRE_MUXLSR3 && tilewire <=TILE_WIRE_MUXLSR0) + { + GraphicElement el; + el.type = GraphicElement::TYPE_LINE; + el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE; + el.x1 = x + switchbox_x2 + 0.0017f * 5; + el.x2 = x + slice_x1 - 0.005f; + el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_CE0 - TILE_WIRE_LSR1 - 5 + 1) + (3 + tilewire - TILE_WIRE_MUXLSR3)*slice_pitch; + el.y2 = el.y1; + ret.push_back(el); + } + } if (decal.type == DecalId::TYPE_BEL) { BelId bel; bel.index = decal.z; |