LEFDesignRuleAdapter

Struct LEFDesignRuleAdapter 

Source
pub struct LEFDesignRuleAdapter<'a, L: LayoutBase> { /* private fields */ }
Expand description

Provides standardized read access to the design-rules defined in a LEF structure.

Implementations§

Source§

impl<'a, L> LEFDesignRuleAdapter<'a, L>

Source

pub fn new(lef: &'a LEF, layout: &L) -> Self

Create a new design rule adapter for a LEF data structure. Derives the mapping from layer IDs and LEF layers based on the layer names.

Source

pub fn new_from_layer_mapping( lef: &'a LEF, layer_ids_by_name: &HashMap<String, L::LayerId>, dbu: f64, ) -> Self

Create a new design rule adapter for a LEF data structure with a custom mapping between layer names and layer IDs.

Trait Implementations§

Source§

impl<'a, L> DefaultWidth for LEFDesignRuleAdapter<'a, L>

Source§

fn default_width( &self, layer_id: &Self::LayerId, shape_length: Option<Self::Distance>, ) -> Option<Self::Distance>

Default width of a wire segment of a certain length.
Source§

impl<'a, L: LayoutBase> DistanceRuleBase for LEFDesignRuleAdapter<'a, L>

Source§

type Distance = <L as LayoutIds>::Coord

Type used to express distances.
Source§

type Area = <L as LayoutIds>::Coord

Type used to express areas.
Source§

impl<'a, L: LayoutBase> MinimumSpacing for LEFDesignRuleAdapter<'a, L>

Source§

fn min_spacing_absolute( &self, layer_id: &Self::LayerId, ) -> Option<Self::Distance>

Absolute minimum spacing between two shapes on the layer.
Source§

fn min_spacing( &self, layer_id: &Self::LayerId, run_length: Self::Distance, width: Self::Distance, ) -> Option<Self::Distance>

Minimum spacing between two shapes on the layer dependent on the geometries.
Source§

impl<'a, L> MinimumWidth for LEFDesignRuleAdapter<'a, L>

Source§

fn min_width( &self, layer_id: &Self::LayerId, shape_length: Option<Self::Distance>, ) -> Option<Self::Distance>

Minimal width of a shape with a certain length.
Source§

impl<'a, L: LayoutBase> PreferredRoutingDirection for LEFDesignRuleAdapter<'a, L>

Source§

fn preferred_routing_direction( &self, layer_id: &Self::LayerId, ) -> Option<Orientation2D>

Get the preferred routing direction on this metal layer.
Source§

impl<'a, L: LayoutBase> RoutingLayerStack for LEFDesignRuleAdapter<'a, L>

Source§

fn layer_stack(&self) -> Vec<RoutingLayer<Self::LayerId>>

Get the stack of routing and via layers in process order.
Source§

fn layer_stack_ids(&self) -> Vec<Self::LayerId>

Get the layer ids of the layer stack (routing layers and via layers).
Source§

fn routing_layer_stack(&self) -> Vec<Self::LayerId>

Get the stack of routing metal layers in process order.
Source§

fn via_layer_stack(&self) -> Vec<Self::LayerId>

Get the stack of via layers in process order.
Source§

fn get_upper_metal_layer(&self, layer: &Self::LayerId) -> Option<Self::LayerId>

Find the closest metal layer above the given layer.
Source§

fn get_lower_metal_layer(&self, layer: &Self::LayerId) -> Option<Self::LayerId>

Find the closest metal layer under the given layer.
Source§

impl<'a, L> RoutingRules for LEFDesignRuleAdapter<'a, L>

Source§

fn default_pitch( &self, layer_id: &Self::LayerId, ) -> Option<(Self::Distance, Self::Distance)>

Get the default routing pitch on this layer for x and y directions.
Source§

fn default_pitch_preferred_direction( &self, layer: &Self::LayerId, ) -> Option<Self::Distance>

Get the default routing pitch for wires with the preferred routing direction. Return None if no default pitch or no routing direction is defined for this layer.
Source§

impl<'a, L: LayoutBase> RuleBase for LEFDesignRuleAdapter<'a, L>

Source§

type LayerId = <L as LayoutIds>::LayerId

Type used as layer identifier.

Auto Trait Implementations§

§

impl<'a, L> Freeze for LEFDesignRuleAdapter<'a, L>

§

impl<'a, L> RefUnwindSafe for LEFDesignRuleAdapter<'a, L>

§

impl<'a, L> Send for LEFDesignRuleAdapter<'a, L>
where L: Send, <L as LayoutIds>::LayerId: Send,

§

impl<'a, L> Sync for LEFDesignRuleAdapter<'a, L>
where L: Sync, <L as LayoutIds>::LayerId: Sync,

§

impl<'a, L> Unpin for LEFDesignRuleAdapter<'a, L>
where L: Unpin, <L as LayoutIds>::LayerId: Unpin,

§

impl<'a, L> UnwindSafe for LEFDesignRuleAdapter<'a, L>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.