projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d46bac3
)
Another $clog2 bugfix
author
Clifford Wolf
<clifford@clifford.at>
Mon, 8 Sep 2014 10:25:23 +0000
(12:25 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Mon, 8 Sep 2014 10:25:23 +0000
(12:25 +0200)
frontends/ast/simplify.cc
patch
|
blob
|
history
diff --git
a/frontends/ast/simplify.cc
b/frontends/ast/simplify.cc
index 9e797573ce62708dd4d1b6aafa51546411adb65b..969cc23026dc0f05ee5094d1724e0ef796a7861e 100644
(file)
--- 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;