pub trait NetlistEdit: NetlistBase + HierarchyEdit {
    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>; fn disconnect_pin(&mut self, pin: &Self::PinId) -> Option<Self::NetId> { ... } fn disconnect_pin_instance(
        &mut self,
        pin_instance: &Self::PinInstId
    ) -> Option<Self::NetId> { ... } fn connect_terminal(
        &mut self,
        terminal: &TerminalId<Self>,
        net: Option<Self::NetId>
    ) -> Option<Self::NetId> { ... } fn disconnect_terminal(
        &mut self,
        terminal: &TerminalId<Self>
    ) -> 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

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

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

Change the name of the pin, returns the old name.

Panics

Panics when the name is already occupied.

Create a net net that lives in the parent circuit.

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

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

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

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

Provided Methods

Disconnect the pin from any connected net. Returns the old connected net, if any.

Disconnect the pin instance from any connected net. Returns the old connected net, if any.

Connect a terminal to a net. Returns the old connected net, if any.

Disconnect the terminal from any connected net. Returns the old connected net, if any.

Implementors