aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2019-11-10 10:08:02 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2019-11-10 10:08:02 +0100
commit9a9265f4d2c5d1c4f1a5bb90aece2647990e8b56 (patch)
treef1a62d7c3cf02eecb9c7ba193f783bde2d1ad950
parentf6d74cb7a91db81410d4990f94b133447081f902 (diff)
downloadnextpnr-9a9265f4d2c5d1c4f1a5bb90aece2647990e8b56.tar.gz
nextpnr-9a9265f4d2c5d1c4f1a5bb90aece2647990e8b56.tar.bz2
nextpnr-9a9265f4d2c5d1c4f1a5bb90aece2647990e8b56.zip
more pips
-rw-r--r--ecp5/gfx.cc45
1 files changed, 43 insertions, 2 deletions
diff --git a/ecp5/gfx.cc b/ecp5/gfx.cc
index f13a6ab7..77572437 100644
--- a/ecp5/gfx.cc
+++ b/ecp5/gfx.cc
@@ -409,14 +409,55 @@ void gfxTilePip(std::vector<GraphicElement> &g, int x, int y, int w, int h, Wire
g.push_back(el);
}
if (src_type == id_WIRE_TYPE_H01 && dst_type == id_WIRE_TYPE_V06) {
- el.x1 = x + switchbox_x2;
- el.y1 = y + switchbox_y1 + 0.0017f*16 - 0.0017f * (src_id - TILE_WIRE_H01E0001);
+ if (src_id <= TILE_WIRE_H01E0101) {
+ el.x1 = x + switchbox_x1;
+ el.y1 = y + switchbox_y1 + 0.0017f*16 - 0.0017f * (src_id - TILE_WIRE_H01E0001);
+
+ el.x2 = x + switchbox_x1 + (switchbox_x2-switchbox_x1)/2;
+ el.y2 = y + switchbox_y1 + 0.0017f*(96 + (dst_id - TILE_WIRE_V06N0303)+ 20 *(y%3));
+ g.push_back(el);
+
+ el.x1 = x + switchbox_x1 + (switchbox_x2-switchbox_x1)/2;
+ el.y1 = y + switchbox_y1 + 0.0017f*(96 + (dst_id - TILE_WIRE_V06N0303)+ 20 *(y%3));
+ el.y2 = y + switchbox_y1 + 0.0017f*(96 + (dst_id - TILE_WIRE_V06N0303)+ 20 *(y%3));
+ el.x2 = x + switchbox_x1;
+ g.push_back(el);
+ } else {
+ el.x1 = x + switchbox_x2;
+ el.y1 = y + switchbox_y1 + 0.0017f*16 - 0.0017f * (src_id - TILE_WIRE_H01E0001);
+
+ el.y2 = y + switchbox_y1 + 0.0017f*(96 + (dst_id - TILE_WIRE_V06N0303)+ 20 *(y%3));
+ el.x2 = x + switchbox_x1;
+ g.push_back(el);
+ }
+ }
+ if (src_type == id_WIRE_TYPE_V02 && dst_type == id_WIRE_TYPE_V06) {
+ el.x1 = x + switchbox_x1;
+ el.y1 = y + switchbox_y1 + 0.0017f*(16 + (src_id - TILE_WIRE_V02N0701)+ 20 *(y%3));
+
+ el.x2 = x + switchbox_x1 + (switchbox_x2-switchbox_x1)/2;
+ el.y2 = y + switchbox_y1 + 0.0017f*(96 + (dst_id - TILE_WIRE_V06N0303)+ 20 *(y%3));
+ g.push_back(el);
+
+ el.x1 = x + switchbox_x1 + (switchbox_x2-switchbox_x1)/2;
+ el.y1 = y + switchbox_y1 + 0.0017f*(96 + (dst_id - TILE_WIRE_V06N0303)+ 20 *(y%3));
el.y2 = y + switchbox_y1 + 0.0017f*(96 + (dst_id - TILE_WIRE_V06N0303)+ 20 *(y%3));
el.x2 = x + switchbox_x1;
g.push_back(el);
}
+ if (src_type == id_WIRE_TYPE_H02 && dst_type == id_WIRE_TYPE_V02) {
+ el.x1 = x + switchbox_x1 + 0.0017f*(16 + (src_id - TILE_WIRE_H02W0701)+ 20 *(src.location.x%3));
+ el.y1 = y + switchbox_y1;
+
+ el.x2 = x + switchbox_x1;
+ el.y2 = y + switchbox_y1 + 0.0017f*(16 + (dst_id - TILE_WIRE_V02N0701)+ 20 *(y%3));
+
+ g.push_back(el);
+ }
+
+
}
NEXTPNR_NAMESPACE_END