core/sal: interface for backend-specific notion of time
This adds an interface for a backend-specific notion of time, e.g. CPU cycles since simulator start, and a concrete implementation for the Bochs backend. This is needed to record CPU idle times (e.g., HLT instruction), and for target backends capable of more timing-accurate execution. This change also modifies the tracing plugin to add the time to all trace events. Change-Id: I93ac1d54c07f32b0b8f84f333417741d8e9c8288
This commit is contained in:
@ -27,6 +27,11 @@ typedef uint8_t byte_t; //!< 8 bit type for memory access (read or
|
||||
typedef uint32_t regwidth_t; //!< type of register width [bits]
|
||||
typedef register_data_t regdata_t; //!< type of register data
|
||||
typedef timer_t timer_id_t; //!< type of timer IDs
|
||||
//! backend-specific notion of time, e.g. CPU cycles or nanoseconds
|
||||
//! (move this to backend-specific headers when necessary)
|
||||
typedef uint64_t simtime_t;
|
||||
//! backend-specific notion of time difference
|
||||
typedef int64_t simtime_diff_t;
|
||||
|
||||
// Note: The following flags are defined in SALConfig.cc.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user