[Libre-soc-bugs] [Bug 448] MUL pipeline unit tests

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Aug 6 18:29:34 BST 2020


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

--- Comment #38 from Cole Poirier <colepoirier at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #37)
> https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/fu/mul/test/
> test_pipe_caller.py;hb=HEAD#l274
> 
> so... ra and rb are set once and then the exact same values issued to each
> instruction?  that doesn't sound useful, does it?
> 
> in addition: rb is in the range 0 to 2^64 while result is in the range 0 to
> 2^31.
> 
> what is the probability that a small random number divided by a massively
> large random number will be anything other than zero?

Very, very helpful, I now much better understand how to write this test. Just
committed a new version, please provide further feedback :)


> programming is about walking through the code and modelling its behaviour in
> your head.
> 
> if you can't model it, you run it and explore the results.
> 
> did you run this test and inspect the results?
> 
> you would have seen every single instruction had rb=0, which is not the
> intent, is it?

Agreed, I just didn't understand it sufficiently to be able to do this, but
these comments bring me closer to understanding. This was my intention. Commit
what I understood I should do, and wait for better understanding to come
through your corrections.

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


More information about the libre-soc-bugs mailing list