From d568f70c757b54c95d2a2ceeafb92ab374785fc5 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 19 Sep 2022 09:15:18 +0100 Subject: [PATCH] add function for calling a simulation --- src/openpower/decoder/isa/pypowersim.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- 2.30.2