diff options
Diffstat (limited to 'frontends/ast')
-rw-r--r-- | frontends/ast/genrtlil.cc | 6 | ||||
-rw-r--r-- | frontends/ast/simplify.cc | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc index 516a9efc3..569d2b6ab 100644 --- a/frontends/ast/genrtlil.cc +++ b/frontends/ast/genrtlil.cc @@ -754,7 +754,7 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint, bool *foun break; case AST_FCALL: - if (str == "\\$anyconst" || str == "\\$aconst") { + if (str == "\\$anyconst") { if (GetSize(children) == 1) { while (children[0]->simplify(true, false, false, 1, -1, false, true) == true) { } if (children[0]->type != AST_CONSTANT) @@ -1447,9 +1447,9 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint) } break; case AST_FCALL: { - if (str == "\\$anyconst" || str == "\\$aconst") + if (str == "\\$anyconst") { - string myid = stringf("%s$%d", RTLIL::unescape_id(str).c_str(), autoidx++); + string myid = stringf("%s$%d", str.c_str() + 1, autoidx++); int width = width_hint; if (GetSize(children) > 1) diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 0c46b6238..aa2afa4ce 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -1672,8 +1672,8 @@ skip_dynamic_range_lvalue_expansion:; goto apply_newNode; } - // $anyconst and $aconst are mapped in AstNode::genRTLIL() - if (str == "\\$anyconst" || str == "\\$aconst") + // $anyconst is mapped in AstNode::genRTLIL() + if (str == "\\$anyconst") return false; if (str == "\\$clog2") |