pub struct SimpleBufferInsertionEngine {
    pub inverting_buffer_cell: String,
    pub max_fanout: u32,
}
Expand description

Simple buffer tree generator. This generator creates buffer trees consisting of a single type of inverter cell.

The algorithm works as follows:

  • Create clusters of the sink terminals based on their location. Each cluster must have maximum size max_fanout. Cluster sizes should be balanced.
  • Insert a buffer to drive each cluster. Place the buffer at the ‘center of mass’ of the terminals, or such that the quadratic distance to the sinks is minimized.
  • Repeat the same with the newly inserted buffers until the fan out limit is satisfied.
  • Make sure that the signal is not being inverted by adding another buffer when necessary.

Caveats

This algorithm assumes that the sinks are small standard-cells. This allows to easily find the rough location of the actual pin shape by assuming it is equal to the position of the cell. For large macro blocks this will not yield good results since the pins are substantially far away from the center of the cell.

Fields§

§inverting_buffer_cell: String

The name of the inverting buffer cell to be used in the buffer tree.

§max_fanout: u32

Maximal number of cells that should be driven by a buffer cell. Must be larger than 1.

Implementations§

source§

impl SimpleBufferInsertionEngine

source

fn insert_buffers_recursive<LN: NetlistEdit + LayoutEdit>( &self, chip: &mut LN, signal_source: TerminalId<LN>, signal_sinks: &Vec<TerminalId<LN>>, need_inversion: bool ) -> Result<(Vec<LN::CellInstId>, Vec<LN::NetId>), ()>where LN::Coord: PrimInt,

All terminals must be in the same parent cell.

  • need_inversion: Force the insertion of an inverter even if no buffer needs to be inserted.
Panics

Panics when

  • The buffer cell cannot be found.
  • The source terminal is not connected to a net.
  • The sinks are not all connected to the same net as the source.

Trait Implementations§

source§

impl Clone for SimpleBufferInsertionEngine

source§

fn clone(&self) -> SimpleBufferInsertionEngine

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SimpleBufferInsertionEngine

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<LN: NetlistEdit + LayoutEdit> SimpleBufferInsertion<LN> for SimpleBufferInsertionEnginewhere LN::Coord: PrimInt,

source§

fn insert_buffers( &self, chip: &mut LN, signal_source: TerminalId<LN>, signal_sinks: &Vec<TerminalId<LN>> ) -> Result<(Vec<LN::CellInstId>, Vec<LN::NetId>), Self::Error>

All terminals must be in the same parent cell.

§

type Error = ()

Error type that is returned on failure.
§

fn add_buffer_tree_on_net( &self, chip: &mut LN, net: &<LN as NetlistIds>::NetId ) -> Result<(Vec<<LN as HierarchyIds>::CellInstId, Global>, Vec<<LN as NetlistIds>::NetId, Global>), Self::Error>

Replace the net by a buffer tree. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.