From b5cf1c8257de6e6c5a6d757231879d7aba0798cb Mon Sep 17 00:00:00 2001 From: David Shah Date: Mon, 9 Jul 2018 16:52:03 +0200 Subject: Adding all LUT input wires Signed-off-by: David Shah --- ice40/gfx.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ice40/gfx.cc b/ice40/gfx.cc index 6954a9fb..f29b38dc 100644 --- a/ice40/gfx.cc +++ b/ice40/gfx.cc @@ -255,12 +255,15 @@ void gfxTileWire(std::vector &g, int x, int y, GfxTileWireId id) g.push_back(el); } - if (id >= TILE_WIRE_LUTFF_0_IN_0 && id <= TILE_WIRE_LUTFF_0_IN_3) { + if (id >= TILE_WIRE_LUTFF_0_IN_0 && id <= TILE_WIRE_LUTFF_7_IN_3) { + int idx = id - TILE_WIRE_LUTFF_0_IN_0; + int z = idx / 4; + int input = idx % 4; GraphicElement el; el.type = GraphicElement::G_LINE; - el.x1 = x + 0.8; + el.x1 = x + lc_lut_swbox_x2; el.x2 = x + 0.82; - el.y1 = y + 0.4675 + (0.005 * (id - TILE_WIRE_LUTFF_0_IN_0)); + el.y1 = y + 0.4675 + (0.005 * input) + z * (0.5 / 8); el.y2 = el.y1; g.push_back(el); } -- cgit v1.2.3