Trait libreda_pnr::route::detail_router::DetailRouter
source · pub trait DetailRouter<LN: L2NBase> {
type RoutingResult: DrawDetailRoutes<LN>;
type Error;
// Required methods
fn name(&self) -> String;
fn route<RP>(
&self,
routing_problem: RP
) -> Result<Self::RoutingResult, Self::Error>
where RP: DetailRoutingProblem<LN> + Sync;
// Provided method
fn route_with_pin_access_oracle(
&self,
routing_problem: impl DetailRoutingProblem<LN> + Sync,
_pin_access_oracle: &impl PinAccessOracle<LN>
) -> Result<Self::RoutingResult, Self::Error> { ... }
}Expand description
Basic trait for a detail router.
A router which follows the concept of this trait takes as input the description of the routing problem (placed layout, nets to be routed, etc.)
and computes the routes which connect the nets to their pins. The router is not allowed to modify the layout nor the netlist but instead it returns
a struct which encodes the result of the detail routing. The RoutingResult must implement DrawDetailRoutes which allows then to apply the
routing result to the layout, e.g. draw the wires and vias.
On failure the router should return an error.
Required Associated Types§
sourcetype RoutingResult: DrawDetailRoutes<LN>
type RoutingResult: DrawDetailRoutes<LN>
Result of the detail routing. The exact type depends on the routing algorithm. The only constraint is that the result can be drawn to a layout.
Required Methods§
sourcefn route<RP>(
&self,
routing_problem: RP
) -> Result<Self::RoutingResult, Self::Error>where
RP: DetailRoutingProblem<LN> + Sync,
fn route<RP>( &self, routing_problem: RP ) -> Result<Self::RoutingResult, Self::Error>where RP: DetailRoutingProblem<LN> + Sync,
Compute the detail routes. Neither layout nor netlist are modified. However, a successful result can be written to the layout.
Provided Methods§
sourcefn route_with_pin_access_oracle(
&self,
routing_problem: impl DetailRoutingProblem<LN> + Sync,
_pin_access_oracle: &impl PinAccessOracle<LN>
) -> Result<Self::RoutingResult, Self::Error>
fn route_with_pin_access_oracle( &self, routing_problem: impl DetailRoutingProblem<LN> + Sync, _pin_access_oracle: &impl PinAccessOracle<LN> ) -> Result<Self::RoutingResult, Self::Error>
Compute the detail routes with provided pin access locations. Neither layout nor netlist are modified.