mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Fix sign extension when sign is 1'bx
This commit is contained in:
		
							parent
							
								
									477e566e8d
								
							
						
					
					
						commit
						0221f3e1c5
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -3437,7 +3437,7 @@ void RTLIL::SigSpec::extend_u0(int width, bool is_signed)
 | 
			
		|||
 | 
			
		||||
	if (width_ < width) {
 | 
			
		||||
		RTLIL::SigBit padding = width_ > 0 ? (*this)[width_ - 1] : RTLIL::State::Sx;
 | 
			
		||||
		if (!is_signed)
 | 
			
		||||
		if (padding != RTLIL::State::Sx && !is_signed)
 | 
			
		||||
			padding = RTLIL::State::S0;
 | 
			
		||||
		while (width_ < width)
 | 
			
		||||
			append(padding);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue