cpu: Query CPU for inst executed from Python
This patch adds the ability for the simulator to query the number of instructions a CPU has executed so far per hw-thread. This can be used to enable more flexible periodic events such as taking checkpoints starting 1s into simulation and X instructions thereafter.
This commit is contained in:
@@ -101,6 +101,7 @@ class BaseCPU(MemObject):
|
||||
Counter totalInsts();
|
||||
void scheduleInstStop(ThreadID tid, Counter insts, const char *cause);
|
||||
void scheduleLoadStop(ThreadID tid, Counter loads, const char *cause);
|
||||
uint64_t getCurrentInstCount(ThreadID tid);
|
||||
''')
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user