Hello gem5 users,
I was wondering if anyone knew a way to run through a simulation normally before executing other commands whilst using a gem5 stdlib script.
For context I am trying to exit a simulation after a set number of instructions in order to manipulate an exit event (so I want to run for n ticks, THEN do an exit event, then run for m more ticks, then another exit event).
command = "echo 'First exit event'; "
+ "m5 exit ; "
+ "echo 'Second exit event';"
+ "m5 exit; "
I want to delay the exits and doing:
m5 exit [number of ticks]
or
m5 simulate [number of ticks]
has not worked for me and spits out:
Usage: m5[call type] <command> [arguments]
Call types:
--inst (default)
Use the instruction based invocation method.
Commands:
addsymbol <address> <symbol>
Adds a symbol with address "address" to gem5's symbol table
checkpoint [delay [period]]
After delay (default 0) take a checkpoint, and then optionally every period after
dumpresetstats [delay [period]]
After delay (default 0) dump and reset the stats, and then optionally every period after
dumpstats [delay [period]]
After delay (default 0) dump the stats, and then optionally every period after
exit [delay]
Exit after delay, or immediately
fail <code> [delay]
Exit with failure code code after delay, or immediately
initparam [key]
optional key may be at most 16 characters long
loadsymbol
load a preselected symbol file into gem5's symbol table
readfile
read a preselected file from the host and write it to stdout
resetstats [delay [period]]
After delay (default 0) reset the stats, and then optionally every period after
sum <a> <b> [c [d [e [f]]]]
Sum a-f (defaults are 0), for testing purposes
writefile <filename> [host filename]
Write a file to the host, optionally with a different name
But the exit [delay] doesn't work and spits this out as well.
Thanks for any help!
Kind Regards,
Abdal