projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b0e7af
)
Improve "read_verilog -dump_vlog[12]" handling of upto ranges
author
Clifford Wolf
<clifford@clifford.at>
Thu, 21 Mar 2019 21:20:16 +0000
(22:20 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Thu, 21 Mar 2019 21:20:16 +0000
(22:20 +0100)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
frontends/ast/ast.cc
patch
|
blob
|
history
diff --git
a/frontends/ast/ast.cc
b/frontends/ast/ast.cc
index 0442ea0dba097c43f410df5a3e021007fe6bbd6c..d489961677c2cfa12dc6df54142c0ab966717c87 100644
(file)
--- a/
frontends/ast/ast.cc
+++ b/
frontends/ast/ast.cc
@@
-431,9
+431,12
@@
void AstNode::dumpVlog(FILE *f, std::string indent) const
break;
case AST_RANGE:
- if (range_valid)
- fprintf(f, "[%d:%d]", range_left, range_right);
- else {
+ if (range_valid) {
+ if (range_swapped)
+ fprintf(f, "[%d:%d]", range_right, range_left);
+ else
+ fprintf(f, "[%d:%d]", range_left, range_right);
+ } else {
for (auto child : children) {
fprintf(f, "%c", first ? '[' : ':');
child->dumpVlog(f, "");