diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-07-09 16:39:18 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-07-09 16:39:18 +0200 |
commit | ba6f3b45b84be2aca06d82ce5b32f68a70f05ebb (patch) | |
tree | bc26eb5a0a47a855aab5fc09385b2f109410464a /ice40/gfx.cc | |
parent | 4576fc7c20c7a211556b9b160a9eb35b5f8bb5b7 (diff) | |
download | nextpnr-ba6f3b45b84be2aca06d82ce5b32f68a70f05ebb.tar.gz nextpnr-ba6f3b45b84be2aca06d82ce5b32f68a70f05ebb.tar.bz2 nextpnr-ba6f3b45b84be2aca06d82ce5b32f68a70f05ebb.zip |
Add ice40 gfx right vertical span-4
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ice40/gfx.cc')
-rw-r--r-- | ice40/gfx.cc | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/ice40/gfx.cc b/ice40/gfx.cc index 613f1a31..1006f7b9 100644 --- a/ice40/gfx.cc +++ b/ice40/gfx.cc @@ -96,9 +96,9 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id) GraphicElement el; el.type = GraphicElement::G_LINE; - float x1 = x + 0.03 + 0.0025 * (60 - idx); - float x2 = x + 0.03 + 0.0025 * (60 - (idx ^ 1)); - float x3 = x + 0.03 + 0.0025 * (60 - (idx ^ 1) - 12); + float x1 = x + 0.03 + 0.0025 * (60 - (idx ^ 1)); + float x2 = x + 0.03 + 0.0025 * (60 - idx); + float x3 = x + 0.03 + 0.0025 * (60 - idx - 12); if (idx >= 12) { el.y1 = y; @@ -125,6 +125,14 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id) el.x1 = x2; el.x2 = x3; g.push_back(el); + + float y1 = y + 0.03 + 0.0025 * (142 - idx); + + el.y1 = y1; + el.y2 = y1; + el.x1 = x; + el.x2 = x2; + g.push_back(el); } // Horizontal Span-12 Wires @@ -148,9 +156,9 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id) GraphicElement el; el.type = GraphicElement::G_LINE; - float y1 = y + 0.03 + 0.0025 * (90 - idx); - float y2 = y + 0.03 + 0.0025 * (90 - (idx ^ 1)); - float y3 = y + 0.03 + 0.0025 * (90 - (idx ^ 1) - 2); + float y1 = y + 0.03 + 0.0025 * (90 - (idx ^ 1)); + float y2 = y + 0.03 + 0.0025 * (90 - idx); + float y3 = y + 0.03 + 0.0025 * (90 - idx - 2); if (idx >= 2) { el.x1 = x; @@ -179,6 +187,22 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id) g.push_back(el); } + // Veritcal Right Span-4 + + if (id >= TILE_WIRE_SP4_R_V_B_0 && id <= TILE_WIRE_SP4_R_V_B_47) { + int idx = id - TILE_WIRE_SP4_R_V_B_0; + GraphicElement el; + el.type = GraphicElement::G_LINE; + + float y1 = y + 0.03 + 0.0025 * (142 - idx); + + el.y1 = y1; + el.y2 = y1; + el.x1 = x + 0.6; + el.x2 = x + 1.0; + g.push_back(el); + } + // Vertical Span-12 Wires if (id >= TILE_WIRE_SP12_V_T_22 && id <= TILE_WIRE_SP12_V_T_23) { |