From 74e1cb79e40d1a7c66f7ad0b942cbe654859eeda Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 17 Mar 2021 22:15:58 +0000 Subject: [PATCH] add twin-predicated extsw SVP64 ISACaller unit test --- src/soc/decoder/isa/caller.py | 5 ++- .../isa/test_caller_svp64_predication.py | 40 ++++++++++++++++++- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/src/soc/decoder/isa/caller.py b/src/soc/decoder/isa/caller.py index 0371f691..23c1c5ae 100644 --- a/src/soc/decoder/isa/caller.py +++ b/src/soc/decoder/isa/caller.py @@ -927,7 +927,7 @@ class ISACaller: if pmode == SVP64PredMode.INT.value: srcmask = dstmask = get_predint(self.gpr, dstpred) if sv_ptype == SVPtype.P2.value: - srcmask = get_predint(srcpred) + srcmask = get_predint(self.gpr, srcpred) elif pmode == SVP64PredMode.CR.value: srcmask = dstmask = get_predcr(self.crl, dstpred, vl) if sv_ptype == SVPtype.P2.value: @@ -943,6 +943,9 @@ class ISACaller: while (((1< not to be touched (skipped) # 2 = 6 + 10 => 0x3334 = 0x2223+0x1111 @@ -73,7 +109,7 @@ class DecoderTestCase(FHDLTestCase): sim = self.run_tst_program(program, initial_regs, svstate) self._check_regs(sim, expected_regs) - def test_sv_add_cr_pred(self): + def tst_sv_add_cr_pred(self): # adds, CR predicated mask CR4.eq = 1, CR5.eq = 0, invert (ne) # 1 = 5 + 9 => not to be touched (skipped) # 2 = 6 + 10 => 0x3334 = 0x2223+0x1111 -- 2.30.2