ice40: Hide IO and PLL that can't be used from utilisation report (#1694)

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
myrtle 2026-04-08 14:28:53 +02:00 committed by GitHub
parent 764c6a6696
commit 5d46a5eeea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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;
// -------------------------------------------------