mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	write_xaiger: sort holes by offset as well as port_id
This commit is contained in:
		
							parent
							
								
									45d9caf3f9
								
							
						
					
					
						commit
						1ccee4b95e
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -474,7 +474,8 @@ struct XAigerWriter
 | 
				
			||||||
		if (holes_mode) {
 | 
							if (holes_mode) {
 | 
				
			||||||
			struct sort_by_port_id {
 | 
								struct sort_by_port_id {
 | 
				
			||||||
				bool operator()(const RTLIL::SigBit& a, const RTLIL::SigBit& b) const {
 | 
									bool operator()(const RTLIL::SigBit& a, const RTLIL::SigBit& b) const {
 | 
				
			||||||
					return a.wire->port_id < b.wire->port_id;
 | 
										return a.wire->port_id < b.wire->port_id ||
 | 
				
			||||||
 | 
										    (a.wire->port_id == b.wire->port_id && a.offset < b.offset);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			};
 | 
								};
 | 
				
			||||||
			input_bits.sort(sort_by_port_id());
 | 
								input_bits.sort(sort_by_port_id());
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue