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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Aug 7 07:37:17 BST 2020


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

--- Comment #57 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Cole Poirier from comment #56)
> Updated and pushed, I think it actually works from examining the test output!

        test_values = [-32768, -32767, -32766, -2, -1, 0, 1, 2, 32766, 32767] 

so, this is now some fixed values (only), where we want fixed values
*and* random values appended.

        for i in range(40):
            choice = random.choice(test_values)
            l = [f"mulli 0, 1, {choice}"]

this is now "multiply immediate-choice randomly selected by register 1
and put the result in register 0"

we don't want "a random choice" we want a for-loop of *all* options from
test_values

            initial_regs = [0] * 32
            initial_regs[1] = random.randint(-1 << 15, (1 << 15) - 1)

this - a 64-bit register - is limited to the range -32768 to +32767
we want register 1 to be the full range 0 to 2^64-1

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


More information about the libre-soc-bugs mailing list