pub trait NetlistEdit: NetlistBase + HierarchyEdit {
    // Required methods
    fn create_pin(
        &mut self,
        cell: &Self::CellId,
        name: Self::NameType,
        direction: Direction
    ) -> Self::PinId;
    fn remove_pin(&mut self, id: &Self::PinId);
    fn rename_pin(
        &mut self,
        pin: &Self::PinId,
        new_name: Self::NameType
    ) -> Self::NameType;
    fn create_net(
        &mut self,
        parent: &Self::CellId,
        name: Option<Self::NameType>
    ) -> Self::NetId;
    fn rename_net(
        &mut self,
        net_id: &Self::NetId,
        new_name: Option<Self::NameType>
    ) -> Option<Self::NameType>;
    fn remove_net(&mut self, net: &Self::NetId);
    fn connect_pin(
        &mut self,
        pin: &Self::PinId,
        net: Option<Self::NetId>
    ) -> Option<Self::NetId>;
    fn connect_pin_instance(
        &mut self,
        pin: &Self::PinInstId,
        net: Option<Self::NetId>
    ) -> Option<Self::NetId>;

    // Provided methods
    fn disconnect_pin(&mut self, pin: &Self::PinId) -> Option<Self::NetId> { ... }
    fn disconnect_pin_instance(
        &mut self,
        pin_instance: &Self::PinInstId
    ) -> Option<Self::NetId> { ... }
}
Expand description

Trait for netlists that support editing.

This includes:

  • creation and removal of pins and nets
  • connecting pins and pin instances to nets
  • renaming nets
  • renaming pins

More complex operations which can be build on top of the basic operations are provided by the NetlistEditUtil trait.

Required Methods§

source

fn create_pin( &mut self, cell: &Self::CellId, name: Self::NameType, direction: Direction ) -> Self::PinId

Create a new pin in this cell. Also adds the pin to all instances of the cell.

source

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

Panics

Panics when the name is already occupied.

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.

Provided Methods§

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.

Implementors§

source§

impl NetlistEdit for Chip

source§

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

source§

impl<'b, N> NetlistEdit for RegionSearchAdapter<'b, N>where N: LayoutBase + NetlistEdit + 'static, N::Coord: PrimInt + Signed + Debug,

source§

impl<'b, N: NetlistEdit + 'static> NetlistEdit for DBPerf<'b, N>