mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Fix width detection of memory access with bit slice, fixes #974
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
		
							parent
							
								
									32ff37bb5a
								
							
						
					
					
						commit
						3b6a02d3a7
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -645,6 +645,8 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint, bool *foun
 | 
			
		|||
			if (!id_ast->children[0]->range_valid)
 | 
			
		||||
				log_file_error(filename, linenum, "Failed to detect width of memory access `%s'!\n", str.c_str());
 | 
			
		||||
			this_width = id_ast->children[0]->range_left - id_ast->children[0]->range_right + 1;
 | 
			
		||||
			if (children.size() > 1)
 | 
			
		||||
				range = children[1];
 | 
			
		||||
		} else
 | 
			
		||||
			log_file_error(filename, linenum, "Failed to detect width for identifier %s!\n", str.c_str());
 | 
			
		||||
		if (range) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue