1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-04-26 20:26:32 +00:00

Make BaseArch getDecalGraphics return an empty range

Fix assertion failure when opening the GUI on an arch without any
decals.

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat
2021-02-12 10:35:51 +00:00
parent ad7bb51030
commit c956cae824
2 changed files with 2 additions and 2 deletions

View File

@@ -1375,7 +1375,7 @@ template <typename R> struct BaseArch : ArchAPI<R>
// Decal methods
virtual typename R::DecalGfxRangeT getDecalGraphics(DecalId decal) const override
{
NPNR_ASSERT_FALSE("unreachable");
return empty_if_possible<typename R::DecalGfxRangeT>();
};
virtual DecalXY getBelDecal(BelId bel) const override { return DecalXY(); }
virtual DecalXY getWireDecal(WireId wire) const override { return DecalXY(); }

View File

@@ -573,7 +573,7 @@ Return the graphic elements that make up a decal.
The same decal must always produce the same list. If the graphics for
a design element changes, that element must return another decal.
*BaseArch default: asserts false as unreachable due to there being no decals*
*BaseArch default: returns default-constructed range*
### DecalXY getBelDecal(BelId bel) const