mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Trim mismatched connection to be same (smallest) size
This commit is contained in:
		
							parent
							
								
									567e5f0aa7
								
							
						
					
					
						commit
						72ce06909e
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -359,6 +359,12 @@ struct TechmapWorker | ||||||
| 				for (auto &attr : w->attributes) { | 				for (auto &attr : w->attributes) { | ||||||
| 					if (attr.first == ID(src)) | 					if (attr.first == ID(src)) | ||||||
| 						continue; | 						continue; | ||||||
|  | 					auto lhs = GetSize(extra_connect.first); | ||||||
|  | 					auto rhs = GetSize(extra_connect.second); | ||||||
|  | 					if (lhs > rhs) | ||||||
|  | 						extra_connect.first.remove(rhs, lhs-rhs); | ||||||
|  | 					else if (rhs > lhs) | ||||||
|  | 						extra_connect.second.remove(lhs, rhs-lhs); | ||||||
| 					module->connect(extra_connect); | 					module->connect(extra_connect); | ||||||
| 					break; | 					break; | ||||||
| 				} | 				} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue