pub struct PlacementProblemOverlay<'a, C: L2NBase> {
pub placement_problem: &'a dyn PlacementProblem<C>,
pub initial_positions: HashMap<C::CellInstId, SimpleTransform<C::Coord>>,
pub placement_status: HashMap<C::CellInstId, PlacementStatus>,
pub net_weights: HashMap<C::NetId, f64>,
}
Expand description
Overlay data for PlacementProblem
s.
This struct takes a PlacementProblem
and stores updates of initial positions, placement status
and net weights. All values which where not set to new values default back to the underlying
PlacementProblem
.
This allows to update such values of a immutable PlacementProblem
with no cloning.
Fields
placement_problem: &'a dyn PlacementProblem<C>
Underlying placement problem.
initial_positions: HashMap<C::CellInstId, SimpleTransform<C::Coord>>
Updates for initial positions.
placement_status: HashMap<C::CellInstId, PlacementStatus>
Updates for placement status.
net_weights: HashMap<C::NetId, f64>
Updates for net weights.
Implementations
sourceimpl<'a, C: L2NBase> PlacementProblemOverlay<'a, C>
impl<'a, C: L2NBase> PlacementProblemOverlay<'a, C>
sourcepub fn new(placement_problem: &'a dyn PlacementProblem<C>) -> Self
pub fn new(placement_problem: &'a dyn PlacementProblem<C>) -> Self
Create a new overlay over placement_problem
without any updates.
The returned placement problem will return the same values but they can
be updated without changing the underlying values.
Trait Implementations
sourceimpl<'a, C: L2NBase> PlacementProblem<C> for PlacementProblemOverlay<'a, C>
impl<'a, C: L2NBase> PlacementProblem<C> for PlacementProblemOverlay<'a, C>
Representation of the placement task.
sourcefn fused_layout_netlist(&self) -> &C
fn fused_layout_netlist(&self) -> &C
Get the base layout/netlist structure.
sourcefn placement_region(&self) -> Vec<SimpleRPolygon<C::Coord>>
fn placement_region(&self) -> Vec<SimpleRPolygon<C::Coord>>
Get a list of polygons which describe where cells are allowed to be placed.
sourcefn soft_blockages(&self) -> Vec<SimpleRPolygon<C::Coord>>
fn soft_blockages(&self) -> Vec<SimpleRPolygon<C::Coord>>
Get regions which should not be used for placement but can if necessary. Overlap of cells with this regions should be minimized. Read more
sourcefn initial_position(
&self,
cell_instance: &C::CellInstId
) -> SimpleTransform<C::Coord>
fn initial_position(
&self,
cell_instance: &C::CellInstId
) -> SimpleTransform<C::Coord>
Get the position of a cell instance which should be used as an initial value for the optimization. This is most likely the output of the previous placement step. Read more
sourcefn placement_status(&self, cell_instance: &C::CellInstId) -> PlacementStatus
fn placement_status(&self, cell_instance: &C::CellInstId) -> PlacementStatus
Tell if the cell instance can be moved by the placement engine.
sourcefn cell_outline(&self, cell: &C::CellId) -> Option<Rect<C::Coord>>
fn cell_outline(&self, cell: &C::CellId) -> Option<Rect<C::Coord>>
Get the abutment box / outline of the cell.
sourcefn net_weight(&self, net: &C::NetId) -> f64
fn net_weight(&self, net: &C::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. Read more
sourcefn cell_instance_outline(
&self,
cell_instance: &C::CellInstId
) -> Option<Rect<C::Coord>>
fn cell_instance_outline(
&self,
cell_instance: &C::CellInstId
) -> Option<Rect<C::Coord>>
Get the abutment box / outline of the cell instance.
sourcefn get_fixed_instances(&self) -> HashSet<C::CellInstId>
fn get_fixed_instances(&self) -> HashSet<C::CellInstId>
TODO: fn arc_weight(&self, arc: &ArcId
sourcefn get_movable_instances(&self) -> HashSet<C::CellInstId>
fn get_movable_instances(&self) -> HashSet<C::CellInstId>
Get the set of movable cell instances.
Auto Trait Implementations
impl<'a, C> !RefUnwindSafe for PlacementProblemOverlay<'a, C>
impl<'a, C> !Send for PlacementProblemOverlay<'a, C>
impl<'a, C> !Sync for PlacementProblemOverlay<'a, C>
impl<'a, C> Unpin for PlacementProblemOverlay<'a, C> where
<C as HierarchyBase>::CellInstId: Unpin,
<C as LayoutBase>::Coord: Unpin,
<C as NetlistBase>::NetId: Unpin,
impl<'a, C> !UnwindSafe for PlacementProblemOverlay<'a, C>
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