mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +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
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -394,7 +394,7 @@ struct FlowGraph
 | 
			
		|||
 | 
			
		||||
	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};
 | 
			
		||||
		pool<NodePrime> visited;
 | 
			
		||||
| 
						 | 
				
			
			@ -437,6 +437,7 @@ struct FlowGraph
 | 
			
		|||
		for (auto collapsed_node : collapsed[sink])
 | 
			
		||||
			xi.insert(collapsed_node);
 | 
			
		||||
 | 
			
		||||
		log_assert(x[source] && !xi[source]);
 | 
			
		||||
		log_assert(!x[sink] && xi[sink]);
 | 
			
		||||
		return {x, xi};
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue