mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Do not allow memory bit select on the left side of an assignment
This commit is contained in:
		
							parent
							
								
									0f04738f40
								
							
						
					
					
						commit
						c4c299eb5a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -473,7 +473,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
 | 
				
			||||||
	// split memory access with bit select to individual statements
 | 
						// split memory access with bit select to individual statements
 | 
				
			||||||
	if (type == AST_IDENTIFIER && children.size() == 2 && children[0]->type == AST_RANGE && children[1]->type == AST_RANGE)
 | 
						if (type == AST_IDENTIFIER && children.size() == 2 && children[0]->type == AST_RANGE && children[1]->type == AST_RANGE)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		if (id2ast == NULL || id2ast->type != AST_MEMORY || children[0]->children.size() != 1)
 | 
							if (id2ast == NULL || id2ast->type != AST_MEMORY || children[0]->children.size() != 1 || in_lvalue)
 | 
				
			||||||
			log_error("Invalid bit-select on memory access at %s:%d!\n", filename.c_str(), linenum);
 | 
								log_error("Invalid bit-select on memory access at %s:%d!\n", filename.c_str(), linenum);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		int mem_width, mem_size, addr_bits;
 | 
							int mem_width, mem_size, addr_bits;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue