diff --git a/ice40/arch.cc b/ice40/arch.cc index a77dd611..86a9934c 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -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 diff --git a/ice40/arch.h b/ice40/arch.h index e1009ddc..2e8940ad 100644 --- a/ice40/arch.h +++ b/ice40/arch.h @@ -523,6 +523,8 @@ struct Arch : BaseArch PortType getBelPinType(BelId bel, IdString pin) const override; std::vector getBelPins(BelId bel) const override; + bool getBelHidden(BelId bel) const override; + bool is_bel_locked(BelId bel) const; // -------------------------------------------------