aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/arch.cc
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2019-10-12 12:19:44 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2019-10-20 09:41:48 +0200
commit4b79050ef4924045e8a7bc3356378340c0c773af (patch)
treece27acf5633a4e4ef86f823fad9c00c19923406b /ecp5/arch.cc
parenta59faa8df0b615f8d09e703c93743a26e3c35823 (diff)
downloadnextpnr-4b79050ef4924045e8a7bc3356378340c0c773af.tar.gz
nextpnr-4b79050ef4924045e8a7bc3356378340c0c773af.tar.bz2
nextpnr-4b79050ef4924045e8a7bc3356378340c0c773af.zip
Fix look of some wires
Diffstat (limited to 'ecp5/arch.cc')
-rw-r--r--ecp5/arch.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc
index ec9004c7..fec1084f 100644
--- a/ecp5/arch.cc
+++ b/ecp5/arch.cc
@@ -768,12 +768,15 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
{
int group = (tilewire - TILE_WIRE_F7) / 4;
int part = (tilewire - TILE_WIRE_F7) % 4;
+ float offset = 0;
+ if (part == 0) offset = -0.0017f/2;
+ if (part == 3) offset = +0.0017f/2;
GraphicElement el;
el.type = GraphicElement::TYPE_LINE;
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
el.x1 = x + slice_x2 + 0.005f;
el.x2 = x + slice_x2 + 0.005f + (0.0017f * (7 *(4-group)-part));
- el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_F7_SLICE - TILE_WIRE_DUMMY_100 + 1 + part) + (3 - group )*slice_pitch;
+ el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_F7_SLICE - TILE_WIRE_DUMMY_100 + 1 + part) + (3 - group )*slice_pitch - offset;
el.y2 = el.y1;
ret.push_back(el);
@@ -781,15 +784,15 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
GraphicElement el2;
el2.type = GraphicElement::TYPE_LINE;
el2.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
- el2.x1 = el.x1;
- el2.x2 = el.x1;
- el2.y1 = el.y1;
- el2.y2 = el.y1 + 0.0017f * (part==3 ? -1 : 1);
+ el2.x1 = x + slice_x2 + 0.005f;
+ el2.x2 = el2.x1;
+ el2.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_F7_SLICE - TILE_WIRE_DUMMY_100 + 1 + part) + (3 - group )*slice_pitch;
+ el2.y2 = el2.y1 + 0.0017f * (part==3 ? -1 : 1);
ret.push_back(el2);
}
el.x1 = el.x2;
- el.y2 = el.y1 - (0.0017f * (30 *(3-group) + (3-part)*2 + 10));
+ el.y2 = el.y1 - (0.0017f * (30 *(3-group) + (3-part)*2 + 10)) + offset;
ret.push_back(el);
el.x1 = x + switchbox_x2;