diff options
Diffstat (limited to 'frontends/ast/genrtlil.cc')
-rw-r--r-- | frontends/ast/genrtlil.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc index ff3f5b84c..d35335747 100644 --- a/frontends/ast/genrtlil.cc +++ b/frontends/ast/genrtlil.cc @@ -1015,7 +1015,10 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint) // remember the parameter, needed for example in techmap case AST_PARAMETER: - current_module->avail_parameters.insert(str); + current_module->avail_parameters(str); + if (GetSize(children) >= 1 && children[0]->type == AST_CONSTANT) { + current_module->parameter_default_values[str] = children[0]->asParaConst(); + } /* fall through */ case AST_LOCALPARAM: if (flag_pwires) |