aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/ast
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-08-20 11:39:23 +0200
committerGitHub <noreply@github.com>2019-08-20 11:39:23 +0200
commitd0117d7d12483abd126602c1220a80e2eb807873 (patch)
tree4bbcb60156a215dd462298904aa8e537465d5355 /frontends/ast
parent1e3dd0a2da1c8a6a34d2a664f938a90fc83e81a9 (diff)
parent6ffb910d12a93e64182b52a58e69386851f2d595 (diff)
downloadyosys-d0117d7d12483abd126602c1220a80e2eb807873.tar.gz
yosys-d0117d7d12483abd126602c1220a80e2eb807873.tar.bz2
yosys-d0117d7d12483abd126602c1220a80e2eb807873.zip
Merge branch 'master' into clifford/pmgen
Diffstat (limited to 'frontends/ast')
-rw-r--r--frontends/ast/ast.cc5
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);