aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2018-11-24 18:49:23 +0100
committerSylvain Munaut <tnt@246tNt.com>2018-11-24 18:49:23 +0100
commit86ce43999eaed10c3b9d141bb2f66bf98ad45eb6 (patch)
treeea2c9ab46c74f01f79828ea4fae9f32feefef677 /frontends
parentab97eddee9b0ea0a772660731fe4c3270d2564e5 (diff)
downloadyosys-86ce43999eaed10c3b9d141bb2f66bf98ad45eb6.tar.gz
yosys-86ce43999eaed10c3b9d141bb2f66bf98ad45eb6.tar.bz2
yosys-86ce43999eaed10c3b9d141bb2f66bf98ad45eb6.zip
Make return value of $clog2 signed
As per Verilog 2005 - 17.11.1. Fixes #708 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'frontends')
-rw-r--r--frontends/ast/simplify.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc
index bb4c9735d..55abe165f 100644
--- a/frontends/ast/simplify.cc
+++ b/frontends/ast/simplify.cc
@@ -1913,7 +1913,7 @@ skip_dynamic_range_lvalue_expansion:;
if (arg_value.bits.at(i) == RTLIL::State::S1)
result = i + 1;
- newNode = mkconst_int(result, false);
+ newNode = mkconst_int(result, true);
goto apply_newNode;
}