[gem5-users] Re: Run Timed Simulation (Stop After Certain Time)

2021-12-08 Thread Jason Lowe-Power via gem5-users
You can call cpu.scheduleInstStop(, , )

So, you can set an initial instruction limit which will exit from the
simulate() call. Then, you can reset the stats and set a new instruction
limit with scheduleInstStop. Then, call simulate() again. When this second
simulate returns you can dump the stats.

You may or may not be able to do all this from se/fs.py, but it's pretty
straightforward to write your own gem5 runscript.

Cheers,
Jason

On Mon, Dec 6, 2021 at 6:41 PM Abdelrahman S. Hussein <
abdelrahman.sob...@gmail.com> wrote:

> Hi Prof. Jason,
>
> Thanks a lot for your response.
>
> The problem is not that we need to set one instruction limit but set one
> instruction limit, then reset the stats, and then terminate the simulation
> completely after the "total instruction limit". So, these are basically two
> termination points; one for warmup and the other for the actual simulation.
>
> Thanks.
>
> --
>
> *Best,Abdelrahman Hussein*
>
>
> On Mon, Dec 6, 2021 at 8:57 AM Jason Lowe-Power 
> wrote:
>
>> Hi Abdelrahman,
>>
>> I think you have the right approach. Is the simulation not exiting after
>> the warmup_inst instructions?
>>
>> Cheers,
>> Jason
>>
>> On Sat, Dec 4, 2021 at 11:43 PM Abdelrahman S. Hussein via gem5-users <
>> gem5-users@gem5.org> wrote:
>>
>>> Hello,
>>>
>>> I am trying to warm up my gem5 in order to train cache prediction. I am
>>> doing this by running a timed simulation in order to limit the number of
>>> instructions executed (if there is a more direction, that would be
>>> certainly welcomed).
>>>
>>> So, how to do this?
>>>
>>> I tried the following:
>>>
>>> system.setMemCtrl(valid_mem_ctls[args.memory_ctl])
>>> system.cpu.max_insts_any_thread = warmup_inst
>>>
>>> Also, I tried to set the duration desired for the simulation by passing
>>> it as an argument to the m5.simulate().
>>>
>>> Thanks.
>>>
>>> --
>>>
>>> *Best,Abdelrahman Hussein*
>>> ___
>>> gem5-users mailing list -- gem5-users@gem5.org
>>> To unsubscribe send an email to gem5-users-le...@gem5.org
>>> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>>
>>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Re: Run Timed Simulation (Stop After Certain Time)

2021-12-06 Thread Abdelrahman S. Hussein via gem5-users
Hi Prof. Jason,

Thanks a lot for your response.

The problem is not that we need to set one instruction limit but set one
instruction limit, then reset the stats, and then terminate the simulation
completely after the "total instruction limit". So, these are basically two
termination points; one for warmup and the other for the actual simulation.

Thanks.

--

*Best,Abdelrahman Hussein*


On Mon, Dec 6, 2021 at 8:57 AM Jason Lowe-Power  wrote:

> Hi Abdelrahman,
>
> I think you have the right approach. Is the simulation not exiting after
> the warmup_inst instructions?
>
> Cheers,
> Jason
>
> On Sat, Dec 4, 2021 at 11:43 PM Abdelrahman S. Hussein via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> Hello,
>>
>> I am trying to warm up my gem5 in order to train cache prediction. I am
>> doing this by running a timed simulation in order to limit the number of
>> instructions executed (if there is a more direction, that would be
>> certainly welcomed).
>>
>> So, how to do this?
>>
>> I tried the following:
>>
>> system.setMemCtrl(valid_mem_ctls[args.memory_ctl])
>> system.cpu.max_insts_any_thread = warmup_inst
>>
>> Also, I tried to set the duration desired for the simulation by passing
>> it as an argument to the m5.simulate().
>>
>> Thanks.
>>
>> --
>>
>> *Best,Abdelrahman Hussein*
>> ___
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Re: Run Timed Simulation (Stop After Certain Time)

2021-12-06 Thread Jason Lowe-Power via gem5-users
Hi Abdelrahman,

I think you have the right approach. Is the simulation not exiting after
the warmup_inst instructions?

Cheers,
Jason

On Sat, Dec 4, 2021 at 11:43 PM Abdelrahman S. Hussein via gem5-users <
gem5-users@gem5.org> wrote:

> Hello,
>
> I am trying to warm up my gem5 in order to train cache prediction. I am
> doing this by running a timed simulation in order to limit the number of
> instructions executed (if there is a more direction, that would be
> certainly welcomed).
>
> So, how to do this?
>
> I tried the following:
>
> system.setMemCtrl(valid_mem_ctls[args.memory_ctl])
> system.cpu.max_insts_any_thread = warmup_inst
>
> Also, I tried to set the duration desired for the simulation by passing it
> as an argument to the m5.simulate().
>
> Thanks.
>
> --
>
> *Best,Abdelrahman Hussein*
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s