Add iCE40 gfx for IO span-4 corners
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
7cdafb8121
commit
b7d4c7afd9
@ -729,7 +729,7 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
|
|||||||
GraphicElement::style_t style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
|
GraphicElement::style_t style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
|
||||||
|
|
||||||
for (int i = 0; i < n; i++)
|
for (int i = 0; i < n; i++)
|
||||||
gfxTileWire(ret, p[i].x, p[i].y, GfxTileWireId(p[i].index), style);
|
gfxTileWire(ret, p[i].x, p[i].y, chip_info->width, chip_info->height, GfxTileWireId(p[i].index), style);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decal.type == DecalId::TYPE_PIP) {
|
if (decal.type == DecalId::TYPE_PIP) {
|
||||||
|
34
ice40/gfx.cc
34
ice40/gfx.cc
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
NEXTPNR_NAMESPACE_BEGIN
|
NEXTPNR_NAMESPACE_BEGIN
|
||||||
|
|
||||||
void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id, GraphicElement::style_t style)
|
void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, int w, int h, GfxTileWireId id, GraphicElement::style_t style)
|
||||||
{
|
{
|
||||||
GraphicElement el;
|
GraphicElement el;
|
||||||
el.type = GraphicElement::TYPE_LINE;
|
el.type = GraphicElement::TYPE_LINE;
|
||||||
@ -462,6 +462,38 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id,
|
|||||||
g.push_back(el);
|
g.push_back(el);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (idx <= 15 && (x == 0 || x == w-1) && y == 1) {
|
||||||
|
float y1 = y - (0.03 + 0.0025 * (60 - idx - 4));
|
||||||
|
|
||||||
|
el.x1 = x2;
|
||||||
|
el.y1 = y;
|
||||||
|
el.x2 = x2;
|
||||||
|
el.y2 = y1;
|
||||||
|
g.push_back(el);
|
||||||
|
|
||||||
|
el.x1 = x2;
|
||||||
|
el.y1 = y1;
|
||||||
|
el.x2 = x + (x == 0);
|
||||||
|
el.y2 = y1;
|
||||||
|
g.push_back(el);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (idx >= 4 && (x == 0 || x == w-1) && y == h-2) {
|
||||||
|
float y1 = y + 2.0 - (0.03 + 0.0025 * (60 - idx));
|
||||||
|
|
||||||
|
el.x1 = x1;
|
||||||
|
el.y1 = y + 1.0;
|
||||||
|
el.x2 = x1;
|
||||||
|
el.y2 = y1;
|
||||||
|
g.push_back(el);
|
||||||
|
|
||||||
|
el.x1 = x1;
|
||||||
|
el.y1 = y1;
|
||||||
|
el.x2 = x + (x == 0);
|
||||||
|
el.y2 = y1;
|
||||||
|
g.push_back(el);
|
||||||
|
}
|
||||||
|
|
||||||
el.y1 = y + 1.0 - (0.03 + 0.0025 * (270 - idx));
|
el.y1 = y + 1.0 - (0.03 + 0.0025 * (270 - idx));
|
||||||
el.y2 = el.y1;
|
el.y2 = el.y1;
|
||||||
el.x1 = x1;
|
el.x1 = x1;
|
||||||
|
@ -713,7 +713,8 @@ enum GfxTileWireId
|
|||||||
TILE_WIRE_PLLOUT_B
|
TILE_WIRE_PLLOUT_B
|
||||||
};
|
};
|
||||||
|
|
||||||
void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id, GraphicElement::style_t style);
|
void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, int w, int h, GfxTileWireId id,
|
||||||
|
GraphicElement::style_t style);
|
||||||
void gfxTilePip(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId src, GfxTileWireId dst,
|
void gfxTilePip(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId src, GfxTileWireId dst,
|
||||||
GraphicElement::style_t style);
|
GraphicElement::style_t style);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user