more pips

This commit is contained in:
Miodrag Milanovic 2019-11-10 10:08:02 +01:00
parent f6d74cb7a9
commit 9a9265f4d2

View File

@ -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