Struct Undo

Source
pub struct Undo<'a, T, U> { /* private fields */ }
Expand description

Wrapper around netlist, layout and L2N structures that allows undoing of operations.

§Types

  • T: Underlying data structure.
  • U: Undo-operation.

Implementations§

Source§

impl<'a, T, U> Undo<'a, T, U>

Source

pub fn num_transactions(&self) -> usize

Return the number of undoable transactions.

Source

pub fn flush(&mut self)

Clear the undo buffer and make changes permanent.

Source§

impl<'a, T: L2NEdit> Undo<'a, T, L2NUndoOp<T>>

Source

pub fn new_l2n_undo(chip: &'a mut T) -> Self

Create a wrapper around a fused layout and netlist which allows to undo operations.

Source

pub fn undo(&mut self)

Undo the latest transaction. Does nothing if there’s no transaction left to be undone.

Source§

impl<'a, T: LayoutEdit> Undo<'a, T, LayoutUndoOp<T>>

Source

pub fn new_layout_undo(chip: &'a mut T) -> Self

Create a wrapper which allows to undo operations performed on the LayoutEdit trait.

Source

pub fn undo(&mut self)

Undo the latest transaction. Does nothing if there’s no transaction left to be undone.

Source§

impl<'a, T: NetlistEdit> Undo<'a, T, NetlistUndoOp<T>>

Source

pub fn new_netlist_undo(chip: &'a mut T) -> Self

Create a wrapper which allows to undo operations performed on the NetlistEdit trait.

Source

pub fn undo(&mut self)

Undo the latest transaction. Does nothing if there’s no transaction left to be undone.

Source§

impl<'a, T: HierarchyEdit> Undo<'a, T, HierarchyUndoOp<T>>

Source

pub fn new_hierarchy_undo(chip: &'a mut T) -> Self

Create a wrapper which allows to undo operations performed on the HierarchyEdit trait.

Source

pub fn undo(&mut self)

Undo the latest transaction. Does nothing if there’s no transaction left to be undone.

Source

pub fn undo_all(&mut self)

Undoes all transactions.

Trait Implementations§

Source§

impl<'a, T, U> Deref for Undo<'a, T, U>

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'b, N, U> HierarchyBase for Undo<'b, N, U>
where N: HierarchyBase,

Source§

type NameType = <N as HierarchyBase>::NameType

Type for names of cells, instances, etc.
Source§

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 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>

Get the name of the cell instance.
Source§

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 get_chip_property(&self, key: &Self::NameType) -> Option<PropertyValue>

Get a property of the top-level chip data structure.
Source§

fn num_cell_references(&self, cell: &Self::CellId) -> usize

Count all instantiations of cell.
Source§

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>

Get a property of a cell instance.
Source§

fn num_cells(&self) -> usize

Get the number of cell templates.
Source§

fn each_cell_instance( &self, cell: &Self::CellId, ) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>

Iterate over all instances in a cell.
Source§

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 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

Count all cells that are dependencies of cell.
Source§

fn cell_name(&self, cell: &Self::CellId) -> Self::NameType

Get the name of the cell.
Source§

fn each_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>

Iterate over all cells.
Source§

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_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_instance_vec(&self, cell: &Self::CellId) -> Vec<Self::CellInstId>

Get a Vec of the IDs of all instances in this cell.
Source§

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 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 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 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)
where F: FnMut(Self::CellId),

Call a function on each cell of the netlist.
Source§

fn num_child_instances(&self, cell: &Self::CellId) -> usize

Get the number of cell instances inside the cell.
Source§

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_vec(&self) -> Vec<Self::CellId>

Get a Vec of all cell IDs in this netlist.
Source§

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 parent_cell(&self, cell_instance: &Self::CellInstId) -> Self::CellId

Get the ID of the parent cell of this instance.
Source§

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§

impl<'a, T: HierarchyEdit + 'static, U: From<HierarchyUndoOp<T>>> HierarchyEdit for Undo<'a, T, U>

Source§

fn create_cell(&mut self, name: Self::NameType) -> Self::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: &Self::CellId)

Remove a cell and all the instances of it. Read more
Source§

fn create_cell_instance( &mut self, parent_cell: &Self::CellId, template_cell: &Self::CellId, name: Option<Self::NameType>, ) -> Self::CellInstId

Create a new instance of template_cell in parent_cell. Recursive instantiation is forbidden and might panic. Read more
Source§

fn remove_cell_instance(&mut self, _inst: &Self::CellInstId)

Remove cell instance if it exists. Read more
Source§

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 rename_cell(&mut self, cell: &Self::CellId, new_name: Self::NameType)

Change the name of a cell. Read more
Source§

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, )

Set a property of a cell.
Source§

fn set_cell_instance_property( &mut self, inst: &Self::CellInstId, key: Self::NameType, value: PropertyValue, )

Set a property of a cell instance.
Source§

impl<'a, N, U> HierarchyIds for Undo<'a, N, U>
where N: HierarchyIds,

Source§

type CellId = <N as HierarchyIds>::CellId

Cell/module identifier type.
Source§

type CellInstId = <N as HierarchyIds>::CellInstId

Cell instance identifier type.
Source§

impl<'b, N, U> L2NBase for Undo<'b, N, U>
where N: L2NBase,

Source§

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§

fn get_pin_of_shape(&self, shape_id: &Self::ShapeId) -> Option<Self::PinId>

Get the pin that belongs to the shape (if any).
Source§

fn shapes_of_pin( &self, pin_id: &Self::PinId, ) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>

Iterate over all shapes that are part of the pin.
Source§

fn get_net_of_shape(&self, shape_id: &Self::ShapeId) -> Option<Self::NetId>

Get the net of a shape.
Source§

impl<'a, T, U> L2NEdit for Undo<'a, T, U>
where T: L2NEdit + 'static, U: From<L2NUndoOp<T>> + From<LayoutUndoOp<T>> + From<NetlistUndoOp<T>> + From<HierarchyUndoOp<T>>,

Source§

fn set_pin_of_shape( &mut self, shape_id: &Self::ShapeId, pin: Option<Self::PinId>, ) -> Option<Self::PinId>

Create the link between a circuit pin and its shapes in the layout. Return the current pin.
Source§

fn set_net_of_shape( &mut self, shape_id: &Self::ShapeId, net: Option<Self::NetId>, ) -> Option<Self::NetId>

Set the net of a shape. Return the current net.
Source§

impl<'b, N, U> LayoutBase for Undo<'b, N, U>
where N: LayoutBase,

Source§

fn layer_by_name(&self, name: &str) -> Option<Self::LayerId>

Find layer index by the name.
Source§

fn with_shape<F, R>(&self, shape_id: &Self::ShapeId, f: F) -> R
where F: FnMut(&Self::LayerId, &Geometry<Self::Coord>) -> R,

Access a shape by its ID.
Source§

fn for_each_shape<F>(&self, cell: &Self::CellId, layer: &Self::LayerId, f: F)
where F: FnMut(&Self::ShapeId, &Geometry<Self::Coord>),

Call a function for each shape on this layer.
Source§

fn shape_geometry(&self, shape_id: &Self::ShapeId) -> Geometry<Self::Coord>

Get a clone of the shape geometry.
Source§

fn find_layer(&self, index: UInt, datatype: UInt) -> Option<Self::LayerId>

Find layer index by the (index, data type) tuple.
Source§

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 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 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 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> + '_>

Iterate over all defined layers.
Source§

fn layer_info(&self, layer: &Self::LayerId) -> LayerInfo<Self::NameType>

Get the LayerInfo data structure for this layer.
Source§

fn get_shape_property( &self, shape: &Self::ShapeId, key: &Self::NameType, ) -> Option<PropertyValue>

Get a property of a shape.
Source§

fn dbu(&self) -> Self::Coord

Get the distance unit used in this layout in ‘pixels per micron’.
Source§

fn shape_layer(&self, shape_id: &Self::ShapeId) -> Self::LayerId

Get the layer of a shape.
Source§

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 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.
Source§

impl<'a, T, U> LayoutEdit for Undo<'a, T, U>
where T: LayoutEdit + 'static, U: From<LayoutUndoOp<T>> + From<HierarchyUndoOp<T>>,

Source§

fn set_dbu(&mut self, dbu: Self::Coord)

Set the distance unit used in this layout in ‘pixels per micron’.
Source§

fn create_layer(&mut self, index: u32, datatype: u32) -> 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: 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.
Source§

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 insert_shape( &mut self, parent_cell: &T::CellId, layer: &T::LayerId, geometry: Geometry<Self::Coord>, ) -> Self::ShapeId

Insert a geometric shape into the parent cell.
Source§

fn remove_shape( &mut self, shape_id: &Self::ShapeId, ) -> Option<Geometry<Self::Coord>>

Remove shape from the parent cell.
Source§

fn replace_shape( &mut self, shape_id: &Self::ShapeId, geometry: Geometry<Self::Coord>, ) -> Geometry<Self::Coord>

Replace the geometry of a shape.
Source§

fn set_transform( &mut self, cell_inst: &Self::CellInstId, tf: SimpleTransform<Self::Coord>, )

Set the geometric transform that describes the location of a cell instance relative to its parent.
Source§

fn set_shape_property( &mut self, shape: &Self::ShapeId, key: Self::NameType, _value: PropertyValue, )

Set a property of a shape.
Source§

impl<'b, N, U> LayoutIds for Undo<'b, N, U>
where N: LayoutIds,

Source§

type Coord = <N as LayoutIds>::Coord

Number type used for coordinates and distances.
Source§

type LayerId = <N as LayoutIds>::LayerId

Layer identifier type.
Source§

type Area = <N as LayoutIds>::Area

Number type for areas. This is possibly another type then Coord for the following reasons: Read more
Source§

type ShapeId = <N as LayoutIds>::ShapeId

Shape identifier type.
Source§

impl<'b, N, U> NetlistBase for Undo<'b, N, U>
where N: NetlistBase,

Source§

fn for_each_pin_of_net<F>(&self, net: &Self::NetId, f: F)
where F: FnMut(Self::PinId),

Call a function for each pin connected to this net.
Source§

fn parent_cell_of_pin(&self, pin: &Self::PinId) -> Self::CellId

Get the ID of the parent circuit of this pin.
Source§

fn net_zero(&self, parent_circuit: &Self::CellId) -> Self::NetId

Get the net of the logical constant zero.
Source§

fn num_net_pin_instances(&self, net: &Self::NetId) -> usize

Get the number of pin instances that are connected to this net.
Source§

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_instance_of_net<F>(&self, net: &Self::NetId, f: F)
where F: FnMut(Self::PinInstId),

Call a function for each pin instance connected to this net.
Source§

fn pin_name(&self, pin: &Self::PinId) -> Self::NameType

Get the name of the pin.
Source§

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

Get the number of pins that are connected to this net.
Source§

fn num_internal_nets(&self, circuit: &Self::CellId) -> usize

Return the number of nets defined inside a cell.
Source§

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 for_each_pin_instance<F>(&self, circuit_inst: &Self::CellInstId, f: F)
where F: FnMut(Self::PinInstId),

Call a function for each pin instance of the circuit instance.
Source§

fn each_internal_net_vec(&self, circuit: &Self::CellId) -> Vec<Self::NetId>

Get a Vec with all nets in this circuit.
Source§

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 template_pin(&self, pin_instance: &Self::PinInstId) -> Self::PinId

Get the ID of the template pin of this pin instance.
Source§

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_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_direction(&self, pin: &Self::PinId) -> Direction

Get the signal direction of the pin.
Source§

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)
where F: FnMut(Self::NetId),

Call a function for net of the circuit.
Source§

fn net_name(&self, net: &Self::NetId) -> Option<Self::NameType>

Get the name of the net.
Source§

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.
Source§

fn net_of_pin(&self, pin: &Self::PinId) -> Option<Self::NetId>

Get the internal net attached to this pin.
Source§

fn num_pins(&self, circuit: &Self::CellId) -> usize

Get the number of pins of a circuit.
Source§

fn parent_cell_of_net(&self, net: &Self::NetId) -> Self::CellId

Get the ID of the parent circuit of this net.
Source§

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 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 net_of_pin_instance( &self, pin_instance: &Self::PinInstId, ) -> Option<Self::NetId>

Get the external net attached to this pin instance.
Source§

fn for_each_pin<F>(&self, circuit: &Self::CellId, f: F)
where F: FnMut(Self::PinId),

Call a function for each pin of the circuit.
Source§

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 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_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 net_one(&self, parent_circuit: &Self::CellId) -> Self::NetId

Get the net of the logical constant one.
Source§

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 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 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 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§

impl<'a, T, U> NetlistEdit for Undo<'a, T, U>
where T: NetlistEdit + 'static, U: From<NetlistUndoOp<T>> + From<HierarchyUndoOp<T>>,

Source§

fn create_pin( &mut self, circuit: &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 remove_pin(&mut self, _id: &Self::PinId)

Remove the pin from this circuit and from all instances of this circuit.
Source§

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 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 rename_net( &mut self, net_id: &Self::NetId, new_name: Option<Self::NameType>, ) -> Option<Self::NameType>

Set a new name for the net. This might panic if the name already exists. Returns the old name.
Source§

fn remove_net(&mut self, _net: &Self::NetId)

Delete the net if it exists and disconnect all connected terminals.
Source§

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 connect_pin_instance( &mut self, pin: &Self::PinInstId, net: Option<Self::NetId>, ) -> Option<Self::NetId>

Connect a pin instance to a net. Returns the old connected net, if any.
Source§

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 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§

impl<'b, N, U> NetlistIds for Undo<'b, N, U>
where N: NetlistIds,

Source§

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.
Source§

type NetId = <N as NetlistIds>::NetId

Net identifier type. Uniquely identifies a net in the whole netlist.
Source§

type PinId = <N as NetlistIds>::PinId

Pin identifier type. Uniquely identifies a pin in the whole netlist.

Auto Trait Implementations§

§

impl<'a, T, U> Freeze for Undo<'a, T, U>

§

impl<'a, T, U> RefUnwindSafe for Undo<'a, T, U>

§

impl<'a, T, U> Send for Undo<'a, T, U>
where T: Send, U: Send,

§

impl<'a, T, U> Sync for Undo<'a, T, U>
where T: Sync, U: Sync,

§

impl<'a, T, U> Unpin for Undo<'a, T, U>
where U: Unpin,

§

impl<'a, T, U> !UnwindSafe for Undo<'a, T, U>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<N> HierarchyEditUtil for N
where N: HierarchyEdit,

Source§

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)

Remove the cell instance and all cells which are then not used anymore.
Source§

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 T
where T: HierarchyBase,

Source§

fn each_cell_ref(&self) -> Box<dyn Iterator<Item = CellRef<'_, Self>> + '_>

Iterate over all cell objects.
Source§

fn cell_ref(&self, cell_id: &Self::CellId) -> CellRef<'_, Self>

Get a cell object by its ID.
Source§

fn cell_instance_ref(&self, inst_id: &Self::CellInstId) -> CellInstRef<'_, Self>

Get a cell instance object by its ID.
Source§

impl<N> HierarchyUtil for N
where N: HierarchyBase,

Source§

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

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> + '_>

Iterate over all top level cells.
Source§

fn each_leaf_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>

Iterate over all leaf cells, i.e. cells which contain no other cells.
Source§

fn each_cell_bottom_to_top(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>

Iterate over topologically sorted cells (from leaf-cells to top-cells).
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<L> LayoutEditUtil for L
where L: LayoutEdit,

Source§

fn find_or_create_layer(&mut self, index: u32, datatype: u32) -> Self::LayerId

Create a layer or return an existing one.
Source§

impl<T> LayoutReferenceAccess for T
where T: LayoutBase,

Source§

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>

Get a layer object by its ID.
Source§

fn each_layer_ref(&self) -> Box<dyn Iterator<Item = LayerRef<'_, Self>> + '_>

Iterate over all layers defined in this layout.
Source§

fn layer_ref_by_name(&self, name: &str) -> Option<LayerRef<'_, Self>>

Get a layer object by the layer name.
Source§

impl<N> NetlistEditUtil for N
where N: NetlistEdit + ?Sized,

Source§

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>

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)

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
Source§

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)

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

Delete all unconnected nets in this circuit. Return number of purged nets.
Source§

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, )

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 T
where T: NetlistBase,

Source§

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>

Get a reference to a pin instance.
Source§

fn net_ref(&self, net: &Self::NetId) -> NetRef<'_, Self>

Get a reference to a net.
Source§

fn terminal_ref(&self, t: &TerminalId<Self>) -> TerminalRef<'_, Self>

Get a reference to a terminal.
Source§

impl<N> NetlistUtil for N
where N: NetlistBase,

Source§

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>),

Call a function for each terminal connected to this net.
Source§

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>

Iterate over all terminals of a net.
Source§

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> + '_>

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),

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>

Iterate over all circuit instances connected to this net. An instance is touched not more than once.
Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Write the netlist in a human readable form.
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<L> L2NBaseMT for L

Source§

impl<LN> L2NIds for LN
where LN: LayoutIds + NetlistIds,