Merge pull request #595 from litghost/const_cell_info
Change CellInfo in getBelPinsForCellPin to be const.
This commit is contained in:
commit
19ae97afd1
@ -1146,7 +1146,7 @@ template <typename R> struct ArchAPI : BaseCtx
|
||||
virtual WireId getBelPinWire(BelId bel, IdString pin) const = 0;
|
||||
virtual PortType getBelPinType(BelId bel, IdString pin) const = 0;
|
||||
virtual typename R::BelPinsRangeT getBelPins(BelId bel) const = 0;
|
||||
virtual typename R::CellBelPinRangeT getBelPinsForCellPin(CellInfo *cell_info, IdString pin) const = 0;
|
||||
virtual typename R::CellBelPinRangeT getBelPinsForCellPin(const CellInfo *cell_info, IdString pin) const = 0;
|
||||
// Wire methods
|
||||
virtual typename R::AllWiresRangeT getWires() const = 0;
|
||||
virtual WireId getWireByName(IdStringList name) const = 0;
|
||||
@ -1298,7 +1298,7 @@ template <typename R> struct BaseArch : ArchAPI<R>
|
||||
return empty_if_possible<typename R::BelAttrsRangeT>();
|
||||
}
|
||||
|
||||
virtual typename R::CellBelPinRangeT getBelPinsForCellPin(CellInfo *cell_info, IdString pin) const override
|
||||
virtual typename R::CellBelPinRangeT getBelPinsForCellPin(const CellInfo *cell_info, IdString pin) const override
|
||||
{
|
||||
return return_if_match<std::array<IdString, 1>, typename R::CellBelPinRangeT>({pin});
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ Return the type (input/output/inout) of the given bel pin.
|
||||
|
||||
Return a list of all pins on that bel.
|
||||
|
||||
### CellBelPinRangeT getBelPinsForCellPin(CellInfo *cell_info, IdString pin) const
|
||||
### CellBelPinRangeT getBelPinsForCellPin(const CellInfo *cell_info, IdString pin) const
|
||||
|
||||
Return the list of bel pin names that a given cell pin should be routed to. In most cases there will be a single bel pin for each cell pin; and output pins must _always_ have only one bel pin associated with them.
|
||||
|
||||
|
@ -1033,7 +1033,7 @@ struct Arch : ArchAPI<ArchRanges>
|
||||
return str_range;
|
||||
}
|
||||
|
||||
const std::vector<IdString> &getBelPinsForCellPin(CellInfo *cell_info, IdString pin) const override
|
||||
const std::vector<IdString> &getBelPinsForCellPin(const CellInfo *cell_info, IdString pin) const override
|
||||
{
|
||||
return cell_info->cell_bel_pins.at(pin);
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ std::vector<IdString> Arch::getBelPins(BelId bel) const
|
||||
return ret;
|
||||
}
|
||||
|
||||
const std::vector<IdString> &Arch::getBelPinsForCellPin(CellInfo *cell_info, IdString pin) const
|
||||
const std::vector<IdString> &Arch::getBelPinsForCellPin(const CellInfo *cell_info, IdString pin) const
|
||||
{
|
||||
return cell_info->bel_pins.at(pin);
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ struct Arch : ArchAPI<ArchRanges>
|
||||
WireId getBelPinWire(BelId bel, IdString pin) const override;
|
||||
PortType getBelPinType(BelId bel, IdString pin) const override;
|
||||
std::vector<IdString> getBelPins(BelId bel) const override;
|
||||
const std::vector<IdString> &getBelPinsForCellPin(CellInfo *cell_info, IdString pin) const override;
|
||||
const std::vector<IdString> &getBelPinsForCellPin(const CellInfo *cell_info, IdString pin) const override;
|
||||
|
||||
WireId getWireByName(IdStringList name) const override;
|
||||
IdStringList getWireName(WireId wire) const override;
|
||||
|
@ -824,7 +824,7 @@ std::vector<IdString> Arch::getBelPins(BelId bel) const
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::array<IdString, 1> Arch::getBelPinsForCellPin(CellInfo *cell_info, IdString pin) const { return {pin}; }
|
||||
std::array<IdString, 1> Arch::getBelPinsForCellPin(const CellInfo *cell_info, IdString pin) const { return {pin}; }
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
|
@ -372,7 +372,7 @@ struct Arch : BaseArch<ArchRanges>
|
||||
WireId getBelPinWire(BelId bel, IdString pin) const override;
|
||||
PortType getBelPinType(BelId bel, IdString pin) const override;
|
||||
std::vector<IdString> getBelPins(BelId bel) const override;
|
||||
std::array<IdString, 1> getBelPinsForCellPin(CellInfo *cell_info, IdString pin) const override;
|
||||
std::array<IdString, 1> getBelPinsForCellPin(const CellInfo *cell_info, IdString pin) const override;
|
||||
|
||||
WireId getWireByName(IdStringList name) const override;
|
||||
IdStringList getWireName(WireId wire) const override;
|
||||
|
Loading…
Reference in New Issue
Block a user