[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
Wed May 6 10:53:22 BST 2020


https://bugs.libre-soc.org/show_bug.cgi?id=208

--- Comment #55 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Michael Nolan from comment #54)

> > if you can drop that into a repository, get it working, write a
> > few simple experiments and see how it operates in each of the 6
> > modes, we're on a roll :)
> 
> I can give it a whirl I suppose

when you have a moment, i noticed that the two functions are actually
incredibly similar.  line-by-line it is a multiply or add, here or there.


btw i saw the commit putting ctx back in.  to test that, cookie-cut
FPADDMuxInOut in fpadd/pipeline.py and fpadd/test/test_fpadd_pipe.py

the ReservationStations class takes two parameters: the bitwidth
and the *number of Function Units*.  it uses ctx to drop the FU number
in along the pipeline, and on the output it uses that FU number to
*re-associate* the result with the correct Function Unit.

runfp knows exactly how ReservationStations works, so there is no need to
write any actual unit test infrastructure.

there is a single-argument version of runfp (i think!) so... oh wait,
you call runfp with "singleop=True".

then instead of passing in "add" as a function to compute the unit
test result, you pass in "math.cos".

that will throw a massive suite of corner-cases at the pipeline, so
be prepared for it to fail as we still have to do INF, NAN, etc. :)

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


More information about the libre-riscv-dev mailing list