mirror of https://github.com/YosysHQ/nextpnr.git
fix partitioner crash when pips are unknown
This commit is contained in:
parent
4b635cf68c
commit
3eceee98bd
|
|
@ -64,7 +64,8 @@ fn extract_arcs_from_nets(ctx: &npnr::Context, nets: &npnr::Nets) -> Vec<route::
|
|||
net.index(),
|
||||
nets.name_from_index(net.index()),
|
||||
);
|
||||
if !arcs.contains(&arc) {
|
||||
if !arcs.contains(&arc) && arc.source_wire() != arc.sink_wire()
|
||||
{
|
||||
arcs.push(arc);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ impl SegmentedArc {
|
|||
let src: Coord = src.into();
|
||||
(src.segment_from(partition_point).into(), src, 1)
|
||||
} else {
|
||||
ctx.get_uphill_pips(arc.source_wire())
|
||||
ctx.get_downhill_pips(arc.source_wire())
|
||||
.map(|pip| {
|
||||
let c: Coord = ctx.pip_location(pip).into();
|
||||
c
|
||||
|
|
@ -268,7 +268,7 @@ impl SegmentedArc {
|
|||
let sink: Coord = sink.into();
|
||||
(sink.segment_from(partition_point).into(), sink, 1)
|
||||
} else {
|
||||
ctx.get_downhill_pips(arc.sink_wire())
|
||||
ctx.get_uphill_pips(arc.sink_wire())
|
||||
.map(|pip| {
|
||||
let c: Coord = ctx.pip_location(pip).into();
|
||||
c
|
||||
|
|
|
|||
Loading…
Reference in New Issue