[libre-riscv-dev] IEEE754 FPU turning into ALU with Reservation Stations

Luke Kenneth Casson Leighton lkcl at lkcl.net
Thu Mar 14 05:48:11 GMT 2019


On Thu, Mar 14, 2019 at 3:19 AM Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

let's work to get FPMul back up and running, first, ok?
>

 gaah, finally, that was a pain in the ass.  i'd forgotten to add the
submodules to the fmul class:
+        m.submodules.of = of
+        m.submodules.a = a
+        m.submodules.b = b
+        m.submodules.z = z

consequently all the logic in those modules wasn't being done:
is_denormalised and all the other tests were all failing.

so, what i suggest, aleksander, is to *slowly* proceed in an *incremental*
fashion, keeping FMul running *at all times*.

it's possible to run thousands to tens of thousands of unit tests to make
absolutely sure that even the smallest code change remains functional and
does not result in the wrong answers being generated.

once you are "off that path" of generating the wrong answers all the time,
it is an absolute hellish nightmare to get back on track.  you have *no
idea* which *combination* of changes will happen, by total random chance,
to produce the right answer.

i just spent about 2 hours debugging FMul, having to go back to git
checkout 1ad14, take screenshots of gtkwave, git checkout master, run the
(failing) test again, and compare the screenshot against the (failing)
gtkwave display in order to track down which function was failing.

jacob: just to emphasise - again - *this is why unit tests are so
absolutely absolutely critical*.

l.


More information about the libre-riscv-dev mailing list