From 61b2fcf7da3c1859e2139aae70d69efd68c5a9d4 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 27 Oct 2018 11:50:40 +0200 Subject: Fixed pip graphics --- ice40/gfx.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ice40/gfx.cc b/ice40/gfx.cc index 320081c5..f46e4001 100644 --- a/ice40/gfx.cc +++ b/ice40/gfx.cc @@ -902,7 +902,7 @@ static bool getWireXY_local(GfxTileWireId id, float &x, float &y) 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; + int input = 3 - idx % 4; x = local_swbox_x2; y = (logic_cell_y1 + logic_cell_y2) / 2 - 0.0075 + (0.005 * input) + z * logic_cell_pitch; return true; @@ -972,11 +972,11 @@ void gfxTilePip(std::vector &g, int x, int y, GfxTileWireId src, return; } - if (getWireXY_local(src, x1, y1) && getWireXY_local(dst, x2, y2)) { + if (getWireXY_local(src, x1, y1) && getWireXY_local(dst, x2, y2)) { pipGfx(g, x, y, x1, y1, x2, y2, local_swbox_x1, local_swbox_y1, local_swbox_x2, local_swbox_y2, style); return; } - +/* if (TILE_WIRE_LUTFF_0_IN_0_LUT <= src && src <= TILE_WIRE_LUTFF_7_IN_3_LUT && TILE_WIRE_LUTFF_0_OUT <= dst && dst <= TILE_WIRE_LUTFF_7_OUT) { int lut_idx = (src - TILE_WIRE_LUTFF_0_IN_0_LUT) / 4; @@ -1058,7 +1058,7 @@ void gfxTilePip(std::vector &g, int x, int y, GfxTileWireId src, el.y2 = y + 0.02; g.push_back(el); return; - } + }*/ } NEXTPNR_NAMESPACE_END -- cgit v1.2.3