aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-07-09 16:52:03 +0200
committerDavid Shah <davey1576@gmail.com>2018-07-09 16:52:03 +0200
commitb5cf1c8257de6e6c5a6d757231879d7aba0798cb (patch)
treeec4b79962929625f138ad4e6569af70ec8ede6ed /ice40
parentc921e4f24b24f4c14ecf3d4f8cb999cd8ead2a41 (diff)
downloadnextpnr-b5cf1c8257de6e6c5a6d757231879d7aba0798cb.tar.gz
nextpnr-b5cf1c8257de6e6c5a6d757231879d7aba0798cb.tar.bz2
nextpnr-b5cf1c8257de6e6c5a6d757231879d7aba0798cb.zip
Adding all LUT input wires
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40')
-rw-r--r--ice40/gfx.cc9
1 files 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<GraphicElement> &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);
}