Struct libreda_pnr::db::Chip
source · [−]pub struct Chip<C = i32> where
C: CoordinateType, { /* private fields */ }
Expand description
A netlist is the container of circuits.
Trait Implementations
sourceimpl<C> Clone for Chip<C> where
C: Clone + CoordinateType,
impl<C> Clone for Chip<C> where
C: Clone + CoordinateType,
sourceimpl<C> Debug for Chip<C> where
C: Debug + CoordinateType,
impl<C> Debug for Chip<C> where
C: Debug + CoordinateType,
sourceimpl<C> Default for Chip<C> where
C: CoordinateType + One,
impl<C> Default for Chip<C> where
C: CoordinateType + One,
sourceimpl HierarchyBase for Chip<i32>
impl HierarchyBase for Chip<i32>
type CellInstId = CellInstId
type CellInstId = CellInstId
Cell instance identifier type.
sourcepub fn cell_by_name(&self, name: &str) -> Option<CellId>
pub fn cell_by_name(&self, name: &str) -> Option<CellId>
Find a cell by its name.
Return the cell with the given name. Returns None
if the cell does not exist. Read more
sourcepub fn cell_instance_by_name(
&self,
parent_circuit: &<Chip<i32> as HierarchyBase>::CellId,
name: &str
) -> Option<<Chip<i32> as HierarchyBase>::CellInstId>
pub fn cell_instance_by_name(
&self,
parent_circuit: &<Chip<i32> as HierarchyBase>::CellId,
name: &str
) -> Option<<Chip<i32> as HierarchyBase>::CellInstId>
Find a cell instance by its name.
Returns None
if the name does not exist. Read more
sourcepub fn cell_name(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> <Chip<i32> as HierarchyBase>::NameType
pub fn cell_name(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> <Chip<i32> as HierarchyBase>::NameType
Get the name of the cell.
sourcepub fn cell_instance_name(
&self,
circuit_inst: &<Chip<i32> as HierarchyBase>::CellInstId
) -> Option<<Chip<i32> as HierarchyBase>::NameType>
pub fn cell_instance_name(
&self,
circuit_inst: &<Chip<i32> as HierarchyBase>::CellInstId
) -> Option<<Chip<i32> as HierarchyBase>::NameType>
Get the name of the cell instance.
sourcepub fn parent_cell(
&self,
circuit_instance: &<Chip<i32> as HierarchyBase>::CellInstId
) -> <Chip<i32> as HierarchyBase>::CellId
pub fn parent_cell(
&self,
circuit_instance: &<Chip<i32> as HierarchyBase>::CellInstId
) -> <Chip<i32> as HierarchyBase>::CellId
Get the ID of the parent cell of this instance.
sourcepub fn template_cell(
&self,
circuit_instance: &<Chip<i32> as HierarchyBase>::CellInstId
) -> <Chip<i32> as HierarchyBase>::CellId
pub fn template_cell(
&self,
circuit_instance: &<Chip<i32> as HierarchyBase>::CellInstId
) -> <Chip<i32> as HierarchyBase>::CellId
Get the ID of the template cell of this instance.
sourcepub fn for_each_cell<F>(&self, f: F) where
F: FnMut(<Chip<i32> as HierarchyBase>::CellId),
pub fn for_each_cell<F>(&self, f: F) where
F: FnMut(<Chip<i32> as HierarchyBase>::CellId),
Call a function on each cell of the netlist.
sourcepub fn for_each_cell_instance<F>(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Chip<i32> as HierarchyBase>::CellInstId),
pub fn for_each_cell_instance<F>(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Chip<i32> as HierarchyBase>::CellInstId),
Call a function on each instance in this cell.
sourcepub fn each_cell_instance(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <Chip<i32> as HierarchyBase>::CellInstId>, Global>
pub fn each_cell_instance(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <Chip<i32> as HierarchyBase>::CellInstId>, Global>
Iterate over all instances in a cell.
sourcepub fn for_each_cell_dependency<F>(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Chip<i32> as HierarchyBase>::CellId),
pub fn for_each_cell_dependency<F>(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Chip<i32> as HierarchyBase>::CellId),
Call a function for each cell that is a child of this cell
.
sourcepub fn each_cell_dependency(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <Chip<i32> as HierarchyBase>::CellId>, Global>
pub fn each_cell_dependency(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <Chip<i32> as HierarchyBase>::CellId>, Global>
Iterate over all cells that are instantiated in this cell
.
sourcepub fn num_cell_dependencies(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId
) -> usize
pub fn num_cell_dependencies(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId
) -> usize
Count all cells that are dependencies of cell
.
sourcepub fn for_each_dependent_cell<F>(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Chip<i32> as HierarchyBase>::CellId),
pub fn for_each_dependent_cell<F>(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Chip<i32> as HierarchyBase>::CellId),
Call a function for each cell that directly depends on cell
.
sourcepub fn each_dependent_cell(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <Chip<i32> as HierarchyBase>::CellId>, Global>
pub fn each_dependent_cell(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <Chip<i32> as HierarchyBase>::CellId>, Global>
Iterate over each cell that directly depends on cell
.
sourcepub fn num_dependent_cells(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId
) -> usize
pub fn num_dependent_cells(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId
) -> usize
Count all cells that are directly dependent on cell
, i.e. contain an instance of cell
.
sourcepub fn for_each_cell_reference<F>(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Chip<i32> as HierarchyBase>::CellInstId),
pub fn for_each_cell_reference<F>(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Chip<i32> as HierarchyBase>::CellInstId),
Iterate over all instances of this cell
, i.e. instances that use this cell as
a template. Read more
sourcepub fn each_cell_reference(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <Chip<i32> as HierarchyBase>::CellInstId>, Global>
pub fn each_cell_reference(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <Chip<i32> as HierarchyBase>::CellInstId>, Global>
Iterate over all instances of this cell
, i.e. instances that use this cell as
a template. Read more
sourcepub fn num_cell_references(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId
) -> usize
pub fn num_cell_references(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId
) -> usize
Count all instantiations of cell
.
sourcepub fn num_child_instances(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId
) -> usize
pub fn num_child_instances(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId
) -> usize
Get the number of cell instances inside the cell
.
sourcepub fn get_chip_property(
&self,
key: &<Chip<i32> as HierarchyBase>::NameType
) -> Option<PropertyValue>
pub fn get_chip_property(
&self,
key: &<Chip<i32> as HierarchyBase>::NameType
) -> Option<PropertyValue>
Get a property of the top-level chip data structure.
sourcepub fn get_cell_property(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId,
key: &<Chip<i32> as HierarchyBase>::NameType
) -> Option<PropertyValue>
pub fn get_cell_property(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId,
key: &<Chip<i32> as HierarchyBase>::NameType
) -> Option<PropertyValue>
Get a property of a cell.
sourcepub fn get_cell_instance_property(
&self,
inst: &<Chip<i32> as HierarchyBase>::CellInstId,
key: &<Chip<i32> as HierarchyBase>::NameType
) -> Option<PropertyValue>
pub fn get_cell_instance_property(
&self,
inst: &<Chip<i32> as HierarchyBase>::CellInstId,
key: &<Chip<i32> as HierarchyBase>::NameType
) -> Option<PropertyValue>
Get a property of a cell instance.
sourcefn each_cell_vec(&self) -> Vec<Self::CellId, Global>
fn each_cell_vec(&self) -> Vec<Self::CellId, Global>
Get a Vec
of all cell IDs in this netlist.
sourcefn each_cell_instance_vec(
&self,
cell: &Self::CellId
) -> Vec<Self::CellInstId, Global>
fn each_cell_instance_vec(
&self,
cell: &Self::CellId
) -> Vec<Self::CellInstId, Global>
Get a Vec
of the IDs of all instances in this cell.
sourcefn each_cell_dependency_vec(
&self,
cell: &Self::CellId
) -> Vec<Self::CellId, Global>
fn each_cell_dependency_vec(
&self,
cell: &Self::CellId
) -> Vec<Self::CellId, Global>
Get a Vec
of each cell that is a child of this cell
.
sourcefn each_dependent_cell_vec(
&self,
cell: &Self::CellId
) -> Vec<Self::CellId, Global>
fn each_dependent_cell_vec(
&self,
cell: &Self::CellId
) -> Vec<Self::CellId, Global>
Get a Vec
of each cell that directly depends on cell
.
sourcefn each_cell_reference_vec(
&self,
cell: &Self::CellId
) -> Vec<Self::CellInstId, Global>
fn each_cell_reference_vec(
&self,
cell: &Self::CellId
) -> Vec<Self::CellInstId, Global>
Get a Vec
with all cell instances referencing this cell.
sourceimpl HierarchyEdit for Chip<i32>
impl HierarchyEdit for Chip<i32>
sourcepub fn create_cell(
&mut self,
name: <Chip<i32> as HierarchyBase>::NameType
) -> <Chip<i32> as HierarchyBase>::CellId
pub fn create_cell(
&mut self,
name: <Chip<i32> as HierarchyBase>::NameType
) -> <Chip<i32> as HierarchyBase>::CellId
Create a new and empty cell template. A cell template can be be instantiated in other cells. Read more
sourcepub fn remove_cell(&mut self, cell_id: &<Chip<i32> as HierarchyBase>::CellId)
pub fn remove_cell(&mut self, cell_id: &<Chip<i32> as HierarchyBase>::CellId)
Remove a cell and all the instances of it. Read more
sourcepub fn create_cell_instance(
&mut self,
parent_cell: &<Chip<i32> as HierarchyBase>::CellId,
template_cell: &<Chip<i32> as HierarchyBase>::CellId,
name: Option<<Chip<i32> as HierarchyBase>::NameType>
) -> <Chip<i32> as HierarchyBase>::CellInstId
pub fn create_cell_instance(
&mut self,
parent_cell: &<Chip<i32> as HierarchyBase>::CellId,
template_cell: &<Chip<i32> as HierarchyBase>::CellId,
name: Option<<Chip<i32> as HierarchyBase>::NameType>
) -> <Chip<i32> as HierarchyBase>::CellInstId
Create a new instance of template_cell
in parent_cell
.
Recursive instantiation is forbidden and might panic. Read more
sourcepub fn remove_cell_instance(
&mut self,
id: &<Chip<i32> as HierarchyBase>::CellInstId
)
pub fn remove_cell_instance(
&mut self,
id: &<Chip<i32> as HierarchyBase>::CellInstId
)
Remove cell instance if it exists. Read more
sourcepub fn rename_cell_instance(
&mut self,
inst: &<Chip<i32> as HierarchyBase>::CellInstId,
new_name: Option<<Chip<i32> as HierarchyBase>::NameType>
)
pub fn rename_cell_instance(
&mut self,
inst: &<Chip<i32> as HierarchyBase>::CellInstId,
new_name: Option<<Chip<i32> as HierarchyBase>::NameType>
)
Change the name of a cell instance. Read more
sourcepub fn rename_cell(
&mut self,
cell: &<Chip<i32> as HierarchyBase>::CellId,
new_name: <Chip<i32> as HierarchyBase>::NameType
)
pub fn rename_cell(
&mut self,
cell: &<Chip<i32> as HierarchyBase>::CellId,
new_name: <Chip<i32> as HierarchyBase>::NameType
)
Change the name of a cell. Read more
sourcepub fn set_chip_property(
&mut self,
key: <Chip<i32> as HierarchyBase>::NameType,
value: PropertyValue
)
pub fn set_chip_property(
&mut self,
key: <Chip<i32> as HierarchyBase>::NameType,
value: PropertyValue
)
Set a property of the top-level chip data structure..
sourcepub fn set_cell_property(
&mut self,
cell: &<Chip<i32> as HierarchyBase>::CellId,
key: <Chip<i32> as HierarchyBase>::NameType,
value: PropertyValue
)
pub fn set_cell_property(
&mut self,
cell: &<Chip<i32> as HierarchyBase>::CellId,
key: <Chip<i32> as HierarchyBase>::NameType,
value: PropertyValue
)
Set a property of a cell.
sourcepub fn set_cell_instance_property(
&mut self,
inst: &<Chip<i32> as HierarchyBase>::CellInstId,
key: <Chip<i32> as HierarchyBase>::NameType,
value: PropertyValue
)
pub fn set_cell_instance_property(
&mut self,
inst: &<Chip<i32> as HierarchyBase>::CellInstId,
key: <Chip<i32> as HierarchyBase>::NameType,
value: PropertyValue
)
Set a property of a cell instance.
sourceimpl L2NBase for Chip<i32>
impl L2NBase for Chip<i32>
sourcepub fn shapes_of_net(
&self,
net_id: &<Chip<i32> as NetlistBase>::NetId
) -> Box<dyn Iterator<Item = <Chip<i32> as LayoutBase>::ShapeId>, Global>
pub fn shapes_of_net(
&self,
net_id: &<Chip<i32> as NetlistBase>::NetId
) -> Box<dyn Iterator<Item = <Chip<i32> as LayoutBase>::ShapeId>, Global>
Iterate over all shapes that are marked to belong to the specified net.
sourcepub fn shapes_of_pin(
&self,
pin_id: &<Chip<i32> as NetlistBase>::PinId
) -> Box<dyn Iterator<Item = <Chip<i32> as LayoutBase>::ShapeId>, Global>
pub fn shapes_of_pin(
&self,
pin_id: &<Chip<i32> as NetlistBase>::PinId
) -> Box<dyn Iterator<Item = <Chip<i32> as LayoutBase>::ShapeId>, Global>
Iterate over all shapes that are part of the pin.
sourcepub fn get_net_of_shape(
&self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId
) -> Option<<Chip<i32> as NetlistBase>::NetId>
pub fn get_net_of_shape(
&self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId
) -> Option<<Chip<i32> as NetlistBase>::NetId>
Get the net of a shape.
sourcepub fn get_pin_of_shape(
&self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId
) -> Option<<Chip<i32> as NetlistBase>::PinId>
pub fn get_pin_of_shape(
&self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId
) -> Option<<Chip<i32> as NetlistBase>::PinId>
Get the pin that belongs to the shape (if any).
sourceimpl L2NEdit for Chip<i32>
impl L2NEdit for Chip<i32>
sourcepub fn set_pin_of_shape(
&mut self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId,
pin: Option<<Chip<i32> as NetlistBase>::PinId>
) -> Option<<Chip<i32> as NetlistBase>::PinId>
pub fn set_pin_of_shape(
&mut self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId,
pin: Option<<Chip<i32> as NetlistBase>::PinId>
) -> Option<<Chip<i32> as NetlistBase>::PinId>
Create the link between a circuit pin and its shapes in the layout. Return the current pin. Read more
sourcepub fn set_net_of_shape(
&mut self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId,
net: Option<<Chip<i32> as NetlistBase>::NetId>
) -> Option<<Chip<i32> as NetlistBase>::NetId>
pub fn set_net_of_shape(
&mut self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId,
net: Option<<Chip<i32> as NetlistBase>::NetId>
) -> Option<<Chip<i32> as NetlistBase>::NetId>
Set the net of a shape. Return the current net. Read more
sourceimpl LayoutBase for Chip<i32>
impl LayoutBase for Chip<i32>
type Area = i64
type Area = i64
Number type for areas.
This is possibly another type then Coord
for the following reasons: Read more
sourcepub fn dbu(&self) -> <Chip<i32> as LayoutBase>::Coord
pub fn dbu(&self) -> <Chip<i32> as LayoutBase>::Coord
Get the distance unit used in this layout in ‘pixels per micron’.
sourcepub fn each_layer(
&self
) -> Box<dyn Iterator<Item = <Chip<i32> as LayoutBase>::LayerId>, Global>
pub fn each_layer(
&self
) -> Box<dyn Iterator<Item = <Chip<i32> as LayoutBase>::LayerId>, Global>
Iterate over all defined layers.
sourcepub fn layer_info(
&self,
layer: &<Chip<i32> as LayoutBase>::LayerId
) -> LayerInfo<<Chip<i32> as HierarchyBase>::NameType>
pub fn layer_info(
&self,
layer: &<Chip<i32> as LayoutBase>::LayerId
) -> LayerInfo<<Chip<i32> as HierarchyBase>::NameType>
Get the LayerInfo
data structure for this layer.
sourcepub fn find_layer(
&self,
index: u32,
datatype: u32
) -> Option<<Chip<i32> as LayoutBase>::LayerId>
pub fn find_layer(
&self,
index: u32,
datatype: u32
) -> Option<<Chip<i32> as LayoutBase>::LayerId>
Find layer index by the (index, data type) tuple.
sourcepub fn layer_by_name(
&self,
name: &str
) -> Option<<Chip<i32> as LayoutBase>::LayerId>
pub fn layer_by_name(
&self,
name: &str
) -> Option<<Chip<i32> as LayoutBase>::LayerId>
Find layer index by the name.
sourcepub fn bounding_box_per_layer(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId,
layer: &<Chip<i32> as LayoutBase>::LayerId
) -> Option<Rect<i32>>
pub fn bounding_box_per_layer(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId,
layer: &<Chip<i32> as LayoutBase>::LayerId
) -> Option<Rect<i32>>
Compute the bounding box of the shapes on one layer. The bounding box also includes all child cell instances. Read more
sourcepub fn each_shape_id(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId,
layer: &<Chip<i32> as LayoutBase>::LayerId
) -> Box<dyn Iterator<Item = <Chip<i32> as LayoutBase>::ShapeId>, Global>
pub fn each_shape_id(
&self,
cell: &<Chip<i32> as HierarchyBase>::CellId,
layer: &<Chip<i32> as LayoutBase>::LayerId
) -> Box<dyn Iterator<Item = <Chip<i32> as LayoutBase>::ShapeId>, Global>
Iterate over the IDs of all shapes in the cell on a specific layer.
sourcepub fn for_each_shape<F>(
&self,
cell_id: &<Chip<i32> as HierarchyBase>::CellId,
layer: &<Chip<i32> as LayoutBase>::LayerId,
f: F
) where
F: FnMut(&<Chip<i32> as LayoutBase>::ShapeId, &Geometry<<Chip<i32> as LayoutBase>::Coord>),
pub fn for_each_shape<F>(
&self,
cell_id: &<Chip<i32> as HierarchyBase>::CellId,
layer: &<Chip<i32> as LayoutBase>::LayerId,
f: F
) where
F: FnMut(&<Chip<i32> as LayoutBase>::ShapeId, &Geometry<<Chip<i32> as LayoutBase>::Coord>),
Call a function for each shape on this layer.
sourcepub fn with_shape<F, R>(
&self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId,
f: F
) -> R where
F: FnMut(&<Chip<i32> as LayoutBase>::LayerId, &Geometry<<Chip<i32> as LayoutBase>::Coord>) -> R,
pub fn with_shape<F, R>(
&self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId,
f: F
) -> R where
F: FnMut(&<Chip<i32> as LayoutBase>::LayerId, &Geometry<<Chip<i32> as LayoutBase>::Coord>) -> R,
Access a shape by its ID.
sourcepub fn parent_of_shape(
&self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId
) -> (<Chip<i32> as HierarchyBase>::CellId, <Chip<i32> as LayoutBase>::LayerId)
pub fn parent_of_shape(
&self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId
) -> (<Chip<i32> as HierarchyBase>::CellId, <Chip<i32> as LayoutBase>::LayerId)
Get the parent cell and the layer of a shape as a (cell, layer) tuple.
sourcepub fn get_transform(
&self,
cell_inst: &<Chip<i32> as HierarchyBase>::CellInstId
) -> SimpleTransform<<Chip<i32> as LayoutBase>::Coord>
pub fn get_transform(
&self,
cell_inst: &<Chip<i32> as HierarchyBase>::CellInstId
) -> SimpleTransform<<Chip<i32> as LayoutBase>::Coord>
Get the geometric transform that describes the location of a cell instance relative to its parent.
sourcepub fn get_shape_property(
&self,
shape: &<Chip<i32> as LayoutBase>::ShapeId,
key: &<Chip<i32> as HierarchyBase>::NameType
) -> Option<PropertyValue>
pub fn get_shape_property(
&self,
shape: &<Chip<i32> as LayoutBase>::ShapeId,
key: &<Chip<i32> as HierarchyBase>::NameType
) -> Option<PropertyValue>
Get a property of a shape.
sourcefn 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
. Read more
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.
sourcefn for_each_shape_recursive<F>(
&self,
cell: &Self::CellId,
layer: &Self::LayerId,
f: F
) where
F: FnMut(SimpleTransform<Self::Coord>, &Self::ShapeId, &Geometry<Self::Coord>),
fn for_each_shape_recursive<F>(
&self,
cell: &Self::CellId,
layer: &Self::LayerId,
f: F
) where
F: FnMut(SimpleTransform<Self::Coord>, &Self::ShapeId, &Geometry<Self::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
sourceimpl LayoutEdit for Chip<i32>
impl LayoutEdit for Chip<i32>
sourcepub fn set_dbu(&mut self, dbu: <Chip<i32> as LayoutBase>::Coord)
pub fn set_dbu(&mut self, dbu: <Chip<i32> as LayoutBase>::Coord)
Set the distance unit used in this layout in ‘pixels per micron’.
sourcepub fn create_layer(
&mut self,
index: u32,
datatype: u32
) -> <Chip<i32> as LayoutBase>::LayerId
pub fn create_layer(
&mut self,
index: u32,
datatype: u32
) -> <Chip<i32> as LayoutBase>::LayerId
Create a new layer.
Use set_layer_name()
to define a name. Read more
sourcepub fn create_layer_with_id(
&mut self,
layer_id: <Chip<i32> as LayoutBase>::LayerId,
index: u32,
datatype: u32
) -> Result<(), ()>
pub fn create_layer_with_id(
&mut self,
layer_id: <Chip<i32> 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
sourcepub fn set_layer_name(
&mut self,
layer: &<Chip<i32> as LayoutBase>::LayerId,
name: Option<<Chip<i32> as HierarchyBase>::NameType>
) -> Option<<Chip<i32> as HierarchyBase>::NameType>
pub fn set_layer_name(
&mut self,
layer: &<Chip<i32> as LayoutBase>::LayerId,
name: Option<<Chip<i32> as HierarchyBase>::NameType>
) -> Option<<Chip<i32> 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
sourcepub fn insert_shape(
&mut self,
parent_cell: &<Chip<i32> as HierarchyBase>::CellId,
layer: &<Chip<i32> as LayoutBase>::LayerId,
geometry: Geometry<<Chip<i32> as LayoutBase>::Coord>
) -> <Chip<i32> as LayoutBase>::ShapeId
pub fn insert_shape(
&mut self,
parent_cell: &<Chip<i32> as HierarchyBase>::CellId,
layer: &<Chip<i32> as LayoutBase>::LayerId,
geometry: Geometry<<Chip<i32> as LayoutBase>::Coord>
) -> <Chip<i32> as LayoutBase>::ShapeId
Insert a geometric shape into the parent cell.
sourcepub fn remove_shape(
&mut self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId
) -> Option<Geometry<<Chip<i32> as LayoutBase>::Coord>>
pub fn remove_shape(
&mut self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId
) -> Option<Geometry<<Chip<i32> as LayoutBase>::Coord>>
Remove shape from the parent cell.
sourcepub fn replace_shape(
&mut self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId,
geometry: Geometry<<Chip<i32> as LayoutBase>::Coord>
) -> Geometry<<Chip<i32> as LayoutBase>::Coord>
pub fn replace_shape(
&mut self,
shape_id: &<Chip<i32> as LayoutBase>::ShapeId,
geometry: Geometry<<Chip<i32> as LayoutBase>::Coord>
) -> Geometry<<Chip<i32> as LayoutBase>::Coord>
Replace the geometry of a shape.
sourcepub fn set_transform(
&mut self,
cell_inst: &<Chip<i32> as HierarchyBase>::CellInstId,
tf: SimpleTransform<<Chip<i32> as LayoutBase>::Coord>
)
pub fn set_transform(
&mut self,
cell_inst: &<Chip<i32> as HierarchyBase>::CellInstId,
tf: SimpleTransform<<Chip<i32> as LayoutBase>::Coord>
)
Set the geometric transform that describes the location of a cell instance relative to its parent.
sourcepub fn set_shape_property(
&mut self,
shape: &<Chip<i32> as LayoutBase>::ShapeId,
key: <Chip<i32> as HierarchyBase>::NameType,
value: PropertyValue
)
pub fn set_shape_property(
&mut self,
shape: &<Chip<i32> as LayoutBase>::ShapeId,
key: <Chip<i32> as HierarchyBase>::NameType,
value: PropertyValue
)
Set a property of a shape.
sourceimpl NetlistBase for Chip<i32>
impl NetlistBase for Chip<i32>
type PinInstId = PinInstId
type PinInstId = 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
sourcepub fn template_pin(
&self,
pin_instance: &<Chip<i32> as NetlistBase>::PinInstId
) -> <Chip<i32> as NetlistBase>::PinId
pub fn template_pin(
&self,
pin_instance: &<Chip<i32> as NetlistBase>::PinInstId
) -> <Chip<i32> as NetlistBase>::PinId
Get the ID of the template pin of this pin instance.
sourcepub fn pin_direction(
&self,
pin: &<Chip<i32> as NetlistBase>::PinId
) -> Direction
pub fn pin_direction(
&self,
pin: &<Chip<i32> as NetlistBase>::PinId
) -> Direction
Get the signal direction of the pin.
sourcepub fn pin_name(
&self,
pin: &<Chip<i32> as NetlistBase>::PinId
) -> <Chip<i32> as HierarchyBase>::NameType
pub fn pin_name(
&self,
pin: &<Chip<i32> as NetlistBase>::PinId
) -> <Chip<i32> as HierarchyBase>::NameType
Get the name of the pin.
sourcepub fn pin_by_name(
&self,
parent_circuit: &<Chip<i32> as HierarchyBase>::CellId,
name: &str
) -> Option<<Chip<i32> as NetlistBase>::PinId>
pub fn pin_by_name(
&self,
parent_circuit: &<Chip<i32> as HierarchyBase>::CellId,
name: &str
) -> Option<<Chip<i32> as NetlistBase>::PinId>
Find a pin by its name.
Returns None
if no such pin can be found. Read more
sourcepub fn parent_cell_of_pin(
&self,
pin: &<Chip<i32> as NetlistBase>::PinId
) -> <Chip<i32> as HierarchyBase>::CellId
pub fn parent_cell_of_pin(
&self,
pin: &<Chip<i32> as NetlistBase>::PinId
) -> <Chip<i32> as HierarchyBase>::CellId
Get the ID of the parent circuit of this pin.
sourcepub fn parent_of_pin_instance(
&self,
pin_inst: &<Chip<i32> as NetlistBase>::PinInstId
) -> <Chip<i32> as HierarchyBase>::CellInstId
pub fn parent_of_pin_instance(
&self,
pin_inst: &<Chip<i32> as NetlistBase>::PinInstId
) -> <Chip<i32> as HierarchyBase>::CellInstId
Get the ID of the circuit instance that holds this pin instance.
sourcepub fn parent_cell_of_net(
&self,
net: &<Chip<i32> as NetlistBase>::NetId
) -> <Chip<i32> as HierarchyBase>::CellId
pub fn parent_cell_of_net(
&self,
net: &<Chip<i32> as NetlistBase>::NetId
) -> <Chip<i32> as HierarchyBase>::CellId
Get the ID of the parent circuit of this net.
sourcepub fn net_of_pin(
&self,
pin: &<Chip<i32> as NetlistBase>::PinId
) -> Option<<Chip<i32> as NetlistBase>::NetId>
pub fn net_of_pin(
&self,
pin: &<Chip<i32> as NetlistBase>::PinId
) -> Option<<Chip<i32> as NetlistBase>::NetId>
Get the internal net attached to this pin.
sourcepub fn net_of_pin_instance(
&self,
pin_inst: &<Chip<i32> as NetlistBase>::PinInstId
) -> Option<<Chip<i32> as NetlistBase>::NetId>
pub fn net_of_pin_instance(
&self,
pin_inst: &<Chip<i32> as NetlistBase>::PinInstId
) -> Option<<Chip<i32> as NetlistBase>::NetId>
Get the external net attached to this pin instance.
sourcepub fn net_zero(
&self,
parent_circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> <Chip<i32> as NetlistBase>::NetId
pub fn net_zero(
&self,
parent_circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> <Chip<i32> as NetlistBase>::NetId
Get the net of the logical constant zero.
sourcepub fn net_one(
&self,
parent_circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> <Chip<i32> as NetlistBase>::NetId
pub fn net_one(
&self,
parent_circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> <Chip<i32> as NetlistBase>::NetId
Get the net of the logical constant one.
sourcepub fn net_by_name(
&self,
parent_circuit: &<Chip<i32> as HierarchyBase>::CellId,
name: &str
) -> Option<<Chip<i32> as NetlistBase>::NetId>
pub fn net_by_name(
&self,
parent_circuit: &<Chip<i32> as HierarchyBase>::CellId,
name: &str
) -> Option<<Chip<i32> as NetlistBase>::NetId>
Find a net by its name inside the parent circuit.
Returns None
if no such net can be found. Read more
sourcepub fn net_name(
&self,
net: &<Chip<i32> as NetlistBase>::NetId
) -> Option<<Chip<i32> as HierarchyBase>::NameType>
pub fn net_name(
&self,
net: &<Chip<i32> as NetlistBase>::NetId
) -> Option<<Chip<i32> as HierarchyBase>::NameType>
Get the name of the net.
sourcepub fn for_each_pin<F>(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Chip<i32> as NetlistBase>::PinId),
pub fn for_each_pin<F>(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Chip<i32> as NetlistBase>::PinId),
Call a function for each pin of the circuit.
sourcepub fn each_pin(
&self,
circuit_id: &CellId
) -> Box<dyn Iterator<Item = PinId>, Global>
pub fn each_pin(
&self,
circuit_id: &CellId
) -> Box<dyn Iterator<Item = PinId>, Global>
Iterate over all pins of a circuit.
sourcepub fn for_each_pin_instance<F>(
&self,
circuit_inst: &<Chip<i32> as HierarchyBase>::CellInstId,
f: F
) where
F: FnMut(<Chip<i32> as NetlistBase>::PinInstId),
pub fn for_each_pin_instance<F>(
&self,
circuit_inst: &<Chip<i32> as HierarchyBase>::CellInstId,
f: F
) where
F: FnMut(<Chip<i32> as NetlistBase>::PinInstId),
Call a function for each pin instance of the circuit instance.
sourcepub fn each_pin_instance(
&'a self,
circuit_inst: &<Chip<i32> as HierarchyBase>::CellInstId
) -> Box<dyn Iterator<Item = <Chip<i32> as NetlistBase>::PinInstId> + 'a, Global>
pub fn each_pin_instance(
&'a self,
circuit_inst: &<Chip<i32> as HierarchyBase>::CellInstId
) -> Box<dyn Iterator<Item = <Chip<i32> as NetlistBase>::PinInstId> + 'a, Global>
Iterate over all pin instances of a circuit.
sourcepub fn for_each_internal_net<F>(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Chip<i32> as NetlistBase>::NetId),
pub fn for_each_internal_net<F>(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
f: F
) where
F: FnMut(<Chip<i32> as NetlistBase>::NetId),
Call a function for net of the circuit.
sourcepub fn each_internal_net(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <Chip<i32> as NetlistBase>::NetId>, Global>
pub fn each_internal_net(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> Box<dyn Iterator<Item = <Chip<i32> as NetlistBase>::NetId>, Global>
Iterate over all defined nets inside a circuit.
sourcepub fn num_internal_nets(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> usize
pub fn num_internal_nets(
&self,
circuit: &<Chip<i32> as HierarchyBase>::CellId
) -> usize
Return the number of nets defined inside a cell.
sourcepub fn num_pins(&self, circuit: &<Chip<i32> as HierarchyBase>::CellId) -> usize
pub fn num_pins(&self, circuit: &<Chip<i32> as HierarchyBase>::CellId) -> usize
Get the number of pins of a circuit.
sourcepub fn for_each_pin_of_net<F>(
&self,
net: &<Chip<i32> as NetlistBase>::NetId,
f: F
) where
F: FnMut(<Chip<i32> as NetlistBase>::PinId),
pub fn for_each_pin_of_net<F>(
&self,
net: &<Chip<i32> as NetlistBase>::NetId,
f: F
) where
F: FnMut(<Chip<i32> as NetlistBase>::PinId),
Call a function for each pin connected to this net.
sourcepub fn each_pin_of_net(
&'a self,
net: &<Chip<i32> as NetlistBase>::NetId
) -> Box<dyn Iterator<Item = <Chip<i32> as NetlistBase>::PinId> + 'a, Global>
pub fn each_pin_of_net(
&'a self,
net: &<Chip<i32> as NetlistBase>::NetId
) -> Box<dyn Iterator<Item = <Chip<i32> as NetlistBase>::PinId> + 'a, Global>
Iterate over all pins of a net.
sourcepub fn for_each_pin_instance_of_net<F>(
&self,
net: &<Chip<i32> as NetlistBase>::NetId,
f: F
) where
F: FnMut(<Chip<i32> as NetlistBase>::PinInstId),
pub fn for_each_pin_instance_of_net<F>(
&self,
net: &<Chip<i32> as NetlistBase>::NetId,
f: F
) where
F: FnMut(<Chip<i32> as NetlistBase>::PinInstId),
Call a function for each pin instance connected to this net.
sourcepub fn each_pin_instance_of_net(
&'a self,
net: &<Chip<i32> as NetlistBase>::NetId
) -> Box<dyn Iterator<Item = <Chip<i32> as NetlistBase>::PinInstId> + 'a, Global>
pub fn each_pin_instance_of_net(
&'a self,
net: &<Chip<i32> as NetlistBase>::NetId
) -> Box<dyn Iterator<Item = <Chip<i32> as NetlistBase>::PinInstId> + 'a, Global>
Iterate over all pins of a 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, Global>
fn each_pin_vec(&self, circuit: &Self::CellId) -> Vec<Self::PinId, Global>
Get a Vec
with the IDs of all pins of this circuit.
sourcefn each_pin_instance_vec(
&self,
circuit_instance: &Self::CellInstId
) -> Vec<Self::PinInstId, Global>
fn each_pin_instance_vec(
&self,
circuit_instance: &Self::CellInstId
) -> Vec<Self::PinInstId, Global>
Get a Vec
with the IDs of all pin instance of this circuit instance.
sourcefn each_external_net(
&'a self,
circuit_instance: &Self::CellInstId
) -> Box<dyn Iterator<Item = Self::NetId> + 'a, Global>
fn each_external_net(
&'a self,
circuit_instance: &Self::CellInstId
) -> Box<dyn Iterator<Item = Self::NetId> + 'a, Global>
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, Global>
fn each_external_net_vec(
&self,
circuit_instance: &Self::CellInstId
) -> Vec<Self::NetId, Global>
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, Global>
fn each_internal_net_vec(
&self,
circuit: &Self::CellId
) -> Vec<Self::NetId, Global>
Get a Vec
with all nets in this circuit.
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, Global>
fn each_pin_of_net_vec(&self, net: &Self::NetId) -> Vec<Self::PinId, Global>
Get a Vec
with all pin IDs connected to this net.
sourcefn each_pin_instance_of_net_vec(
&self,
net: &Self::NetId
) -> Vec<Self::PinInstId, Global>
fn each_pin_instance_of_net_vec(
&self,
net: &Self::NetId
) -> Vec<Self::PinInstId, Global>
Get a Vec
with all pin instance IDs connected to this 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>, Global>
fn each_terminal_of_net_vec(
&self,
net: &Self::NetId
) -> Vec<TerminalId<Self>, Global>
Get a Vec
with all terminal IDs connected to this net.
sourcefn each_terminal_of_net(
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = TerminalId<Self>> + 'a, Global>
fn each_terminal_of_net(
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = TerminalId<Self>> + 'a, Global>
Iterate over all terminals of a net.
sourceimpl NetlistEdit for Chip<i32>
impl NetlistEdit for Chip<i32>
sourcepub fn create_pin(
&mut self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
name: <Chip<i32> as HierarchyBase>::NameType,
direction: Direction
) -> <Chip<i32> as NetlistBase>::PinId
pub fn create_pin(
&mut self,
circuit: &<Chip<i32> as HierarchyBase>::CellId,
name: <Chip<i32> as HierarchyBase>::NameType,
direction: Direction
) -> <Chip<i32> as NetlistBase>::PinId
Create a new pin in this cell. Also adds the pin to all instances of the cell. Read more
sourcepub fn remove_pin(&mut self, id: &<Chip<i32> as NetlistBase>::PinId)
pub fn remove_pin(&mut self, id: &<Chip<i32> as NetlistBase>::PinId)
Remove the pin from this circuit and from all instances of this circuit.
sourcepub fn rename_pin(
&mut self,
pin: &<Chip<i32> as NetlistBase>::PinId,
new_name: <Chip<i32> as HierarchyBase>::NameType
) -> <Chip<i32> as HierarchyBase>::NameType
pub fn rename_pin(
&mut self,
pin: &<Chip<i32> as NetlistBase>::PinId,
new_name: <Chip<i32> as HierarchyBase>::NameType
) -> <Chip<i32> as HierarchyBase>::NameType
Change the name of the pin, returns the old name. Read more
sourcepub fn create_net(
&mut self,
parent: &CellId,
name: Option<<Chip<i32> as HierarchyBase>::NameType>
) -> NetId
pub fn create_net(
&mut self,
parent: &CellId,
name: Option<<Chip<i32> as HierarchyBase>::NameType>
) -> NetId
Create a net net that lives in the parent
circuit.
sourcepub fn rename_net(
&mut self,
net_id: &<Chip<i32> as NetlistBase>::NetId,
new_name: Option<<Chip<i32> as HierarchyBase>::NameType>
) -> Option<<Chip<i32> as HierarchyBase>::NameType>
pub fn rename_net(
&mut self,
net_id: &<Chip<i32> as NetlistBase>::NetId,
new_name: Option<<Chip<i32> as HierarchyBase>::NameType>
) -> Option<<Chip<i32> as HierarchyBase>::NameType>
Set a new name for the net. This might panic if the name already exists. Returns the old name. Read more
sourcepub fn remove_net(&mut self, net: &NetId)
pub fn remove_net(&mut self, net: &NetId)
Delete the net if it exists and disconnect all connected terminals.
sourcepub fn connect_pin(&mut self, pin: &PinId, net: Option<NetId>) -> Option<NetId>
pub fn connect_pin(&mut self, pin: &PinId, net: Option<NetId>) -> Option<NetId>
Connect a pin to a net. Returns the old connected net, if any. Read more
sourcepub fn connect_pin_instance(
&mut self,
pin: &PinInstId,
net: Option<NetId>
) -> Option<<Chip<i32> as NetlistBase>::NetId>
pub fn connect_pin_instance(
&mut self,
pin: &PinInstId,
net: Option<NetId>
) -> Option<<Chip<i32> 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
Auto Trait Implementations
impl<C> RefUnwindSafe for Chip<C> where
C: RefUnwindSafe,
impl<C> Send for Chip<C> where
C: Send,
impl<C> Sync for Chip<C> where
C: Sync,
impl<C> Unpin for Chip<C> where
C: Unpin,
impl<C> UnwindSafe for Chip<C> where
C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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<T> HierarchyReferenceAccess for T where
T: HierarchyBase,
impl<T> HierarchyReferenceAccess for T where
T: HierarchyBase,
sourcefn each_cell_ref(&self) -> Box<dyn Iterator<Item = CellRef<'_, Self>>, Global>
fn each_cell_ref(&self) -> Box<dyn Iterator<Item = CellRef<'_, Self>>, Global>
Iterate over all cell objects.
sourcefn 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.
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
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> LayoutReferenceAccess for T where
T: LayoutBase,
impl<T> LayoutReferenceAccess for T where
T: LayoutBase,
sourcefn 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.
sourcefn 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.
sourcefn each_layer_ref(&self) -> Box<dyn Iterator<Item = LayerRef<'_, Self>>, Global>
fn each_layer_ref(&self) -> Box<dyn Iterator<Item = LayerRef<'_, Self>>, Global>
Iterate over all layers defined in this layout.
sourcefn layer_ref_by_name(&self, name: &str) -> Option<LayerRef<'_, Self>>
fn layer_ref_by_name(&self, name: &str) -> Option<LayerRef<'_, Self>>
Get a layer object by the layer name.
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<T> NetlistReferenceAccess for T where
T: NetlistBase,
impl<T> NetlistReferenceAccess for T where
T: NetlistBase,
sourcefn 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.
sourcefn 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.
sourcefn terminal_ref(&self, t: &TerminalId<Self>) -> TerminalRef<'_, Self>
fn terminal_ref(&self, t: &TerminalId<Self>) -> TerminalRef<'_, Self>
Get a reference to a terminal.
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>, Global>
fn nets_of_cell_instance(
&self,
inst: &Self::CellInstId
) -> Box<dyn Iterator<Item = Self::NetId>, Global>
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, Global>
fn each_circuit_instance_of_net_vec(
&self,
net: &Self::NetId
) -> Vec<Self::CellInstId, Global>
Iterate over all circuit instances connected to this net. An instance is touched not more than once. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more