[libre-riscv-dev] priority encoder replacement
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Tue May 19 19:46:58 BST 2020
On Tuesday, May 19, 2020, Jacob Lifshay <programmerjake at gmail.com> wrote:
>
>
> If clz is strictly better, replace PriorityEncoder with clz, or just change
> clz to match PriorityEncoder's interface and rename it PriorityEncoder,
> deleting the old one.
it does have some subtle differences, PE sets a flag when the input is
entirely zero.
i do not believe there is an offbyone. PE will set its output to 0 if bit
0 is 1. output is 1 if input is 0bxxx10 which is pretty much the
definition of CLZ.
l.
--
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
More information about the libre-riscv-dev
mailing list