Trait libreda_db::layout::traits::LayoutBase[][src]

pub trait LayoutBase {
    type Coord: CoordinateType;
    type NameType: Eq + Hash + From<String> + Clone + Borrow<String> + Borrow<str>;
    type LayerId: Eq + Hash + Clone;
    type CellId: Eq + Hash + Clone;
    type CellInstId: Eq + Hash + Clone;
    fn new() -> Self;
fn cell_by_name<N: ?Sized + Eq + Hash>(
        &self,
        name: &N
    ) -> Option<Self::CellId>
    where
        Self::NameType: Borrow<N>
;
fn each_cell<'a>(&'a self) -> Box<dyn Iterator<Item = Self::CellId> + 'a>;
fn each_cell_instance<'a>(
        &'a self,
        cell: &Self::CellId
    ) -> Box<dyn Iterator<Item = Self::CellInstId> + 'a>;
fn each_dependent_cell<'a>(
        &'a self,
        cell: &Self::CellId
    ) -> Box<dyn Iterator<Item = Self::CellId> + 'a>;
fn each_cell_dependency<'a>(
        &'a self,
        cell: &Self::CellId
    ) -> Box<dyn Iterator<Item = Self::CellId> + 'a>;
fn parent_cell(&self, circuit_instance: &Self::CellInstId) -> Self::CellId;
fn template_cell(&self, circuit_instance: &Self::CellInstId) -> Self::CellId;
fn find_layer(&self, index: UInt, datatype: UInt) -> Option<Self::LayerId>; }

Most basic trait of a layout.

Associated Types

type Coord: CoordinateType[src]

Number type used for coordinates.

type NameType: Eq + Hash + From<String> + Clone + Borrow<String> + Borrow<str>[src]

Type for names of circuits, instances, pins, etc.

type LayerId: Eq + Hash + Clone[src]

Layer identifier type.

type CellId: Eq + Hash + Clone[src]

Cell/module identifier type.

type CellInstId: Eq + Hash + Clone[src]

Cell instance identifier type.

Loading content...

Required methods

fn new() -> Self[src]

Create a new empty netlist.

fn cell_by_name<N: ?Sized + Eq + Hash>(&self, name: &N) -> Option<Self::CellId> where
    Self::NameType: Borrow<N>, 
[src]

Find a cell by its name. Return the cell with the given name. Returns None if the cell does not exist.

fn each_cell<'a>(&'a self) -> Box<dyn Iterator<Item = Self::CellId> + 'a>[src]

Iterate over all cells.

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

Iterate over all child instance in a cell.

fn each_dependent_cell<'a>(
    &'a self,
    cell: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellId> + 'a>
[src]

Iterate over all cells that contain a child of type cell.

fn each_cell_dependency<'a>(
    &'a self,
    cell: &Self::CellId
) -> Box<dyn Iterator<Item = Self::CellId> + 'a>
[src]

Iterate over all cells types that are instantiated in this cell.

fn parent_cell(&self, circuit_instance: &Self::CellInstId) -> Self::CellId[src]

Get the ID of the parent cell of this instance.

fn template_cell(&self, circuit_instance: &Self::CellInstId) -> Self::CellId[src]

Get the ID of the template cell of this instance.

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

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

Loading content...

Implementors

impl<C: CoordinateType> LayoutBase for Layout<C>[src]

type Coord = C

type NameType = RcString

type LayerId = LayerId

type CellId = CellId<C>

type CellInstId = CellInstId<C>

Loading content...