Struct libreda_pnr::db::CellInstRef
source · pub struct CellInstRef<'a, H>where
H: HierarchyBase + ?Sized,{
pub(super) base: &'a H,
pub(super) id: <H as HierarchyIds>::CellInstId,
}Expand description
Default implementation for CellInstRef.
This is just a wrapper around a netlist and a cell ID.
Fields§
§base: &'a H§id: <H as HierarchyIds>::CellInstIdImplementations§
source§impl<'a, H> CellInstRef<'a, H>where
H: HierarchyBase,
impl<'a, H> CellInstRef<'a, H>where H: HierarchyBase,
sourcepub fn id(&self) -> <H as HierarchyIds>::CellInstId
pub fn id(&self) -> <H as HierarchyIds>::CellInstId
Get the ID of this cell instance.
sourcepub fn name(&self) -> Option<<H as HierarchyBase>::NameType>
pub fn name(&self) -> Option<<H as HierarchyBase>::NameType>
Get the name of the cell instance.
sourcepub fn parent_id(&self) -> <H as HierarchyIds>::CellId
pub fn parent_id(&self) -> <H as HierarchyIds>::CellId
Get the ID of the parent cell of this instance.
sourcepub fn template_id(&self) -> <H as HierarchyIds>::CellId
pub fn template_id(&self) -> <H as HierarchyIds>::CellId
Get the ID of the template cell of this instance.
source§impl<'a, L> CellInstRef<'a, L>where
L: LayoutBase,
impl<'a, L> CellInstRef<'a, L>where L: LayoutBase,
sourcepub fn get_transform(&self) -> SimpleTransform<<L as LayoutIds>::Coord>
pub fn get_transform(&self) -> SimpleTransform<<L as LayoutIds>::Coord>
Get the geometric transform that describes the location of a cell instance relative to its parent.
source§impl<'a, N> CellInstRef<'a, N>where
N: NetlistBase,
impl<'a, N> CellInstRef<'a, N>where N: NetlistBase,
sourcepub fn each_pin_instance_id(
&self
) -> impl Iterator<Item = <N as NetlistIds>::PinInstId>
pub fn each_pin_instance_id( &self ) -> impl Iterator<Item = <N as NetlistIds>::PinInstId>
Iterate over the IDs of all pins of this cell.
sourcepub fn each_pin_instance(&self) -> impl Iterator<Item = PinInstRef<'a, N>>
pub fn each_pin_instance(&self) -> impl Iterator<Item = PinInstRef<'a, N>>
Iterate over all pins of this cell.
sourcepub fn each_net(&self) -> impl Iterator<Item = NetRef<'a, N>>
pub fn each_net(&self) -> impl Iterator<Item = NetRef<'a, N>>
Iterate over all nets are connected to this instance. A net might appear more than once.
sourcepub fn pin_instance(&self, pin: &<N as NetlistIds>::PinId) -> PinInstRef<'a, N>
pub fn pin_instance(&self, pin: &<N as NetlistIds>::PinId) -> PinInstRef<'a, N>
Get the pin instance which matches the given pin template.
sourcepub fn pin_instance_by_name(&self, name: &str) -> Option<PinInstRef<'a, N>>
pub fn pin_instance_by_name(&self, name: &str) -> Option<PinInstRef<'a, N>>
Find a pin instance by its name.
Trait Implementations§
source§impl<'a, H> Debug for CellInstRef<'a, H>where
H: HierarchyBase,
impl<'a, H> Debug for CellInstRef<'a, H>where H: HierarchyBase,
source§impl<'a, H> PartialEq<CellInstRef<'a, H>> for CellInstRef<'a, H>where
H: HierarchyBase,
impl<'a, H> PartialEq<CellInstRef<'a, H>> for CellInstRef<'a, H>where H: HierarchyBase,
source§fn eq(&self, other: &CellInstRef<'a, H>) -> bool
fn eq(&self, other: &CellInstRef<'a, H>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.