projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c523ef
)
Fixed propagation of width hints for $signed() and $unsigned()
author
Clifford Wolf
<clifford@clifford.at>
Wed, 6 Nov 2013 21:41:21 +0000
(22:41 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Wed, 6 Nov 2013 21:41:21 +0000
(22:41 +0100)
frontends/ast/genrtlil.cc
patch
|
blob
|
history
diff --git
a/frontends/ast/genrtlil.cc
b/frontends/ast/genrtlil.cc
index f3ca0c787a971bdcb023509dd500dc54161c3bcd..ce34f708abf93e492842f1d3a4b15a472283fd37 100644
(file)
--- a/
frontends/ast/genrtlil.cc
+++ b/
frontends/ast/genrtlil.cc
@@
-950,7
+950,10
@@
RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
// just pass thru the signal. the parent will evaluated the is_signed property and inperpret the SigSpec accordingly
case AST_TO_SIGNED:
case AST_TO_UNSIGNED: {
- RTLIL::SigSpec sig = children[0]->genRTLIL();
+ int sub_width_hint;
+ bool sub_sign_hint;
+ children[0]->detectSignWidth(sub_width_hint, sub_sign_hint);
+ RTLIL::SigSpec sig = children[0]->genRTLIL(width_hint, sub_sign_hint);
is_signed = sign_hint;
return sig;
}