diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2019-02-19 12:36:10 -0800 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2019-02-19 12:36:10 -0800 |
commit | 92b60d5e42c57e2c268ef13bcc3138a5399501b8 (patch) | |
tree | 0b17c32535dd5138af9e34e00414fc10cb3d84f7 /frontends | |
parent | 8886fa5506b227229398e5ac884203e799bce22c (diff) | |
parent | 2a8e5bf9535a25bba9c9c11fc7e40d5a08958d4c (diff) | |
download | yosys-92b60d5e42c57e2c268ef13bcc3138a5399501b8.tar.gz yosys-92b60d5e42c57e2c268ef13bcc3138a5399501b8.tar.bz2 yosys-92b60d5e42c57e2c268ef13bcc3138a5399501b8.zip |
Merge branch 'master' into read_aiger
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/ast/genrtlil.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc index 9531dd356..e66625228 100644 --- a/frontends/ast/genrtlil.cc +++ b/frontends/ast/genrtlil.cc @@ -942,16 +942,15 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint) // simply return the corresponding RTLIL::SigSpec for an AST_CONSTANT node case AST_CONSTANT: + case AST_REALVALUE: { if (width_hint < 0) detectSignWidth(width_hint, sign_hint); - is_signed = sign_hint; - return RTLIL::SigSpec(bitsAsConst()); - } - case AST_REALVALUE: - { + if (type == AST_CONSTANT) + return RTLIL::SigSpec(bitsAsConst()); + RTLIL::SigSpec sig = realAsConst(width_hint); log_file_warning(filename, linenum, "converting real value %e to binary %s.\n", realvalue, log_signal(sig)); return sig; |