Merge pull request #4066 from daglem/dump_vlog-more-ast-nodes

Uncloak array expressions generated by read_verilog -dump_vlog2
This commit is contained in:
Martin Povišer 2023-12-12 11:30:07 +01:00 committed by GitHub
commit 7bded221a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -658,11 +658,20 @@ void AstNode::dumpVlog(FILE *f, std::string indent) const
if (0) { case AST_NEG: txt = "-"; } if (0) { case AST_NEG: txt = "-"; }
if (0) { case AST_LOGIC_NOT: txt = "!"; } if (0) { case AST_LOGIC_NOT: txt = "!"; }
if (0) { case AST_SELFSZ: txt = "@selfsz@"; } if (0) { case AST_SELFSZ: txt = "@selfsz@"; }
if (0) { case AST_TO_SIGNED: txt = "signed'"; }
if (0) { case AST_TO_UNSIGNED: txt = "unsigned'"; }
fprintf(f, "%s(", txt.c_str()); fprintf(f, "%s(", txt.c_str());
children[0]->dumpVlog(f, ""); children[0]->dumpVlog(f, "");
fprintf(f, ")"); fprintf(f, ")");
break; break;
case AST_CAST_SIZE:
children[0]->dumpVlog(f, "");
fprintf(f, "'(");
children[1]->dumpVlog(f, "");
fprintf(f, ")");
break;
if (0) { case AST_BIT_AND: txt = "&"; } if (0) { case AST_BIT_AND: txt = "&"; }
if (0) { case AST_BIT_OR: txt = "|"; } if (0) { case AST_BIT_OR: txt = "|"; }
if (0) { case AST_BIT_XOR: txt = "^"; } if (0) { case AST_BIT_XOR: txt = "^"; }