Struct libreda_db::chip::Chip
source · pub struct Chip<C: CoordinateType = Coord> {Show 20 fields
circuits: FnvHashMap<CellId, Circuit<C>>,
circuits_by_name: HashMap<String, CellId>,
circuit_instances: FnvHashMap<CellInstId, CircuitInst>,
nets: FnvHashMap<NetId, Net>,
pins: FnvHashMap<PinId, Pin>,
pin_instances: FnvHashMap<PinInstId, PinInst>,
properties: PropertyStore<String>,
id_counter_circuit: u32,
id_counter_circuit_inst: usize,
id_counter_pin: u32,
id_counter_pin_inst: usize,
id_counter_net: usize,
dbu: C,
layer_index_generator: IndexGenerator<LayerInfo<String>, u16>,
layers_by_name: HashMap<String, LayerId>,
layers_by_index_datatype: FnvHashMap<(UInt, UInt), LayerId>,
layer_info: FnvHashMap<LayerId, LayerInfo<String>>,
shape_index_generator: IndexGenerator<Shape<C>>,
shape_parents: FnvHashMap<ShapeId, (CellId, LayerId)>,
net_shapes: FnvHashMap<NetId, FnvHashSet<ShapeId>>,
}
Expand description
A netlist is the container of circuits.
Fields§
§circuits: FnvHashMap<CellId, Circuit<C>>
§circuits_by_name: HashMap<String, CellId>
§circuit_instances: FnvHashMap<CellInstId, CircuitInst>
§nets: FnvHashMap<NetId, Net>
§pins: FnvHashMap<PinId, Pin>
§pin_instances: FnvHashMap<PinInstId, PinInst>
§properties: PropertyStore<String>
Top-level properties.
id_counter_circuit: u32
§id_counter_circuit_inst: usize
§id_counter_pin: u32
§id_counter_pin_inst: usize
§id_counter_net: usize
§dbu: C
§layer_index_generator: IndexGenerator<LayerInfo<String>, u16>
Counter for generating the next layer index.
layers_by_name: HashMap<String, LayerId>
Lookup table for finding layers by name.
layers_by_index_datatype: FnvHashMap<(UInt, UInt), LayerId>
Lookup table for finding layers by index/datatype numbers.
layer_info: FnvHashMap<LayerId, LayerInfo<String>>
Info structures for all layers.
shape_index_generator: IndexGenerator<Shape<C>>
ID generator for shapes.
shape_parents: FnvHashMap<ShapeId, (CellId, LayerId)>
Link to the cell and layer that contain a shape.
net_shapes: FnvHashMap<NetId, FnvHashSet<ShapeId>>
Link to the shapes of a net.
Implementations§
source§impl Chip<Coord>
impl Chip<Coord>
sourcefn circuit_by_name<S: ?Sized + Eq + Hash>(&self, name: &S) -> Option<CellId>where
String: Borrow<S>,
fn circuit_by_name<S: ?Sized + Eq + Hash>(&self, name: &S) -> Option<CellId>where String: Borrow<S>,
Find a circuit by its name.
sourcefn rename_cell(&mut self, cell: &CellId, name: String)
fn rename_cell(&mut self, cell: &CellId, name: String)
sourcefn rename_cell_instance(&mut self, inst: &CellInstId, name: Option<String>)
fn rename_cell_instance(&mut self, inst: &CellInstId, name: Option<String>)
sourcefn create_circuit(
&mut self,
name: String,
pins: Vec<(String, Direction)>
) -> CellId
fn create_circuit( &mut self, name: String, pins: Vec<(String, Direction)> ) -> CellId
Create a new circuit template.
sourcefn remove_circuit(&mut self, circuit_id: &CellId)
fn remove_circuit(&mut self, circuit_id: &CellId)
Remove all instances inside the circuit, remove all instances of the circuit and remove finally the circuit itself.
sourcefn create_circuit_instance(
&mut self,
parent: &CellId,
circuit_template: &CellId,
name: Option<String>
) -> CellInstId
fn create_circuit_instance( &mut self, parent: &CellId, circuit_template: &CellId, name: Option<String> ) -> CellInstId
Create a new instance of circuit_template
in the parent
circuit.
sourcefn remove_circuit_instance(&mut self, circuit_inst_id: &CellInstId)
fn remove_circuit_instance(&mut self, circuit_inst_id: &CellInstId)
Remove a circuit instance after disconnecting it from the nets.
sourcefn create_net(&mut self, parent: &CellId, name: Option<String>) -> NetId
fn create_net(&mut self, parent: &CellId, name: Option<String>) -> NetId
Create a new net in the parent
circuit.
sourcefn rename_net(
&mut self,
net_id: &NetId,
new_name: Option<String>
) -> Option<String>
fn rename_net( &mut self, net_id: &NetId, new_name: Option<String> ) -> Option<String>
Change the name of the net.
sourcefn remove_net(&mut self, net: &NetId)
fn remove_net(&mut self, net: &NetId)
Disconnect all connected terminals and remove the net.
sourcefn disconnect_pin(&mut self, pin: &PinId) -> Option<NetId>
fn disconnect_pin(&mut self, pin: &PinId) -> Option<NetId>
Disconnect pin and return the ID of the net that was connected.
sourcefn connect_pin(&mut self, pin: &PinId, net: Option<NetId>) -> Option<NetId>
fn connect_pin(&mut self, pin: &PinId, net: Option<NetId>) -> Option<NetId>
Connect the pin to a net.
sourcefn disconnect_pin_instance(&mut self, pin: &PinInstId) -> Option<NetId>
fn disconnect_pin_instance(&mut self, pin: &PinInstId) -> Option<NetId>
Disconnect the pin instance and return the net to which it was connected.
sourcefn connect_pin_instance(
&mut self,
pin: &PinInstId,
net: Option<NetId>
) -> Option<NetId>
fn connect_pin_instance( &mut self, pin: &PinInstId, net: Option<NetId> ) -> Option<NetId>
Connect the pin to a net.
sourcefn circuit_mut(&mut self, id: &CellId) -> &mut Circuit
fn circuit_mut(&mut self, id: &CellId) -> &mut Circuit
Get a mutable reference to the circuit by its ID.
sourcefn circuit_inst(&self, id: &CellInstId) -> &CircuitInst
fn circuit_inst(&self, id: &CellInstId) -> &CircuitInst
Get a reference to a circuit instance.
sourcefn circuit_inst_mut(&mut self, id: &CellInstId) -> &mut CircuitInst
fn circuit_inst_mut(&mut self, id: &CellInstId) -> &mut CircuitInst
Get a mutable reference to a circuit instance.
sourcefn pin_inst_mut(&mut self, id: &PinInstId) -> &mut PinInst
fn pin_inst_mut(&mut self, id: &PinInstId) -> &mut PinInst
Get a mutable reference to a pin instance by its ID.
sourcefn next_id_counter_usize(ctr: &mut usize) -> usize
fn next_id_counter_usize(ctr: &mut usize) -> usize
Get the value of a counter and increment the counter afterwards.
sourcefn next_id_counter_u32(ctr: &mut u32) -> u32
fn next_id_counter_u32(ctr: &mut u32) -> u32
Get the value of a counter and increment the counter afterwards.
sourcefn create_pin(
&mut self,
parent: CellId,
name: String,
direction: Direction
) -> PinId
fn create_pin( &mut self, parent: CellId, name: String, direction: Direction ) -> PinId
Append a new pin to the parent
circuit.
Update all circuit instances with the new pin.
sourcefn create_pin_inst(&mut self, circuit: CellInstId, pin: PinId) -> PinInstId
fn create_pin_inst(&mut self, circuit: CellInstId, pin: PinId) -> PinInstId
Insert a new pin instance to a circuit instance.
sourcefn pins_for_net(&self, net: &NetId) -> impl Iterator<Item = PinId> + '_
fn pins_for_net(&self, net: &NetId) -> impl Iterator<Item = PinId> + '_
Iterate over all pins connected to a net.
sourcefn pins_instances_for_net(
&self,
net: &NetId
) -> impl Iterator<Item = PinInstId> + '_
fn pins_instances_for_net( &self, net: &NetId ) -> impl Iterator<Item = PinInstId> + '_
Iterate over all pin instances connected to a net.
Trait Implementations§
source§impl<'de, C> Deserialize<'de> for Chip<C>where
C: Deserialize<'de> + CoordinateType,
impl<'de, C> Deserialize<'de> for Chip<C>where C: Deserialize<'de> + CoordinateType,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl HierarchyBase for Chip<Coord>
impl HierarchyBase for Chip<Coord>
source§fn cell_by_name(&self, name: &str) -> Option<CellId>
fn cell_by_name(&self, name: &str) -> Option<CellId>
None
if the cell does not exist.source§fn cell_instance_by_name(
&self,
parent_circuit: &Self::CellId,
name: &str
) -> Option<Self::CellInstId>
fn cell_instance_by_name( &self, parent_circuit: &Self::CellId, name: &str ) -> Option<Self::CellInstId>
None
if the name does not exist.source§fn cell_instance_name(
&self,
circuit_inst: &Self::CellInstId
) -> Option<Self::NameType>
fn cell_instance_name( &self, circuit_inst: &Self::CellInstId ) -> Option<Self::NameType>
source§fn parent_cell(&self, circuit_instance: &Self::CellInstId) -> Self::CellId
fn parent_cell(&self, circuit_instance: &Self::CellInstId) -> Self::CellId
source§fn template_cell(&self, circuit_instance: &Self::CellInstId) -> Self::CellId
fn template_cell(&self, circuit_instance: &Self::CellInstId) -> Self::CellId
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),
source§fn for_each_cell_instance<F>(&self, circuit: &Self::CellId, f: F)where
F: FnMut(Self::CellInstId),
fn for_each_cell_instance<F>(&self, circuit: &Self::CellId, f: F)where F: FnMut(Self::CellInstId),
source§fn each_cell_instance(
&self,
circuit: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>
fn each_cell_instance( &self, circuit: &Self::CellId ) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>
source§fn for_each_cell_dependency<F>(&self, circuit: &Self::CellId, f: F)where
F: FnMut(Self::CellId),
fn for_each_cell_dependency<F>(&self, circuit: &Self::CellId, f: F)where F: FnMut(Self::CellId),
cell
.source§fn each_cell_dependency(
&self,
circuit: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellId> + '_>
fn each_cell_dependency( &self, circuit: &Self::CellId ) -> Box<dyn Iterator<Item = Self::CellId> + '_>
cell
.source§fn num_cell_dependencies(&self, cell: &Self::CellId) -> usize
fn num_cell_dependencies(&self, cell: &Self::CellId) -> usize
cell
.source§fn for_each_dependent_cell<F>(&self, circuit: &Self::CellId, f: F)where
F: FnMut(Self::CellId),
fn for_each_dependent_cell<F>(&self, circuit: &Self::CellId, f: F)where F: FnMut(Self::CellId),
cell
.source§fn each_dependent_cell(
&self,
circuit: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellId> + '_>
fn each_dependent_cell( &self, circuit: &Self::CellId ) -> Box<dyn Iterator<Item = Self::CellId> + '_>
cell
.source§fn num_dependent_cells(&self, cell: &Self::CellId) -> usize
fn num_dependent_cells(&self, cell: &Self::CellId) -> usize
cell
, i.e. contain an instance of cell
.source§fn for_each_cell_reference<F>(&self, circuit: &Self::CellId, f: F)where
F: FnMut(Self::CellInstId),
fn for_each_cell_reference<F>(&self, circuit: &Self::CellId, f: F)where F: FnMut(Self::CellInstId),
cell
, i.e. instances that use this cell as
a template.source§fn each_cell_reference(
&self,
circuit: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>
fn each_cell_reference( &self, circuit: &Self::CellId ) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>
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
cell
.source§fn num_child_instances(&self, cell: &Self::CellId) -> usize
fn num_child_instances(&self, cell: &Self::CellId) -> usize
cell
.source§fn get_chip_property(&self, key: &Self::NameType) -> Option<PropertyValue>
fn get_chip_property(&self, key: &Self::NameType) -> Option<PropertyValue>
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>
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>
source§fn each_cell_vec(&self) -> Vec<Self::CellId>
fn each_cell_vec(&self) -> Vec<Self::CellId>
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>
Vec
of the IDs of all instances in this 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>
Vec
of each cell that is a child of this 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>
Vec
of each cell that directly depends on 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>
Vec
with all cell instances referencing this cell.source§impl HierarchyEdit for Chip<Coord>
impl HierarchyEdit for Chip<Coord>
source§fn create_cell(&mut self, name: Self::NameType) -> Self::CellId
fn create_cell(&mut self, name: Self::NameType) -> Self::CellId
source§fn remove_cell(&mut self, cell_id: &Self::CellId)
fn remove_cell(&mut self, cell_id: &Self::CellId)
source§fn create_cell_instance(
&mut self,
parent_cell: &Self::CellId,
template_cell: &Self::CellId,
name: Option<Self::NameType>
) -> Self::CellInstId
fn create_cell_instance( &mut self, parent_cell: &Self::CellId, template_cell: &Self::CellId, name: Option<Self::NameType> ) -> Self::CellInstId
template_cell
in parent_cell
.
Recursive instantiation is forbidden and might panic. Read moresource§fn remove_cell_instance(&mut self, id: &Self::CellInstId)
fn remove_cell_instance(&mut self, id: &Self::CellInstId)
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> )
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)
source§fn set_chip_property(&mut self, key: Self::NameType, value: PropertyValue)
fn set_chip_property(&mut self, key: Self::NameType, value: PropertyValue)
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 )
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 )
source§impl HierarchyIds for Chip<Coord>
impl HierarchyIds for Chip<Coord>
§type CellInstId = CellInstId
type CellInstId = CellInstId
source§impl L2NBase for Chip<Coord>
impl L2NBase for Chip<Coord>
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> + '_>
source§fn shapes_of_pin(
&self,
pin_id: &Self::PinId
) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>
fn shapes_of_pin( &self, pin_id: &Self::PinId ) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>
source§impl L2NEdit for Chip<Coord>
impl L2NEdit for Chip<Coord>
source§impl LayoutBase for Chip<Coord>
impl LayoutBase for Chip<Coord>
source§fn dbu(&self) -> Self::Coord
fn dbu(&self) -> Self::Coord
source§fn each_layer(&self) -> Box<dyn Iterator<Item = Self::LayerId> + '_>
fn each_layer(&self) -> Box<dyn Iterator<Item = Self::LayerId> + '_>
source§fn layer_info(&self, layer: &Self::LayerId) -> LayerInfo<Self::NameType>
fn layer_info(&self, layer: &Self::LayerId) -> LayerInfo<Self::NameType>
LayerInfo
data structure for this layer.source§fn find_layer(&self, index: u32, datatype: u32) -> Option<Self::LayerId>
fn find_layer(&self, index: u32, datatype: u32) -> Option<Self::LayerId>
source§fn bounding_box_per_layer(
&self,
cell: &Self::CellId,
layer: &Self::LayerId
) -> Option<Rect<Coord>>
fn bounding_box_per_layer( &self, cell: &Self::CellId, layer: &Self::LayerId ) -> Option<Rect<Coord>>
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> + '_>
source§fn for_each_shape<F>(&self, cell_id: &Self::CellId, layer: &Self::LayerId, f: F)where
F: FnMut(&Self::ShapeId, &Geometry<Self::Coord>),
fn for_each_shape<F>(&self, cell_id: &Self::CellId, layer: &Self::LayerId, f: F)where F: FnMut(&Self::ShapeId, &Geometry<Self::Coord>),
source§fn with_shape<F, R>(&self, shape_id: &Self::ShapeId, f: F) -> Rwhere
F: FnMut(&Self::LayerId, &Geometry<Self::Coord>) -> R,
fn with_shape<F, R>(&self, shape_id: &Self::ShapeId, f: F) -> Rwhere F: FnMut(&Self::LayerId, &Geometry<Self::Coord>) -> R,
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)
source§fn get_transform(
&self,
cell_inst: &Self::CellInstId
) -> SimpleTransform<Self::Coord>
fn get_transform( &self, cell_inst: &Self::CellInstId ) -> SimpleTransform<Self::Coord>
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>
source§fn bounding_box(&self, cell: &Self::CellId) -> Option<Rect<Self::Coord>>
fn bounding_box(&self, cell: &Self::CellId) -> Option<Rect<Self::Coord>>
None
.source§fn shape_geometry(&self, shape_id: &Self::ShapeId) -> Geometry<Self::Coord>
fn shape_geometry(&self, shape_id: &Self::ShapeId) -> Geometry<Self::Coord>
source§fn shape_layer(&self, shape_id: &Self::ShapeId) -> Self::LayerId
fn shape_layer(&self, shape_id: &Self::ShapeId) -> Self::LayerId
source§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>),
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>),
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 LayoutEdit for Chip<Coord>
impl LayoutEdit for Chip<Coord>
source§fn set_dbu(&mut self, dbu: Self::Coord)
fn set_dbu(&mut self, dbu: Self::Coord)
source§fn create_layer(&mut self, index: u32, datatype: u32) -> Self::LayerId
fn create_layer(&mut self, index: u32, datatype: u32) -> Self::LayerId
set_layer_name()
to define a name.source§fn create_layer_with_id(
&mut self,
layer_id: Self::LayerId,
index: u32,
datatype: u32
) -> Result<(), ()>
fn create_layer_with_id( &mut self, layer_id: Self::LayerId, index: u32, datatype: u32 ) -> Result<(), ()>
Err
when the ID already exists.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>
None
.
This method should not change the ID of the layer.
Returns the previous name of the layer.source§fn insert_shape(
&mut self,
parent_cell: &Self::CellId,
layer: &Self::LayerId,
geometry: Geometry<Self::Coord>
) -> Self::ShapeId
fn insert_shape( &mut self, parent_cell: &Self::CellId, layer: &Self::LayerId, geometry: Geometry<Self::Coord> ) -> Self::ShapeId
source§fn remove_shape(
&mut self,
shape_id: &Self::ShapeId
) -> Option<Geometry<Self::Coord>>
fn remove_shape( &mut self, shape_id: &Self::ShapeId ) -> Option<Geometry<Self::Coord>>
source§fn replace_shape(
&mut self,
shape_id: &Self::ShapeId,
geometry: Geometry<Self::Coord>
) -> Geometry<Self::Coord>
fn replace_shape( &mut self, shape_id: &Self::ShapeId, geometry: Geometry<Self::Coord> ) -> Geometry<Self::Coord>
source§fn set_transform(
&mut self,
cell_inst: &Self::CellInstId,
tf: SimpleTransform<Self::Coord>
)
fn set_transform( &mut self, cell_inst: &Self::CellInstId, tf: SimpleTransform<Self::Coord> )
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 )
source§impl LayoutIds for Chip<Coord>
impl LayoutIds for Chip<Coord>
source§impl NetlistBase for Chip
impl NetlistBase for Chip
source§fn template_pin(&self, pin_instance: &Self::PinInstId) -> Self::PinId
fn template_pin(&self, pin_instance: &Self::PinInstId) -> Self::PinId
source§fn pin_direction(&self, pin: &Self::PinId) -> Direction
fn pin_direction(&self, pin: &Self::PinId) -> Direction
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>
None
if no such pin can be found.source§fn parent_cell_of_pin(&self, pin: &Self::PinId) -> Self::CellId
fn parent_cell_of_pin(&self, pin: &Self::PinId) -> Self::CellId
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
source§fn parent_cell_of_net(&self, net: &Self::NetId) -> Self::CellId
fn parent_cell_of_net(&self, net: &Self::NetId) -> Self::CellId
source§fn net_of_pin(&self, pin: &Self::PinId) -> Option<Self::NetId>
fn net_of_pin(&self, pin: &Self::PinId) -> Option<Self::NetId>
source§fn net_of_pin_instance(&self, pin_inst: &Self::PinInstId) -> Option<Self::NetId>
fn net_of_pin_instance(&self, pin_inst: &Self::PinInstId) -> Option<Self::NetId>
source§fn net_zero(&self, parent_circuit: &Self::CellId) -> Self::NetId
fn net_zero(&self, parent_circuit: &Self::CellId) -> Self::NetId
source§fn net_one(&self, parent_circuit: &Self::CellId) -> Self::NetId
fn net_one(&self, parent_circuit: &Self::CellId) -> Self::NetId
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>
None
if no such net can be found.source§fn for_each_pin<F>(&self, circuit: &Self::CellId, f: F)where
F: FnMut(Self::PinId),
fn for_each_pin<F>(&self, circuit: &Self::CellId, f: F)where F: FnMut(Self::PinId),
source§fn each_pin(&self, circuit_id: &CellId) -> Box<dyn Iterator<Item = PinId> + '_>
fn each_pin(&self, circuit_id: &CellId) -> Box<dyn Iterator<Item = PinId> + '_>
source§fn for_each_pin_instance<F>(&self, circuit_inst: &Self::CellInstId, f: F)where
F: FnMut(Self::PinInstId),
fn for_each_pin_instance<F>(&self, circuit_inst: &Self::CellInstId, f: F)where F: FnMut(Self::PinInstId),
source§fn each_pin_instance<'a>(
&'a self,
circuit_inst: &Self::CellInstId
) -> Box<dyn Iterator<Item = Self::PinInstId> + 'a>
fn each_pin_instance<'a>( &'a self, circuit_inst: &Self::CellInstId ) -> Box<dyn Iterator<Item = Self::PinInstId> + 'a>
source§fn for_each_internal_net<F>(&self, circuit: &Self::CellId, f: F)where
F: FnMut(Self::NetId),
fn for_each_internal_net<F>(&self, circuit: &Self::CellId, f: F)where F: FnMut(Self::NetId),
source§fn each_internal_net(
&self,
circuit: &Self::CellId
) -> Box<dyn Iterator<Item = Self::NetId> + '_>
fn each_internal_net( &self, circuit: &Self::CellId ) -> Box<dyn Iterator<Item = Self::NetId> + '_>
source§fn num_internal_nets(&self, circuit: &Self::CellId) -> usize
fn num_internal_nets(&self, circuit: &Self::CellId) -> usize
source§fn for_each_pin_of_net<F>(&self, net: &Self::NetId, f: F)where
F: FnMut(Self::PinId),
fn for_each_pin_of_net<F>(&self, net: &Self::NetId, f: F)where F: FnMut(Self::PinId),
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>
source§fn for_each_pin_instance_of_net<F>(&self, net: &Self::NetId, f: F)where
F: FnMut(Self::PinInstId),
fn for_each_pin_instance_of_net<F>(&self, net: &Self::NetId, f: F)where F: FnMut(Self::PinInstId),
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>
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
source§fn each_pin_vec(&self, circuit: &Self::CellId) -> Vec<Self::PinId>
fn each_pin_vec(&self, circuit: &Self::CellId) -> Vec<Self::PinId>
Vec
with the IDs of all pins of this circuit.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>
Vec
with the IDs of all pin instance of this circuit instance.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>
source§fn 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),
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>
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>
Vec
with all nets in this circuit.source§fn num_net_pins(&self, net: &Self::NetId) -> usize
fn num_net_pins(&self, net: &Self::NetId) -> usize
source§fn num_net_pin_instances(&self, net: &Self::NetId) -> usize
fn num_net_pin_instances(&self, net: &Self::NetId) -> usize
source§fn num_net_terminals(&self, net: &Self::NetId) -> usize
fn num_net_terminals(&self, net: &Self::NetId) -> usize
source§impl NetlistEdit for Chip
impl NetlistEdit for Chip
source§fn create_pin(
&mut self,
circuit: &Self::CellId,
name: Self::NameType,
direction: Direction
) -> Self::PinId
fn create_pin( &mut self, circuit: &Self::CellId, name: Self::NameType, direction: Direction ) -> Self::PinId
source§fn remove_pin(&mut self, id: &Self::PinId)
fn remove_pin(&mut self, id: &Self::PinId)
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
source§fn create_net(&mut self, parent: &CellId, name: Option<Self::NameType>) -> NetId
fn create_net(&mut self, parent: &CellId, name: Option<Self::NameType>) -> NetId
parent
circuit.source§fn rename_net(
&mut self,
net_id: &Self::NetId,
new_name: Option<Self::NameType>
) -> Option<Self::NameType>
fn rename_net( &mut self, net_id: &Self::NetId, new_name: Option<Self::NameType> ) -> Option<Self::NameType>
source§fn remove_net(&mut self, net: &NetId)
fn remove_net(&mut self, net: &NetId)
source§fn connect_pin(&mut self, pin: &PinId, net: Option<NetId>) -> Option<NetId>
fn connect_pin(&mut self, pin: &PinId, net: Option<NetId>) -> Option<NetId>
source§fn connect_pin_instance(
&mut self,
pin: &PinInstId,
net: Option<NetId>
) -> Option<Self::NetId>
fn connect_pin_instance( &mut self, pin: &PinInstId, net: Option<NetId> ) -> Option<Self::NetId>
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§
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)
cell
.source§fn prune_cell_instance(&mut self, inst: &Self::CellInstId)
fn prune_cell_instance(&mut self, inst: &Self::CellInstId)
source§fn prune_cell(&mut self, cell: &Self::CellId)
fn prune_cell(&mut self, cell: &Self::CellId)
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
source§fn is_leaf_cell(&self, cell: &Self::CellId) -> bool
fn is_leaf_cell(&self, cell: &Self::CellId) -> bool
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> + '_>
source§impl<L> LayoutEditUtil for Lwhere
L: LayoutEdit,
impl<L> LayoutEditUtil for Lwhere L: LayoutEdit,
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>
source§fn disconnect_terminal(
&mut self,
terminal: &TerminalId<Self>
) -> Option<Self::NetId>
fn disconnect_terminal( &mut self, terminal: &TerminalId<Self> ) -> Option<Self::NetId>
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)
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)
source§fn flatten_circuit(&mut self, circuit: &Self::CellId)
fn flatten_circuit(&mut self, circuit: &Self::CellId)
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
source§fn purge_nets(&mut self) -> usize
fn purge_nets(&mut self) -> usize
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 )
prefix
and an appended number.
After calling this method, no net inside this circuit will be unnamed.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>
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>),
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>>
Vec
with all terminal IDs connected to this net.