projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3333e00
)
Bugfix in peepopt_shiftmul.pmg
author
Clifford Wolf
<clifford@clifford.at>
Mon, 6 May 2019 13:34:19 +0000
(15:34 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Mon, 6 May 2019 13:34:19 +0000
(15:34 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
passes/pmgen/peepopt_shiftmul.pmg
patch
|
blob
|
history
diff --git
a/passes/pmgen/peepopt_shiftmul.pmg
b/passes/pmgen/peepopt_shiftmul.pmg
index 1f9b3c2b94c594cc313d710250737471e3b54e7f..fe861b728301d0786a5acca528ebdde562d1192f 100644
(file)
--- a/
passes/pmgen/peepopt_shiftmul.pmg
+++ b/
passes/pmgen/peepopt_shiftmul.pmg
@@
-8,9
+8,13
@@
endmatch
code shamt
shamt = port(shift, \B);
+ if (shamt.empty())
+ reject;
if (shamt[GetSize(shamt)-1] == State::S0) {
do {
shamt.remove(GetSize(shamt)-1);
+ if (shamt.empty())
+ reject;
} while (shamt[GetSize(shamt)-1] == State::S0);
} else
if (shift->type.in($shift, $shiftx) && param(shift, \B_SIGNED).as_bool()) {