mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	write_xaiger to preserve POs even if driven by constant
This commit is contained in:
		
							parent
							
								
									2e7b3eee40
								
							
						
					
					
						commit
						fb2758aade
					
				
					 1 changed files with 6 additions and 7 deletions
				
			
		| 
						 | 
					@ -142,8 +142,10 @@ struct XAigerWriter
 | 
				
			||||||
				SigBit wirebit(wire, i);
 | 
									SigBit wirebit(wire, i);
 | 
				
			||||||
				SigBit bit = sigmap(wirebit);
 | 
									SigBit bit = sigmap(wirebit);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				undriven_bits.insert(bit);
 | 
									if (bit.wire) {
 | 
				
			||||||
				unused_bits.insert(bit);
 | 
										undriven_bits.insert(bit);
 | 
				
			||||||
 | 
										unused_bits.insert(bit);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if (wire->port_input || keep) {
 | 
									if (wire->port_input || keep) {
 | 
				
			||||||
					if (bit != wirebit)
 | 
										if (bit != wirebit)
 | 
				
			||||||
| 
						 | 
					@ -154,7 +156,8 @@ struct XAigerWriter
 | 
				
			||||||
				if (wire->port_output || keep) {
 | 
									if (wire->port_output || keep) {
 | 
				
			||||||
					if (bit != wirebit) {
 | 
										if (bit != wirebit) {
 | 
				
			||||||
						alias_map[wirebit] = bit;
 | 
											alias_map[wirebit] = bit;
 | 
				
			||||||
						undriven_bits.insert(wirebit);
 | 
											if (!bit.wire)
 | 
				
			||||||
 | 
												undriven_bits.insert(wirebit);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					output_bits.insert(wirebit);
 | 
										output_bits.insert(wirebit);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
| 
						 | 
					@ -480,10 +483,6 @@ struct XAigerWriter
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Erase all POs that are undriven
 | 
					 | 
				
			||||||
		if (!holes_mode)
 | 
					 | 
				
			||||||
			for (auto bit : undriven_bits)
 | 
					 | 
				
			||||||
				output_bits.erase(bit);
 | 
					 | 
				
			||||||
		for (auto bit : unused_bits)
 | 
							for (auto bit : unused_bits)
 | 
				
			||||||
			undriven_bits.erase(bit);
 | 
								undriven_bits.erase(bit);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue