mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	shiftx NULL pointer check
This commit is contained in:
		
							parent
							
								
									d6d9ef0fee
								
							
						
					
					
						commit
						b94db54664
					
				
					 1 changed files with 10 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -165,15 +165,17 @@ struct ShregmapTechXilinx7 : ShregmapTech
 | 
			
		|||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Cannot implement variable-length shift registers
 | 
			
		||||
		// greater than 128 since Q31 cannot be output onto
 | 
			
		||||
		// fabric
 | 
			
		||||
		if (shiftx && GetSize(taps) > 128)
 | 
			
		||||
			return false;
 | 
			
		||||
		if (shiftx) {
 | 
			
		||||
			// Cannot implement variable-length shift registers
 | 
			
		||||
			// greater than 128 since Q31 cannot be output onto
 | 
			
		||||
			// fabric
 | 
			
		||||
			if (GetSize(taps) > 128)
 | 
			
		||||
				return false;
 | 
			
		||||
 | 
			
		||||
		// Only map if $shiftx exclusively covers the shift register
 | 
			
		||||
		if (GetSize(taps) != shiftx->getParam("\\A_WIDTH").as_int())
 | 
			
		||||
			return false;
 | 
			
		||||
			// Only map if $shiftx exclusively covers the shift register
 | 
			
		||||
			if (GetSize(taps) != shiftx->getParam("\\A_WIDTH").as_int())
 | 
			
		||||
				return false;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		return true;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue