Struct libreda_db::region_search::RegionSearchAdapter
source · [−]pub struct RegionSearchAdapter<'a, T> where
T: LayoutBase,
T::Coord: PrimInt + Signed + Debug, {
chip: &'a mut T,
shape_rtrees: FnvHashMap<T::CellId, FnvHashMap<T::LayerId, RTree<ShapeEntry<T::ShapeId, T::Coord>>>>,
instance_rtree: FnvHashMap<T::CellId, RTree<CellInstanceEntry<T>>>,
cell_bounding_boxes: FnvHashMap<T::CellId, Rect<T::Coord>>,
}
Expand description
Wrapper around netlist, layout and L2N structures that allows fast region queries.
Types
T
: Underlying data structure.
Fields
chip: &'a mut T
Underlying data structure.
shape_rtrees: FnvHashMap<T::CellId, FnvHashMap<T::LayerId, RTree<ShapeEntry<T::ShapeId, T::Coord>>>>
RTrees containing geometric shapes.
instance_rtree: FnvHashMap<T::CellId, RTree<CellInstanceEntry<T>>>
RTree containing child instances.
cell_bounding_boxes: FnvHashMap<T::CellId, Rect<T::Coord>>
Cache for bounding boxes of cells.
Implementations
sourceimpl<'a, T> RegionSearchAdapter<'a, T> where
T: LayoutBase,
T::Coord: PrimInt + Signed + Debug,
impl<'a, T> RegionSearchAdapter<'a, T> where
T: LayoutBase,
T::Coord: PrimInt + Signed + Debug,
fn create_shape_trees(&mut self)
fn create_cell_instance_trees(&mut self)
Trait Implementations
sourceimpl<'a, T> Decorator for RegionSearchAdapter<'a, T> where
T: LayoutBase,
T::Coord: PrimInt + Signed + Debug,
impl<'a, T> Decorator for RegionSearchAdapter<'a, T> where
T: LayoutBase,
T::Coord: PrimInt + Signed + Debug,
sourceimpl<'a, H> HierarchyBaseDecorator for RegionSearchAdapter<'a, H> where
H: LayoutBase + 'static,
H::Coord: PrimInt + Signed + Debug,
impl<'a, H> HierarchyBaseDecorator for RegionSearchAdapter<'a, H> where
H: LayoutBase + 'static,
H::Coord: PrimInt + Signed + Debug,
type NameType = <H as HierarchyBase>::NameType
type NameType = <H as HierarchyBase>::NameType
Inherit the types from HierarchyBase.
type CellId = <H as HierarchyBase>::CellId
type CellInstId = <H as HierarchyBase>::CellInstId
fn d_cell_by_name(&self, name: &str) -> Option<Self::CellId>
fn d_cell_instance_by_name(
&self,
parent_cell: &Self::CellId,
name: &str
) -> Option<Self::CellInstId>
fn d_cell_name(&self, cell: &Self::CellId) -> Self::NameType
fn d_cell_instance_name(
&self,
cell_inst: &Self::CellInstId
) -> Option<Self::NameType>
fn d_parent_cell(&self, cell_instance: &Self::CellInstId) -> Self::CellId
fn d_template_cell(&self, cell_instance: &Self::CellInstId) -> Self::CellId
fn d_for_each_cell<F>(&self, f: F) where
F: FnMut(Self::CellId),
fn d_each_cell_vec(&self) -> Vec<Self::CellId>
fn d_each_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
fn d_for_each_cell_instance<F>(&self, cell: &Self::CellId, f: F) where
F: FnMut(Self::CellInstId),
fn d_each_cell_instance_vec(&self, cell: &Self::CellId) -> Vec<Self::CellInstId>
fn d_each_cell_instance(
&self,
cell: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>
fn d_for_each_cell_dependency<F>(&self, cell: &Self::CellId, f: F) where
F: FnMut(Self::CellId),
fn d_each_cell_dependency_vec(&self, cell: &Self::CellId) -> Vec<Self::CellId>
fn d_each_cell_dependency(
&self,
cell: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellId> + '_>
fn d_num_cell_dependencies(&self, cell: &Self::CellId) -> usize
fn d_for_each_dependent_cell<F>(&self, cell: &Self::CellId, f: F) where
F: FnMut(Self::CellId),
fn d_each_dependent_cell_vec(&self, cell: &Self::CellId) -> Vec<Self::CellId>
fn d_each_dependent_cell(
&self,
cell: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellId> + '_>
fn d_num_dependent_cells(&self, cell: &Self::CellId) -> usize
fn d_for_each_cell_reference<F>(&self, cell: &Self::CellId, f: F) where
F: FnMut(Self::CellInstId),
fn d_each_cell_reference_vec(&self, cell: &Self::CellId) -> Vec<Self::CellInstId>
fn d_each_cell_reference(
&self,
cell: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>
fn d_num_cell_references(&self, cell: &Self::CellId) -> usize
fn d_num_child_instances(&self, cell: &Self::CellId) -> usize
fn d_num_cells(&self) -> usize
fn d_get_chip_property(&self, key: &Self::NameType) -> Option<PropertyValue>
fn d_get_cell_property(
&self,
cell: &Self::CellId,
key: &Self::NameType
) -> Option<PropertyValue>
fn d_get_cell_instance_property(
&self,
inst: &Self::CellInstId,
key: &Self::NameType
) -> Option<PropertyValue>
sourceimpl<'a, H> HierarchyEditDecorator for RegionSearchAdapter<'a, H> where
H: HierarchyEdit + LayoutBase + 'static,
H::Coord: PrimInt + Signed + Debug,
impl<'a, H> HierarchyEditDecorator for RegionSearchAdapter<'a, H> where
H: HierarchyEdit + LayoutBase + 'static,
H::Coord: PrimInt + Signed + Debug,
fn d_new() -> Self
fn d_create_cell(&mut self, name: H::NameType) -> H::CellId
fn d_remove_cell(&mut self, cell_id: &H::CellId)
fn d_create_cell_instance(
&mut self,
parent_cell: &H::CellId,
template_cell: &H::CellId,
name: Option<H::NameType>
) -> H::CellInstId
fn d_remove_cell_instance(&mut self, inst: &H::CellInstId)
fn d_rename_cell_instance(
&mut self,
inst: &<Self::D as HierarchyBase>::CellInstId,
new_name: Option<<Self::D as HierarchyBase>::NameType>
)
fn d_rename_cell(
&mut self,
cell: &<Self::D as HierarchyBase>::CellId,
new_name: <Self::D as HierarchyBase>::NameType
)
fn d_set_chip_property(
&mut self,
key: <Self::D as HierarchyBase>::NameType,
value: PropertyValue
)
fn d_set_cell_property(
&mut self,
cell: &<Self::D as HierarchyBase>::CellId,
key: <Self::D as HierarchyBase>::NameType,
value: PropertyValue
)
fn d_set_cell_instance_property(
&mut self,
inst: &<Self::D as HierarchyBase>::CellInstId,
key: <Self::D as HierarchyBase>::NameType,
value: PropertyValue
)
sourceimpl<'a, LN> L2NBaseDecorator for RegionSearchAdapter<'a, LN> where
LN: L2NBase + 'static,
LN::Coord: PrimInt + Signed + Debug,
impl<'a, LN> L2NBaseDecorator for RegionSearchAdapter<'a, LN> where
LN: L2NBase + 'static,
LN::Coord: PrimInt + Signed + Debug,
fn d_shapes_of_net(
&self,
net_id: &<Self::D as NetlistBase>::NetId
) -> Box<dyn Iterator<Item = <Self::D as LayoutBase>::ShapeId> + '_>
fn d_shapes_of_pin(
&self,
pin_id: &<Self::D as NetlistBase>::PinId
) -> Box<dyn Iterator<Item = <Self::D as LayoutBase>::ShapeId> + '_>
fn d_get_net_of_shape(
&self,
shape_id: &<Self::D as LayoutBase>::ShapeId
) -> Option<<Self::D as NetlistBase>::NetId>
fn d_get_pin_of_shape(
&self,
shape_id: &<Self::D as LayoutBase>::ShapeId
) -> Option<<Self::D as NetlistBase>::PinId>
sourceimpl<'a, LN> L2NEditDecorator for RegionSearchAdapter<'a, LN> where
LN: L2NEdit + 'static,
LN::Coord: PrimInt + Signed + Debug,
impl<'a, LN> L2NEditDecorator for RegionSearchAdapter<'a, LN> where
LN: L2NEdit + 'static,
LN::Coord: PrimInt + Signed + Debug,
fn d_set_pin_of_shape(
&mut self,
shape_id: &<Self::D as LayoutBase>::ShapeId,
pin: Option<<Self::D as NetlistBase>::PinId>
) -> Option<<Self::D as NetlistBase>::PinId>
fn d_set_net_of_shape(
&mut self,
shape_id: &<Self::D as LayoutBase>::ShapeId,
net: Option<<Self::D as NetlistBase>::NetId>
) -> Option<<Self::D as NetlistBase>::NetId>
sourceimpl<'a, L> LayoutBaseDecorator for RegionSearchAdapter<'a, L> where
L: LayoutBase + 'static,
L::Coord: PrimInt + Signed + Debug,
impl<'a, L> LayoutBaseDecorator for RegionSearchAdapter<'a, L> where
L: LayoutBase + 'static,
L::Coord: PrimInt + Signed + Debug,
fn d_dbu(&self) -> <Self::D as LayoutBase>::Coord
fn d_each_layer(
&self
) -> Box<dyn Iterator<Item = <Self::D as LayoutBase>::LayerId> + '_>
fn d_layer_info(
&self,
layer: &<Self::D as LayoutBase>::LayerId
) -> LayerInfo<<Self::D as HierarchyBase>::NameType>
fn d_find_layer(
&self,
index: u32,
datatype: u32
) -> Option<<Self::D as LayoutBase>::LayerId>
fn d_layer_by_name(&self, name: &str) -> Option<<Self::D as LayoutBase>::LayerId>
fn d_bounding_box_per_layer(
&self,
cell: &<Self::D as HierarchyBase>::CellId,
layer: &<Self::D as LayoutBase>::LayerId
) -> Option<Rect<<Self::D as LayoutBase>::Coord>>
fn d_bounding_box(
&self,
cell: &<Self::D as HierarchyBase>::CellId
) -> Option<Rect<<Self::D as LayoutBase>::Coord>>
fn d_each_shape_id(
&self,
cell: &<Self::D as HierarchyBase>::CellId,
layer: &<Self::D as LayoutBase>::LayerId
) -> Box<dyn Iterator<Item = <Self::D as LayoutBase>::ShapeId> + '_>
fn d_for_each_shape<F>(
&self,
cell: &<Self::D as HierarchyBase>::CellId,
layer: &<Self::D as LayoutBase>::LayerId,
f: F
) where
F: FnMut(&<Self::D as LayoutBase>::ShapeId, &Geometry<<Self::D as LayoutBase>::Coord>),
fn d_with_shape<F, R>(
&self,
shape_id: &<Self::D as LayoutBase>::ShapeId,
f: F
) -> R where
F: FnMut(&<Self::D as LayoutBase>::LayerId, &Geometry<<Self::D as LayoutBase>::Coord>) -> R,
fn d_parent_of_shape(
&self,
shape_id: &<Self::D as LayoutBase>::ShapeId
) -> (<Self::D as HierarchyBase>::CellId, <Self::D as LayoutBase>::LayerId)
fn d_for_each_shape_recursive<F>(
&self,
cell: &<Self::D as HierarchyBase>::CellId,
layer: &<Self::D as LayoutBase>::LayerId,
f: F
) where
F: FnMut(SimpleTransform<<Self::D as LayoutBase>::Coord>, &<Self::D as LayoutBase>::ShapeId, &Geometry<<Self::D as LayoutBase>::Coord>),
fn d_get_transform(
&self,
cell_inst: &<Self::D as HierarchyBase>::CellInstId
) -> SimpleTransform<<Self::D as LayoutBase>::Coord>
fn d_get_shape_property(
&self,
shape: &<Self::D as LayoutBase>::ShapeId,
key: &<Self::D as HierarchyBase>::NameType
) -> Option<PropertyValue>
sourceimpl<'a, L> LayoutEditDecorator for RegionSearchAdapter<'a, L> where
L: LayoutEdit + 'static,
L::Coord: PrimInt + Signed + Debug,
impl<'a, L> LayoutEditDecorator for RegionSearchAdapter<'a, L> where
L: LayoutEdit + 'static,
L::Coord: PrimInt + Signed + Debug,
fn d_insert_shape(
&mut self,
parent_cell: &L::CellId,
layer: &L::LayerId,
geometry: Geometry<L::Coord>
) -> L::ShapeId
fn d_remove_shape(&mut self, shape_id: &L::ShapeId) -> Option<Geometry<L::Coord>>
fn d_replace_shape(
&mut self,
shape_id: &L::ShapeId,
geometry: Geometry<L::Coord>
) -> Geometry<L::Coord>
fn d_set_transform(
&mut self,
cell_inst: &L::CellInstId,
tf: SimpleTransform<L::Coord>
)
fn d_set_dbu(&mut self, dbu: <Self::D as LayoutBase>::Coord)
fn d_create_layer(
&mut self,
index: UInt,
datatype: UInt
) -> <Self::D as LayoutBase>::LayerId
fn d_create_layer_with_id(
&mut self,
layer_id: <Self::D as LayoutBase>::LayerId,
index: UInt,
datatype: UInt
) -> Result<(), ()>
fn d_set_layer_name(
&mut self,
layer: &<Self::D as LayoutBase>::LayerId,
name: Option<<Self::D as HierarchyBase>::NameType>
) -> Option<<Self::D as HierarchyBase>::NameType>
fn d_set_shape_property(
&mut self,
shape: &<Self::D as LayoutBase>::ShapeId,
key: <Self::D as HierarchyBase>::NameType,
value: PropertyValue
)
sourceimpl<'a, T> MutDecorator for RegionSearchAdapter<'a, T> where
T: LayoutBase,
T::Coord: PrimInt + Signed + Debug,
impl<'a, T> MutDecorator for RegionSearchAdapter<'a, T> where
T: LayoutBase,
T::Coord: PrimInt + Signed + Debug,
sourceimpl<'a, N> NetlistBaseDecorator for RegionSearchAdapter<'a, N> where
N: LayoutBase + NetlistBase + 'static,
N::Coord: PrimInt + Signed + Debug,
impl<'a, N> NetlistBaseDecorator for RegionSearchAdapter<'a, N> where
N: LayoutBase + NetlistBase + 'static,
N::Coord: PrimInt + Signed + Debug,
fn d_template_pin(
&self,
pin_instance: &<Self::D as NetlistBase>::PinInstId
) -> <Self::D as NetlistBase>::PinId
fn d_pin_direction(&self, pin: &<Self::D as NetlistBase>::PinId) -> Direction
fn d_pin_name(
&self,
pin: &<Self::D as NetlistBase>::PinId
) -> <Self::D as HierarchyBase>::NameType
fn d_pin_by_name(
&self,
parent_circuit: &<Self::D as HierarchyBase>::CellId,
name: &str
) -> Option<<Self::D as NetlistBase>::PinId>
fn d_parent_cell_of_pin(
&self,
pin: &<Self::D as NetlistBase>::PinId
) -> <Self::D as HierarchyBase>::CellId
fn d_parent_of_pin_instance(
&self,
pin_inst: &<Self::D as NetlistBase>::PinInstId
) -> <Self::D as HierarchyBase>::CellInstId
fn d_pin_instance(
&self,
cell_inst: &<Self::D as HierarchyBase>::CellInstId,
pin: &<Self::D as NetlistBase>::PinId
) -> <Self::D as NetlistBase>::PinInstId
fn d_parent_cell_of_net(
&self,
net: &<Self::D as NetlistBase>::NetId
) -> <Self::D as HierarchyBase>::CellId
fn d_net_of_pin(
&self,
pin: &<Self::D as NetlistBase>::PinId
) -> Option<<Self::D as NetlistBase>::NetId>
fn d_net_of_pin_instance(
&self,
pin_instance: &<Self::D as NetlistBase>::PinInstId
) -> Option<<Self::D as NetlistBase>::NetId>
fn d_net_of_terminal(
&self,
terminal: &TerminalId<Self::D>
) -> Option<<Self::D as NetlistBase>::NetId>
fn d_net_zero(
&self,
parent_circuit: &<Self::D as HierarchyBase>::CellId
) -> <Self::D as NetlistBase>::NetId
fn d_net_one(
&self,
parent_circuit: &<Self::D as HierarchyBase>::CellId
) -> <Self::D as NetlistBase>::NetId
fn d_net_by_name(
&self,
parent_circuit: &<Self::D as HierarchyBase>::CellId,
name: &str
) -> Option<<Self::D as NetlistBase>::NetId>
fn d_net_name(
&self,
net: &<Self::D as NetlistBase>::NetId
) -> Option<<Self::D as HierarchyBase>::NameType>
fn d_for_each_pin<F>(&self, circuit: &<Self::D as HierarchyBase>::CellId, f: F) where
F: FnMut(<Self::D as NetlistBase>::PinId),
fn d_each_pin_vec(
&self,
circuit: &<Self::D as HierarchyBase>::CellId
) -> Vec<<Self::D as NetlistBase>::PinId>
fn d_each_pin<'a>(
&'a self,
circuit: &<Self::D as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <Self::D as NetlistBase>::PinId> + 'a>
fn d_for_each_pin_instance<F>(
&self,
circuit_inst: &<Self::D as HierarchyBase>::CellInstId,
f: F
) where
F: FnMut(<Self::D as NetlistBase>::PinInstId),
fn d_each_pin_instance_vec(
&self,
circuit_instance: &<Self::D as HierarchyBase>::CellInstId
) -> Vec<<Self::D as NetlistBase>::PinInstId>
fn d_each_pin_instance<'a>(
&'a self,
circuit_instance: &<Self::D as HierarchyBase>::CellInstId
) -> Box<dyn Iterator<Item = <Self::D as NetlistBase>::PinInstId> + 'a>
fn d_each_external_net<'a>(
&'a self,
circuit_instance: &<Self::D as HierarchyBase>::CellInstId
) -> Box<dyn Iterator<Item = <Self::D as NetlistBase>::NetId> + 'a>
fn d_for_each_external_net<F>(
&self,
circuit_instance: &<Self::D as HierarchyBase>::CellInstId,
f: F
) where
F: FnMut(<Self::D as NetlistBase>::NetId),
fn d_each_external_net_vec(
&self,
circuit_instance: &<Self::D as HierarchyBase>::CellInstId
) -> Vec<<Self::D as NetlistBase>::NetId>
fn d_for_each_internal_net<F>(
&self,
circuit: &<Self::D as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Self::D as NetlistBase>::NetId),
fn d_each_internal_net_vec(
&self,
circuit: &<Self::D as HierarchyBase>::CellId
) -> Vec<<Self::D as NetlistBase>::NetId>
fn d_each_internal_net<'a>(
&'a self,
circuit: &<Self::D as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <Self::D as NetlistBase>::NetId> + 'a>
fn d_num_internal_nets(
&self,
circuit: &<Self::D as HierarchyBase>::CellId
) -> usize
fn d_num_net_pins(&self, net: &<Self::D as NetlistBase>::NetId) -> usize
fn d_num_net_pin_instances(&self, net: &<Self::D as NetlistBase>::NetId) -> usize
fn d_num_net_terminals(&self, net: &<Self::D as NetlistBase>::NetId) -> usize
fn d_num_pins(&self, circuit: &<Self::D as HierarchyBase>::CellId) -> usize
fn d_for_each_pin_of_net<F>(&self, net: &<Self::D as NetlistBase>::NetId, f: F) where
F: FnMut(<Self::D as NetlistBase>::PinId),
fn d_each_pin_of_net_vec(
&self,
net: &<Self::D as NetlistBase>::NetId
) -> Vec<<Self::D as NetlistBase>::PinId>
fn d_each_pin_of_net<'a>(
&'a self,
net: &<Self::D as NetlistBase>::NetId
) -> Box<dyn Iterator<Item = <Self::D as NetlistBase>::PinId> + 'a>
fn d_for_each_pin_instance_of_net<F>(
&self,
net: &<Self::D as NetlistBase>::NetId,
f: F
) where
F: FnMut(<Self::D as NetlistBase>::PinInstId),
fn d_each_pin_instance_of_net_vec(
&self,
net: &<Self::D as NetlistBase>::NetId
) -> Vec<<Self::D as NetlistBase>::PinInstId>
fn d_each_pin_instance_of_net<'a>(
&'a self,
net: &<Self::D as NetlistBase>::NetId
) -> Box<dyn Iterator<Item = <Self::D as NetlistBase>::PinInstId> + 'a>
fn d_for_each_terminal_of_net<F>(
&self,
net: &<Self::D as NetlistBase>::NetId,
f: F
) where
F: FnMut(TerminalId<Self::D>),
fn d_each_terminal_of_net_vec(
&self,
net: &<Self::D as NetlistBase>::NetId
) -> Vec<TerminalId<Self::D>>
fn d_each_terminal_of_net<'a>(
&'a self,
net: &<Self::D as NetlistBase>::NetId
) -> Box<dyn Iterator<Item = TerminalId<Self::D>> + 'a>
sourceimpl<'a, N: NetlistEdit + 'static> NetlistEditDecorator for RegionSearchAdapter<'a, N> where
N: LayoutBase + NetlistEdit + 'static,
N::Coord: PrimInt + Signed + Debug,
impl<'a, N: NetlistEdit + 'static> NetlistEditDecorator for RegionSearchAdapter<'a, N> where
N: LayoutBase + NetlistEdit + 'static,
N::Coord: PrimInt + Signed + Debug,
sourcefn d_create_pin(
&mut self,
cell: &<Self::D as HierarchyBase>::CellId,
name: <Self::D as HierarchyBase>::NameType,
direction: Direction
) -> <Self::D as NetlistBase>::PinId
fn d_create_pin(
&mut self,
cell: &<Self::D as HierarchyBase>::CellId,
name: <Self::D as HierarchyBase>::NameType,
direction: Direction
) -> <Self::D as NetlistBase>::PinId
Create a new pin in this cell. Also adds the pin to all instances of the cell. Read more
sourcefn d_remove_pin(&mut self, id: &<Self::D as NetlistBase>::PinId)
fn d_remove_pin(&mut self, id: &<Self::D as NetlistBase>::PinId)
Remove the pin from this circuit and from all instances of this circuit.
sourcefn d_rename_pin(
&mut self,
pin: &<Self::D as NetlistBase>::PinId,
new_name: <Self::D as HierarchyBase>::NameType
) -> <Self::D as HierarchyBase>::NameType
fn d_rename_pin(
&mut self,
pin: &<Self::D as NetlistBase>::PinId,
new_name: <Self::D as HierarchyBase>::NameType
) -> <Self::D as HierarchyBase>::NameType
Change the name of the pin, returns the old name. Read more
sourcefn d_create_net(
&mut self,
parent: &<Self::D as HierarchyBase>::CellId,
name: Option<<Self::D as HierarchyBase>::NameType>
) -> <Self::D as NetlistBase>::NetId
fn d_create_net(
&mut self,
parent: &<Self::D as HierarchyBase>::CellId,
name: Option<<Self::D as HierarchyBase>::NameType>
) -> <Self::D as NetlistBase>::NetId
Create a net net that lives in the parent
circuit.
sourcefn d_rename_net(
&mut self,
net_id: &<Self::D as NetlistBase>::NetId,
new_name: Option<<Self::D as HierarchyBase>::NameType>
) -> Option<<Self::D as HierarchyBase>::NameType>
fn d_rename_net(
&mut self,
net_id: &<Self::D as NetlistBase>::NetId,
new_name: Option<<Self::D as HierarchyBase>::NameType>
) -> Option<<Self::D as HierarchyBase>::NameType>
Set a new name for the net. This might panic if the name already exists. Returns the old name. Read more
sourcefn d_remove_net(&mut self, net: &<Self::D as NetlistBase>::NetId)
fn d_remove_net(&mut self, net: &<Self::D as NetlistBase>::NetId)
Delete the net if it exists and disconnect all connected terminals.
sourcefn d_connect_pin(
&mut self,
pin: &<Self::D as NetlistBase>::PinId,
net: Option<<Self::D as NetlistBase>::NetId>
) -> Option<<Self::D as NetlistBase>::NetId>
fn d_connect_pin(
&mut self,
pin: &<Self::D as NetlistBase>::PinId,
net: Option<<Self::D as NetlistBase>::NetId>
) -> Option<<Self::D as NetlistBase>::NetId>
Connect a pin to a net. Returns the old connected net, if any. Read more
sourcefn d_connect_pin_instance(
&mut self,
pin: &<Self::D as NetlistBase>::PinInstId,
net: Option<<Self::D as NetlistBase>::NetId>
) -> Option<<Self::D as NetlistBase>::NetId>
fn d_connect_pin_instance(
&mut self,
pin: &<Self::D as NetlistBase>::PinInstId,
net: Option<<Self::D as NetlistBase>::NetId>
) -> Option<<Self::D as NetlistBase>::NetId>
Connect a pin instance to a net. Returns the old connected net, if any. Read more
sourceimpl<'a, L> RegionSearch for RegionSearchAdapter<'a, L> where
L: LayoutBase + 'static,
L::Coord: PrimInt + Signed + Debug,
impl<'a, L> RegionSearch for RegionSearchAdapter<'a, L> where
L: LayoutBase + 'static,
L::Coord: PrimInt + Signed + Debug,
sourcefn each_shape_in_region_per_layer(
&self,
cell: &Self::CellId,
layer_id: &Self::LayerId,
search_region: &Rect<Self::Coord>
) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>
fn each_shape_in_region_per_layer(
&self,
cell: &Self::CellId,
layer_id: &Self::LayerId,
search_region: &Rect<Self::Coord>
) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>
Iterate over the IDs of all shapes (on a specific layer) whose bounding-box overlaps with the search_region
.
sourcefn each_cell_instance_in_region(
&self,
cell: &Self::CellId,
search_region: &Rect<Self::Coord>
) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>
fn each_cell_instance_in_region(
&self,
cell: &Self::CellId,
search_region: &Rect<Self::Coord>
) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>
Iterate over the IDs of all instances within the cell
whose bounding-box overlaps with the search_region
.
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for RegionSearchAdapter<'a, T> where
T: RefUnwindSafe,
<T as HierarchyBase>::CellId: RefUnwindSafe,
<T as HierarchyBase>::CellInstId: RefUnwindSafe,
<T as LayoutBase>::Coord: RefUnwindSafe,
<T as LayoutBase>::LayerId: RefUnwindSafe,
<T as LayoutBase>::ShapeId: RefUnwindSafe,
impl<'a, T> Send for RegionSearchAdapter<'a, T> where
T: Send,
<T as HierarchyBase>::CellId: Send,
<T as HierarchyBase>::CellInstId: Send,
<T as LayoutBase>::LayerId: Send,
<T as LayoutBase>::ShapeId: Send,
impl<'a, T> Sync for RegionSearchAdapter<'a, T> where
T: Sync,
<T as HierarchyBase>::CellId: Sync,
<T as HierarchyBase>::CellInstId: Sync,
<T as LayoutBase>::LayerId: Sync,
<T as LayoutBase>::ShapeId: Sync,
impl<'a, T> Unpin for RegionSearchAdapter<'a, T> where
<T as HierarchyBase>::CellId: Unpin,
<T as HierarchyBase>::CellInstId: Unpin,
<T as LayoutBase>::Coord: Unpin,
<T as LayoutBase>::LayerId: Unpin,
<T as LayoutBase>::ShapeId: Unpin,
impl<'a, T> !UnwindSafe for RegionSearchAdapter<'a, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, H> HierarchyBase for T where
T: HierarchyBaseDecorator<D = H, NameType = <H as HierarchyBase>::NameType, CellId = <H as HierarchyBase>::CellId, CellInstId = <H as HierarchyBase>::CellInstId>,
H: HierarchyBase,
impl<T, H> HierarchyBase for T where
T: HierarchyBaseDecorator<D = H, NameType = <H as HierarchyBase>::NameType, CellId = <H as HierarchyBase>::CellId, CellInstId = <H as HierarchyBase>::CellInstId>,
H: HierarchyBase,
type NameType = <H as HierarchyBase>::NameType
type NameType = <H as HierarchyBase>::NameType
Type for names of cells, instances, etc.
type CellId = <H as HierarchyBase>::CellId
type CellId = <H as HierarchyBase>::CellId
Cell/module identifier type.
type CellInstId = <H as HierarchyBase>::CellInstId
type CellInstId = <H as HierarchyBase>::CellInstId
Cell instance identifier type.
sourcefn cell_by_name(&self, name: &str) -> Option<<T as HierarchyBase>::CellId>
fn cell_by_name(&self, name: &str) -> Option<<T as HierarchyBase>::CellId>
Find a cell by its name.
Return the cell with the given name. Returns None
if the cell does not exist. Read more
sourcefn cell_instance_by_name(
&self,
parent_cell: &<T as HierarchyBase>::CellId,
name: &str
) -> Option<<T as HierarchyBase>::CellInstId>
fn cell_instance_by_name(
&self,
parent_cell: &<T as HierarchyBase>::CellId,
name: &str
) -> Option<<T as HierarchyBase>::CellInstId>
Find a cell instance by its name.
Returns None
if the name does not exist. Read more
sourcefn cell_name(
&self,
cell: &<T as HierarchyBase>::CellId
) -> <T as HierarchyBase>::NameType
fn cell_name(
&self,
cell: &<T as HierarchyBase>::CellId
) -> <T as HierarchyBase>::NameType
Get the name of the cell.
sourcefn cell_instance_name(
&self,
cell_inst: &<T as HierarchyBase>::CellInstId
) -> Option<<T as HierarchyBase>::NameType>
fn cell_instance_name(
&self,
cell_inst: &<T as HierarchyBase>::CellInstId
) -> Option<<T as HierarchyBase>::NameType>
Get the name of the cell instance.
sourcefn parent_cell(
&self,
cell_instance: &<T as HierarchyBase>::CellInstId
) -> <T as HierarchyBase>::CellId
fn parent_cell(
&self,
cell_instance: &<T as HierarchyBase>::CellInstId
) -> <T as HierarchyBase>::CellId
Get the ID of the parent cell of this instance.
sourcefn template_cell(
&self,
cell_instance: &<T as HierarchyBase>::CellInstId
) -> <T as HierarchyBase>::CellId
fn template_cell(
&self,
cell_instance: &<T as HierarchyBase>::CellInstId
) -> <T as HierarchyBase>::CellId
Get the ID of the template cell of this instance.
sourcefn for_each_cell<F>(&self, f: F) where
F: FnMut(<T as HierarchyBase>::CellId),
fn for_each_cell<F>(&self, f: F) where
F: FnMut(<T as HierarchyBase>::CellId),
Call a function on each cell of the netlist.
sourcefn each_cell_vec(&self) -> Vec<<T as HierarchyBase>::CellId, Global>
fn each_cell_vec(&self) -> Vec<<T as HierarchyBase>::CellId, Global>
Get a Vec
of all cell IDs in this netlist.
sourcefn each_cell(
&self
) -> Box<dyn Iterator<Item = <T as HierarchyBase>::CellId>, Global>
fn each_cell(
&self
) -> Box<dyn Iterator<Item = <T as HierarchyBase>::CellId>, Global>
Iterate over all cells.
sourcefn for_each_cell_instance<F>(&self, cell: &<T as HierarchyBase>::CellId, f: F) where
F: FnMut(<T as HierarchyBase>::CellInstId),
fn for_each_cell_instance<F>(&self, cell: &<T as HierarchyBase>::CellId, f: F) where
F: FnMut(<T as HierarchyBase>::CellInstId),
Call a function on each instance in this cell.
sourcefn each_cell_instance_vec(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Vec<<T as HierarchyBase>::CellInstId, Global>
fn each_cell_instance_vec(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Vec<<T as HierarchyBase>::CellInstId, Global>
Get a Vec
of the IDs of all instances in this cell.
sourcefn each_cell_instance(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <T as HierarchyBase>::CellInstId>, Global>
fn each_cell_instance(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <T as HierarchyBase>::CellInstId>, Global>
Iterate over all instances in a cell.
sourcefn for_each_cell_dependency<F>(&self, cell: &<T as HierarchyBase>::CellId, f: F) where
F: FnMut(<T as HierarchyBase>::CellId),
fn for_each_cell_dependency<F>(&self, cell: &<T as HierarchyBase>::CellId, f: F) where
F: FnMut(<T as HierarchyBase>::CellId),
Call a function for each cell that is a child of this cell
.
sourcefn each_cell_dependency_vec(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Vec<<T as HierarchyBase>::CellId, Global>
fn each_cell_dependency_vec(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Vec<<T as HierarchyBase>::CellId, Global>
Get a Vec
of each cell that is a child of this cell
.
sourcefn each_cell_dependency(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <T as HierarchyBase>::CellId>, Global>
fn each_cell_dependency(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <T as HierarchyBase>::CellId>, Global>
Iterate over all cells that are instantiated in this cell
.
sourcefn num_cell_dependencies(&self, cell: &<T as HierarchyBase>::CellId) -> usize
fn num_cell_dependencies(&self, cell: &<T as HierarchyBase>::CellId) -> usize
Count all cells that are dependencies of cell
.
sourcefn for_each_dependent_cell<F>(&self, cell: &<T as HierarchyBase>::CellId, f: F) where
F: FnMut(<T as HierarchyBase>::CellId),
fn for_each_dependent_cell<F>(&self, cell: &<T as HierarchyBase>::CellId, f: F) where
F: FnMut(<T as HierarchyBase>::CellId),
Call a function for each cell that directly depends on cell
.
sourcefn each_dependent_cell_vec(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Vec<<T as HierarchyBase>::CellId, Global>
fn each_dependent_cell_vec(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Vec<<T as HierarchyBase>::CellId, Global>
Get a Vec
of each cell that directly depends on cell
.
sourcefn each_dependent_cell(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <T as HierarchyBase>::CellId>, Global>
fn each_dependent_cell(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <T as HierarchyBase>::CellId>, Global>
Iterate over each cell that directly depends on cell
.
sourcefn num_dependent_cells(&self, cell: &<T as HierarchyBase>::CellId) -> usize
fn num_dependent_cells(&self, cell: &<T as HierarchyBase>::CellId) -> usize
Count all cells that are directly dependent on cell
, i.e. contain an instance of cell
.
sourcefn for_each_cell_reference<F>(&self, cell: &<T as HierarchyBase>::CellId, f: F) where
F: FnMut(<T as HierarchyBase>::CellInstId),
fn for_each_cell_reference<F>(&self, cell: &<T as HierarchyBase>::CellId, f: F) where
F: FnMut(<T as HierarchyBase>::CellInstId),
Iterate over all instances of this cell
, i.e. instances that use this cell as
a template. Read more
sourcefn each_cell_reference_vec(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Vec<<T as HierarchyBase>::CellInstId, Global>
fn each_cell_reference_vec(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Vec<<T as HierarchyBase>::CellInstId, Global>
Get a Vec
with all cell instances referencing this cell.
sourcefn each_cell_reference(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <T as HierarchyBase>::CellInstId>, Global>
fn each_cell_reference(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <T as HierarchyBase>::CellInstId>, Global>
Iterate over all instances of this cell
, i.e. instances that use this cell as
a template. Read more
sourcefn num_cell_references(&self, cell: &<T as HierarchyBase>::CellId) -> usize
fn num_cell_references(&self, cell: &<T as HierarchyBase>::CellId) -> usize
Count all instantiations of cell
.
sourcefn num_child_instances(&self, cell: &<T as HierarchyBase>::CellId) -> usize
fn num_child_instances(&self, cell: &<T as HierarchyBase>::CellId) -> usize
Get the number of cell instances inside the cell
.
sourcefn get_chip_property(
&self,
key: &<T as HierarchyBase>::NameType
) -> Option<PropertyValue>
fn get_chip_property(
&self,
key: &<T as HierarchyBase>::NameType
) -> Option<PropertyValue>
Get a property of the top-level chip data structure.
sourcefn get_cell_property(
&self,
cell: &<T as HierarchyBase>::CellId,
key: &<T as HierarchyBase>::NameType
) -> Option<PropertyValue>
fn get_cell_property(
&self,
cell: &<T as HierarchyBase>::CellId,
key: &<T as HierarchyBase>::NameType
) -> Option<PropertyValue>
Get a property of a cell.
sourcefn get_cell_instance_property(
&self,
inst: &<T as HierarchyBase>::CellInstId,
key: &<T as HierarchyBase>::NameType
) -> Option<PropertyValue>
fn get_cell_instance_property(
&self,
inst: &<T as HierarchyBase>::CellInstId,
key: &<T as HierarchyBase>::NameType
) -> Option<PropertyValue>
Get a property of a cell instance.
sourceimpl<T, H> HierarchyEdit for T where
T: HierarchyBase<NameType = <H as HierarchyBase>::NameType, CellId = <H as HierarchyBase>::CellId, CellInstId = <H as HierarchyBase>::CellInstId> + HierarchyEditDecorator<D = H>,
H: HierarchyEdit,
impl<T, H> HierarchyEdit for T where
T: HierarchyBase<NameType = <H as HierarchyBase>::NameType, CellId = <H as HierarchyBase>::CellId, CellInstId = <H as HierarchyBase>::CellInstId> + HierarchyEditDecorator<D = H>,
H: HierarchyEdit,
sourcefn create_cell(
&mut self,
name: <T as HierarchyBase>::NameType
) -> <T as HierarchyBase>::CellId
fn create_cell(
&mut self,
name: <T as HierarchyBase>::NameType
) -> <T as HierarchyBase>::CellId
Create a new and empty cell template. A cell template can be be instantiated in other cells. Read more
sourcefn remove_cell(&mut self, cell_id: &<T as HierarchyBase>::CellId)
fn remove_cell(&mut self, cell_id: &<T as HierarchyBase>::CellId)
Remove a cell and all the instances of it. Read more
sourcefn create_cell_instance(
&mut self,
parent_cell: &<T as HierarchyBase>::CellId,
template_cell: &<T as HierarchyBase>::CellId,
name: Option<<T as HierarchyBase>::NameType>
) -> <T as HierarchyBase>::CellInstId
fn create_cell_instance(
&mut self,
parent_cell: &<T as HierarchyBase>::CellId,
template_cell: &<T as HierarchyBase>::CellId,
name: Option<<T as HierarchyBase>::NameType>
) -> <T as HierarchyBase>::CellInstId
Create a new instance of template_cell
in parent_cell
.
Recursive instantiation is forbidden and might panic. Read more
sourcefn remove_cell_instance(&mut self, inst: &<T as HierarchyBase>::CellInstId)
fn remove_cell_instance(&mut self, inst: &<T as HierarchyBase>::CellInstId)
Remove cell instance if it exists. Read more
sourcefn rename_cell_instance(
&mut self,
inst: &<T as HierarchyBase>::CellInstId,
new_name: Option<<T as HierarchyBase>::NameType>
)
fn rename_cell_instance(
&mut self,
inst: &<T as HierarchyBase>::CellInstId,
new_name: Option<<T as HierarchyBase>::NameType>
)
Change the name of a cell instance. Read more
sourcefn rename_cell(
&mut self,
cell: &<T as HierarchyBase>::CellId,
new_name: <T as HierarchyBase>::NameType
)
fn rename_cell(
&mut self,
cell: &<T as HierarchyBase>::CellId,
new_name: <T as HierarchyBase>::NameType
)
Change the name of a cell. Read more
sourcefn set_chip_property(
&mut self,
key: <T as HierarchyBase>::NameType,
value: PropertyValue
)
fn set_chip_property(
&mut self,
key: <T as HierarchyBase>::NameType,
value: PropertyValue
)
Set a property of the top-level chip data structure..
sourcefn set_cell_property(
&mut self,
cell: &<T as HierarchyBase>::CellId,
key: <T as HierarchyBase>::NameType,
value: PropertyValue
)
fn set_cell_property(
&mut self,
cell: &<T as HierarchyBase>::CellId,
key: <T as HierarchyBase>::NameType,
value: PropertyValue
)
Set a property of a cell.
sourcefn set_cell_instance_property(
&mut self,
inst: &<T as HierarchyBase>::CellInstId,
key: <T as HierarchyBase>::NameType,
value: PropertyValue
)
fn set_cell_instance_property(
&mut self,
inst: &<T as HierarchyBase>::CellInstId,
key: <T as HierarchyBase>::NameType,
value: PropertyValue
)
Set a property of a cell instance.
sourceimpl<N> HierarchyEditUtil for N where
N: HierarchyEdit,
impl<N> HierarchyEditUtil for N where
N: HierarchyEdit,
sourcefn clear_cell_instances(&mut self, cell: &Self::CellId)
fn clear_cell_instances(&mut self, cell: &Self::CellId)
Remove all child instances inside the cell
.
sourcefn prune_cell_instance(&mut self, inst: &Self::CellInstId)
fn prune_cell_instance(&mut self, inst: &Self::CellInstId)
Remove the cell instance and all cells which are then not used anymore.
sourcefn prune_cell(&mut self, cell: &Self::CellId)
fn prune_cell(&mut self, cell: &Self::CellId)
Remove the cell and all other cells which are then not used anymore.
sourceimpl<N> HierarchyUtil for N where
N: HierarchyBase,
impl<N> HierarchyUtil for N where
N: HierarchyBase,
sourcefn is_top_level_cell(&self, cell: &Self::CellId) -> bool
fn is_top_level_cell(&self, cell: &Self::CellId) -> bool
Check if the cell is a top level cell. This is done by checking that no other cells have an instance of this cell. Read more
sourcefn is_leaf_cell(&self, cell: &Self::CellId) -> bool
fn is_leaf_cell(&self, cell: &Self::CellId) -> bool
Check if the cell is a leaf cell. This is done by checking that this cell contains no other cell instances. Read more
sourcefn each_top_level_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
fn each_top_level_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
Iterate over all top level cells.
sourcefn each_leaf_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
fn each_leaf_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
Iterate over all leaf cells, i.e. cells which contain no other cells.
sourcefn each_cell_bottom_to_top(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
fn each_cell_bottom_to_top(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
Iterate over topologically sorted cells (from leaf-cells to top-cells).
sourceimpl<T, N> L2NBase for T where
T: NetlistBase<NameType = <N as HierarchyBase>::NameType, CellId = <N as HierarchyBase>::CellId, CellInstId = <N as HierarchyBase>::CellInstId, PinId = <N as NetlistBase>::PinId, NetId = <N as NetlistBase>::NetId, PinInstId = <N as NetlistBase>::PinInstId> + LayoutBase<LayerId = <N as LayoutBase>::LayerId, ShapeId = <N as LayoutBase>::ShapeId> + L2NBaseDecorator<D = N> + HierarchyBase,
N: 'static + L2NBase,
impl<T, N> L2NBase for T where
T: NetlistBase<NameType = <N as HierarchyBase>::NameType, CellId = <N as HierarchyBase>::CellId, CellInstId = <N as HierarchyBase>::CellInstId, PinId = <N as NetlistBase>::PinId, NetId = <N as NetlistBase>::NetId, PinInstId = <N as NetlistBase>::PinInstId> + LayoutBase<LayerId = <N as LayoutBase>::LayerId, ShapeId = <N as LayoutBase>::ShapeId> + L2NBaseDecorator<D = N> + HierarchyBase,
N: 'static + L2NBase,
sourcefn shapes_of_net(
&self,
net_id: &<T as NetlistBase>::NetId
) -> Box<dyn Iterator<Item = <T as LayoutBase>::ShapeId>, Global>
fn shapes_of_net(
&self,
net_id: &<T as NetlistBase>::NetId
) -> Box<dyn Iterator<Item = <T as LayoutBase>::ShapeId>, Global>
Iterate over all shapes that are marked to belong to the specified net.
sourcefn shapes_of_pin(
&self,
pin_id: &<T as NetlistBase>::PinId
) -> Box<dyn Iterator<Item = <T as LayoutBase>::ShapeId>, Global>
fn shapes_of_pin(
&self,
pin_id: &<T as NetlistBase>::PinId
) -> Box<dyn Iterator<Item = <T as LayoutBase>::ShapeId>, Global>
Iterate over all shapes that are part of the pin.
sourcefn get_net_of_shape(
&self,
shape_id: &<T as LayoutBase>::ShapeId
) -> Option<<T as NetlistBase>::NetId>
fn get_net_of_shape(
&self,
shape_id: &<T as LayoutBase>::ShapeId
) -> Option<<T as NetlistBase>::NetId>
Get the net of a shape.
sourcefn get_pin_of_shape(
&self,
shape_id: &<T as LayoutBase>::ShapeId
) -> Option<<T as NetlistBase>::PinId>
fn get_pin_of_shape(
&self,
shape_id: &<T as LayoutBase>::ShapeId
) -> Option<<T as NetlistBase>::PinId>
Get the pin that belongs to the shape (if any).
sourceimpl<T, N> L2NEdit for T where
T: LayoutBase<NameType = <N as HierarchyBase>::NameType, CellId = <N as HierarchyBase>::CellId, CellInstId = <N as HierarchyBase>::CellInstId, Coord = <N as LayoutBase>::Coord, LayerId = <N as LayoutBase>::LayerId, ShapeId = <N as LayoutBase>::ShapeId> + LayoutEditDecorator<D = N, D = N, D = N> + L2NEditDecorator + L2NBaseDecorator + HierarchyEdit + NetlistEdit<PinId = <N as NetlistBase>::PinId, NetId = <N as NetlistBase>::NetId, PinInstId = <N as NetlistBase>::PinInstId>,
N: 'static + L2NEdit + LayoutEdit + NetlistEdit,
impl<T, N> L2NEdit for T where
T: LayoutBase<NameType = <N as HierarchyBase>::NameType, CellId = <N as HierarchyBase>::CellId, CellInstId = <N as HierarchyBase>::CellInstId, Coord = <N as LayoutBase>::Coord, LayerId = <N as LayoutBase>::LayerId, ShapeId = <N as LayoutBase>::ShapeId> + LayoutEditDecorator<D = N, D = N, D = N> + L2NEditDecorator + L2NBaseDecorator + HierarchyEdit + NetlistEdit<PinId = <N as NetlistBase>::PinId, NetId = <N as NetlistBase>::NetId, PinInstId = <N as NetlistBase>::PinInstId>,
N: 'static + L2NEdit + LayoutEdit + NetlistEdit,
sourcefn set_pin_of_shape(
&mut self,
shape_id: &<T as LayoutBase>::ShapeId,
pin: Option<<T as NetlistBase>::PinId>
) -> Option<<T as NetlistBase>::PinId>
fn set_pin_of_shape(
&mut self,
shape_id: &<T as LayoutBase>::ShapeId,
pin: Option<<T as NetlistBase>::PinId>
) -> Option<<T as NetlistBase>::PinId>
Create the link between a circuit pin and its shapes in the layout. Return the current pin. Read more
sourcefn set_net_of_shape(
&mut self,
shape_id: &<T as LayoutBase>::ShapeId,
net: Option<<T as NetlistBase>::NetId>
) -> Option<<T as NetlistBase>::NetId>
fn set_net_of_shape(
&mut self,
shape_id: &<T as LayoutBase>::ShapeId,
net: Option<<T as NetlistBase>::NetId>
) -> Option<<T as NetlistBase>::NetId>
Set the net of a shape. Return the current net. Read more
sourceimpl<T, L> LayoutBase for T where
T: HierarchyBase<NameType = <L as HierarchyBase>::NameType, CellId = <L as HierarchyBase>::CellId, CellInstId = <L as HierarchyBase>::CellInstId> + LayoutBaseDecorator<D = L>,
L: 'static + LayoutBase,
impl<T, L> LayoutBase for T where
T: HierarchyBase<NameType = <L as HierarchyBase>::NameType, CellId = <L as HierarchyBase>::CellId, CellInstId = <L as HierarchyBase>::CellInstId> + LayoutBaseDecorator<D = L>,
L: 'static + LayoutBase,
type Coord = <L as LayoutBase>::Coord
type Coord = <L as LayoutBase>::Coord
Number type used for coordinates and distances.
type Area = <L as LayoutBase>::Area
type Area = <L as LayoutBase>::Area
Number type for areas.
This is possibly another type then Coord
for the following reasons: Read more
type LayerId = <L as LayoutBase>::LayerId
type LayerId = <L as LayoutBase>::LayerId
Layer identifier type.
type ShapeId = <L as LayoutBase>::ShapeId
type ShapeId = <L as LayoutBase>::ShapeId
Shape identifier type.
sourcefn dbu(&self) -> <T as LayoutBase>::Coord
fn dbu(&self) -> <T as LayoutBase>::Coord
Get the distance unit used in this layout in ‘pixels per micron’.
sourcefn each_layer(
&self
) -> Box<dyn Iterator<Item = <T as LayoutBase>::LayerId>, Global>
fn each_layer(
&self
) -> Box<dyn Iterator<Item = <T as LayoutBase>::LayerId>, Global>
Iterate over all defined layers.
sourcefn layer_info(
&self,
layer: &<T as LayoutBase>::LayerId
) -> LayerInfo<<T as HierarchyBase>::NameType>
fn layer_info(
&self,
layer: &<T as LayoutBase>::LayerId
) -> LayerInfo<<T as HierarchyBase>::NameType>
Get the LayerInfo
data structure for this layer.
sourcefn find_layer(
&self,
index: u32,
datatype: u32
) -> Option<<T as LayoutBase>::LayerId>
fn find_layer(
&self,
index: u32,
datatype: u32
) -> Option<<T as LayoutBase>::LayerId>
Find layer index by the (index, data type) tuple.
sourcefn layer_by_name(&self, name: &str) -> Option<<T as LayoutBase>::LayerId>
fn layer_by_name(&self, name: &str) -> Option<<T as LayoutBase>::LayerId>
Find layer index by the name.
sourcefn bounding_box_per_layer(
&self,
cell: &<T as HierarchyBase>::CellId,
layer: &<T as LayoutBase>::LayerId
) -> Option<Rect<<T as LayoutBase>::Coord>>
fn bounding_box_per_layer(
&self,
cell: &<T as HierarchyBase>::CellId,
layer: &<T as LayoutBase>::LayerId
) -> Option<Rect<<T as LayoutBase>::Coord>>
Compute the bounding box of the shapes on one layer. The bounding box also includes all child cell instances. Read more
sourcefn bounding_box(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Option<Rect<<T as LayoutBase>::Coord>>
fn bounding_box(
&self,
cell: &<T as HierarchyBase>::CellId
) -> Option<Rect<<T as LayoutBase>::Coord>>
Compute the bounding box of the cell over all layers.
The bounding box is not defined if the cell is empty. In this
case return None
. Read more
sourcefn each_shape_id(
&self,
cell: &<T as HierarchyBase>::CellId,
layer: &<T as LayoutBase>::LayerId
) -> Box<dyn Iterator<Item = <T as LayoutBase>::ShapeId>, Global>
fn each_shape_id(
&self,
cell: &<T as HierarchyBase>::CellId,
layer: &<T as LayoutBase>::LayerId
) -> Box<dyn Iterator<Item = <T as LayoutBase>::ShapeId>, Global>
Iterate over the IDs of all shapes in the cell on a specific layer.
sourcefn for_each_shape<F>(
&self,
cell: &<T as HierarchyBase>::CellId,
layer: &<T as LayoutBase>::LayerId,
f: F
) where
F: FnMut(&<T as LayoutBase>::ShapeId, &Geometry<<T as LayoutBase>::Coord>),
fn for_each_shape<F>(
&self,
cell: &<T as HierarchyBase>::CellId,
layer: &<T as LayoutBase>::LayerId,
f: F
) where
F: FnMut(&<T as LayoutBase>::ShapeId, &Geometry<<T as LayoutBase>::Coord>),
Call a function for each shape on this layer.
sourcefn with_shape<F, R>(&self, shape_id: &<T as LayoutBase>::ShapeId, f: F) -> R where
F: FnMut(&<T as LayoutBase>::LayerId, &Geometry<<T as LayoutBase>::Coord>) -> R,
fn with_shape<F, R>(&self, shape_id: &<T as LayoutBase>::ShapeId, f: F) -> R where
F: FnMut(&<T as LayoutBase>::LayerId, &Geometry<<T as LayoutBase>::Coord>) -> R,
Access a shape by its ID.
sourcefn parent_of_shape(
&self,
shape_id: &<T as LayoutBase>::ShapeId
) -> (<T as HierarchyBase>::CellId, <T as LayoutBase>::LayerId)
fn parent_of_shape(
&self,
shape_id: &<T as LayoutBase>::ShapeId
) -> (<T as HierarchyBase>::CellId, <T as LayoutBase>::LayerId)
Get the parent cell and the layer of a shape as a (cell, layer) tuple.
sourcefn for_each_shape_recursive<F>(
&self,
cell: &<T as HierarchyBase>::CellId,
layer: &<T as LayoutBase>::LayerId,
f: F
) where
F: FnMut(SimpleTransform<<T as LayoutBase>::Coord>, &<T as LayoutBase>::ShapeId, &Geometry<<T as LayoutBase>::Coord>),
fn for_each_shape_recursive<F>(
&self,
cell: &<T as HierarchyBase>::CellId,
layer: &<T as LayoutBase>::LayerId,
f: F
) where
F: FnMut(SimpleTransform<<T as LayoutBase>::Coord>, &<T as LayoutBase>::ShapeId, &Geometry<<T as LayoutBase>::Coord>),
Call a function f
for each shape of this cell and its sub cells.
Along to the geometric shape f
also gets a transformation as argument.
The transformation describes the actual position of the geometric shape relative to the cell
. Read more
sourcefn get_transform(
&self,
cell_inst: &<T as HierarchyBase>::CellInstId
) -> SimpleTransform<<T as LayoutBase>::Coord>
fn get_transform(
&self,
cell_inst: &<T as HierarchyBase>::CellInstId
) -> SimpleTransform<<T as LayoutBase>::Coord>
Get the geometric transform that describes the location of a cell instance relative to its parent.
sourcefn get_shape_property(
&self,
shape: &<T as LayoutBase>::ShapeId,
key: &<T as HierarchyBase>::NameType
) -> Option<PropertyValue>
fn get_shape_property(
&self,
shape: &<T as LayoutBase>::ShapeId,
key: &<T as HierarchyBase>::NameType
) -> Option<PropertyValue>
Get a property of a shape.
sourcefn shape_geometry(&self, shape_id: &Self::ShapeId) -> Geometry<Self::Coord>
fn shape_geometry(&self, shape_id: &Self::ShapeId) -> Geometry<Self::Coord>
Get a clone of the shape geometry.
sourcefn shape_layer(&self, shape_id: &Self::ShapeId) -> Self::LayerId
fn shape_layer(&self, shape_id: &Self::ShapeId) -> Self::LayerId
Get the layer of a shape.
sourceimpl<T, L> LayoutEdit for T where
T: LayoutBase<Coord = <L as LayoutBase>::Coord, ShapeId = <L as LayoutBase>::ShapeId, LayerId = <L as LayoutBase>::LayerId, NameType = <L as HierarchyBase>::NameType, CellId = <L as HierarchyBase>::CellId, CellInstId = <L as HierarchyBase>::CellInstId> + HierarchyEdit + LayoutEditDecorator<D = L>,
L: 'static + LayoutEdit,
impl<T, L> LayoutEdit for T where
T: LayoutBase<Coord = <L as LayoutBase>::Coord, ShapeId = <L as LayoutBase>::ShapeId, LayerId = <L as LayoutBase>::LayerId, NameType = <L as HierarchyBase>::NameType, CellId = <L as HierarchyBase>::CellId, CellInstId = <L as HierarchyBase>::CellInstId> + HierarchyEdit + LayoutEditDecorator<D = L>,
L: 'static + LayoutEdit,
sourcefn set_dbu(&mut self, dbu: <T as LayoutBase>::Coord)
fn set_dbu(&mut self, dbu: <T as LayoutBase>::Coord)
Set the distance unit used in this layout in ‘pixels per micron’.
sourcefn create_layer(
&mut self,
index: u32,
datatype: u32
) -> <T as LayoutBase>::LayerId
fn create_layer(
&mut self,
index: u32,
datatype: u32
) -> <T as LayoutBase>::LayerId
Create a new layer.
Use set_layer_name()
to define a name. Read more
sourcefn create_layer_with_id(
&mut self,
layer_id: <T as LayoutBase>::LayerId,
index: u32,
datatype: u32
) -> Result<(), ()>
fn create_layer_with_id(
&mut self,
layer_id: <T as LayoutBase>::LayerId,
index: u32,
datatype: u32
) -> Result<(), ()>
Create a new layer with a specific ID. This is used to clone layer-stacks between layouts while preserving their IDs.
Returns an Err
when the ID already exists. Read more
sourcefn set_layer_name(
&mut self,
layer: &<T as LayoutBase>::LayerId,
name: Option<<T as HierarchyBase>::NameType>
) -> Option<<T as HierarchyBase>::NameType>
fn set_layer_name(
&mut self,
layer: &<T as LayoutBase>::LayerId,
name: Option<<T as HierarchyBase>::NameType>
) -> Option<<T as HierarchyBase>::NameType>
Set the name of a layer or clear the layer name when passing None
.
This method should not change the ID of the layer.
Returns the previous name of the layer. Read more
sourcefn insert_shape(
&mut self,
parent_cell: &<T as HierarchyBase>::CellId,
layer: &<T as LayoutBase>::LayerId,
geometry: Geometry<<T as LayoutBase>::Coord>
) -> <T as LayoutBase>::ShapeId
fn insert_shape(
&mut self,
parent_cell: &<T as HierarchyBase>::CellId,
layer: &<T as LayoutBase>::LayerId,
geometry: Geometry<<T as LayoutBase>::Coord>
) -> <T as LayoutBase>::ShapeId
Insert a geometric shape into the parent cell.
sourcefn remove_shape(
&mut self,
shape_id: &<T as LayoutBase>::ShapeId
) -> Option<Geometry<<T as LayoutBase>::Coord>>
fn remove_shape(
&mut self,
shape_id: &<T as LayoutBase>::ShapeId
) -> Option<Geometry<<T as LayoutBase>::Coord>>
Remove shape from the parent cell.
sourcefn replace_shape(
&mut self,
shape_id: &<T as LayoutBase>::ShapeId,
geometry: Geometry<<T as LayoutBase>::Coord>
) -> Geometry<<T as LayoutBase>::Coord>
fn replace_shape(
&mut self,
shape_id: &<T as LayoutBase>::ShapeId,
geometry: Geometry<<T as LayoutBase>::Coord>
) -> Geometry<<T as LayoutBase>::Coord>
Replace the geometry of a shape.
sourcefn set_transform(
&mut self,
cell_inst: &<T as HierarchyBase>::CellInstId,
tf: SimpleTransform<<T as LayoutBase>::Coord>
)
fn set_transform(
&mut self,
cell_inst: &<T as HierarchyBase>::CellInstId,
tf: SimpleTransform<<T as LayoutBase>::Coord>
)
Set the geometric transform that describes the location of a cell instance relative to its parent.
sourcefn set_shape_property(
&mut self,
shape: &<T as LayoutBase>::ShapeId,
key: <T as HierarchyBase>::NameType,
value: PropertyValue
)
fn set_shape_property(
&mut self,
shape: &<T as LayoutBase>::ShapeId,
key: <T as HierarchyBase>::NameType,
value: PropertyValue
)
Set a property of a shape.
sourceimpl<L> LayoutEditUtil for L where
L: LayoutEdit,
impl<L> LayoutEditUtil for L where
L: LayoutEdit,
sourcefn find_or_create_layer(&mut self, index: u32, datatype: u32) -> Self::LayerId
fn find_or_create_layer(&mut self, index: u32, datatype: u32) -> Self::LayerId
Create a layer or return an existing one.
sourceimpl<T, N> NetlistBase for T where
T: HierarchyBase<NameType = <N as HierarchyBase>::NameType, CellId = <N as HierarchyBase>::CellId, CellInstId = <N as HierarchyBase>::CellInstId> + NetlistBaseDecorator<D = N>,
N: 'static + NetlistBase,
impl<T, N> NetlistBase for T where
T: HierarchyBase<NameType = <N as HierarchyBase>::NameType, CellId = <N as HierarchyBase>::CellId, CellInstId = <N as HierarchyBase>::CellInstId> + NetlistBaseDecorator<D = N>,
N: 'static + NetlistBase,
type PinId = <N as NetlistBase>::PinId
type PinId = <N as NetlistBase>::PinId
Pin identifier type. Uniquely identifies a pin in the whole netlist.
type PinInstId = <N as NetlistBase>::PinInstId
type PinInstId = <N as NetlistBase>::PinInstId
Pin instance identifier type. Uniquely identifies a pin instance in the whole netlist. A pin instance is a pin of a circuit instance. Read more
type NetId = <N as NetlistBase>::NetId
type NetId = <N as NetlistBase>::NetId
Net identifier type. Uniquely identifies a net in the whole netlist.
sourcefn template_pin(
&self,
pin_instance: &<T as NetlistBase>::PinInstId
) -> <T as NetlistBase>::PinId
fn template_pin(
&self,
pin_instance: &<T as NetlistBase>::PinInstId
) -> <T as NetlistBase>::PinId
Get the ID of the template pin of this pin instance.
sourcefn pin_direction(&self, pin: &<T as NetlistBase>::PinId) -> Direction
fn pin_direction(&self, pin: &<T as NetlistBase>::PinId) -> Direction
Get the signal direction of the pin.
sourcefn pin_name(
&self,
pin: &<T as NetlistBase>::PinId
) -> <T as HierarchyBase>::NameType
fn pin_name(
&self,
pin: &<T as NetlistBase>::PinId
) -> <T as HierarchyBase>::NameType
Get the name of the pin.
sourcefn pin_by_name(
&self,
parent_circuit: &<T as HierarchyBase>::CellId,
name: &str
) -> Option<<T as NetlistBase>::PinId>
fn pin_by_name(
&self,
parent_circuit: &<T as HierarchyBase>::CellId,
name: &str
) -> Option<<T as NetlistBase>::PinId>
Find a pin by its name.
Returns None
if no such pin can be found. Read more
sourcefn parent_cell_of_pin(
&self,
pin: &<T as NetlistBase>::PinId
) -> <T as HierarchyBase>::CellId
fn parent_cell_of_pin(
&self,
pin: &<T as NetlistBase>::PinId
) -> <T as HierarchyBase>::CellId
Get the ID of the parent circuit of this pin.
sourcefn parent_of_pin_instance(
&self,
pin_inst: &<T as NetlistBase>::PinInstId
) -> <T as HierarchyBase>::CellInstId
fn parent_of_pin_instance(
&self,
pin_inst: &<T as NetlistBase>::PinInstId
) -> <T as HierarchyBase>::CellInstId
Get the ID of the circuit instance that holds this pin instance.
sourcefn parent_cell_of_net(
&self,
net: &<T as NetlistBase>::NetId
) -> <T as HierarchyBase>::CellId
fn parent_cell_of_net(
&self,
net: &<T as NetlistBase>::NetId
) -> <T as HierarchyBase>::CellId
Get the ID of the parent circuit of this net.
sourcefn net_of_pin(
&self,
pin: &<T as NetlistBase>::PinId
) -> Option<<T as NetlistBase>::NetId>
fn net_of_pin(
&self,
pin: &<T as NetlistBase>::PinId
) -> Option<<T as NetlistBase>::NetId>
Get the internal net attached to this pin.
sourcefn net_of_pin_instance(
&self,
pin_instance: &<T as NetlistBase>::PinInstId
) -> Option<<T as NetlistBase>::NetId>
fn net_of_pin_instance(
&self,
pin_instance: &<T as NetlistBase>::PinInstId
) -> Option<<T as NetlistBase>::NetId>
Get the external net attached to this pin instance.
sourcefn net_zero(
&self,
parent_circuit: &<T as HierarchyBase>::CellId
) -> <T as NetlistBase>::NetId
fn net_zero(
&self,
parent_circuit: &<T as HierarchyBase>::CellId
) -> <T as NetlistBase>::NetId
Get the net of the logical constant zero.
sourcefn net_one(
&self,
parent_circuit: &<T as HierarchyBase>::CellId
) -> <T as NetlistBase>::NetId
fn net_one(
&self,
parent_circuit: &<T as HierarchyBase>::CellId
) -> <T as NetlistBase>::NetId
Get the net of the logical constant one.
sourcefn net_by_name(
&self,
parent_circuit: &<T as HierarchyBase>::CellId,
name: &str
) -> Option<<T as NetlistBase>::NetId>
fn net_by_name(
&self,
parent_circuit: &<T as HierarchyBase>::CellId,
name: &str
) -> Option<<T as NetlistBase>::NetId>
Find a net by its name inside the parent circuit.
Returns None
if no such net can be found. Read more
sourcefn net_name(
&self,
net: &<T as NetlistBase>::NetId
) -> Option<<T as HierarchyBase>::NameType>
fn net_name(
&self,
net: &<T as NetlistBase>::NetId
) -> Option<<T as HierarchyBase>::NameType>
Get the name of the net.
sourcefn for_each_pin<F>(&self, circuit: &<T as HierarchyBase>::CellId, f: F) where
F: FnMut(<T as NetlistBase>::PinId),
fn for_each_pin<F>(&self, circuit: &<T as HierarchyBase>::CellId, f: F) where
F: FnMut(<T as NetlistBase>::PinId),
Call a function for each pin of the circuit.
sourcefn for_each_pin_instance<F>(
&self,
circuit_inst: &<T as HierarchyBase>::CellInstId,
f: F
) where
F: FnMut(<T as NetlistBase>::PinInstId),
fn for_each_pin_instance<F>(
&self,
circuit_inst: &<T as HierarchyBase>::CellInstId,
f: F
) where
F: FnMut(<T as NetlistBase>::PinInstId),
Call a function for each pin instance of the circuit instance.
sourcefn for_each_internal_net<F>(&self, circuit: &<T as HierarchyBase>::CellId, f: F) where
F: FnMut(<T as NetlistBase>::NetId),
fn for_each_internal_net<F>(&self, circuit: &<T as HierarchyBase>::CellId, f: F) where
F: FnMut(<T as NetlistBase>::NetId),
Call a function for net of the circuit.
sourcefn num_pins(&self, circuit: &<T as HierarchyBase>::CellId) -> usize
fn num_pins(&self, circuit: &<T as HierarchyBase>::CellId) -> usize
Get the number of pins of a circuit.
sourcefn for_each_pin_of_net<F>(&self, net: &<T as NetlistBase>::NetId, f: F) where
F: FnMut(<T as NetlistBase>::PinId),
fn for_each_pin_of_net<F>(&self, net: &<T as NetlistBase>::NetId, f: F) where
F: FnMut(<T as NetlistBase>::PinId),
Call a function for each pin connected to this net.
sourcefn for_each_pin_instance_of_net<F>(&self, net: &<T as NetlistBase>::NetId, f: F) where
F: FnMut(<T as NetlistBase>::PinInstId),
fn for_each_pin_instance_of_net<F>(&self, net: &<T as NetlistBase>::NetId, f: F) where
F: FnMut(<T as NetlistBase>::PinInstId),
Call a function for each pin instance connected to this net.
sourcefn pin_instance(
&self,
cell_inst: &Self::CellInstId,
pin: &Self::PinId
) -> Self::PinInstId
fn pin_instance(
&self,
cell_inst: &Self::CellInstId,
pin: &Self::PinId
) -> Self::PinInstId
Get the ID of a pin instance given the cell instance and the pin ID.
sourcefn net_of_terminal(&self, terminal: &TerminalId<Self>) -> Option<Self::NetId>
fn net_of_terminal(&self, terminal: &TerminalId<Self>) -> Option<Self::NetId>
Get the net that is attached to this terminal.
sourcefn each_pin_vec(&self, circuit: &Self::CellId) -> Vec<Self::PinId>
fn each_pin_vec(&self, circuit: &Self::CellId) -> Vec<Self::PinId>
Get a Vec
with the IDs of all pins of this circuit.
sourcefn each_pin<'a>(
&'a self,
circuit: &Self::CellId
) -> Box<dyn Iterator<Item = Self::PinId> + 'a>
fn each_pin<'a>(
&'a self,
circuit: &Self::CellId
) -> Box<dyn Iterator<Item = Self::PinId> + 'a>
Iterate over all pins of a circuit.
sourcefn each_pin_instance_vec(
&self,
circuit_instance: &Self::CellInstId
) -> Vec<Self::PinInstId>
fn each_pin_instance_vec(
&self,
circuit_instance: &Self::CellInstId
) -> Vec<Self::PinInstId>
Get a Vec
with the IDs of all pin instance of this circuit instance.
sourcefn each_pin_instance<'a>(
&'a self,
circuit_instance: &Self::CellInstId
) -> Box<dyn Iterator<Item = Self::PinInstId> + 'a>
fn each_pin_instance<'a>(
&'a self,
circuit_instance: &Self::CellInstId
) -> Box<dyn Iterator<Item = Self::PinInstId> + 'a>
Iterate over all pin instances of a circuit.
sourcefn each_external_net<'a>(
&'a self,
circuit_instance: &Self::CellInstId
) -> Box<dyn Iterator<Item = Self::NetId> + 'a>
fn each_external_net<'a>(
&'a self,
circuit_instance: &Self::CellInstId
) -> Box<dyn Iterator<Item = Self::NetId> + 'a>
Iterate over all external nets connected to the circuit instance. A net might appear more than once. Read more
sourcefn for_each_external_net<F>(&self, circuit_instance: &Self::CellInstId, f: F) where
F: FnMut(Self::NetId),
fn for_each_external_net<F>(&self, circuit_instance: &Self::CellInstId, f: F) where
F: FnMut(Self::NetId),
Iterate over all external nets connected to the circuit instance. A net might appear more than once. Read more
sourcefn each_external_net_vec(
&self,
circuit_instance: &Self::CellInstId
) -> Vec<Self::NetId>
fn each_external_net_vec(
&self,
circuit_instance: &Self::CellInstId
) -> Vec<Self::NetId>
Get a vector of all external nets connected to the circuit instance. A net might appear more than once. Read more
sourcefn each_internal_net_vec(&self, circuit: &Self::CellId) -> Vec<Self::NetId>
fn each_internal_net_vec(&self, circuit: &Self::CellId) -> Vec<Self::NetId>
Get a Vec
with all nets in this circuit.
sourcefn each_internal_net<'a>(
&'a self,
circuit: &Self::CellId
) -> Box<dyn Iterator<Item = Self::NetId> + 'a>
fn each_internal_net<'a>(
&'a self,
circuit: &Self::CellId
) -> Box<dyn Iterator<Item = Self::NetId> + 'a>
Iterate over all defined nets inside a circuit.
sourcefn num_internal_nets(&self, circuit: &Self::CellId) -> usize
fn num_internal_nets(&self, circuit: &Self::CellId) -> usize
Return the number of nets defined inside a cell.
sourcefn num_net_pins(&self, net: &Self::NetId) -> usize
fn num_net_pins(&self, net: &Self::NetId) -> usize
Get the number of pins that are connected to this net.
sourcefn num_net_pin_instances(&self, net: &Self::NetId) -> usize
fn num_net_pin_instances(&self, net: &Self::NetId) -> usize
Get the number of pin instances that are connected to this net.
sourcefn num_net_terminals(&self, net: &Self::NetId) -> usize
fn num_net_terminals(&self, net: &Self::NetId) -> usize
Get the number of terminals that are connected to this net.
sourcefn each_pin_of_net_vec(&self, net: &Self::NetId) -> Vec<Self::PinId>
fn each_pin_of_net_vec(&self, net: &Self::NetId) -> Vec<Self::PinId>
Get a Vec
with all pin IDs connected to this net.
sourcefn each_pin_of_net<'a>(
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = Self::PinId> + 'a>
fn each_pin_of_net<'a>(
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = Self::PinId> + 'a>
Iterate over all pins of a net.
sourcefn each_pin_instance_of_net_vec(&self, net: &Self::NetId) -> Vec<Self::PinInstId>
fn each_pin_instance_of_net_vec(&self, net: &Self::NetId) -> Vec<Self::PinInstId>
Get a Vec
with all pin instance IDs connected to this net.
sourcefn each_pin_instance_of_net<'a>(
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = Self::PinInstId> + 'a>
fn each_pin_instance_of_net<'a>(
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = Self::PinInstId> + 'a>
Iterate over all pins of a net.
sourcefn for_each_terminal_of_net<F>(&self, net: &Self::NetId, f: F) where
F: FnMut(TerminalId<Self>),
fn for_each_terminal_of_net<F>(&self, net: &Self::NetId, f: F) where
F: FnMut(TerminalId<Self>),
Call a function for each terminal connected to this net.
sourcefn each_terminal_of_net_vec(&self, net: &Self::NetId) -> Vec<TerminalId<Self>>
fn each_terminal_of_net_vec(&self, net: &Self::NetId) -> Vec<TerminalId<Self>>
Get a Vec
with all terminal IDs connected to this net.
sourcefn each_terminal_of_net<'a>(
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = TerminalId<Self>> + 'a>
fn each_terminal_of_net<'a>(
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = TerminalId<Self>> + 'a>
Iterate over all terminals of a net.
sourceimpl<T, N> NetlistEdit for T where
T: HierarchyEdit<NameType = <N as HierarchyBase>::NameType, CellId = <N as HierarchyBase>::CellId, CellInstId = <N as HierarchyBase>::CellInstId> + NetlistBase<NetId = <N as NetlistBase>::NetId, PinId = <N as NetlistBase>::PinId, PinInstId = <N as NetlistBase>::PinInstId> + NetlistEditDecorator<D = N>,
N: 'static + NetlistEdit,
impl<T, N> NetlistEdit for T where
T: HierarchyEdit<NameType = <N as HierarchyBase>::NameType, CellId = <N as HierarchyBase>::CellId, CellInstId = <N as HierarchyBase>::CellInstId> + NetlistBase<NetId = <N as NetlistBase>::NetId, PinId = <N as NetlistBase>::PinId, PinInstId = <N as NetlistBase>::PinInstId> + NetlistEditDecorator<D = N>,
N: 'static + NetlistEdit,
sourcefn create_pin(
&mut self,
cell: &<T as HierarchyBase>::CellId,
name: <T as HierarchyBase>::NameType,
direction: Direction
) -> <T as NetlistBase>::PinId
fn create_pin(
&mut self,
cell: &<T as HierarchyBase>::CellId,
name: <T as HierarchyBase>::NameType,
direction: Direction
) -> <T as NetlistBase>::PinId
Create a new pin in this cell. Also adds the pin to all instances of the cell. Read more
sourcefn remove_pin(&mut self, id: &<T as NetlistBase>::PinId)
fn remove_pin(&mut self, id: &<T as NetlistBase>::PinId)
Remove the pin from this circuit and from all instances of this circuit.
sourcefn rename_pin(
&mut self,
pin: &<T as NetlistBase>::PinId,
new_name: <T as HierarchyBase>::NameType
) -> <T as HierarchyBase>::NameType
fn rename_pin(
&mut self,
pin: &<T as NetlistBase>::PinId,
new_name: <T as HierarchyBase>::NameType
) -> <T as HierarchyBase>::NameType
Change the name of the pin, returns the old name. Read more
sourcefn create_net(
&mut self,
parent: &<T as HierarchyBase>::CellId,
name: Option<<T as HierarchyBase>::NameType>
) -> <T as NetlistBase>::NetId
fn create_net(
&mut self,
parent: &<T as HierarchyBase>::CellId,
name: Option<<T as HierarchyBase>::NameType>
) -> <T as NetlistBase>::NetId
Create a net net that lives in the parent
circuit.
sourcefn rename_net(
&mut self,
net_id: &<T as NetlistBase>::NetId,
new_name: Option<<T as HierarchyBase>::NameType>
) -> Option<<T as HierarchyBase>::NameType>
fn rename_net(
&mut self,
net_id: &<T as NetlistBase>::NetId,
new_name: Option<<T as HierarchyBase>::NameType>
) -> Option<<T as HierarchyBase>::NameType>
Set a new name for the net. This might panic if the name already exists. Returns the old name. Read more
sourcefn remove_net(&mut self, net: &<T as NetlistBase>::NetId)
fn remove_net(&mut self, net: &<T as NetlistBase>::NetId)
Delete the net if it exists and disconnect all connected terminals.
sourcefn connect_pin(
&mut self,
pin: &<T as NetlistBase>::PinId,
net: Option<<T as NetlistBase>::NetId>
) -> Option<<T as NetlistBase>::NetId>
fn connect_pin(
&mut self,
pin: &<T as NetlistBase>::PinId,
net: Option<<T as NetlistBase>::NetId>
) -> Option<<T as NetlistBase>::NetId>
Connect a pin to a net. Returns the old connected net, if any. Read more
sourcefn connect_pin_instance(
&mut self,
pin: &<T as NetlistBase>::PinInstId,
net: Option<<T as NetlistBase>::NetId>
) -> Option<<T as NetlistBase>::NetId>
fn connect_pin_instance(
&mut self,
pin: &<T as NetlistBase>::PinInstId,
net: Option<<T as NetlistBase>::NetId>
) -> Option<<T as NetlistBase>::NetId>
Connect a pin instance to a net. Returns the old connected net, if any. Read more
sourcefn disconnect_pin(&mut self, pin: &Self::PinId) -> Option<Self::NetId>
fn disconnect_pin(&mut self, pin: &Self::PinId) -> Option<Self::NetId>
Disconnect the pin from any connected net. Returns the old connected net, if any. Read more
sourcefn disconnect_pin_instance(
&mut self,
pin_instance: &Self::PinInstId
) -> Option<Self::NetId>
fn disconnect_pin_instance(
&mut self,
pin_instance: &Self::PinInstId
) -> Option<Self::NetId>
Disconnect the pin instance from any connected net. Returns the old connected net, if any. Read more
sourcefn connect_terminal(
&mut self,
terminal: &TerminalId<Self>,
net: Option<Self::NetId>
) -> Option<Self::NetId>
fn connect_terminal(
&mut self,
terminal: &TerminalId<Self>,
net: Option<Self::NetId>
) -> Option<Self::NetId>
Connect a terminal to a net. Returns the old connected net, if any. Read more
sourcefn disconnect_terminal(
&mut self,
terminal: &TerminalId<Self>
) -> Option<Self::NetId>
fn disconnect_terminal(
&mut self,
terminal: &TerminalId<Self>
) -> Option<Self::NetId>
Disconnect the terminal from any connected net. Returns the old connected net, if any. Read more
sourceimpl<N> NetlistEditUtil for N where
N: NetlistEdit + ?Sized,
impl<N> NetlistEditUtil for N where
N: NetlistEdit + ?Sized,
sourcefn replace_net(&mut self, old_net: &Self::NetId, new_net: &Self::NetId)
fn replace_net(&mut self, old_net: &Self::NetId, new_net: &Self::NetId)
Take all terminals that are connected to old_net
and connect them to new_net
instead.
The old net is no longer used and removed. Read more
sourcefn flatten_circuit_instance(&mut self, circuit_instance: &Self::CellInstId)
fn flatten_circuit_instance(&mut self, circuit_instance: &Self::CellInstId)
Replace the circuit instance with its contents. Remove the circuit instance afterwards. Does not purge nets nor unconnected instances. So there could be unconnected nets or unconnected instances. Read more
sourcefn flatten_circuit(&mut self, circuit: &Self::CellId)
fn flatten_circuit(&mut self, circuit: &Self::CellId)
Flatten all instances of this circuit by replacing them with their content. Remove the circuit from the netlist afterwards. For top level circuits this is equivalent to removing them. Read more
sourcefn purge_nets_in_circuit(&mut self, circuit_id: &Self::CellId) -> usize
fn purge_nets_in_circuit(&mut self, circuit_id: &Self::CellId) -> usize
Delete all unconnected nets in this circuit. Return number of purged nets. Read more
sourcefn purge_nets(&mut self) -> usize
fn purge_nets(&mut self) -> usize
Delete all unconnected nets in all circuits. Return number of purged nets. Read more
sourcefn create_net_names_in_circuit(&mut self, circuit_id: &Self::CellId, prefix: &str)
fn create_net_names_in_circuit(&mut self, circuit_id: &Self::CellId, prefix: &str)
Create names for all unnamed nets in the specified circuit.
The names will consist of the prefix
and an appended number.
After calling this method, no net inside this circuit will be unnamed. Read more
sourceimpl<N> NetlistUtil for N where
N: NetlistBase,
impl<N> NetlistUtil for N where
N: NetlistBase,
sourcefn is_constant_net(&self, net: &Self::NetId) -> bool
fn is_constant_net(&self, net: &Self::NetId) -> bool
Check if the net is either the constant LOW or HIGH.
sourcefn nets_of_cell_instance(
&self,
inst: &Self::CellInstId
) -> Box<dyn Iterator<Item = Self::NetId> + '_>
fn nets_of_cell_instance(
&self,
inst: &Self::CellInstId
) -> Box<dyn Iterator<Item = Self::NetId> + '_>
Get all nets that are connected to the circuit instance.
sourcefn for_each_circuit_instance_of_net<F>(&self, net: &Self::NetId, f: F) where
F: FnMut(Self::CellInstId),
fn for_each_circuit_instance_of_net<F>(&self, net: &Self::NetId, f: F) where
F: FnMut(Self::CellInstId),
Visit all circuit instances connected to this net. An instance is touched not more than once. Read more
sourcefn each_circuit_instance_of_net_vec(
&self,
net: &Self::NetId
) -> Vec<Self::CellInstId>
fn each_circuit_instance_of_net_vec(
&self,
net: &Self::NetId
) -> Vec<Self::CellInstId>
Iterate over all circuit instances connected to this net. An instance is touched not more than once. Read more