Struct libreda_pnr::route::routing_problem::SimpleRoutingProblem
source · [−]pub struct SimpleRoutingProblem<'a, LN, RoutingGuide = ()> where
LN: L2NBase, {
pub chip: &'a LN,
pub top_cell: LN::CellId,
pub nets: Vec<LN::NetId>,
pub net_weights: HashMap<LN::NetId, f64>,
pub boundary: Option<SimpleRPolygon<LN::Coord>>,
pub routing_guides: HashMap<LN::NetId, RoutingGuide>,
}
Expand description
Simple representation of the global and detail routing problems.
Implements the RoutingProblem
traits.
Fields
chip: &'a LN
A fused layout-netlist structure.
top_cell: LN::CellId
The ID of the top cell to be routed.
nets: Vec<LN::NetId>
The IDs of the nets to be routed.
net_weights: HashMap<LN::NetId, f64>
Weights of nets for optimizing the total wire-length.
Default weight is 1.0
. A net with weight 0.0
will not be optimized for length
while a net with a high weight will be optimized for wiring length much more aggressively.
boundary: Option<SimpleRPolygon<LN::Coord>>
All routes should be contained within this boundary, if it is specified.
routing_guides: HashMap<LN::NetId, RoutingGuide>
Global routes.
Implementations
sourceimpl<'a, LN: L2NBase, RG> SimpleRoutingProblem<'a, LN, RG>
impl<'a, LN: L2NBase, RG> SimpleRoutingProblem<'a, LN, RG>
Trait Implementations
sourceimpl<'a, LN: Clone, RoutingGuide: Clone> Clone for SimpleRoutingProblem<'a, LN, RoutingGuide> where
LN: L2NBase,
LN::CellId: Clone,
LN::NetId: Clone,
LN::NetId: Clone,
LN::Coord: Clone,
LN::NetId: Clone,
impl<'a, LN: Clone, RoutingGuide: Clone> Clone for SimpleRoutingProblem<'a, LN, RoutingGuide> where
LN: L2NBase,
LN::CellId: Clone,
LN::NetId: Clone,
LN::NetId: Clone,
LN::Coord: Clone,
LN::NetId: Clone,
sourcefn clone(&self) -> SimpleRoutingProblem<'a, LN, RoutingGuide>
fn clone(&self) -> SimpleRoutingProblem<'a, LN, RoutingGuide>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a, LN: L2NBase, RG> DetailRoutingProblem<LN> for SimpleRoutingProblem<'a, LN, RG> where
RG: RoutingGuide<LN>,
impl<'a, LN: L2NBase, RG> DetailRoutingProblem<LN> for SimpleRoutingProblem<'a, LN, RG> where
RG: RoutingGuide<LN>,
type RoutingGuide = RG
type RoutingGuide = RG
Representation of a global route which guides a single net.
sourcefn routing_guide(&self, net: &LN::NetId) -> Option<&Self::RoutingGuide>
fn routing_guide(&self, net: &LN::NetId) -> Option<&Self::RoutingGuide>
Get the routing guide for this net.
sourceimpl<'a, LN, RG> RoutingProblem<LN> for SimpleRoutingProblem<'a, LN, RG> where
LN: L2NBase,
impl<'a, LN, RG> RoutingProblem<LN> for SimpleRoutingProblem<'a, LN, RG> where
LN: L2NBase,
sourcefn fused_layout_netlist(&self) -> &LN
fn fused_layout_netlist(&self) -> &LN
Get the base layout/netlist structure.
sourcefn net_weight(&self, net: &LN::NetId) -> f64
fn net_weight(&self, net: &LN::NetId) -> f64
Get the weight of a net. Default is 1.0
.
When optimizing the wire-length, the weighted wire-length should be used.
For example a weight 0.0
means that the net should not be considered for wire-length optimization.
Place and route algorithms may or may not use the net weight. Read more
sourcefn blockages(
&self
) -> Box<dyn Iterator<Item = (LN::LayerId, SimpleRPolygon<LN::Coord>)>>
fn blockages(
&self
) -> Box<dyn Iterator<Item = (LN::LayerId, SimpleRPolygon<LN::Coord>)>>
Shapes where routes should not pass.
sourcefn boundary(&self) -> Option<SimpleRPolygon<LN::Coord>>
fn boundary(&self) -> Option<SimpleRPolygon<LN::Coord>>
Routes must remain within this boundary.
sourcefn arc_weight(
&self,
_signal_source: &TerminalId<C>,
_signal_destination: &TerminalId<C>
) -> f64
fn arc_weight(
&self,
_signal_source: &TerminalId<C>,
_signal_destination: &TerminalId<C>
) -> f64
Weight of an ‘arc’, i.e. a net segment which starts at signal_source
and ends at signal_destination. Default weight is
1.0`.
Place and route algorithms may or may not use the arc weight. Read more
impl<'a, LN: L2NBase, RG> GlobalRoutingProblem<LN> for SimpleRoutingProblem<'a, LN, RG>
Auto Trait Implementations
impl<'a, LN, RoutingGuide> RefUnwindSafe for SimpleRoutingProblem<'a, LN, RoutingGuide> where
LN: RefUnwindSafe,
RoutingGuide: RefUnwindSafe,
<LN as HierarchyBase>::CellId: RefUnwindSafe,
<LN as LayoutBase>::Coord: RefUnwindSafe,
<LN as NetlistBase>::NetId: RefUnwindSafe,
impl<'a, LN, RoutingGuide> Send for SimpleRoutingProblem<'a, LN, RoutingGuide> where
LN: Sync,
RoutingGuide: Send,
<LN as HierarchyBase>::CellId: Send,
<LN as LayoutBase>::Coord: Send,
<LN as NetlistBase>::NetId: Send,
impl<'a, LN, RoutingGuide> Sync for SimpleRoutingProblem<'a, LN, RoutingGuide> where
LN: Sync,
RoutingGuide: Sync,
<LN as HierarchyBase>::CellId: Sync,
<LN as LayoutBase>::Coord: Sync,
<LN as NetlistBase>::NetId: Sync,
impl<'a, LN, RoutingGuide> Unpin for SimpleRoutingProblem<'a, LN, RoutingGuide> where
RoutingGuide: Unpin,
<LN as HierarchyBase>::CellId: Unpin,
<LN as LayoutBase>::Coord: Unpin,
<LN as NetlistBase>::NetId: Unpin,
impl<'a, LN, RoutingGuide> UnwindSafe for SimpleRoutingProblem<'a, LN, RoutingGuide> where
LN: RefUnwindSafe,
RoutingGuide: UnwindSafe,
<LN as HierarchyBase>::CellId: UnwindSafe,
<LN as LayoutBase>::Coord: UnwindSafe,
<LN as NetlistBase>::NetId: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more