[libre-riscv-dev] [Bug 208] New: implement CORDIC in a general way sufficient to do transcendentals

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Wed Mar 4 18:35:42 GMT 2020


http://bugs.libre-riscv.org/show_bug.cgi?id=208

            Bug ID: 208
           Summary: implement CORDIC in a general way sufficient to do
                    transcendentals
           Product: Libre Shakti M-Class
           Version: unspecified
          Hardware: Other
                OS: Linux
            Status: CONFIRMED
          Severity: enhancement
          Priority: ---
         Component: ALU (including IEEE754 16/32/64-bit FPU)
          Assignee: lkcl at lkcl.net
          Reporter: lkcl at lkcl.net
                CC: libre-riscv-dev at lists.libre-riscv.org
   NLnet milestone: ---

see bug #127 for research: CORDIC is a bibary search algorithm that can do a
huge number of other algorithms: SIN, COS, LOG and more.

it will need to be pipelined, split out in a similar fashion to the FPDIV
pipeline.

it would be good to have a multi-radix version which instead of a single bit
per combinatorial block will do N bits by generating a cascade of adds and
comparators, hopefully this will be more efficient than a cascade of
combinatorial singlebit blocks

the ATAN2 tables are going to need to be big enough to do 64 bit sin/cos etc. 
they could get huge. they will be ROM but still huge.

although it would be nice to consider having the tables in exponent-mantissa
form, thus maintaining extra accuracy without wasting bits by needing really
large adders, it may be a good idea to add that as a secondary phase.

also nice to have: complex numbers.  these make certain other algorithms also
possible to do.  again, a tertiary phase.

the input and output should be done as integers only, "scaled", and then, after
drmonstrating that (when converting input in unit tests to integers) sin and
cos work.

*after* that, the next phase will be to make an IEEE754 FP cos and sin, plus
unit tests.  this as a sub-bug of this one.

then, other IEEE754 functions can be added as well.

this is a simple CORDIC example which does sin and cos in myhdl, the nmigen
could should be near identical in the inner loop
http://www.myhdl.org/docs/examples/sinecomp/

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-riscv-dev mailing list