From e8dbe8dabcd16381be263c403fc1714ea943cbd3 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 21 May 2023 21:35:20 +0100 Subject: [PATCH] eurrrgh, hack in a namespace dict now that @inject() is done on ISACallerFnHelper_{pyfnwriterpage} --- src/openpower/decoder/isa/test_caller_svp64_dct.py | 11 +++++++++-- src/openpower/decoder/isa/test_caller_svp64_fft.py | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/openpower/decoder/isa/test_caller_svp64_dct.py b/src/openpower/decoder/isa/test_caller_svp64_dct.py index 7fc6260c..940724f9 100644 --- a/src/openpower/decoder/isa/test_caller_svp64_dct.py +++ b/src/openpower/decoder/isa/test_caller_svp64_dct.py @@ -8,14 +8,21 @@ from openpower.decoder.isa.remap_dct_yield import ( halfrev2, inverse_transform2, iterate_dct_inner_butterfly_indices, iterate_dct_outer_butterfly_indices, reverse_bits, transform2) from openpower.decoder.isa.test_caller import run_tst -from openpower.decoder.isafunctions.double2single import ISACallerFnHelper +from openpower.decoder.isafunctions.double2single import ( + ISACallerFnHelper_double2single) from openpower.decoder.selectable_int import SelectableInt from openpower.simulator.program import Program from openpower.sv.trans.svp64 import SVP64Asm # really bad hack. need to access the DOUBLE2SINGLE function auto-generated # from pseudo-code. -fph = ISACallerFnHelper(XLEN=64, FPSCR=None) +fph = ISACallerFnHelper_double2single(XLEN=64, FPSCR=None) +fph.namespace = {'FPSCR': fph.FPSCR, + 'NIA': None, + 'XLEN': fph.XLEN, + 'CIA': None, + 'SVSTATE': None, + } def transform_inner_radix2_dct(vec, ctable): diff --git a/src/openpower/decoder/isa/test_caller_svp64_fft.py b/src/openpower/decoder/isa/test_caller_svp64_fft.py index 67a6a4e9..fceb6b38 100644 --- a/src/openpower/decoder/isa/test_caller_svp64_fft.py +++ b/src/openpower/decoder/isa/test_caller_svp64_fft.py @@ -4,14 +4,21 @@ from nmutil.formaltest import FHDLTestCase from openpower.decoder.helpers import SINGLE, fp64toselectable from openpower.decoder.isa.caller import SVP64State from openpower.decoder.isa.test_caller import run_tst -from openpower.decoder.isafunctions.double2single import ISACallerFnHelper +from openpower.decoder.isafunctions.double2single import ( + ISACallerFnHelper_double2single) from openpower.decoder.selectable_int import SelectableInt from openpower.simulator.program import Program from openpower.sv.trans.svp64 import SVP64Asm # really bad hack. need to access the DOUBLE2SINGLE function auto-generated # from pseudo-code. -fph = ISACallerFnHelper(XLEN=64, FPSCR=None) +fph = ISACallerFnHelper_double2single(XLEN=64, FPSCR=None) +fph.namespace = {'FPSCR': fph.FPSCR, + 'NIA': None, + 'XLEN': fph.XLEN, + 'CIA': None, + 'SVSTATE': None, + } def transform_radix2(vec, exptable, reverse=False): -- 2.30.2