Hey Farzad,

You could check out the function "FullO3CPU<Impl>::instDone(ThreadID tid, 
DynInstPtr &inst)" in src/cpu/o3/cpu.cc.


This updates a thread-Id based committed instruction stat - 
"committedInsts[tid]++". I guess you could modify the code there and use it to 
exit  (from within Gem5) on a per-thread basis when any specific thread(s) 
reach a particular instruction count.



Thanks,
Gokul Subramanian Ravi,
Graduate Student,
ECE Dept.,
University of Wisconsin-Madison

________________________________
From: gem5-users <[email protected]> on behalf of Farshchi, Farzad 
<[email protected]>
Sent: Friday, July 14, 2017 5:27:08 PM
To: [email protected]
Subject: [gem5-users] Maximum number of instructions to simulate


Hi,


I would like to terminate the simulation when a specific cpu (e.g. cpu 1) 
reaches a specific number of instructions. I am currently using the "-I" option 
which terminates when any of the cpus reaches the specified number of 
instructions. I am simulating in FS mode using example/fs.py.


The other approach is to terminate when all​ of the cpus execute a minimum 
number of instructions. Either of these two approaches would work for me.


Thanks,

Farzad


_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to