[libre-riscv-dev] [Bug 316] bperm TODO
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Wed May 20 23:20:28 BST 2020
https://bugs.libre-soc.org/show_bug.cgi?id=316
--- Comment #77 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
so, cole, here's an example: RS=0x4000000, RB=0xdeadcownonsense
the hardware produces the answer 0xf7, the *actual* expected answer
is supposed to be 0xff.
so you can now write a unit test which puts those exact values in
(oh look, fu/logical/test/test_bpermd.py is empty....) and play
with the code until you *do* get the answer "0xff".
bpermd 3, 1, 2
['RS', 'RB']
reading reg 1
reading reg 2
[SelectableInt(value=0x4000000, bits=64),
SelectableInt(value=0xdeadbeefcafec0de, bits=64)]
concat 8 SelectableInt(value=0x0, bits=8)
concat 56 SelectableInt(value=0x0, bits=56)
concat 1 SelectableInt(value=0xff, bits=64)
(SelectableInt(value=0xff, bits=64),)
writing reg 3 SelectableInt(value=0xff, bits=64)
expected ff, actual: f7
File "fu/logical/test/test_pipe_caller.py", line 260, in process
self.assertEqual(expected, alu_out, code)
AssertionError: 255 != 247 : bpermd 3, 1, 2
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-riscv-dev
mailing list