Function libreda_pnr::util::netlist_validation::check_drivers_in_cell
source · pub fn check_drivers_in_cell<N: NetlistBase>(
netlist: &N,
cell: &N::CellId
) -> Result<(), (Vec<(N::NetId, Vec<TerminalId<N>>)>, Vec<N::NetId>)>Expand description
For each net in the cell check that there’s exactly one cell driving it.
The check is done only based on the pin direction as annotated in the netlist.
The internals of child cells are ignored and hence the check is not perfect: If a child cell
has an inout pin then it could be resolved by looking at the internals.
Errors are logged with log::error!().
Return Ok when no problem was found,
return Err((drive_conflicts, nets_without_drivers)) when a problem was found.
Where drive_conflicts is a list of the form [(net, [driver1 terminal, driver2 terminal, ...], ...].
nets_without_drivers is a list of nets without driver.