diff options
-rw-r--r-- | common/place/placer_heap.cc | 4 | ||||
-rw-r--r-- | gowin/arch.cc | 8 | ||||
-rw-r--r-- | gowin/gfx.cc | 2 | ||||
-rw-r--r-- | gowin/gfx.h | 2 |
4 files changed, 14 insertions, 2 deletions
diff --git a/common/place/placer_heap.cc b/common/place/placer_heap.cc index 781a7646..7fa27206 100644 --- a/common/place/placer_heap.cc +++ b/common/place/placer_heap.cc @@ -666,7 +666,7 @@ class HeAPPlacer if (cell->cluster != ClusterId()) { const auto base = cell_locs[cell->name]; for (auto child : cluster2cells.at(cell->cluster)) { - if (child->type == cell->type && child != cell) + if (child != cell) chain_size[cell->name]++; Loc offset = ctx->getClusterOffset(child); cell_locs[child->name].x = std::max(0, std::min(max_x, base.x + offset.x)); @@ -859,7 +859,7 @@ class HeAPPlacer // Was now placed, ignore if (ci->bel != BelId()) continue; - // log_info(" Legalising %s (%s)\n", top.second.c_str(ctx), ci->type.c_str(ctx)); + // log_info(" Legalising %s (%s) %d\n", top.second.c_str(ctx), ci->type.c_str(ctx), top.first); FastBels::FastBelsData *fb; fast_bels.getBelsForCellType(ci->type, &fb); int radius = 0; diff --git a/gowin/arch.cc b/gowin/arch.cc index 461b64c8..8c908b04 100644 --- a/gowin/arch.cc +++ b/gowin/arch.cc @@ -523,6 +523,7 @@ void Arch::setBelDecal(BelId bel, DecalXY active, DecalXY inactive) void Arch::setDefaultDecals(void) { +#ifndef NO_GUI for (BelId bel : getBels()) { gfxSetBelDefaultDecal(this, bel_info(bel)); } @@ -533,6 +534,7 @@ void Arch::setDefaultDecals(void) gfxSetWireDefaultDecal(this, wire_info(wire)); } fixClockSpineDecals(); +#endif } void Arch::setGroupDecal(GroupId group, DecalXY decalxy) @@ -1125,8 +1127,10 @@ Arch::Arch(ArchArgs args) : args(args) addDecalGraphic(IdString(), GraphicElement()); if (args.gui) { +#ifndef NO_GUI // decals gfxCreateBelDecals(this); +#endif } // setup package @@ -1216,11 +1220,13 @@ Arch::Arch(ArchArgs args) : args(args) int col = i % db->cols; const TilePOD *tile = db->grid[i].get(); if (args.gui) { +#ifndef NO_GUI // CRU decal snprintf(buf, 32, "R%dC%d_CRU", row + 1, col + 1); grpname = id(buf); addGroup(grpname); setGroupDecal(grpname, gfxGetCruGroupDecalXY(col, row)); +#endif } // setup wires const PairPOD *pips[2] = {tile->pips.get(), tile->clock_pips.get()}; @@ -1420,8 +1426,10 @@ Arch::Arch(ArchArgs args) : args(args) snprintf(buf, 32, "R%dC%d_LUT_GRP%d", row + 1, col + 1, z); grpname = id(buf); if (args.gui) { +#ifndef NO_GUI addGroup(grpname); setGroupDecal(grpname, gfxGetLutGroupDecalXY(col, row, z >> 1)); +#endif } } break; diff --git a/gowin/gfx.cc b/gowin/gfx.cc index 5abb1399..a06df6f8 100644 --- a/gowin/gfx.cc +++ b/gowin/gfx.cc @@ -24,6 +24,7 @@ NEXTPNR_NAMESPACE_BEGIN +#ifndef NO_GUI // LUTs const float lut_w = 0.6732 - 0.6386; const float lut_h = 0.9392 - 0.9074; @@ -5824,5 +5825,6 @@ DecalXY gfxGetCruGroupDecalXY(int x, int y) decalxy.y = y; return decalxy; } +#endif // NO_GUI NEXTPNR_NAMESPACE_END diff --git a/gowin/gfx.h b/gowin/gfx.h index 623b9fb2..4c798ed9 100644 --- a/gowin/gfx.h +++ b/gowin/gfx.h @@ -24,6 +24,7 @@ NEXTPNR_NAMESPACE_BEGIN +#ifndef NO_GUI void gfxCreateBelDecals(Arch *arch); void gfxSetBelDefaultDecal(Arch *arch, BelInfo &bel); void gfxSetIOBWireDecals(Arch *arch, BelInfo &bel); @@ -32,6 +33,7 @@ void gfxSetPipDefaultDecal(Arch *arch, PipInfo &pip); void gfxSetWireDefaultDecal(Arch *arch, WireInfo &wire); DecalXY gfxGetLutGroupDecalXY(int x, int y, int z); DecalXY gfxGetCruGroupDecalXY(int x, int y); +#endif NEXTPNR_NAMESPACE_END |