[libre-riscv-dev] need help on working out a partitioned "eq"

Luke Kenneth Casson Leighton lkcl at lkcl.net
Fri Jan 24 15:19:39 GMT 2020


help, i'm stuck.
https://git.libre-riscv.org/?p=ieee754fpu.git;a=blob;f=src/ieee754/part_cmp/equal.py
https://git.libre-riscv.org/?p=ieee754fpu.git;a=blob;f=src/ieee754/part/test/test_partsig.py;h=32382117cb007705ce943edf4bcb84ed87ed89d7;hb=50b043f4867c422bee10f4acee2e2f99b1c4636d#l94

the eq comparisons, like in PartitionedMul, need to start off as
isolated comparisons (PartitionedMul starts off with isolated muls).
from there, if the "mask gates" are open, then the output needs to
only be set true if *all* of those (isolated) comparisons are true,
right up to the point where one of the mask gates are closed
(indicating a partition point).

i'm not sure how to do this dynamically, except by cheating and saying
"case Mask==0b1111", case Mask==0b0001 etc. etc. and limiting it to a
series of fixed masks:
0b1111
0b1100 0b0011
0b1000 0b0100 0b0010 0b0001

thoughts?

l.



More information about the libre-riscv-dev mailing list