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(),
|
net.index(),
|
||||||
nets.name_from_index(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);
|
arcs.push(arc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ impl SegmentedArc {
|
|||||||
let src: Coord = src.into();
|
let src: Coord = src.into();
|
||||||
(src.segment_from(partition_point).into(), src, 1)
|
(src.segment_from(partition_point).into(), src, 1)
|
||||||
} else {
|
} else {
|
||||||
ctx.get_uphill_pips(arc.source_wire())
|
ctx.get_downhill_pips(arc.source_wire())
|
||||||
.map(|pip| {
|
.map(|pip| {
|
||||||
let c: Coord = ctx.pip_location(pip).into();
|
let c: Coord = ctx.pip_location(pip).into();
|
||||||
c
|
c
|
||||||
@ -268,7 +268,7 @@ impl SegmentedArc {
|
|||||||
let sink: Coord = sink.into();
|
let sink: Coord = sink.into();
|
||||||
(sink.segment_from(partition_point).into(), sink, 1)
|
(sink.segment_from(partition_point).into(), sink, 1)
|
||||||
} else {
|
} else {
|
||||||
ctx.get_downhill_pips(arc.sink_wire())
|
ctx.get_uphill_pips(arc.sink_wire())
|
||||||
.map(|pip| {
|
.map(|pip| {
|
||||||
let c: Coord = ctx.pip_location(pip).into();
|
let c: Coord = ctx.pip_location(pip).into();
|
||||||
c
|
c
|
||||||
|
Loading…
Reference in New Issue
Block a user