[Libre-soc-bugs] [Bug 425] DIV overflow not being calculated correctly
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Fri Jul 10 16:19:54 BST 2020
https://bugs.libre-soc.org/show_bug.cgi?id=425
--- Comment #12 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #10)
> actually the sim output might be wrong, here. it should never be
> set to 0b1. the two legal values are 0b00 and 0b11, NEVER 0b01.
it was wrong. fixed.
commit f25aad525dfc184b5a8407e52b62a499dfb182f4
Author: Luke Kenneth Casson Leighton <lkcl at lkcl.net>
Date: Fri Jul 10 16:04:08 2020 +0100
check for div_overflow equal to None rather than == 1
going through some more regression tests, it looks like we're out of the
woods. the div_by_zero flag is not being propagated through the
pipeline stages to the output stage, that was shown by this test:
def test_div_by_zero_1(self):
lst = ["divw. 3, 1, 2"]
initial_regs = [0] * 32
initial_regs[1] = 0x1
initial_regs[2] = 0x0
self.run_tst_program(Program(lst), initial_regs)
i'll sort that now.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list