diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2019-02-17 11:49:06 -0800 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2019-02-17 11:49:06 -0800 |
commit | 17cd5f759f74b3f2b96d2035970ebac03509df9a (patch) | |
tree | 02262b0e2d32e2753c81ea4ae51ea56c1072506c /frontends/ast/genrtlil.cc | |
parent | e8f4dc739c5cf1129800aaa88df3f7c6f9c99360 (diff) | |
parent | e45f62b0c56717a23099425f078d1e56212aa632 (diff) | |
download | yosys-17cd5f759f74b3f2b96d2035970ebac03509df9a.tar.gz yosys-17cd5f759f74b3f2b96d2035970ebac03509df9a.tar.bz2 yosys-17cd5f759f74b3f2b96d2035970ebac03509df9a.zip |
Merge https://github.com/YosysHQ/yosys into dff_init
Diffstat (limited to 'frontends/ast/genrtlil.cc')
-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; |