ice40: Hide IO and PLL that can't be used from utilisation report

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat 2026-04-08 14:04:28 +02:00
parent 764c6a6696
commit 176a4ba236
2 changed files with 14 additions and 0 deletions

View File

@ -361,6 +361,18 @@ bool Arch::is_bel_locked(BelId bel) const
return false;
}
bool Arch::getBelHidden(BelId bel) const
{
IdString bel_type = getBelType(bel);
if (bel_type == id_SB_IO) {
return get_bel_package_pin(bel).empty();
} else if (bel_type == id_ICESTORM_PLL) {
return is_bel_locked(bel);
} else {
return false;
}
}
// -----------------------------------------------------------------------
WireId Arch::getWireByName(IdStringList name) const

View File

@ -523,6 +523,8 @@ struct Arch : BaseArch<ArchRanges>
PortType getBelPinType(BelId bel, IdString pin) const override;
std::vector<IdString> getBelPins(BelId bel) const override;
bool getBelHidden(BelId bel) const override;
bool is_bel_locked(BelId bel) const;
// -------------------------------------------------