Class SimulationState
Holds the current state of a simulation. Also keeps hit rate and a list of
all executed instructions..
Methods summary
public
|
#
__construct( mixed $layout )
Constructs a new instance representing a simulation of a cache with the
specified layout.
Constructs a new instance representing a simulation of a cache with the
specified layout.
|
public
Csim\Model\CacheLayout
|
#
getLayout( )
Returns the layout of the cache used in this simulation.
Returns the layout of the cache used in this simulation.
Returns
|
public
|
#
addExecution( Csim\Model\Execution $execution )
Adds the specified simulated instruction and its result to the execution
history.
Adds the specified simulated instruction and its result to the execution
history.
Parameters
|
public
boolean
|
#
hasNewExecution( )
Returns true if a new execution has been added since last time this method
was called.
Returns true if a new execution has been added since last time this method
was called.
Returns
boolean
|
public
boolean
|
#
lastWasHit( )
Returns true if last simulated instruction hit in the cache, false if
not.
Returns true if last simulated instruction hit in the cache, false if
not.
Returns
boolean
|
public
Csim\Model\CacheLocation
|
#
getLastAccessLocation( )
Returns the location where the last instruction wrote/read.
Returns the location where the last instruction wrote/read.
Returns
Csim\Model\CacheLocation
|
public
integer
|
#
getLastMappedTag( )
Returns the tag that was mapped by the last write instruction.
Returns the tag that was mapped by the last write instruction.
Returns
integer
|