From 90fe002a36a9b90cd6d003d34398242a5d5affb6 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 23 Jul 2018 13:16:27 +0200 Subject: Remove getBelsByType() API Signed-off-by: Clifford Wolf --- ecp5/arch.h | 14 -------------- generic/arch.cc | 10 ---------- generic/arch.h | 2 -- ice40/arch.h | 14 -------------- 4 files changed, 40 deletions(-) diff --git a/ecp5/arch.h b/ecp5/arch.h index aada2079..b3ef5195 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -482,20 +482,6 @@ struct Arch : BaseCtx return range; } - BelRange getBelsByType(BelType type) const - { - BelRange range; -// FIXME -#if 0 - if (type == "TYPE_A") { - range.b.cursor = bels_type_a_begin; - range.e.cursor = bels_type_a_end; - } - ... -#endif - return range; - } - BelRange getBelsAtSameTile(BelId bel) const; BelType getBelType(BelId bel) const diff --git a/generic/arch.cc b/generic/arch.cc index 4fc07613..0fff2e4c 100644 --- a/generic/arch.cc +++ b/generic/arch.cc @@ -75,8 +75,6 @@ void Arch::addBel(IdString name, IdString type, Loc loc, bool gb) bi.gb = gb; bel_ids.push_back(name); - bel_ids_by_type[type].push_back(name); - bel_by_loc[loc] = name; if (bels_by_tile.size() <= loc.x) @@ -225,14 +223,6 @@ IdString Arch::getConflictingBelCell(BelId bel) const { return bels.at(bel).boun const std::vector &Arch::getBels() const { return bel_ids; } -const std::vector &Arch::getBelsByType(BelType type) const -{ - static std::vector empty_list; - if (bel_ids_by_type.count(type)) - return bel_ids_by_type.at(type); - return empty_list; -} - BelType Arch::getBelType(BelId bel) const { return bels.at(bel).type; } WireId Arch::getBelPinWire(BelId bel, PortPin pin) const { return bels.at(bel).pins.at(pin).wire; } diff --git a/generic/arch.h b/generic/arch.h index 5f0df988..61e6b033 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -84,7 +84,6 @@ struct Arch : BaseCtx std::unordered_map groups; std::vector bel_ids, wire_ids, pip_ids; - std::unordered_map> bel_ids_by_type; std::unordered_map bel_by_loc; std::vector>> bels_by_tile; @@ -151,7 +150,6 @@ struct Arch : BaseCtx IdString getBoundBelCell(BelId bel) const; IdString getConflictingBelCell(BelId bel) const; const std::vector &getBels() const; - const std::vector &getBelsByType(BelType type) const; BelType getBelType(BelId bel) const; WireId getBelPinWire(BelId bel, PortPin pin) const; PortType getBelPinType(BelId bel, PortPin pin) const; diff --git a/ice40/arch.h b/ice40/arch.h index cd699a0c..d4d71cfc 100644 --- a/ice40/arch.h +++ b/ice40/arch.h @@ -439,20 +439,6 @@ struct Arch : BaseCtx return range; } - BelRange getBelsByType(BelType type) const - { - BelRange range; -// FIXME -#if 0 - if (type == "TYPE_A") { - range.b.cursor = bels_type_a_begin; - range.e.cursor = bels_type_a_end; - } - ... -#endif - return range; - } - Loc getBelLocation(BelId bel) const { Loc loc; -- cgit v1.2.3