mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-30 19:22:31 +00:00 
			
		
		
		
	ast: fix dump_vlog display of casex/casez
The first child of AST_CASE is the case expression, it's subsequent childrean that are AST_COND* and can be used to discriminate the type of the case.
This commit is contained in:
		
							parent
							
								
									708eb327a1
								
							
						
					
					
						commit
						a4c04d1b90
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -548,9 +548,9 @@ void AstNode::dumpVlog(FILE *f, std::string indent) const | |||
| 		break; | ||||
| 
 | ||||
| 	case AST_CASE: | ||||
| 		if (!children.empty() && children[0]->type == AST_CONDX) | ||||
| 		if (children.size() > 1 && children[1]->type == AST_CONDX) | ||||
| 			fprintf(f, "%s" "casex (", indent.c_str()); | ||||
| 		else if (!children.empty() && children[0]->type == AST_CONDZ) | ||||
| 		else if (children.size() > 1 && children[1]->type == AST_CONDZ) | ||||
| 			fprintf(f, "%s" "casez (", indent.c_str()); | ||||
| 		else | ||||
| 			fprintf(f, "%s" "case (", indent.c_str()); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue