clangformat run
This commit is contained in:
parent
275805d78f
commit
7fd856b866
45
ecp5/arch.cc
45
ecp5/arch.cc
@ -597,7 +597,6 @@ bool Arch::route()
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
|
std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
|
||||||
{
|
{
|
||||||
std::vector<GraphicElement> ret;
|
std::vector<GraphicElement> ret;
|
||||||
@ -641,7 +640,8 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
|
|||||||
GfxTileWireId src_id = GfxTileWireId(locInfo(src_wire)->wire_data[src_wire.index].tile_wire);
|
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);
|
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;
|
GraphicElement::style_t style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_HIDDEN;
|
||||||
gfxTilePip(ret, x, y, chip_info->width, chip_info->height, src_wire, getWireType(src_wire), src_id, dst_wire, getWireType(dst_wire), dst_id, style);
|
gfxTilePip(ret, x, y, chip_info->width, chip_info->height, src_wire, getWireType(src_wire), src_id, dst_wire,
|
||||||
|
getWireType(dst_wire), dst_id, style);
|
||||||
} else if (decal.type == DecalId::TYPE_BEL) {
|
} else if (decal.type == DecalId::TYPE_BEL) {
|
||||||
BelId bel;
|
BelId bel;
|
||||||
bel.index = decal.z;
|
bel.index = decal.z;
|
||||||
@ -664,34 +664,36 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
|
|||||||
el.style = GraphicElement::STYLE_FRAME;
|
el.style = GraphicElement::STYLE_FRAME;
|
||||||
el.x1 = x + slice_x2 + 0.0255f;
|
el.x1 = x + slice_x2 + 0.0255f;
|
||||||
el.x2 = el.x1 + 0.0017f;
|
el.x2 = el.x1 + 0.0017f;
|
||||||
el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_CLK3_SLICE - TILE_WIRE_DUMMY_D2 + 5 + z*26) + 3*slice_pitch - 0.0007f;
|
el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_CLK3_SLICE - TILE_WIRE_DUMMY_D2 + 5 + z * 26) +
|
||||||
|
3 * slice_pitch - 0.0007f;
|
||||||
el.y2 = el.y1 + 0.0017f * 5;
|
el.y2 = el.y1 + 0.0017f * 5;
|
||||||
ret.push_back(el);
|
ret.push_back(el);
|
||||||
} else if (bel_type == id_TRELLIS_IO || bel_type == id_IOLOGIC || bel_type == id_SIOLOGIC || bel_type == id_DQSBUFM) {
|
} else if (bel_type == id_TRELLIS_IO || bel_type == id_IOLOGIC || bel_type == id_SIOLOGIC ||
|
||||||
bool top_bottom = (y==0 || y==(chip_info->height-1));
|
bel_type == id_DQSBUFM) {
|
||||||
|
bool top_bottom = (y == 0 || y == (chip_info->height - 1));
|
||||||
GraphicElement el;
|
GraphicElement el;
|
||||||
el.type = GraphicElement::TYPE_BOX;
|
el.type = GraphicElement::TYPE_BOX;
|
||||||
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
|
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
|
||||||
if (top_bottom) {
|
if (top_bottom) {
|
||||||
el.x1 = x + io_cell_h_x1 + (z+2) * 0.10;
|
el.x1 = x + io_cell_h_x1 + (z + 2) * 0.10;
|
||||||
el.x2 = x + io_cell_h_x1 + (z+2) * 0.10 + 0.08f;
|
el.x2 = x + io_cell_h_x1 + (z + 2) * 0.10 + 0.08f;
|
||||||
if (y==chip_info->height-1) {
|
if (y == chip_info->height - 1) {
|
||||||
el.y1 = y + 1- io_cell_h_y1;
|
el.y1 = y + 1 - io_cell_h_y1;
|
||||||
el.y2 = y + 1- io_cell_h_y2;
|
el.y2 = y + 1 - io_cell_h_y2;
|
||||||
} else {
|
} else {
|
||||||
el.y1 = y + io_cell_h_y1;
|
el.y1 = y + io_cell_h_y1;
|
||||||
el.y2 = y + io_cell_h_y2;
|
el.y2 = y + io_cell_h_y2;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (x==0) {
|
if (x == 0) {
|
||||||
el.x1 = x + 1-io_cell_v_x1;
|
el.x1 = x + 1 - io_cell_v_x1;
|
||||||
el.x2 = x + 1-io_cell_v_x2;
|
el.x2 = x + 1 - io_cell_v_x2;
|
||||||
} else {
|
} else {
|
||||||
el.x1 = x + io_cell_v_x1;
|
el.x1 = x + io_cell_v_x1;
|
||||||
el.x2 = x + io_cell_v_x2;
|
el.x2 = x + io_cell_v_x2;
|
||||||
}
|
}
|
||||||
el.y1 = y + io_cell_v_y1 + z * 0.10;
|
el.y1 = y + io_cell_v_y1 + z * 0.10;
|
||||||
el.y2 = y + io_cell_v_y1 + z * 0.10 + 0.08f;
|
el.y2 = y + io_cell_v_y1 + z * 0.10 + 0.08f;
|
||||||
}
|
}
|
||||||
ret.push_back(el);
|
ret.push_back(el);
|
||||||
} else if (bel_type == id_DCCA) {
|
} else if (bel_type == id_DCCA) {
|
||||||
@ -710,7 +712,7 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
|
|||||||
el.x1 = x + slice_x1;
|
el.x1 = x + slice_x1;
|
||||||
el.x2 = x + 0.97;
|
el.x2 = x + 0.97;
|
||||||
el.y1 = y + slice_y1;
|
el.y1 = y + slice_y1;
|
||||||
el.y2 = y + slice_y2 + 3*slice_pitch;
|
el.y2 = y + slice_y2 + 3 * slice_pitch;
|
||||||
ret.push_back(el);
|
ret.push_back(el);
|
||||||
} else if (bel_type == id_EHXPLLL) {
|
} else if (bel_type == id_EHXPLLL) {
|
||||||
GraphicElement el;
|
GraphicElement el;
|
||||||
@ -721,7 +723,8 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
|
|||||||
el.y1 = y + slice_y1;
|
el.y1 = y + slice_y1;
|
||||||
el.y2 = y + slice_y2;
|
el.y2 = y + slice_y2;
|
||||||
ret.push_back(el);
|
ret.push_back(el);
|
||||||
} else if (bel_type == id_DCUA || bel_type == id_EXTREFB || bel_type == id_PCSCLKDIV || bel_type == id_DTR || bel_type == id_USRMCLK) {
|
} else if (bel_type == id_DCUA || bel_type == id_EXTREFB || bel_type == id_PCSCLKDIV || bel_type == id_DTR ||
|
||||||
|
bel_type == id_USRMCLK) {
|
||||||
GraphicElement el;
|
GraphicElement el;
|
||||||
el.type = GraphicElement::TYPE_BOX;
|
el.type = GraphicElement::TYPE_BOX;
|
||||||
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
|
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
|
||||||
@ -748,7 +751,8 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
|
|||||||
el.y1 = y + 0.2;
|
el.y1 = y + 0.2;
|
||||||
el.y2 = y + 0.8;
|
el.y2 = y + 0.8;
|
||||||
ret.push_back(el);
|
ret.push_back(el);
|
||||||
} else if (bel_type == id_DLLDELD || bel_type == id_CLKDIVF || bel_type == id_ECLKSYNCB || bel_type == id_TRELLIS_ECLKBUF || bel_type == id_ECLKBRIDGECS) {
|
} else if (bel_type == id_DLLDELD || bel_type == id_CLKDIVF || bel_type == id_ECLKSYNCB ||
|
||||||
|
bel_type == id_TRELLIS_ECLKBUF || bel_type == id_ECLKBRIDGECS) {
|
||||||
GraphicElement el;
|
GraphicElement el;
|
||||||
el.type = GraphicElement::TYPE_BOX;
|
el.type = GraphicElement::TYPE_BOX;
|
||||||
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
|
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
|
||||||
@ -1248,12 +1252,12 @@ std::vector<GroupId> Arch::getGroups() const
|
|||||||
{
|
{
|
||||||
std::vector<GroupId> ret;
|
std::vector<GroupId> ret;
|
||||||
|
|
||||||
for (int y = 1; y < chip_info->height-1; y++) {
|
for (int y = 1; y < chip_info->height - 1; y++) {
|
||||||
for (int x = 1; x < chip_info->width-1; x++) {
|
for (int x = 1; x < chip_info->width - 1; x++) {
|
||||||
GroupId group;
|
GroupId group;
|
||||||
group.type = GroupId::TYPE_SWITCHBOX;
|
group.type = GroupId::TYPE_SWITCHBOX;
|
||||||
group.location.x = x;
|
group.location.x = x;
|
||||||
group.location. y = y;
|
group.location.y = y;
|
||||||
ret.push_back(group);
|
ret.push_back(group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1286,7 +1290,6 @@ std::vector<GroupId> Arch::getGroupGroups(GroupId group) const
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
std::vector<std::pair<IdString, std::string>> Arch::getWireAttrs(WireId wire) const
|
std::vector<std::pair<IdString, std::string>> Arch::getWireAttrs(WireId wire) const
|
||||||
{
|
{
|
||||||
std::vector<std::pair<IdString, std::string>> ret;
|
std::vector<std::pair<IdString, std::string>> ret;
|
||||||
|
498
ecp5/gfx.cc
498
ecp5/gfx.cc
File diff suppressed because it is too large
Load Diff
18
ecp5/gfx.h
18
ecp5/gfx.h
@ -33,7 +33,7 @@ const float slice_x1 = 0.92;
|
|||||||
const float slice_x2 = 0.94;
|
const float slice_x2 = 0.94;
|
||||||
const float slice_y1 = 0.71;
|
const float slice_y1 = 0.71;
|
||||||
const float slice_y2 = 0.745 + 0.0068;
|
const float slice_y2 = 0.745 + 0.0068;
|
||||||
const float slice_pitch = 0.0374 +0.0068;
|
const float slice_pitch = 0.0374 + 0.0068;
|
||||||
|
|
||||||
const float io_cell_v_x1 = 0.76;
|
const float io_cell_v_x1 = 0.76;
|
||||||
const float io_cell_v_x2 = 0.95;
|
const float io_cell_v_x2 = 0.95;
|
||||||
@ -76,7 +76,6 @@ enum GfxTileWireId
|
|||||||
TILE_WIRE_CE3_SLICE,
|
TILE_WIRE_CE3_SLICE,
|
||||||
TILE_WIRE_FCID_SLICE,
|
TILE_WIRE_FCID_SLICE,
|
||||||
|
|
||||||
|
|
||||||
TILE_WIRE_FCOC_SLICE,
|
TILE_WIRE_FCOC_SLICE,
|
||||||
TILE_WIRE_D5_SLICE,
|
TILE_WIRE_D5_SLICE,
|
||||||
TILE_WIRE_C5_SLICE,
|
TILE_WIRE_C5_SLICE,
|
||||||
@ -152,7 +151,6 @@ enum GfxTileWireId
|
|||||||
TILE_WIRE_CE0_SLICE,
|
TILE_WIRE_CE0_SLICE,
|
||||||
TILE_WIRE_FCI_SLICE,
|
TILE_WIRE_FCI_SLICE,
|
||||||
|
|
||||||
|
|
||||||
TILE_WIRE_CLK0,
|
TILE_WIRE_CLK0,
|
||||||
TILE_WIRE_CLK1,
|
TILE_WIRE_CLK1,
|
||||||
TILE_WIRE_LSR0,
|
TILE_WIRE_LSR0,
|
||||||
@ -208,7 +206,6 @@ enum GfxTileWireId
|
|||||||
TILE_WIRE_CE2,
|
TILE_WIRE_CE2,
|
||||||
TILE_WIRE_DUMMY_SWB9,
|
TILE_WIRE_DUMMY_SWB9,
|
||||||
|
|
||||||
|
|
||||||
TILE_WIRE_DUMMY_SWB10,
|
TILE_WIRE_DUMMY_SWB10,
|
||||||
TILE_WIRE_D3,
|
TILE_WIRE_D3,
|
||||||
TILE_WIRE_C3,
|
TILE_WIRE_C3,
|
||||||
@ -234,7 +231,6 @@ enum GfxTileWireId
|
|||||||
TILE_WIRE_CE1,
|
TILE_WIRE_CE1,
|
||||||
TILE_WIRE_DUMMY_SWB14,
|
TILE_WIRE_DUMMY_SWB14,
|
||||||
|
|
||||||
|
|
||||||
TILE_WIRE_DUMMY_SWB15,
|
TILE_WIRE_DUMMY_SWB15,
|
||||||
TILE_WIRE_D1,
|
TILE_WIRE_D1,
|
||||||
TILE_WIRE_C1,
|
TILE_WIRE_C1,
|
||||||
@ -260,7 +256,6 @@ enum GfxTileWireId
|
|||||||
TILE_WIRE_CE0,
|
TILE_WIRE_CE0,
|
||||||
TILE_WIRE_FCI,
|
TILE_WIRE_FCI,
|
||||||
|
|
||||||
|
|
||||||
TILE_WIRE_MUXCLK3,
|
TILE_WIRE_MUXCLK3,
|
||||||
TILE_WIRE_MUXLSR3,
|
TILE_WIRE_MUXLSR3,
|
||||||
TILE_WIRE_MUXCLK2,
|
TILE_WIRE_MUXCLK2,
|
||||||
@ -293,7 +288,6 @@ enum GfxTileWireId
|
|||||||
TILE_WIRE_DUMMY_D10,
|
TILE_WIRE_DUMMY_D10,
|
||||||
TILE_WIRE_DUMMY_D11,
|
TILE_WIRE_DUMMY_D11,
|
||||||
|
|
||||||
|
|
||||||
TILE_WIRE_DUMMY_C2,
|
TILE_WIRE_DUMMY_C2,
|
||||||
TILE_WIRE_DUMMY_C3,
|
TILE_WIRE_DUMMY_C3,
|
||||||
TILE_WIRE_CLK2_SLICE,
|
TILE_WIRE_CLK2_SLICE,
|
||||||
@ -307,7 +301,6 @@ enum GfxTileWireId
|
|||||||
TILE_WIRE_WADO1C_SLICE,
|
TILE_WIRE_WADO1C_SLICE,
|
||||||
TILE_WIRE_WADO0C_SLICE,
|
TILE_WIRE_WADO0C_SLICE,
|
||||||
|
|
||||||
|
|
||||||
TILE_WIRE_WCK1_SLICE,
|
TILE_WIRE_WCK1_SLICE,
|
||||||
TILE_WIRE_WRE1_SLICE,
|
TILE_WIRE_WRE1_SLICE,
|
||||||
TILE_WIRE_CLK1_SLICE,
|
TILE_WIRE_CLK1_SLICE,
|
||||||
@ -321,7 +314,6 @@ enum GfxTileWireId
|
|||||||
TILE_WIRE_WAD1B_SLICE,
|
TILE_WIRE_WAD1B_SLICE,
|
||||||
TILE_WIRE_WAD0B_SLICE,
|
TILE_WIRE_WAD0B_SLICE,
|
||||||
|
|
||||||
|
|
||||||
TILE_WIRE_WCK0_SLICE,
|
TILE_WIRE_WCK0_SLICE,
|
||||||
TILE_WIRE_WRE0_SLICE,
|
TILE_WIRE_WRE0_SLICE,
|
||||||
TILE_WIRE_CLK0_SLICE,
|
TILE_WIRE_CLK0_SLICE,
|
||||||
@ -335,7 +327,6 @@ enum GfxTileWireId
|
|||||||
TILE_WIRE_WAD1A_SLICE,
|
TILE_WIRE_WAD1A_SLICE,
|
||||||
TILE_WIRE_WAD0A_SLICE,
|
TILE_WIRE_WAD0A_SLICE,
|
||||||
|
|
||||||
|
|
||||||
TILE_WIRE_V01N0001,
|
TILE_WIRE_V01N0001,
|
||||||
TILE_WIRE_V01N0101,
|
TILE_WIRE_V01N0101,
|
||||||
TILE_WIRE_V01S0000,
|
TILE_WIRE_V01S0000,
|
||||||
@ -435,8 +426,11 @@ enum GfxTileWireId
|
|||||||
TILE_WIRE_G_HPBX1500,
|
TILE_WIRE_G_HPBX1500,
|
||||||
};
|
};
|
||||||
|
|
||||||
void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, int w, int h, IdString wire_type, GfxTileWireId tilewire, GraphicElement::style_t style);
|
void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, int w, int h, IdString wire_type, GfxTileWireId tilewire,
|
||||||
void gfxTilePip(std::vector<GraphicElement> &g, int x, int y, int w, int h, WireId src, IdString src_type, GfxTileWireId src_id, WireId dst, IdString dst_type, GfxTileWireId dst_id, GraphicElement::style_t style);
|
GraphicElement::style_t style);
|
||||||
|
void gfxTilePip(std::vector<GraphicElement> &g, int x, int y, int w, int h, WireId src, IdString src_type,
|
||||||
|
GfxTileWireId src_id, WireId dst, IdString dst_type, GfxTileWireId dst_id,
|
||||||
|
GraphicElement::style_t style);
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_END
|
NEXTPNR_NAMESPACE_END
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
const float zoomNear_ = 0.05f; // do not zoom closer than this
|
const float zoomNear_ = 0.05f; // do not zoom closer than this
|
||||||
float zoomFar_ = 10.0f; // do not zoom further than this
|
float zoomFar_ = 10.0f; // do not zoom further than this
|
||||||
const float zoomLvl1_ = 1.0f;
|
const float zoomLvl1_ = 1.0f;
|
||||||
const float zoomLvl2_ = 5.0f;
|
const float zoomLvl2_ = 5.0f;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user