Module libreda_pnr::metrics::wirelength_estimation
source · Expand description
Estimate wire lengths.
Example
Get the wire length estimation of a cell without any net.
use libreda_pnr::db;
use libreda_pnr::db::traits::*;
use libreda_pnr::metrics::wirelength_estimation;
let mut chip = db::Chip::new();
let cell_top = chip.create_cell("TOP".to_string());
let wire_length: i32 = wirelength_estimation::hpwl(&chip.cell_ref(&cell_top));
assert_eq!(wire_length, 0)Functions
- Compute the half-perimeter wire length estimation for the cell
top. Returns the sum of half-perimeters of each nets bounding box. Respects the pin locations at sub cells (instead of just taking the sub cell location). - Compute the half-perimeter wire length of a single net.
- Get the bounding box around all the pins connected to
net.Noneis returned whennetis not connected to any pins or pin instances. - Get an point-like approximation of a absolute pin instance location.
- Get an point-like approximation of a pin location (relative to the cell). If the pin has no shapes defined, return
(0, 0).