From: Luke Kenneth Casson Leighton Date: Mon, 19 Sep 2022 08:15:18 +0000 (+0100) Subject: add function for calling a simulation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d568f70c757b54c95d2a2ceeafb92ab374785fc5;p=openpower-isa.git add function for calling a simulation --- diff --git a/src/openpower/decoder/isa/pypowersim.py b/src/openpower/decoder/isa/pypowersim.py index 20edf565..f19de83f 100644 --- a/src/openpower/decoder/isa/pypowersim.py +++ b/src/openpower/decoder/isa/pypowersim.py @@ -281,6 +281,21 @@ def help(): exit(-1) +def run_a_simulation(lst, bigendian, orig_filename, + prog, qemu_cosim, initial_regs, + initial_sprs, svstate, mmu, + initial_cr, mem, + initial_fprs, initial_pc): + + with Program(lst, bigendian=bigendian, orig_filename=binaryname) as prog: + simulator, qemu = run_tst(None, prog, qemu_cosim, + initial_regs, + initial_sprs=initial_sprs, + svstate=svstate, mmu=mmu, + initial_cr=initial_cr, mem=initial_mem, + initial_fprs=initial_fprs, + initial_pc=initial_pc) + def run_simulation(): binaryname = None