mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 13:29:12 +00:00 
			
		
		
		
	Fix xilinx_dsp for unsigned extensions
This commit is contained in:
		
							parent
							
								
									6bf7114bbd
								
							
						
					
					
						commit
						74ef8feeaf
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -277,7 +277,9 @@ match postAdd
 | 
			
		|||
	index <SigBit> port(postAdd, AB)[0] === sigP[0]
 | 
			
		||||
	filter GetSize(port(postAdd, AB)) >= GetSize(sigP)
 | 
			
		||||
	filter port(postAdd, AB).extract(0, GetSize(sigP)) == sigP
 | 
			
		||||
	filter port(postAdd, AB).extract_end(GetSize(sigP)) == SigSpec(sigP[GetSize(sigP)-1], GetSize(port(postAdd, AB))-GetSize(sigP))
 | 
			
		||||
	// Check that remainder of AB is a sign-extension
 | 
			
		||||
	define <bool> AB_SIGNED (param(postAdd, AB == \A ? \A_SIGNED : \B_SIGNED).as_bool())
 | 
			
		||||
	filter port(postAdd, AB).extract_end(GetSize(sigP)) == SigSpec(AB_SIGNED ? sigP[GetSize(sigP)-1] : State::S0, GetSize(port(postAdd, AB))-GetSize(sigP))
 | 
			
		||||
	set postAddAB AB
 | 
			
		||||
	optional
 | 
			
		||||
endmatch
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue