"""
def __init__(self, dec, opkls=None, fn_name=None, final=False, state=None,
- svp64_en=True, regreduce_en=False):
+ svp64_en=True, regreduce_en=False, fp_en=False):
self.svp64_en = svp64_en
self.regreduce_en = regreduce_en
+ self.fp_en = fp_en
if svp64_en:
self.is_svp64_mode = Signal() # mark decoding as SVP64 Mode
self.use_svp64_fft = Signal() # FFT Mode
if dec is None:
dec = create_pdecode(name=fn_name, col_subset=col_subset,
row_subset=row_subset,
- conditions=conditions)
+ conditions=conditions, include_fp=fp_en)
self.dec = dec
# set up a copy of the PowerOp
"""
def __init__(self, dec, opkls=None, fn_name=None, final=False,
- state=None, svp64_en=True, regreduce_en=False):
+ state=None, svp64_en=True, regreduce_en=False, fp_en=False):
super().__init__(dec, opkls, fn_name, final, state, svp64_en,
- regreduce_en=False)
+ regreduce_en=False, fp_en=fp_en)
self.ldst_exc = LDSTException("dec2_exc") # rewrites as OP_TRAP
self.instr_fault = Signal() # rewrites instruction as OP_FETCH_FAILED
initial_svstate=0,
expected=None,
stop_at_pc=None,
+ fpregs=None,
src_loc_at=0):
# name of caller of this function
expected=expected,
stop_at_pc=stop_at_pc,
test_file=test_file,
- subtest_args=self.__subtest_args.copy())
+ subtest_args=self.__subtest_args.copy(),
+ fpregs=fpregs)
self.test_data.append(tc)
expected=None,
stop_at_pc=None,
test_file=None,
- subtest_args=None):
+ subtest_args=None,
+ fpregs=None):
self.program = program
self.name = name
sprs = {}
if mem is None:
mem = {}
+ if fpregs is None:
+ fpregs = [0] * 32
self.regs = regs
+ self.fpregs = fpregs
self.sprs = sprs
self.cr = cr
self.mem = mem
self.dut = dut
self.mmu = pspec.mmu == True
+ fp_en = pspec.fp_en == True
regreduce_en = pspec.regreduce_en == True
- self.simdec2 = simdec2 = PowerDecode2(None, regreduce_en=regreduce_en)
+ self.simdec2 = simdec2 = PowerDecode2(
+ None, regreduce_en=regreduce_en, fp_en=fp_en)
m.submodules.simdec2 = simdec2 # pain in the neck
def prepare_for_test(self, test):
disassembly=insncode,
bigendian=bigendian,
initial_svstate=test.svstate,
- mmu=self.mmu)
+ mmu=self.mmu,
+ fpregfile=test.fpregs)
# run the loop of the instructions on the current test
index = sim.pc.CIA.value//4
def __init__(self, tst_data, microwatt_mmu=False, rom=None,
svp64=True, run_hdl=None, run_sim=True,
- allow_overlap=False, inorder=False):
+ allow_overlap=False, inorder=False, fp=False):
super().__init__("run_all")
self.test_data = tst_data
self.microwatt_mmu = microwatt_mmu
self.inorder = inorder
self.run_hdl = run_hdl
self.run_sim = run_sim
+ self.fp = fp
def run_all(self):
m = Module()
allow_overlap=self.allow_overlap,
inorder=self.inorder,
mmu=self.microwatt_mmu,
- reg_wid=64)
+ reg_wid=64,
+ fp_en=self.fp)
###### SETUP PHASE #######
# Determine the simulations needed and add to state_list
if(reg != 0):
msg = "%se.intregs[%d] = 0x%x\n"
sout.write( msg % (lindent, i, reg))
+ for i, reg in enumerate(self.fpregs):
+ if reg != 0:
+ msg = "%se.fpregs[%d] = 0x%x\n"
+ sout.write(msg % (lindent, i, reg))
# CR fields
for i in range(8):
cri = self.crregs[i]