On 01/16/2012 02:30 AM, Werner Almesberger wrote:
Fourth, how to fix this ? The problem is
div = 5 (0x409ffffb)
which really is 4.9999976 and then becomes
idiv = 4 (0x40800000)
This can certainly be improved with a float-to-int that rounds to the
nearest integer instead of flooring?
The code is here:
https://github.com/milkymist/milkymist/blob/master/cores/pfpu/rtl/pfpu_f2i.v
By the way... there are Verilog simulators, so you do not need to
resynthesize, boot, run telnet etc. every time :)
S.
_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist@Freenode