From: Luke Kenneth Casson Leighton Date: Thu, 27 Aug 2020 14:20:31 +0000 (+0100) Subject: overflow-enable does not occur on shift operations X-Git-Tag: semi_working_ecp5~250^2~6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f59bf30527aba7a557651260b3dc2b1312fa689a;p=soc.git overflow-enable does not occur on shift operations --- diff --git a/src/soc/decoder/power_decoder2.py b/src/soc/decoder/power_decoder2.py index 51c3511f..046b715b 100644 --- a/src/soc/decoder/power_decoder2.py +++ b/src/soc/decoder/power_decoder2.py @@ -450,7 +450,11 @@ class DecodeOE(Elaboratable): with m.Switch(op.internal_op): # mulhw, mulhwu, mulhd, mulhdu - these *ignore* OE - with m.Case(MicrOp.OP_MUL_H64, MicrOp.OP_MUL_H32): + # also rotate + with m.Case(MicrOp.OP_MUL_H64, MicrOp.OP_MUL_H32, + MicrOp.OP_SHL, MicrOp.OP_SHR, MicrOp.OP_RLC, + MicrOp.OP_RLCL, MicrOp.OP_RLCR, + MicrOp.OP_EXTSWSLI): pass # all other ops decode OE field diff --git a/src/soc/simple/test/test_issuer.py b/src/soc/simple/test/test_issuer.py index f83c17b5..2361ed1a 100644 --- a/src/soc/simple/test/test_issuer.py +++ b/src/soc/simple/test/test_issuer.py @@ -32,7 +32,7 @@ from soc.debug.dmi import DBGCore, DBGCtrl, DBGStat from soc.fu.alu.test.test_pipe_caller import ALUTestCase from soc.fu.div.test.test_pipe_caller import DivTestCases from soc.fu.logical.test.test_pipe_caller import LogicalTestCase -#from soc.fu.shift_rot.test.test_pipe_caller import ShiftRotTestCase +from soc.fu.shift_rot.test.test_pipe_caller import ShiftRotTestCase from soc.fu.cr.test.test_pipe_caller import CRTestCase #from soc.fu.branch.test.test_pipe_caller import BranchTestCase #from soc.fu.spr.test.test_pipe_caller import SPRTestCase @@ -304,7 +304,7 @@ if __name__ == "__main__": suite.addTest(TestRunner(GeneralTestCases.test_data)) suite.addTest(TestRunner(LDSTTestCase().test_data)) suite.addTest(TestRunner(CRTestCase().test_data)) - # suite.addTest(TestRunner(ShiftRotTestCase.test_data)) + suite.addTest(TestRunner(ShiftRotTestCase().test_data)) suite.addTest(TestRunner(LogicalTestCase().test_data)) suite.addTest(TestRunner(ALUTestCase().test_data)) # suite.addTest(TestRunner(BranchTestCase.test_data))