Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncloak array expressions generated by read_verilog -dump_vlog2 #4066

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

daglem
Copy link
Contributor

@daglem daglem commented Dec 11, 2023

Explicit conversion of AST_TO_SIGNED, AST_TO_UNSIGNED, and AST_CAST_SIZE makes it possible to reason about simplified array expressions.

Explicit conversion of AST_TO_SIGNED, AST_TO_UNSIGNED, and AST_CAST_SIZE
makes it possible to reason about simplified array expressions.
@@ -658,11 +658,20 @@ void AstNode::dumpVlog(FILE *f, std::string indent) const
if (0) { case AST_NEG: txt = "-"; }
if (0) { case AST_LOGIC_NOT: txt = "!"; }
if (0) { case AST_SELFSZ: txt = "@selfsz@"; }
if (0) { case AST_TO_SIGNED: txt = "signed'"; }
if (0) { case AST_TO_UNSIGNED: txt = "unsigned'"; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be best if we used $signed and $unsigned here since that's part of base Verilog. Though I am not that familiar with the standards to say if it's exactly the same thing as the SystemVerilog casts, nor do I know if there's something we can print out for AST_CASE_SIZE that's part of Verilog. Of course for a dump output what we print out here doesn't matter much.

@povik povik merged commit 7bded22 into YosysHQ:master Dec 12, 2023
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants