From f59bf30527aba7a557651260b3dc2b1312fa689a Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 27 Aug 2020 15:20:31 +0100 Subject: [PATCH] overflow-enable does not occur on shift operations --- src/soc/decoder/power_decoder2.py | 6 +++++- src/soc/simple/test/test_issuer.py | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) 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)) -- 2.30.2