Struct libreda_db::region_search::RegionSearchAdapter
source · pub struct RegionSearchAdapter<T>{ /* private fields */ }Expand description
Wrapper around netlist, layout and L2N structures that allows fast region queries.
§Types
T: Underlying data structure.
Implementations§
source§impl<T> RegionSearchAdapter<T>
impl<T> RegionSearchAdapter<T>
Trait Implementations§
source§impl<H> HierarchyBase for RegionSearchAdapter<H>
impl<H> HierarchyBase for RegionSearchAdapter<H>
§type NameType = <H as HierarchyBase>::NameType
type NameType = <H as HierarchyBase>::NameType
Type for names of cells, instances, etc.
source§fn num_cell_dependencies(&self, cell: &Self::CellId) -> usize
fn num_cell_dependencies(&self, cell: &Self::CellId) -> usize
Count all cells that are dependencies of
cell.source§fn for_each_cell_reference<F>(&self, cell: &Self::CellId, f: F)where
F: FnMut(Self::CellInstId),
fn for_each_cell_reference<F>(&self, cell: &Self::CellId, f: F)where
F: FnMut(Self::CellInstId),
Iterate over all instances of this
cell, i.e. instances that use this cell as
a template.source§fn for_each_cell_dependency<F>(&self, cell: &Self::CellId, f: F)
fn for_each_cell_dependency<F>(&self, cell: &Self::CellId, f: F)
Call a function for each cell that is a child of this
cell.source§fn cell_by_name(&self, name: &str) -> Option<Self::CellId>
fn cell_by_name(&self, name: &str) -> Option<Self::CellId>
Find a cell by its name.
Return the cell with the given name. Returns
None if the cell does not exist.source§fn cell_instance_by_name(
&self,
parent_cell: &Self::CellId,
name: &str
) -> Option<Self::CellInstId>
fn cell_instance_by_name( &self, parent_cell: &Self::CellId, name: &str ) -> Option<Self::CellInstId>
Find a cell instance by its name.
Returns
None if the name does not exist.source§fn num_cell_references(&self, cell: &Self::CellId) -> usize
fn num_cell_references(&self, cell: &Self::CellId) -> usize
Count all instantiations of
cell.source§fn each_cell_reference_vec(&self, cell: &Self::CellId) -> Vec<Self::CellInstId>
fn each_cell_reference_vec(&self, cell: &Self::CellId) -> Vec<Self::CellInstId>
Get a
Vec with all cell instances referencing this cell.source§fn cell_instance_name(
&self,
cell_inst: &Self::CellInstId
) -> Option<Self::NameType>
fn cell_instance_name( &self, cell_inst: &Self::CellInstId ) -> Option<Self::NameType>
Get the name of the cell instance.
source§fn num_dependent_cells(&self, cell: &Self::CellId) -> usize
fn num_dependent_cells(&self, cell: &Self::CellId) -> usize
Count all cells that are directly dependent on
cell, i.e. contain an instance of cell.source§fn for_each_cell_instance<F>(&self, cell: &Self::CellId, f: F)where
F: FnMut(Self::CellInstId),
fn for_each_cell_instance<F>(&self, cell: &Self::CellId, f: F)where
F: FnMut(Self::CellInstId),
Call a function on each instance in this cell.
source§fn template_cell(&self, cell_instance: &Self::CellInstId) -> Self::CellId
fn template_cell(&self, cell_instance: &Self::CellInstId) -> Self::CellId
Get the ID of the template cell of this instance.
source§fn for_each_cell<F>(&self, f: F)
fn for_each_cell<F>(&self, f: F)
Call a function on each cell of the netlist.
source§fn each_cell_instance(
&self,
cell: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>
fn each_cell_instance( &self, cell: &Self::CellId ) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>
Iterate over all instances in a cell.
source§fn each_cell_instance_vec(&self, cell: &Self::CellId) -> Vec<Self::CellInstId>
fn each_cell_instance_vec(&self, cell: &Self::CellId) -> Vec<Self::CellInstId>
Get a
Vec of the IDs of all instances in this cell.source§fn get_cell_property(
&self,
cell: &Self::CellId,
key: &Self::NameType
) -> Option<PropertyValue>
fn get_cell_property( &self, cell: &Self::CellId, key: &Self::NameType ) -> Option<PropertyValue>
Get a property of a cell.
source§fn for_each_dependent_cell<F>(&self, cell: &Self::CellId, f: F)
fn for_each_dependent_cell<F>(&self, cell: &Self::CellId, f: F)
Call a function for each cell that directly depends on
cell.source§fn get_chip_property(&self, key: &Self::NameType) -> Option<PropertyValue>
fn get_chip_property(&self, key: &Self::NameType) -> Option<PropertyValue>
Get a property of the top-level chip data structure.
source§fn each_dependent_cell_vec(&self, cell: &Self::CellId) -> Vec<Self::CellId>
fn each_dependent_cell_vec(&self, cell: &Self::CellId) -> Vec<Self::CellId>
Get a
Vec of each cell that directly depends on cell.source§fn each_cell_vec(&self) -> Vec<Self::CellId>
fn each_cell_vec(&self) -> Vec<Self::CellId>
Get a
Vec of all cell IDs in this netlist.source§fn get_cell_instance_property(
&self,
inst: &Self::CellInstId,
key: &Self::NameType
) -> Option<PropertyValue>
fn get_cell_instance_property( &self, inst: &Self::CellInstId, key: &Self::NameType ) -> Option<PropertyValue>
Get a property of a cell instance.
source§fn each_cell_reference(
&self,
cell: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>
fn each_cell_reference( &self, cell: &Self::CellId ) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>
Iterate over all instances of this
cell, i.e. instances that use this cell as
a template.source§fn each_cell_dependency_vec(&self, cell: &Self::CellId) -> Vec<Self::CellId>
fn each_cell_dependency_vec(&self, cell: &Self::CellId) -> Vec<Self::CellId>
Get a
Vec of each cell that is a child of this cell.source§fn each_dependent_cell<'a>(
&'a self,
cell: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellId> + 'a>
fn each_dependent_cell<'a>( &'a self, cell: &Self::CellId ) -> Box<dyn Iterator<Item = Self::CellId> + 'a>
Iterate over each cell that directly depends on
cell.source§fn parent_cell(&self, cell_instance: &Self::CellInstId) -> Self::CellId
fn parent_cell(&self, cell_instance: &Self::CellInstId) -> Self::CellId
Get the ID of the parent cell of this instance.
source§fn each_cell_dependency<'a>(
&'a self,
cell: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellId> + 'a>
fn each_cell_dependency<'a>( &'a self, cell: &Self::CellId ) -> Box<dyn Iterator<Item = Self::CellId> + 'a>
Iterate over all cells that are instantiated in this
cell.source§fn num_child_instances(&self, cell: &Self::CellId) -> usize
fn num_child_instances(&self, cell: &Self::CellId) -> usize
Get the number of cell instances inside the
cell.source§impl<H> HierarchyEdit for RegionSearchAdapter<H>
impl<H> HierarchyEdit for RegionSearchAdapter<H>
source§fn create_cell(&mut self, name: H::NameType) -> H::CellId
fn create_cell(&mut self, name: H::NameType) -> H::CellId
Create a new and empty cell template.
A cell template can be be instantiated in other cells. Read more
source§fn remove_cell(&mut self, cell_id: &H::CellId)
fn remove_cell(&mut self, cell_id: &H::CellId)
Remove a cell and all the instances of it. Read more
source§fn create_cell_instance(
&mut self,
parent_cell: &H::CellId,
template_cell: &H::CellId,
name: Option<H::NameType>
) -> H::CellInstId
fn create_cell_instance( &mut self, parent_cell: &H::CellId, template_cell: &H::CellId, name: Option<H::NameType> ) -> H::CellInstId
Create a new instance of
template_cell in parent_cell.
Recursive instantiation is forbidden and might panic. Read moresource§fn remove_cell_instance(&mut self, inst: &H::CellInstId)
fn remove_cell_instance(&mut self, inst: &H::CellInstId)
Remove cell instance if it exists. Read more
source§fn rename_cell(&mut self, cell: &Self::CellId, new_name: Self::NameType)
fn rename_cell(&mut self, cell: &Self::CellId, new_name: Self::NameType)
Change the name of a cell. Read more
source§fn rename_cell_instance(
&mut self,
inst: &Self::CellInstId,
new_name: Option<Self::NameType>
)
fn rename_cell_instance( &mut self, inst: &Self::CellInstId, new_name: Option<Self::NameType> )
Change the name of a cell instance. Read more
source§fn set_chip_property(&mut self, key: Self::NameType, value: PropertyValue)
fn set_chip_property(&mut self, key: Self::NameType, value: PropertyValue)
Set a property of the top-level chip data structure..
source§fn set_cell_property(
&mut self,
cell: &Self::CellId,
key: Self::NameType,
value: PropertyValue
)
fn set_cell_property( &mut self, cell: &Self::CellId, key: Self::NameType, value: PropertyValue )
Set a property of a cell.
source§fn set_cell_instance_property(
&mut self,
inst: &Self::CellInstId,
key: Self::NameType,
value: PropertyValue
)
fn set_cell_instance_property( &mut self, inst: &Self::CellInstId, key: Self::NameType, value: PropertyValue )
Set a property of a cell instance.
source§impl<H> HierarchyIds for RegionSearchAdapter<H>
impl<H> HierarchyIds for RegionSearchAdapter<H>
§type CellInstId = <H as HierarchyIds>::CellInstId
type CellInstId = <H as HierarchyIds>::CellInstId
Cell instance identifier type.
§type CellId = <H as HierarchyIds>::CellId
type CellId = <H as HierarchyIds>::CellId
Cell/module identifier type.
source§impl<LN> L2NBase for RegionSearchAdapter<LN>
impl<LN> L2NBase for RegionSearchAdapter<LN>
source§fn get_net_of_shape(&self, shape_id: &Self::ShapeId) -> Option<Self::NetId>
fn get_net_of_shape(&self, shape_id: &Self::ShapeId) -> Option<Self::NetId>
Get the net of a shape.
source§fn shapes_of_net(
&self,
net_id: &Self::NetId
) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>
fn shapes_of_net( &self, net_id: &Self::NetId ) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>
Iterate over all shapes that are marked to belong to the specified net.
source§impl<LN> L2NEdit for RegionSearchAdapter<LN>
impl<LN> L2NEdit for RegionSearchAdapter<LN>
source§impl<L> LayoutBase for RegionSearchAdapter<L>
impl<L> LayoutBase for RegionSearchAdapter<L>
source§fn with_shape<F, R>(&self, shape_id: &Self::ShapeId, f: F) -> R
fn with_shape<F, R>(&self, shape_id: &Self::ShapeId, f: F) -> R
Access a shape by its ID.
source§fn for_each_shape<F>(&self, cell: &Self::CellId, layer: &Self::LayerId, f: F)
fn for_each_shape<F>(&self, cell: &Self::CellId, layer: &Self::LayerId, f: F)
Call a function for each shape on this layer.
source§fn bounding_box(&self, cell: &Self::CellId) -> Option<Rect<Self::Coord>>
fn bounding_box(&self, cell: &Self::CellId) -> Option<Rect<Self::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.source§fn each_layer(&self) -> Box<dyn Iterator<Item = Self::LayerId> + '_>
fn each_layer(&self) -> Box<dyn Iterator<Item = Self::LayerId> + '_>
Iterate over all defined layers.
source§fn each_shape_id(
&self,
cell: &Self::CellId,
layer: &Self::LayerId
) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>
fn each_shape_id( &self, cell: &Self::CellId, layer: &Self::LayerId ) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>
Iterate over the IDs of all shapes in the cell on a specific layer.
source§fn get_transform(
&self,
cell_inst: &Self::CellInstId
) -> SimpleTransform<Self::Coord>
fn get_transform( &self, cell_inst: &Self::CellInstId ) -> SimpleTransform<Self::Coord>
Get the geometric transform that describes the location of a cell instance relative to its parent.
source§fn parent_of_shape(
&self,
shape_id: &Self::ShapeId
) -> (Self::CellId, Self::LayerId)
fn parent_of_shape( &self, shape_id: &Self::ShapeId ) -> (Self::CellId, Self::LayerId)
Get the parent cell and the layer of a shape as a (cell, layer) tuple.
source§fn get_shape_property(
&self,
shape: &Self::ShapeId,
key: &Self::NameType
) -> Option<PropertyValue>
fn get_shape_property( &self, shape: &Self::ShapeId, key: &Self::NameType ) -> Option<PropertyValue>
Get a property of a shape.
source§fn bounding_box_per_layer(
&self,
cell: &Self::CellId,
layer: &Self::LayerId
) -> Option<Rect<Self::Coord>>
fn bounding_box_per_layer( &self, cell: &Self::CellId, layer: &Self::LayerId ) -> Option<Rect<Self::Coord>>
Compute the bounding box of the shapes on one layer.
The bounding box also includes all child cell instances.
source§fn layer_info(&self, layer: &Self::LayerId) -> LayerInfo<Self::NameType>
fn layer_info(&self, layer: &Self::LayerId) -> LayerInfo<Self::NameType>
Get the
LayerInfo data structure for this layer.source§fn find_layer(&self, index: UInt, datatype: UInt) -> Option<Self::LayerId>
fn find_layer(&self, index: UInt, datatype: UInt) -> Option<Self::LayerId>
Find layer index by the (index, data type) tuple.
source§fn 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.
source§fn 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.
source§fn for_each_shape_recursive<F>(
&self,
cell: &Self::CellId,
layer: &Self::LayerId,
f: F
)
fn for_each_shape_recursive<F>( &self, cell: &Self::CellId, layer: &Self::LayerId, f: F )
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.source§impl<L> LayoutEdit for RegionSearchAdapter<L>
impl<L> LayoutEdit for RegionSearchAdapter<L>
source§fn insert_shape(
&mut self,
parent_cell: &L::CellId,
layer: &L::LayerId,
geometry: Geometry<L::Coord>
) -> L::ShapeId
fn insert_shape( &mut self, parent_cell: &L::CellId, layer: &L::LayerId, geometry: Geometry<L::Coord> ) -> L::ShapeId
Insert a geometric shape into the parent cell.
source§fn remove_shape(&mut self, shape_id: &L::ShapeId) -> Option<Geometry<L::Coord>>
fn remove_shape(&mut self, shape_id: &L::ShapeId) -> Option<Geometry<L::Coord>>
Remove shape from the parent cell.
source§fn replace_shape(
&mut self,
shape_id: &L::ShapeId,
geometry: Geometry<L::Coord>
) -> Geometry<L::Coord>
fn replace_shape( &mut self, shape_id: &L::ShapeId, geometry: Geometry<L::Coord> ) -> Geometry<L::Coord>
Replace the geometry of a shape.
source§fn set_transform(
&mut self,
cell_inst: &L::CellInstId,
tf: SimpleTransform<L::Coord>
)
fn set_transform( &mut self, cell_inst: &L::CellInstId, tf: SimpleTransform<L::Coord> )
Set the geometric transform that describes the location of a cell instance relative to its parent.
source§fn set_layer_name(
&mut self,
layer: &Self::LayerId,
name: Option<Self::NameType>
) -> Option<Self::NameType>
fn set_layer_name( &mut self, layer: &Self::LayerId, name: Option<Self::NameType> ) -> Option<Self::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.source§fn create_layer(&mut self, index: UInt, datatype: UInt) -> Self::LayerId
fn create_layer(&mut self, index: UInt, datatype: UInt) -> Self::LayerId
Create a new layer.
Use
set_layer_name() to define a name.source§fn create_layer_with_id(
&mut self,
layer_id: Self::LayerId,
index: UInt,
datatype: UInt
) -> Result<(), ()>
fn create_layer_with_id( &mut self, layer_id: Self::LayerId, index: UInt, datatype: UInt ) -> 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.source§fn set_dbu(&mut self, dbu: Self::Coord)
fn set_dbu(&mut self, dbu: Self::Coord)
Set the distance unit used in this layout in ‘pixels per micron’.
source§fn set_shape_property(
&mut self,
shape: &Self::ShapeId,
key: Self::NameType,
value: PropertyValue
)
fn set_shape_property( &mut self, shape: &Self::ShapeId, key: Self::NameType, value: PropertyValue )
Set a property of a shape.
source§impl<L> LayoutIds for RegionSearchAdapter<L>
impl<L> LayoutIds for RegionSearchAdapter<L>
source§impl<N> NetlistBase for RegionSearchAdapter<N>
impl<N> NetlistBase for RegionSearchAdapter<N>
source§fn 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.source§fn pin_direction(&self, pin: &Self::PinId) -> Direction
fn pin_direction(&self, pin: &Self::PinId) -> Direction
Get the signal direction of the pin.
source§fn pin_by_name(
&self,
parent_circuit: &Self::CellId,
name: &str
) -> Option<Self::PinId>
fn pin_by_name( &self, parent_circuit: &Self::CellId, name: &str ) -> Option<Self::PinId>
Find a pin by its name.
Returns
None if no such pin can be found.source§fn for_each_external_net<F>(&self, circuit_instance: &Self::CellInstId, f: F)
fn for_each_external_net<F>(&self, circuit_instance: &Self::CellInstId, f: F)
Iterate over all external nets connected to the circuit instance.
A net might appear more than once.
source§fn 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.
source§fn 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.source§fn net_of_pin(&self, pin: &Self::PinId) -> Option<Self::NetId>
fn net_of_pin(&self, pin: &Self::PinId) -> Option<Self::NetId>
Get the internal net attached to this pin.
source§fn net_by_name(
&self,
parent_circuit: &Self::CellId,
name: &str
) -> Option<Self::NetId>
fn net_by_name( &self, parent_circuit: &Self::CellId, name: &str ) -> Option<Self::NetId>
Find a net by its name inside the parent circuit.
Returns
None if no such net can be found.source§fn 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.
source§fn 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.
source§fn for_each_pin_of_net<F>(&self, net: &Self::NetId, f: F)
fn for_each_pin_of_net<F>(&self, net: &Self::NetId, f: F)
Call a function for each pin connected to this net.
source§fn 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.
source§fn 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.
source§fn parent_cell_of_pin(&self, pin: &Self::PinId) -> Self::CellId
fn parent_cell_of_pin(&self, pin: &Self::PinId) -> Self::CellId
Get the ID of the parent circuit of this pin.
source§fn for_each_pin_instance<F>(&self, circuit_inst: &Self::CellInstId, f: F)
fn for_each_pin_instance<F>(&self, circuit_inst: &Self::CellInstId, f: F)
Call a function for each pin instance of the circuit instance.
source§fn net_one(&self, parent_circuit: &Self::CellId) -> Self::NetId
fn net_one(&self, parent_circuit: &Self::CellId) -> Self::NetId
Get the net of the logical constant one.
source§fn parent_cell_of_net(&self, net: &Self::NetId) -> Self::CellId
fn parent_cell_of_net(&self, net: &Self::NetId) -> Self::CellId
Get the ID of the parent circuit of this net.
source§fn 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.
source§fn for_each_internal_net<F>(&self, circuit: &Self::CellId, f: F)
fn for_each_internal_net<F>(&self, circuit: &Self::CellId, f: F)
Call a function for net of the circuit.
source§fn for_each_pin_instance_of_net<F>(&self, net: &Self::NetId, f: F)
fn for_each_pin_instance_of_net<F>(&self, net: &Self::NetId, f: F)
Call a function for each pin instance connected to this net.
source§fn 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.
source§fn 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.
source§fn net_of_pin_instance(
&self,
pin_instance: &Self::PinInstId
) -> Option<Self::NetId>
fn net_of_pin_instance( &self, pin_instance: &Self::PinInstId ) -> Option<Self::NetId>
Get the external net attached to this pin instance.
source§fn 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.source§fn 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.
source§fn 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.
source§fn parent_of_pin_instance(&self, pin_inst: &Self::PinInstId) -> Self::CellInstId
fn parent_of_pin_instance(&self, pin_inst: &Self::PinInstId) -> Self::CellInstId
Get the ID of the circuit instance that holds this pin instance.
source§fn 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.source§fn 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.
source§fn 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.source§fn net_zero(&self, parent_circuit: &Self::CellId) -> Self::NetId
fn net_zero(&self, parent_circuit: &Self::CellId) -> Self::NetId
Get the net of the logical constant zero.
source§fn 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.
source§fn for_each_pin<F>(&self, circuit: &Self::CellId, f: F)
fn for_each_pin<F>(&self, circuit: &Self::CellId, f: F)
Call a function for each pin of the circuit.
source§fn template_pin(&self, pin_instance: &Self::PinInstId) -> Self::PinId
fn template_pin(&self, pin_instance: &Self::PinInstId) -> Self::PinId
Get the ID of the template pin of this pin instance.
source§impl<N> NetlistEdit for RegionSearchAdapter<N>
impl<N> NetlistEdit for RegionSearchAdapter<N>
source§fn 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.
source§fn remove_net(&mut self, net: &Self::NetId)
fn remove_net(&mut self, net: &Self::NetId)
Delete the net if it exists and disconnect all connected terminals.
source§fn 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.
source§fn rename_pin(
&mut self,
pin: &Self::PinId,
new_name: Self::NameType
) -> Self::NameType
fn rename_pin( &mut self, pin: &Self::PinId, new_name: Self::NameType ) -> Self::NameType
Change the name of the pin, returns the old name. Read more
source§fn connect_pin(
&mut self,
pin: &Self::PinId,
net: Option<Self::NetId>
) -> Option<Self::NetId>
fn connect_pin( &mut self, pin: &Self::PinId, net: Option<Self::NetId> ) -> Option<Self::NetId>
Connect a pin to a net.
Returns the old connected net, if any.
source§fn create_pin(
&mut self,
cell: &Self::CellId,
name: Self::NameType,
direction: Direction
) -> Self::PinId
fn create_pin( &mut self, cell: &Self::CellId, name: Self::NameType, direction: Direction ) -> Self::PinId
Create a new pin in this cell.
Also adds the pin to all instances of the cell.
source§fn create_net(
&mut self,
parent: &Self::CellId,
name: Option<Self::NameType>
) -> Self::NetId
fn create_net( &mut self, parent: &Self::CellId, name: Option<Self::NameType> ) -> Self::NetId
Create a net net that lives in the
parent circuit.source§fn remove_pin(&mut self, id: &Self::PinId)
fn remove_pin(&mut self, id: &Self::PinId)
Remove the pin from this circuit and from all instances of this circuit.
source§impl<N> NetlistIds for RegionSearchAdapter<N>
impl<N> NetlistIds for RegionSearchAdapter<N>
§type NetId = <N as NetlistIds>::NetId
type NetId = <N as NetlistIds>::NetId
Net identifier type. Uniquely identifies a net in the whole netlist.
§type PinInstId = <N as NetlistIds>::PinInstId
type PinInstId = <N as NetlistIds>::PinInstId
Pin instance identifier type. Uniquely identifies a pin instance in the whole netlist.
A pin instance is a pin of a circuit instance.
§type PinId = <N as NetlistIds>::PinId
type PinId = <N as NetlistIds>::PinId
Pin identifier type. Uniquely identifies a pin in the whole netlist.
source§impl<L> RegionSearch for RegionSearchAdapter<L>
impl<L> RegionSearch for RegionSearchAdapter<L>
source§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> + '_>
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.source§fn 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<T> Freeze for RegionSearchAdapter<T>
impl<T> RefUnwindSafe for RegionSearchAdapter<T>where
<T as LayoutIds>::Coord: Sized + RefUnwindSafe,
T: RefUnwindSafe,
<T as HierarchyIds>::CellId: RefUnwindSafe,
<T as LayoutIds>::LayerId: RefUnwindSafe,
<T as HierarchyIds>::CellInstId: RefUnwindSafe,
<T as LayoutIds>::ShapeId: RefUnwindSafe,
impl<T> Send for RegionSearchAdapter<T>
impl<T> Sync for RegionSearchAdapter<T>
impl<T> Unpin for RegionSearchAdapter<T>
impl<T> UnwindSafe for RegionSearchAdapter<T>where
<T as LayoutIds>::Coord: Sized + UnwindSafe,
T: UnwindSafe,
<T as HierarchyIds>::CellId: UnwindSafe,
<T as LayoutIds>::LayerId: UnwindSafe,
<T as HierarchyIds>::CellInstId: UnwindSafe,
<T as LayoutIds>::ShapeId: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<N> HierarchyEditUtil for Nwhere
N: HierarchyEdit,
impl<N> HierarchyEditUtil for Nwhere
N: HierarchyEdit,
source§fn clear_cell_instances(&mut self, cell: &Self::CellId)
fn clear_cell_instances(&mut self, cell: &Self::CellId)
Remove all child instances inside the
cell.source§fn 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.
source§fn 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.
source§impl<T> HierarchyReferenceAccess for Twhere
T: HierarchyBase,
impl<T> HierarchyReferenceAccess for Twhere
T: HierarchyBase,
source§fn each_cell_ref(&self) -> Box<dyn Iterator<Item = CellRef<'_, Self>> + '_>
fn each_cell_ref(&self) -> Box<dyn Iterator<Item = CellRef<'_, Self>> + '_>
Iterate over all cell objects.
source§fn cell_instance_ref(&self, inst_id: &Self::CellInstId) -> CellInstRef<'_, Self>
fn cell_instance_ref(&self, inst_id: &Self::CellInstId) -> CellInstRef<'_, Self>
Get a cell instance object by its ID.
source§impl<N> HierarchyUtil for Nwhere
N: HierarchyBase,
impl<N> HierarchyUtil for Nwhere
N: HierarchyBase,
source§fn 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.
source§fn 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.
source§fn 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.
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<L> LayoutEditUtil for Lwhere
L: LayoutEdit,
impl<L> LayoutEditUtil for Lwhere
L: LayoutEdit,
source§impl<T> LayoutReferenceAccess for Twhere
T: LayoutBase,
impl<T> LayoutReferenceAccess for Twhere
T: LayoutBase,
source§fn shape_ref(&self, shape_id: &Self::ShapeId) -> ShapeRef<'_, Self>
fn shape_ref(&self, shape_id: &Self::ShapeId) -> ShapeRef<'_, Self>
Get a cell object by its ID.
source§fn layer_ref(&self, layer_id: &Self::LayerId) -> LayerRef<'_, Self>
fn layer_ref(&self, layer_id: &Self::LayerId) -> LayerRef<'_, Self>
Get a layer object by its ID.
source§impl<N> NetlistEditUtil for Nwhere
N: NetlistEdit + ?Sized,
impl<N> NetlistEditUtil for Nwhere
N: NetlistEdit + ?Sized,
source§fn 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.
source§fn 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.
source§fn 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 moresource§fn 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
source§fn 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.
source§fn 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.
source§fn purge_nets(&mut self) -> usize
fn purge_nets(&mut self) -> usize
Delete all unconnected nets in all circuits.
Return number of purged nets.
source§fn 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.source§impl<T> NetlistReferenceAccess for Twhere
T: NetlistBase,
impl<T> NetlistReferenceAccess for Twhere
T: NetlistBase,
source§fn pin_ref(&self, pin: &Self::PinId) -> PinRef<'_, Self>
fn pin_ref(&self, pin: &Self::PinId) -> PinRef<'_, Self>
Get a reference to a pin from a pin ID.
source§fn pin_instance_ref(&self, id: &Self::PinInstId) -> PinInstRef<'_, Self>
fn pin_instance_ref(&self, id: &Self::PinInstId) -> PinInstRef<'_, Self>
Get a reference to a pin instance.
source§fn terminal_ref(&self, t: &TerminalId<Self>) -> TerminalRef<'_, Self>
fn terminal_ref(&self, t: &TerminalId<Self>) -> TerminalRef<'_, Self>
Get a reference to a terminal.
source§impl<N> NetlistUtil for Nwhere
N: NetlistBase,
impl<N> NetlistUtil for Nwhere
N: NetlistBase,
source§fn 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.
source§fn 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.
source§fn 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.source§fn 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.
source§fn 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.
source§fn 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.
source§fn 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.
source§fn 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.