Re: Fixed Point (Chapter 13): Clarification Request


Mikael <mikael.mortensen@...>
 

I like the new definition of fixed point. Its quite crisp.

 

Building on the definition we can now argue that any integer number representation is: integer value/2^N

With N being a positive integer. N=0 is basically a regular INT, and N>0 is a fixed point number.

 

If we accept this definition we can ask ourselves how 13.2 and 13.3 fit into our new definition. This as both are built on the assumption that N=1, which goes against our more open-ended definition.

 

Arguably, 13.3 is just short hand for a vmul followed by vnclip.

Similarly, 13.2 is just short hand for vadd/vsub followed by vssra.

 

Utilizing this more crisp definition we can now semantically define fixed point math operations as:

 

#inner loop

vmul of SEW*SEW -> 2xSEW [N.(SEW-N) -> 2N.2(SEW-N)]

vssra of 2xSEW -> 2xSEW >> needed guarding for the expected math operation

vadd of guarded 2xSEW with guarded running sum vector

#roll out

vnclip of guarded running sum vector 2xSEW >> SEW-guard bits+N to convert back to N.(SEW-N)

#or if we want to utilize a 2N.2(SEW-N) double precision fixed point

#note this construct is currently not feasible

#vnclip_shift_left guarded 2xSEW << guard bits

Join {tech-vector-ext@lists.riscv.org to automatically receive all group messages.