Struct libreda_db::library::LibraryWrapper
source · pub struct LibraryWrapper<'a, T> {
libraries: Vec<&'a T>,
owned: T,
}Fields§
§libraries: Vec<&'a T>§owned: TImplementations§
Trait Implementations§
source§impl<'a, T> HierarchyBase for LibraryWrapper<'a, T>where
T: HierarchyBase,
impl<'a, T> HierarchyBase for LibraryWrapper<'a, T>where T: HierarchyBase,
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 name. Precedence is: Current data base, then libraries in the order where they where added.
§type NameType = <T as HierarchyBase>::NameType
type NameType = <T as HierarchyBase>::NameType
Type for names of cells, instances, etc.
source§fn cell_instance_by_name(
&self,
(lib_id, parent_cell): &Self::CellId,
name: &str
) -> Option<Self::CellInstId>
fn cell_instance_by_name( &self, (lib_id, 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 cell_name(&self, (lib_id, cell): &Self::CellId) -> Self::NameType
fn cell_name(&self, (lib_id, cell): &Self::CellId) -> Self::NameType
Get the name of the cell.
source§fn cell_instance_name(
&self,
(lib_id, cell_inst): &Self::CellInstId
) -> Option<Self::NameType>
fn cell_instance_name( &self, (lib_id, cell_inst): &Self::CellInstId ) -> Option<Self::NameType>
Get the name of the cell instance.
source§fn parent_cell(
&self,
(lib_id, cell_instance): &Self::CellInstId
) -> Self::CellId
fn parent_cell( &self, (lib_id, cell_instance): &Self::CellInstId ) -> Self::CellId
Get the ID of the parent cell of this instance.
source§fn template_cell(
&self,
(lib_id, cell_instance): &Self::CellInstId
) -> Self::CellId
fn template_cell( &self, (lib_id, 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)where
F: FnMut(Self::CellId),
fn for_each_cell<F>(&self, f: F)where F: FnMut(Self::CellId),
Call a function on each cell of the netlist.
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 for_each_cell_dependency<F>(&self, cell: &Self::CellId, f: F)where
F: FnMut(Self::CellId),
fn for_each_cell_dependency<F>(&self, cell: &Self::CellId, f: F)where F: FnMut(Self::CellId),
Call a function for each cell that is a child of this
cell.source§fn for_each_dependent_cell<F>(&self, cell: &Self::CellId, f: F)where
F: FnMut(Self::CellId),
fn for_each_dependent_cell<F>(&self, cell: &Self::CellId, f: F)where F: FnMut(Self::CellId),
Call a function for each cell that directly depends on
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 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§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 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 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_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_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_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 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_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 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 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 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 num_cell_references(&self, cell: &Self::CellId) -> usize
fn num_cell_references(&self, cell: &Self::CellId) -> usize
Count all instantiations of
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 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 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§impl<'a, T> HierarchyIds for LibraryWrapper<'a, T>where
T: HierarchyIds,
impl<'a, T> HierarchyIds for LibraryWrapper<'a, T>where T: HierarchyIds,
§type CellId = (LibraryId, <T as HierarchyIds>::CellId)
type CellId = (LibraryId, <T as HierarchyIds>::CellId)
Cell/module identifier type.
§type CellInstId = (LibraryId, <T as HierarchyIds>::CellInstId)
type CellInstId = (LibraryId, <T as HierarchyIds>::CellInstId)
Cell instance identifier type.
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for LibraryWrapper<'a, T>where T: RefUnwindSafe,
impl<'a, T> Send for LibraryWrapper<'a, T>where T: Send + Sync,
impl<'a, T> Sync for LibraryWrapper<'a, T>where T: Sync,
impl<'a, T> Unpin for LibraryWrapper<'a, T>where T: Unpin,
impl<'a, T> UnwindSafe for LibraryWrapper<'a, T>where T: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
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.