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:
Geoffrey Blake
2016-04-05 05:29:02 -05:00
parent df36764e91
commit f948f9fca9
3 changed files with 16 additions and 0 deletions

View File

@@ -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