mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Bugfix in RTLIL::SigSpec::remove2()
This commit is contained in:
		
							parent
							
								
									7da7a6d1df
								
							
						
					
					
						commit
						6b2c23c721
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		|  | @ -2766,10 +2766,11 @@ void RTLIL::SigSpec::remove2(const RTLIL::SigSpec &pattern, RTLIL::SigSpec *othe | ||||||
| 		other->unpack(); | 		other->unpack(); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	for (int i = GetSize(bits_) - 1; i >= 0; i--) { | 	for (int i = GetSize(bits_) - 1; i >= 0; i--) | ||||||
|  | 	{ | ||||||
| 		if (bits_[i].wire == NULL) continue; | 		if (bits_[i].wire == NULL) continue; | ||||||
| 
 | 
 | ||||||
| 		for (auto &pattern_chunk : pattern.chunks()) { | 		for (auto &pattern_chunk : pattern.chunks()) | ||||||
| 			if (bits_[i].wire == pattern_chunk.wire && | 			if (bits_[i].wire == pattern_chunk.wire && | ||||||
| 				bits_[i].offset >= pattern_chunk.offset && | 				bits_[i].offset >= pattern_chunk.offset && | ||||||
| 				bits_[i].offset < pattern_chunk.offset + pattern_chunk.width) { | 				bits_[i].offset < pattern_chunk.offset + pattern_chunk.width) { | ||||||
|  | @ -2779,8 +2780,8 @@ void RTLIL::SigSpec::remove2(const RTLIL::SigSpec &pattern, RTLIL::SigSpec *othe | ||||||
| 					other->bits_.erase(other->bits_.begin() + i); | 					other->bits_.erase(other->bits_.begin() + i); | ||||||
| 					other->width_--; | 					other->width_--; | ||||||
| 				} | 				} | ||||||
|  | 				break; | ||||||
| 			} | 			} | ||||||
| 		} |  | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	check(); | 	check(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue