Struct libreda_pnr::db::Net[][src]

pub struct Net { /* fields omitted */ }

Copied from KLayout: A single net. A net connects multiple pins or terminals together. Pins are either pin or subcircuits of outgoing pins of the circuit the net lives in. Terminals are connections made to specific terminals of devices. Net objects are created inside a circuit with Circuit#create_net. To connect a net to an outgoing pin of a circuit, use Circuit#connect_pin, to disconnect a net from an outgoing pin use Circuit#disconnect_pin. To connect a net to a pin of a subcircuit, use SubCircuit#connect_pin, to disconnect a net from a pin of a subcircuit, use SubCircuit#disconnect_pin. To connect a net to a terminal of a device, use Device#connect_terminal, to disconnect a net from a terminal of a device, use Device#disconnect_terminal.

Implementations

impl Net[src]

pub fn name(&self) -> Option<String>[src]

Return the name of this net.

pub fn create_name(&self) -> String[src]

Return the name of this net or if it is None create a name based on the net ID. TODO: There is no guarantee yet that this name is collision free.

pub fn create_qname(&self) -> String[src]

Return a qualified name of this net of the form CIRCUIT_NAME:NET_NAME. TODO: There is no guarantee yet that this name is collision free.

pub fn rename<S>(&self, name: Option<S>) where
    S: Into<String>, 
[src]

Rename the net

Panics

  • Panics if there is already a net with this name.

pub fn id(&self) -> Index<Net>[src]

Get the index of this net. The index uniquely identifies this net within the circuit.

pub fn pins(&self) -> impl Deref<Target = HashSet<Rc<Pin>, RandomState>>[src]

Get borrowed reference to the set of pins.

pub fn pins_instances(
    &self
) -> impl Deref<Target = HashSet<Rc<PinInstance>, RandomState>>
[src]

Get borrowed reference to the set of pin instances.

pub fn each_terminal(&self) -> impl Iterator<Item = TerminalRef>[src]

Iterate over all pins and pin instances connected to this net.

pub fn each_pin_instance(&self) -> impl Iterator<Item = Rc<PinInstance>>[src]

Iterate over all pin instances connected to this net.

pub fn each_pin(&self) -> impl Iterator<Item = Rc<Pin>>[src]

Iterate over all pins connected to this net.

pub fn each_instance(&self) -> impl Iterator<Item = Rc<CircuitInstance>>[src]

Find each circuit instance that is connected to this net.

pub fn parent_circuit(&self) -> Weak<Circuit>[src]

Get the circuit where this net lives in.

pub fn num_pins(&self) -> usize[src]

Return the number of pins connected to this net.

pub fn num_pin_instances(&self) -> usize[src]

Return the number of pin instances connected to this net.

pub fn num_terminals(&self) -> usize[src]

Return the number of terminals (pins and pin instances) connected to this net.

Trait Implementations

impl Debug for Net[src]

impl Eq for Net[src]

impl Hash for Net[src]

impl PartialEq<Net> for Net[src]

pub fn eq(&self, other: &Net) -> bool[src]

A net is considered equal if the ID and parent circuit are identical.

Auto Trait Implementations

impl !RefUnwindSafe for Net

impl !Send for Net

impl !Sync for Net

impl Unpin for Net

impl !UnwindSafe for Net

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.