more pips, and valid mapping

This commit is contained in:
Miodrag Milanovic 2019-11-10 15:24:06 +01:00
parent 43c7b4fa21
commit 74f2c4a73b
2 changed files with 23 additions and 10 deletions

View File

@ -605,7 +605,7 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
if (decal.type == DecalId::TYPE_GROUP) {
int type = decal.z;
int x = decal.location.x;
int y = chip_info->height - 1 - decal.location.y;
int y = decal.location.y;
if (type == GroupId::TYPE_SWITCHBOX) {
GraphicElement el;
@ -625,7 +625,7 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
wire.location = decal.location;
auto wire_type = getWireType(wire);
int x = decal.location.x;
int y = chip_info->height - 1 - decal.location.y;
int y = decal.location.y;
GraphicElement::style_t style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
GfxTileWireId tilewire = GfxTileWireId(locInfo(wire)->wire_data[wire.index].tile_wire);
@ -639,7 +639,7 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
WireId src_wire = getPipSrcWire(pip);
WireId dst_wire = getPipDstWire(pip);
int x = decal.location.x;
int y = chip_info->height - 1 - decal.location.y;
int y = decal.location.y;
GfxTileWireId src_id = GfxTileWireId(locInfo(src_wire)->wire_data[src_wire.index].tile_wire);
GfxTileWireId dst_id = GfxTileWireId(locInfo(dst_wire)->wire_data[dst_wire.index].tile_wire);
GraphicElement::style_t style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_HIDDEN;
@ -651,7 +651,7 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
bel.location = decal.location;
auto bel_type = getBelType(bel);
int x = decal.location.x;
int y = chip_info->height - 1 - decal.location.y;
int y = decal.location.y;
int z = locInfo(bel)->bel_data[bel.index].z;
if (bel_type == id_TRELLIS_SLICE) {

View File

@ -455,8 +455,7 @@ void gfxTilePip(std::vector<GraphicElement> &g, int x, int y, int w, int h, Wire
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;
@ -466,6 +465,15 @@ 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_V02 && dst_type == id_WIRE_TYPE_H02) {
el.x1 = x + switchbox_x1 + 0.0017f*(16 + (dst_id - TILE_WIRE_H02W0701)+ 20 *(dst.location.x%3));
el.y1 = y + switchbox_y1;
el.x2 = x + switchbox_x1;
el.y2 = y + switchbox_y1 + 0.0017f*(20 + (src_id - TILE_WIRE_V02N0701)+ 20 *(src.location.y%3));
g.push_back(el);
}
if (src_type == id_WIRE_TYPE_V02 && dst_type == id_WIRE_TYPE_V02) {
el.x1 = x + switchbox_x1;
@ -485,10 +493,15 @@ void gfxTilePip(std::vector<GraphicElement> &g, int x, int y, int w, int h, Wire
el.x1 = x + switchbox_x1;
g.push_back(el);
}
}
if (src_type == id_WIRE_TYPE_V06 && dst_type == id_WIRE_TYPE_H02) {
el.x1 = x + switchbox_x1 + 0.0017f*(16 + (dst_id - TILE_WIRE_H02W0701)+ 20 *(dst.location.x%3));
el.y1 = y + switchbox_y1;
el.x2 = x + switchbox_x1;
el.y2 = y + switchbox_y1 + 0.0017f*(96 + (src_id - TILE_WIRE_V06N0303)+ 20 *(y%3));
g.push_back(el);
}
}
NEXTPNR_NAMESPACE_END