[libre-riscv-dev] [Bug 208] implement CORDIC in a general way sufficient to do transcendentals
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Mon Apr 13 15:35:08 BST 2020
https://bugs.libre-soc.org/show_bug.cgi?id=208
--- Comment #3 from Michael Nolan <mtnolan2640 at gmail.com> ---
I was able to translate the linked myhdl code to nmigen and implement both a
state machine based and pipelined cordic here:
https://git.libre-soc.org/?p=ieee754fpu.git;a=tree;f=src/ieee754/cordic;h=3f06900baa42651410d661739fb616e4b3020c52;hb=77f150cff440bed025e2487b6f0fcda9f529290b
You can configure the width, as well as the number of cordic rounds per
pipeline stage. There are some accuracy issues with it though - it exactly
matches the behavior of the myhdl one, but the results it gives can be off by
1% or so from that obtained using sin() or cos() on 16 bit numbers.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-riscv-dev
mailing list