aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorJim Lawson <ucbjrl@berkeley.edu>2019-02-15 08:19:27 -0800
committerJim Lawson <ucbjrl@berkeley.edu>2019-02-15 08:19:27 -0800
commit970f854c2ad271098b841e61b1d37a61cd04e252 (patch)
tree9348faf4d3db5cbc4e02927084f838af312586d6 /frontends
parent311396860b7380e5dc68e66c17d5083d1953fe3f (diff)
parent807b3c769733b8cf07f5b14674df41bd2788e09d (diff)
downloadyosys-970f854c2ad271098b841e61b1d37a61cd04e252.tar.gz
yosys-970f854c2ad271098b841e61b1d37a61cd04e252.tar.bz2
yosys-970f854c2ad271098b841e61b1d37a61cd04e252.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'frontends')
-rw-r--r--frontends/ast/genrtlil.cc9
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;