diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-09-08 12:25:23 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-09-08 12:25:23 +0200 |
commit | 48b00dcceab8bb046258cd6f0912636a6e5b232c (patch) | |
tree | 7998ac559ae6f57cb1b2c90a96c3e0ff6c0d57b9 /frontends/ast | |
parent | d46bac330520f91ee5bf8027abe98a8f9389f696 (diff) | |
download | yosys-48b00dcceab8bb046258cd6f0912636a6e5b232c.tar.gz yosys-48b00dcceab8bb046258cd6f0912636a6e5b232c.tar.bz2 yosys-48b00dcceab8bb046258cd6f0912636a6e5b232c.zip |
Another $clog2 bugfix
Diffstat (limited to 'frontends/ast')
-rw-r--r-- | frontends/ast/simplify.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 9e797573c..969cc2302 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -1365,6 +1365,8 @@ skip_dynamic_range_lvalue_expansion:; log_error("Failed to evaluate system function `%s' with non-constant value at %s:%d.\n", str.c_str(), filename.c_str(), linenum); RTLIL::Const arg_value = buf->bitsAsConst(); + if (arg_value.as_bool()) + arg_value = const_sub(arg_value, 1, false, false, SIZE(arg_value)); delete buf; uint32_t result = 0; |