diff options
author | C-Elegans <mtnolan2640@gmail.com> | 2017-01-16 10:16:03 -0500 |
---|---|---|
committer | C-Elegans <mtnolan2640@gmail.com> | 2017-01-16 13:45:50 -0500 |
commit | 84f9cd0025b080c7b1fc2dc86aaacc08a8f88805 (patch) | |
tree | ece1f333fbb3ac6a3ac8688ba32fcd17a65f900f /manual | |
parent | 943389cdd50e8c77d76f64ba9abffa5190e5106a (diff) | |
download | yosys-84f9cd0025b080c7b1fc2dc86aaacc08a8f88805.tar.gz yosys-84f9cd0025b080c7b1fc2dc86aaacc08a8f88805.tar.bz2 yosys-84f9cd0025b080c7b1fc2dc86aaacc08a8f88805.zip |
Optimize compares to powers of 2
Remove opt_compare and put comparison pass in opt_expr
assuming a [7:0] is unsigned
a >= (1<<x) becomes |a[7:x]
a < (1<<x) becomes !a[7:x]
Additionally:
a >= 0 becomes constant true,
a < 0 becomes constant false
delete opt_compare.cc
revert opt.cc to commit b7cfb7dbd (remove opt_compare step)
Diffstat (limited to 'manual')
0 files changed, 0 insertions, 0 deletions