Trait libreda_pnr::place::placement_problem::PlacementProblem
source · pub trait PlacementProblem<C: L2NBase> {
// Required methods
fn fused_layout_netlist(&self) -> &C;
fn top_cell(&self) -> C::CellId;
fn placement_region(&self) -> Vec<SimpleRPolygon<C::Coord>>;
fn initial_position(
&self,
cell_instance: &C::CellInstId
) -> SimpleTransform<C::Coord>;
fn placement_status(&self, cell_instance: &C::CellInstId) -> PlacementStatus;
fn cell_outline(&self, cell: &C::CellId) -> Option<Rect<C::Coord>>;
// Provided methods
fn soft_blockages(&self) -> Vec<SimpleRPolygon<C::Coord>> { ... }
fn cell_instance_outline(
&self,
cell_instance: &C::CellInstId
) -> Option<Rect<C::Coord>> { ... }
fn net_weight(&self, _net: &C::NetId) -> f64 { ... }
fn get_fixed_instances(&self) -> HashSet<C::CellInstId> { ... }
fn get_movable_instances(&self) -> HashSet<C::CellInstId> { ... }
}
Expand description
Representation of the placement task.
Required Methods§
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 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.
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.
Provided Methods§
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.
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 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.
sourcefn get_fixed_instances(&self) -> HashSet<C::CellInstId>
fn get_fixed_instances(&self) -> HashSet<C::CellInstId>
Get the set of fixed instances.
sourcefn get_movable_instances(&self) -> HashSet<C::CellInstId>
fn get_movable_instances(&self) -> HashSet<C::CellInstId>
Get the set of movable cell instances.
Implementors§
impl<'a, C: L2NBase> PlacementProblem<C> for SimpleDesignRef<'a, C>
impl<'a, C: L2NBase> PlacementProblem<C> for PlacementProblemOverlay<'a, C>
Representation of the placement task.