Struct libreda_pnr::db::PinRef
source · pub struct PinRef<'a, N>where
N: NetlistBase + ?Sized,{
pub(super) base: &'a N,
pub(super) id: <N as NetlistIds>::PinId,
}Expand description
A reference to a pin. This is just a wrapper around a netlist and a pin ID.
Fields§
§base: &'a N§id: <N as NetlistIds>::PinIdImplementations§
source§impl<'a, L> PinRef<'a, L>where
L: L2NBase,
impl<'a, L> PinRef<'a, L>where L: L2NBase,
sourcepub fn each_shape(&self) -> impl Iterator<Item = ShapeRef<'_, L>>
pub fn each_shape(&self) -> impl Iterator<Item = ShapeRef<'_, L>>
Iterate over all shapes attached to this pin.
source§impl<'a, N> PinRef<'a, N>where
N: NetlistBase,
impl<'a, N> PinRef<'a, N>where N: NetlistBase,
sourcepub fn id(&self) -> <N as NetlistIds>::PinId
pub fn id(&self) -> <N as NetlistIds>::PinId
Get the pin ID.
sourcepub fn terminal_id(&self) -> TerminalId<N>
pub fn terminal_id(&self) -> TerminalId<N>
Get the terminal ID of this pin.
sourcepub fn name(&self) -> <N as HierarchyBase>::NameType
pub fn name(&self) -> <N as HierarchyBase>::NameType
Get the name of the pin.
sourcepub fn net(&self) -> Option<NetRef<'a, N>>
pub fn net(&self) -> Option<NetRef<'a, N>>
Get the net which is attached to the pin from inside the cell.
sourcepub fn instance(
&self,
cell_inst: &<N as HierarchyIds>::CellInstId
) -> PinInstRef<'a, N>
pub fn instance( &self, cell_inst: &<N as HierarchyIds>::CellInstId ) -> PinInstRef<'a, N>
Find the instance of this pin in the given cell instance.
sourcepub fn into_terminal(self) -> TerminalRef<'a, N>
pub fn into_terminal(self) -> TerminalRef<'a, N>
Convert the pin reference into a terminal reference.
Trait Implementations§
source§impl<'a, N> From<PinRef<'a, N>> for TerminalRef<'a, N>where
N: NetlistBase,
impl<'a, N> From<PinRef<'a, N>> for TerminalRef<'a, N>where N: NetlistBase,
source§fn from(p: PinRef<'a, N>) -> TerminalRef<'a, N>
fn from(p: PinRef<'a, N>) -> TerminalRef<'a, N>
Converts to this type from the input type.