[Libre-soc-bugs] [Bug 448] MUL pipeline unit tests
    bugzilla-daemon at libre-soc.org 
    bugzilla-daemon at libre-soc.org
       
    Fri Aug  7 18:00:19 BST 2020
    
    
  
https://bugs.libre-soc.org/show_bug.cgi?id=448
--- Comment #58 from Cole Poirier <colepoirier at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #57)
> (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
Right, that makes more sense. I'm sorry but I wasn't able to figure out the
manner in which you want me to append these random values? Is it simple a line
before the "for val in test_values" loop that goes like this?
```
for i in range(20):
    test_values.append(random.randint(-1 << 15, (1 << 15) - 1))
```
>             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
Thank you, I was under the misapprehension that it needed to be in the 2^16-1
range in order to ever hit the edge cases over million of runs, thanks for
helping me clear up this misunderstanding.
-- 
You are receiving this mail because:
You are on the CC list for the bug.
    
    
More information about the libre-soc-bugs
mailing list