mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
flowmap: when doing mincut, ensure source is always in X, not X̅.
Fixes #1475.
This commit is contained in:
parent
eef32195bd
commit
c68722818a
|
@ -394,7 +394,7 @@ struct FlowGraph
|
||||||
|
|
||||||
pair<pool<RTLIL::SigBit>, pool<RTLIL::SigBit>> edge_cut()
|
pair<pool<RTLIL::SigBit>, pool<RTLIL::SigBit>> edge_cut()
|
||||||
{
|
{
|
||||||
pool<RTLIL::SigBit> x, xi;
|
pool<RTLIL::SigBit> x = {source}, xi; // X and X̅ in the paper
|
||||||
|
|
||||||
NodePrime source_prime = {source, true};
|
NodePrime source_prime = {source, true};
|
||||||
pool<NodePrime> visited;
|
pool<NodePrime> visited;
|
||||||
|
@ -437,6 +437,7 @@ struct FlowGraph
|
||||||
for (auto collapsed_node : collapsed[sink])
|
for (auto collapsed_node : collapsed[sink])
|
||||||
xi.insert(collapsed_node);
|
xi.insert(collapsed_node);
|
||||||
|
|
||||||
|
log_assert(x[source] && !xi[source]);
|
||||||
log_assert(!x[sink] && xi[sink]);
|
log_assert(!x[sink] && xi[sink]);
|
||||||
return {x, xi};
|
return {x, xi};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue