aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-20 12:00:12 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-20 12:00:12 -0700
commitc4d4c6db3f4bff22b2fa3a152c5c33d648af81f8 (patch)
treeb465265f1bc72f0b943fc6e4be7f4661e4e5734d /frontends
parent1f03154a0cc08c1bde59036d6b0a4a40a3898c3d (diff)
parent14c03861b6d178c85d6963e673ed51bc142457e1 (diff)
downloadyosys-c4d4c6db3f4bff22b2fa3a152c5c33d648af81f8.tar.gz
yosys-c4d4c6db3f4bff22b2fa3a152c5c33d648af81f8.tar.bz2
yosys-c4d4c6db3f4bff22b2fa3a152c5c33d648af81f8.zip
Merge remote-tracking branch 'origin/master' into xaig_dff
Diffstat (limited to 'frontends')
-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);