Add ice40 LC output gfx

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-07-09 17:13:26 +02:00
parent 132c5b5019
commit 46d28551fc
2 changed files with 30 additions and 3 deletions

View File

@ -126,7 +126,7 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id)
el.x2 = x3;
g.push_back(el);
float y1 = y + 0.03 + 0.0025 * (142 - idx);
float y1 = y + 0.03 + 0.0025 * (154 - idx);
el.y1 = y1;
el.y2 = y1;
@ -194,7 +194,7 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id)
GraphicElement el;
el.type = GraphicElement::G_LINE;
float y1 = y + 0.03 + 0.0025 * (142 - idx);
float y1 = y + 0.03 + 0.0025 * (154 - idx);
el.y1 = y1;
el.y2 = y1;
@ -255,6 +255,8 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id)
g.push_back(el);
}
// LC Inputs
if (id >= TILE_WIRE_LUTFF_0_IN_0 && id <= TILE_WIRE_LUTFF_7_IN_3) {
int idx = id - TILE_WIRE_LUTFF_0_IN_0;
int z = idx / 4;
@ -267,6 +269,31 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id)
el.y2 = el.y1;
g.push_back(el);
}
// LC Outputs
if (id >= TILE_WIRE_LUTFF_0_OUT && id <= TILE_WIRE_LUTFF_7_OUT) {
int idx = id - TILE_WIRE_LUTFF_0_OUT;
float y1 = y + 0.03 + 0.0025 * (102 - idx);
GraphicElement el;
el.type = GraphicElement::G_LINE;
el.y1 = y1;
el.y2 = y1;
el.x1 = x + 0.3;
el.x2 = x + 0.97 + 0.0025 * idx;
g.push_back(el);
el.y1 = y1;
el.y2 = y + (logic_cell_y1 + logic_cell_y2) / 2 + idx * logic_cell_pitch;
el.x1 = el.x2;
g.push_back(el);
el.y1 = el.y2;
el.x1 = x + logic_cell_x2;
g.push_back(el);
}
}
NEXTPNR_NAMESPACE_END

View File

@ -60,7 +60,7 @@ const float span4v_swbox_y1 = 0.300;
const float span4v_swbox_y2 = 0.400;
const float logic_cell_x1 = 0.82;
const float logic_cell_x2 = 0.92;
const float logic_cell_x2 = 0.95;
const float logic_cell_y1 = 0.45;
const float logic_cell_y2 = 0.50;
const float logic_cell_pitch = 0.0625;