extend API so we can distinguish CLK wires
This commit is contained in:
parent
49f098ad51
commit
5b2100a5df
@ -515,7 +515,7 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
|
|||||||
Loc loc;
|
Loc loc;
|
||||||
tile_xy(chip_info, wire.tile, loc.x, loc.y);
|
tile_xy(chip_info, wire.tile, loc.x, loc.y);
|
||||||
int32_t tilewire = chip_wire_info(chip_info, wire).tile_wire;
|
int32_t tilewire = chip_wire_info(chip_info, wire).tile_wire;
|
||||||
uarch->drawWire(ret, style, loc, wire_type, tilewire);
|
uarch->drawWire(ret, style, loc, wire_type, tilewire, get_tile_type(wire.tile));
|
||||||
} else if (decal.type == DecalId::TYPE_PIP) {
|
} else if (decal.type == DecalId::TYPE_PIP) {
|
||||||
PipId pip(decal.tile, decal.index);
|
PipId pip(decal.tile, decal.index);
|
||||||
WireId src_wire = getPipSrcWire(pip);
|
WireId src_wire = getPipSrcWire(pip);
|
||||||
|
@ -116,7 +116,7 @@ struct HimbaechelAPI
|
|||||||
// Graphics
|
// Graphics
|
||||||
virtual void drawBel(std::vector<GraphicElement> &g, GraphicElement::style_t style, IdString bel_type, Loc loc) {};
|
virtual void drawBel(std::vector<GraphicElement> &g, GraphicElement::style_t style, IdString bel_type, Loc loc) {};
|
||||||
|
|
||||||
virtual void drawWire(std::vector<GraphicElement> &g, GraphicElement::style_t style, Loc loc, IdString wire_type, int32_t tilewire) {};
|
virtual void drawWire(std::vector<GraphicElement> &g, GraphicElement::style_t style, Loc loc, IdString wire_type, int32_t tilewire, IdString tile_type) {};
|
||||||
|
|
||||||
virtual void drawPip(std::vector<GraphicElement> &g,GraphicElement::style_t style, Loc loc,
|
virtual void drawPip(std::vector<GraphicElement> &g,GraphicElement::style_t style, Loc loc,
|
||||||
WireId src, IdString src_type, int32_t src_id, WireId dst, IdString dst_type, int32_t dst_id) {};
|
WireId src, IdString src_type, int32_t src_id, WireId dst, IdString dst_type, int32_t dst_id) {};
|
||||||
|
@ -24,3 +24,8 @@ X(LUT_INPUT)
|
|||||||
X(FF_DATA)
|
X(FF_DATA)
|
||||||
X(LUT_OUT)
|
X(LUT_OUT)
|
||||||
X(FF_OUT)
|
X(FF_OUT)
|
||||||
|
X(TILE_CLK)
|
||||||
|
|
||||||
|
X(LOGIC)
|
||||||
|
X(BRAM)
|
||||||
|
X(IO)
|
||||||
|
@ -177,7 +177,7 @@ struct ExampleImpl : HimbaechelAPI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawWire(std::vector<GraphicElement> &g, GraphicElement::style_t style, Loc loc, IdString wire_type, int32_t tilewire)
|
void drawWire(std::vector<GraphicElement> &g, GraphicElement::style_t style, Loc loc, IdString wire_type, int32_t tilewire, IdString tile_type)
|
||||||
{
|
{
|
||||||
GraphicElement el;
|
GraphicElement el;
|
||||||
el.type = GraphicElement::TYPE_LINE;
|
el.type = GraphicElement::TYPE_LINE;
|
||||||
@ -217,6 +217,27 @@ struct ExampleImpl : HimbaechelAPI
|
|||||||
el.y2 = el.y1;
|
el.y2 = el.y1;
|
||||||
g.push_back(el);
|
g.push_back(el);
|
||||||
break;
|
break;
|
||||||
|
case id_TILE_CLK.index:
|
||||||
|
switch(tile_type.index)
|
||||||
|
{
|
||||||
|
case id_LOGIC.index:
|
||||||
|
for(int i=0;i<8; i++) {
|
||||||
|
GraphicElement el;
|
||||||
|
el.type = GraphicElement::TYPE_LINE;
|
||||||
|
el.style = style;
|
||||||
|
el.x1 = loc.x + 0.6;
|
||||||
|
el.x2 = el.x1;
|
||||||
|
el.y1 = loc.y + 0.85 - i * 0.1 - 0.05;
|
||||||
|
el.y2 = el.y1 - 0.05;
|
||||||
|
g.push_back(el);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case id_BRAM.index:
|
||||||
|
break;
|
||||||
|
case id_IO.index:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user