I don’t know exactly how you are figuring out the warm-up period and how this 
all this is to fit together but the following may be of help:

If you’re using the gem5 standard library the “simulator” module has a function 
called “schedule_max_insts”. It will exit the simulation loop when any thread 
in any core reaches the specified number of instructions.

If you're not using the standard library you can set the BaseCPU’s 
“max_insts_any_thread” parameter prior to the system’s initialization specify 
when to exit the simulation, or, if after initialization, BaseCPU’s 
“scheduleInstStopAnyThread” function can be used.

--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616
 
web: https://www.bobbybruce.net

> On Apr 10, 2023, at 1:47 PM, Humza Ikram via gem5-users <gem5-users@gem5.org> 
> wrote:
> 
> Hi,
> 
> I do not know how to stop execution after a certain number of instructions 
> but perhaps stopping execution after a certain number of ticks will suffice? 
> If that works, you could try using the "m5.scheduleTickExitFromCurrent" 
> function available in src>python>m5>simulate.py.  You could call this 
> function before "processor.switch()". 
> 
> You might also have to  append something like "ExitEvent.SCHEDULED_TICK: 
> handle_exit()" to "ExitEvent.EXIT: handle_exit()," in line ~300 of the same 
> file.
> 
> Hope I helped!
> Humza Ikram
> From: Farbin Fayza via gem5-users <gem5-users@gem5.org>
> Sent: Tuesday, April 11, 2023 1:19 AM
> To: The gem5 Users mailing list <gem5-users@gem5.org>
> Cc: Farbin Fayza <ffa...@bu.edu>
> Subject: [gem5-users] Setting the maxinsts after warm-up period for running 
> SPEC2017 in full-system mode
>  
> Hello,
> Could anyone tell me how to set the max number of instructions to run after 
> the warm-up period? I'm not sure how to make the relevant change in the 
> x86-spec-cpu2017-benchmarks.py file. Or, is it possible to do this with 
> command-line arguments?
> 
> Thanks,
> Farbin.
> _______________________________________________
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org

_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

Reply via email to