Struct libreda_db::netlist::hashmap_netlist::HashMapNetlist [−][src]
A netlist is the container of circuits.
Implementations
impl HashMapNetlist
[src]
pub fn circuit(&self, id: &CircuitId) -> &Circuit
[src]
Get a circuit reference by its ID.
pub fn circuit_inst(&self, id: &CircuitInstId) -> &CircuitInst
[src]
Get a reference to a circuit instance.
pub fn net(&self, id: &NetId) -> &Net
[src]
Get a reference to a net by its ID.
pub fn pin(&self, id: &PinId) -> &Pin
[src]
Get a reference to a pin by its ID.
pub fn pin_inst(&self, id: &PinInstId) -> &PinInst
[src]
Get a reference to a pin instance by its ID.
pub fn circuit_inst_nets(
&self,
circuit_inst_id: &CircuitInstId
) -> impl Iterator<Item = NetId> + '_
[src]
&self,
circuit_inst_id: &CircuitInstId
) -> impl Iterator<Item = NetId> + '_
Get all nets that are connected to the circuit instance.
pub fn pins_for_net(&self, net: &NetId) -> impl Iterator<Item = PinId> + '_
[src]
Iterate over all pins connected to a net.
pub fn pins_instances_for_net(
&self,
net: &NetId
) -> impl Iterator<Item = PinInstId> + '_
[src]
&self,
net: &NetId
) -> impl Iterator<Item = PinInstId> + '_
Iterate over all pin instances connected to a net.
pub fn terminals_for_net(
&self,
net: &NetId
) -> impl Iterator<Item = TerminalId> + '_
[src]
&self,
net: &NetId
) -> impl Iterator<Item = TerminalId> + '_
Iterate over all pins and pin instances connected to a net.
pub fn purge_nets(&mut self) -> usize
[src]
Remove all unconnected nets. Return number of purged nets.
pub fn top_circuit_count(&self) -> usize
[src]
Return number of top level circuits (roots of the circuit tree).
pub fn each_net(&self) -> impl Iterator<Item = NetId> + '_
[src]
Iterate through all nets that are defined in the netlist.
Trait Implementations
impl Debug for HashMapNetlist
[src]
impl Default for HashMapNetlist
[src]
fn default() -> HashMapNetlist
[src]
impl NetlistBase for HashMapNetlist
[src]
type NameType = RcString
Type for names of circuits, instances, pins, etc.
type PinId = PinId
Pin identifier type.
type PinInstId = PinInstId
Pin instance identifier type. A pin instance is a pin of a circuit instance. Read more
type TerminalId = TerminalId
Either a pin or a pin instance ID.
type CircuitId = CircuitId
Circuit identifier type.
type CircuitInstId = CircuitInstId
Circuit instance identifier type.
type NetId = NetId
Net identifier type.
fn new() -> Self
[src]
Create an empty netlist.
fn circuit_by_name<S: ?Sized + Eq + Hash>(&self, name: &S) -> Option<CircuitId> where
Self::NameType: Borrow<S>,
[src]
Self::NameType: Borrow<S>,
Find a circuit by its name.
fn circuit_instance_by_name<N: ?Sized + Eq + Hash>(
&self,
parent_circuit: &Self::CircuitId,
name: &N
) -> Option<Self::CircuitInstId> where
Self::NameType: Borrow<N>,
[src]
&self,
parent_circuit: &Self::CircuitId,
name: &N
) -> Option<Self::CircuitInstId> where
Self::NameType: Borrow<N>,
fn template_circuit(
&self,
circuit_instance: &Self::CircuitInstId
) -> Self::CircuitId
[src]
&self,
circuit_instance: &Self::CircuitInstId
) -> Self::CircuitId
fn template_pin(&self, pin_instance: &Self::PinInstId) -> Self::PinId
[src]
fn pin_direction(&self, pin: &Self::PinId) -> Direction
[src]
fn pin_name(&self, pin: &Self::PinId) -> Self::NameType
[src]
fn pin_by_name<N: ?Sized + Eq + Hash>(
&self,
parent_circuit: &Self::CircuitId,
name: &N
) -> Option<Self::PinId> where
Self::NameType: Borrow<N>,
[src]
&self,
parent_circuit: &Self::CircuitId,
name: &N
) -> Option<Self::PinId> where
Self::NameType: Borrow<N>,
fn parent_circuit(
&self,
circuit_instance: &Self::CircuitInstId
) -> Self::CircuitId
[src]
&self,
circuit_instance: &Self::CircuitInstId
) -> Self::CircuitId
fn parent_circuit_of_pin(&self, pin: &Self::PinId) -> Self::CircuitId
[src]
fn parent_of_pin_instance(
&self,
pin_inst: &Self::PinInstId
) -> Self::CircuitInstId
[src]
&self,
pin_inst: &Self::PinInstId
) -> Self::CircuitInstId
fn net_of_pin(&self, pin: &Self::PinId) -> Option<Self::NetId>
[src]
Get the net connected to this pin.
fn net_of_pin_instance(&self, pin_inst: &Self::PinInstId) -> Option<Self::NetId>
[src]
Get the net connected to this pin instance.
fn net_zero(&self, parent_circuit: &Self::CircuitId) -> Self::NetId
[src]
fn net_one(&self, parent_circuit: &Self::CircuitId) -> Self::NetId
[src]
fn net_by_name<N: ?Sized + Eq + Hash>(
&self,
parent_circuit: &Self::CircuitId,
name: &N
) -> Option<Self::NetId> where
Self::NameType: Borrow<N>,
[src]
&self,
parent_circuit: &Self::CircuitId,
name: &N
) -> Option<Self::NetId> where
Self::NameType: Borrow<N>,
fn net_name(&self, net: &Self::NetId) -> Option<Self::NameType>
[src]
fn circuit_name(&self, circuit: &Self::CircuitId) -> Self::NameType
[src]
fn circuit_instance_name(
&self,
circuit_inst: &Self::CircuitInstId
) -> Option<Self::NameType>
[src]
&self,
circuit_inst: &Self::CircuitInstId
) -> Option<Self::NameType>
fn for_each_circuit<F>(&self, f: F) where
F: FnMut(Self::CircuitId),
[src]
F: FnMut(Self::CircuitId),
fn each_circuit(&self) -> Box<dyn Iterator<Item = CircuitId>>
[src]
Iterate over all circuits.
fn for_each_instance<F>(&self, circuit: &Self::CircuitId, f: F) where
F: FnMut(Self::CircuitInstId),
[src]
F: FnMut(Self::CircuitInstId),
fn each_instance(
&self,
circuit: &Self::CircuitId
) -> Box<dyn Iterator<Item = Self::CircuitInstId>>
[src]
&self,
circuit: &Self::CircuitId
) -> Box<dyn Iterator<Item = Self::CircuitInstId>>
fn for_each_circuit_dependency<F>(&self, circuit: &Self::CircuitId, f: F) where
F: FnMut(Self::CircuitId),
[src]
F: FnMut(Self::CircuitId),
fn each_circuit_dependency(
&self,
circuit: &Self::CircuitId
) -> Box<dyn Iterator<Item = Self::CircuitId>>
[src]
&self,
circuit: &Self::CircuitId
) -> Box<dyn Iterator<Item = Self::CircuitId>>
fn for_each_dependent_circuit<F>(&self, circuit: &Self::CircuitId, f: F) where
F: FnMut(Self::CircuitId),
[src]
F: FnMut(Self::CircuitId),
fn each_dependent_circuit(
&self,
circuit: &Self::CircuitId
) -> Box<dyn Iterator<Item = Self::CircuitId>>
[src]
&self,
circuit: &Self::CircuitId
) -> Box<dyn Iterator<Item = Self::CircuitId>>
fn for_each_reference<F>(&self, circuit: &Self::CircuitId, f: F) where
F: FnMut(Self::CircuitInstId),
[src]
F: FnMut(Self::CircuitInstId),
fn each_reference(
&self,
circuit: &Self::CircuitId
) -> Box<dyn Iterator<Item = Self::CircuitInstId>>
[src]
&self,
circuit: &Self::CircuitId
) -> Box<dyn Iterator<Item = Self::CircuitInstId>>
fn for_each_pin<F>(&self, circuit: &Self::CircuitId, f: F) where
F: FnMut(Self::PinId),
[src]
F: FnMut(Self::PinId),
fn each_pin(&self, circuit_id: &CircuitId) -> Box<dyn Iterator<Item = PinId>>
[src]
Iterate over all pins of a circuit.
fn for_each_pin_instance<F>(&self, circuit_inst: &Self::CircuitInstId, f: F) where
F: FnMut(Self::PinInstId),
[src]
F: FnMut(Self::PinInstId),
fn each_pin_instance<'a>(
&'a self,
circuit_inst: &Self::CircuitInstId
) -> Box<dyn Iterator<Item = Self::PinInstId> + 'a>
[src]
&'a self,
circuit_inst: &Self::CircuitInstId
) -> Box<dyn Iterator<Item = Self::PinInstId> + 'a>
fn for_each_internal_net<F>(&self, circuit: &Self::CircuitId, f: F) where
F: FnMut(Self::NetId),
[src]
F: FnMut(Self::NetId),
fn each_internal_net(
&self,
circuit: &Self::CircuitId
) -> Box<dyn Iterator<Item = Self::NetId>>
[src]
&self,
circuit: &Self::CircuitId
) -> Box<dyn Iterator<Item = Self::NetId>>
fn num_child_instances(&self, circuit: &Self::CircuitId) -> usize
[src]
fn num_circuits(&self) -> usize
[src]
fn num_pins(&self, circuit: &Self::CircuitId) -> usize
[src]
fn for_each_pin_of_net<F>(&self, net: &Self::NetId, f: F) where
F: FnMut(Self::PinId),
[src]
F: FnMut(Self::PinId),
fn each_pin_of_net<'a>(
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = Self::PinId> + 'a>
[src]
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = Self::PinId> + 'a>
fn for_each_pin_instance_of_net<F>(&self, net: &Self::NetId, f: F) where
F: FnMut(Self::PinInstId),
[src]
F: FnMut(Self::PinInstId),
fn each_pin_instance_of_net<'a>(
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = Self::PinInstId> + 'a>
[src]
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = Self::PinInstId> + 'a>
fn each_circuit_vec(&self) -> Vec<Self::CircuitId>
[src]
fn each_instance_vec(
&self,
circuit: &Self::CircuitId
) -> Vec<Self::CircuitInstId>
[src]
&self,
circuit: &Self::CircuitId
) -> Vec<Self::CircuitInstId>
fn each_circuit_dependency_vec(
&self,
circuit: &Self::CircuitId
) -> Vec<Self::CircuitId>
[src]
&self,
circuit: &Self::CircuitId
) -> Vec<Self::CircuitId>
fn each_dependent_circuit_vec(
&self,
circuit: &Self::CircuitId
) -> Vec<Self::CircuitId>
[src]
&self,
circuit: &Self::CircuitId
) -> Vec<Self::CircuitId>
fn each_reference_vec(
&self,
circuit: &Self::CircuitId
) -> Vec<Self::CircuitInstId>
[src]
&self,
circuit: &Self::CircuitId
) -> Vec<Self::CircuitInstId>
fn each_pin_vec(&self, circuit: &Self::CircuitId) -> Vec<Self::PinId>
[src]
fn each_pin_instance_vec(
&self,
circuit_instance: &Self::CircuitInstId
) -> Vec<Self::PinInstId>
[src]
&self,
circuit_instance: &Self::CircuitInstId
) -> Vec<Self::PinInstId>
fn each_external_net<'a>(
&'a self,
circuit_instance: &Self::CircuitInstId
) -> Box<dyn Iterator<Item = Self::NetId> + 'a>
[src]
&'a self,
circuit_instance: &Self::CircuitInstId
) -> Box<dyn Iterator<Item = Self::NetId> + 'a>
fn each_internal_net_vec(&self, circuit: &Self::CircuitId) -> Vec<Self::NetId>
[src]
fn num_net_pins(&self, net: &Self::NetId) -> usize
[src]
fn num_net_pin_instances(&self, net: &Self::NetId) -> usize
[src]
fn num_net_terminals(&self, net: &Self::NetId) -> usize
[src]
fn num_references(&self, circuit: &Self::CircuitId) -> usize
[src]
fn each_pin_of_net_vec(&self, net: &Self::NetId) -> Vec<Self::PinId>
[src]
fn each_pin_instance_of_net_vec(
&self,
net: &Self::NetId
) -> Vec<Self::PinInstId>
[src]
&self,
net: &Self::NetId
) -> Vec<Self::PinInstId>
fn for_each_circuit_instance_of_net<F>(&self, net: &Self::NetId, f: F) where
F: FnMut(Self::CircuitInstId),
[src]
F: FnMut(Self::CircuitInstId),
fn each_circuit_instance_of_net_vec(
&self,
net: &Self::NetId
) -> Vec<Self::CircuitInstId>
[src]
&self,
net: &Self::NetId
) -> Vec<Self::CircuitInstId>
fn circuit(&self, id: Self::CircuitId) -> Box<dyn CircuitRef<N = Self>> where
Self: Sized,
[src]
Self: Sized,
fn circuit_inst(
&self,
id: Self::CircuitInstId
) -> Box<dyn CircuitInstRef<N = Self>> where
Self: Sized,
[src]
&self,
id: Self::CircuitInstId
) -> Box<dyn CircuitInstRef<N = Self>> where
Self: Sized,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
[src]
impl NetlistEdit for HashMapNetlist
[src]
fn create_circuit(
&mut self,
name: Self::NameType,
pins: Vec<(Self::NameType, Direction)>
) -> CircuitId
[src]
&mut self,
name: Self::NameType,
pins: Vec<(Self::NameType, Direction)>
) -> CircuitId
Create a new circuit with a given list of pins.
fn remove_circuit(&mut self, circuit_id: &CircuitId)
[src]
Remove all instances inside the circuit,
fn create_circuit_instance(
&mut self,
parent: &CircuitId,
circuit_template: &CircuitId,
name: Option<Self::NameType>
) -> CircuitInstId
[src]
&mut self,
parent: &CircuitId,
circuit_template: &CircuitId,
name: Option<Self::NameType>
) -> CircuitInstId
Create a new instance of circuit_template
in the parent
circuit.
fn remove_circuit_instance(&mut self, circuit_inst_id: &CircuitInstId)
[src]
Remove a circuit instance after disconnecting it from the nets.
fn create_net(
&mut self,
parent: &CircuitId,
name: Option<Self::NameType>
) -> NetId
[src]
&mut self,
parent: &CircuitId,
name: Option<Self::NameType>
) -> NetId
Create a new net in the parent
circuit.
fn rename_net(
&mut self,
parent_circuit: &Self::CircuitId,
net_id: &Self::NetId,
new_name: Option<Self::NameType>
)
[src]
&mut self,
parent_circuit: &Self::CircuitId,
net_id: &Self::NetId,
new_name: Option<Self::NameType>
)
fn remove_net(&mut self, net: &NetId)
[src]
Disconnect all connected terminals and remove the net.
fn connect_pin(&mut self, pin: &PinId, net: Option<NetId>) -> Option<NetId>
[src]
Connect the pin to a net.
fn connect_pin_instance(
&mut self,
pin: &PinInstId,
net: Option<NetId>
) -> Option<Self::NetId>
[src]
&mut self,
pin: &PinInstId,
net: Option<NetId>
) -> Option<Self::NetId>
Connect the pin to a net.
fn disconnect_pin(&mut self, pin: &Self::PinId) -> Option<Self::NetId>
[src]
fn disconnect_pin_instance(
&mut self,
pin_instance: &Self::PinInstId
) -> Option<Self::NetId>
[src]
&mut self,
pin_instance: &Self::PinInstId
) -> Option<Self::NetId>
fn replace_net(&mut self, old_net: &Self::NetId, new_net: &Self::NetId)
[src]
fn flatten_circuit_instance(&mut self, circuit_instance: &Self::CircuitInstId)
[src]
fn flatten_circuit(&mut self, circuit: &Self::CircuitId)
[src]
fn purge_nets_in_circuit(&mut self, circuit_id: &Self::CircuitId) -> usize
[src]
fn purge_nets(&mut self) -> usize
[src]
Auto Trait Implementations
impl !RefUnwindSafe for HashMapNetlist
impl !Send for HashMapNetlist
impl !Sync for HashMapNetlist
impl Unpin for HashMapNetlist
impl UnwindSafe for HashMapNetlist
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,