diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-08-28 12:18:32 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-08-28 12:18:32 -0700 |
commit | 32eef26ee277b79736e135a8800625543dd6080a (patch) | |
tree | 28cd6d5af904ddd2ec2772e2bd1d2378215c1dc7 /frontends/ast/ast.cc | |
parent | fe58790f3789a79b867660031d7e3e28cb3fff20 (diff) | |
parent | c499dc3e73390c3bc9bf8045f2e4cad963c1fbad (diff) | |
download | yosys-32eef26ee277b79736e135a8800625543dd6080a.tar.gz yosys-32eef26ee277b79736e135a8800625543dd6080a.tar.bz2 yosys-32eef26ee277b79736e135a8800625543dd6080a.zip |
Merge remote-tracking branch 'origin/clifford/async2synclatch' into Sergey/tests_ice40
Diffstat (limited to 'frontends/ast/ast.cc')
-rw-r--r-- | frontends/ast/ast.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/frontends/ast/ast.cc b/frontends/ast/ast.cc index 0d6626b19..82283fb5b 100644 --- a/frontends/ast/ast.cc +++ b/frontends/ast/ast.cc @@ -1502,7 +1502,10 @@ std::string AstModule::derive_common(RTLIL::Design *design, dict<RTLIL::IdString rewrite_parameter: para_info += stringf("%s=%s", child->str.c_str(), log_signal(RTLIL::SigSpec(parameters[para_id]))); delete child->children.at(0); - if ((parameters[para_id].flags & RTLIL::CONST_FLAG_STRING) != 0) + if ((parameters[para_id].flags & RTLIL::CONST_FLAG_REAL) != 0) { + child->children[0] = new AstNode(AST_REALVALUE); + child->children[0]->realvalue = std::stod(parameters[para_id].decode_string()); + } else if ((parameters[para_id].flags & RTLIL::CONST_FLAG_STRING) != 0) child->children[0] = AstNode::mkconst_str(parameters[para_id].decode_string()); else child->children[0] = AstNode::mkconst_bits(parameters[para_id].bits, (parameters[para_id].flags & RTLIL::CONST_FLAG_SIGNED) != 0); |