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. None is returned when net is not connected to any pins or pin instances.