mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-30 07:53:16 +00:00
Added cast to type support (#4284)
This commit is contained in:
parent
8e1e2b9a39
commit
ce7db661a8
4 changed files with 573 additions and 2 deletions
|
@ -478,6 +478,10 @@ void AstNode::dumpVlog(FILE *f, std::string indent) const
|
|||
fprintf(f, ";\n");
|
||||
break;
|
||||
|
||||
case AST_WIRETYPE:
|
||||
fprintf(f, "%s", id2vl(str).c_str());
|
||||
break;
|
||||
|
||||
case AST_MEMORY:
|
||||
fprintf(f, "%s" "memory", indent.c_str());
|
||||
if (is_signed)
|
||||
|
@ -694,7 +698,17 @@ void AstNode::dumpVlog(FILE *f, std::string indent) const
|
|||
break;
|
||||
|
||||
case AST_CAST_SIZE:
|
||||
children[0]->dumpVlog(f, "");
|
||||
switch (children[0]->type)
|
||||
{
|
||||
case AST_WIRE:
|
||||
if (children[0]->children.size() > 0)
|
||||
children[0]->children[0]->dumpVlog(f, "");
|
||||
else
|
||||
fprintf(f, "%d'", children[0]->range_left - children[0]->range_right + 1);
|
||||
break;
|
||||
default:
|
||||
children[0]->dumpVlog(f, "");
|
||||
}
|
||||
fprintf(f, "'(");
|
||||
children[1]->dumpVlog(f, "");
|
||||
fprintf(f, ")");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue