OpenASIP  2.0
Public Member Functions | List of all members
DetailedOperationSimulator Class Referenceabstract

#include <DetailedOperationSimulator.hh>

Collaboration diagram for DetailedOperationSimulator:
Collaboration graph

Public Member Functions

virtual ~DetailedOperationSimulator ()
 
virtual bool simulateStage (ExecutingOperation &operation)=0
 
virtual void simulateCycleStart ()
 

Detailed Description

Interface to allow modeling cycle-by-cycle operation simulation behaviors.

Used by MultiCycleOperationExecutor and the SystemC integration layer (tce_systemc.hh).

Note
each instance should be used to model the operation pipeline of a single FU only. Otherwise multiple cycle start notifications will be recevied.

Definition at line 49 of file DetailedOperationSimulator.hh.

Constructor & Destructor Documentation

◆ ~DetailedOperationSimulator()

virtual DetailedOperationSimulator::~DetailedOperationSimulator ( )
inlinevirtual

Definition at line 52 of file DetailedOperationSimulator.hh.

52 {}

Member Function Documentation

◆ simulateCycleStart()

virtual void DetailedOperationSimulator::simulateCycleStart ( )
inlinevirtual

This is called once at the beginning of the TTA instruction cycle before any simulateStage() calls for that cycle.

Useful for initializing signals to their default values etc.

Definition at line 77 of file DetailedOperationSimulator.hh.

77 {}

Referenced by FUState::advanceClock().

◆ simulateStage()

virtual bool DetailedOperationSimulator::simulateStage ( ExecutingOperation operation)
pure virtual

Simulate a single stage in the operation's execution.

This can be used in more detailed simulation models (SystemC at the moment) to more accurately simulate each stage of operation's execution.

Parameters
operationThe operation being simulated.
cycleThe stage/cycle to simulate, 0 being the trigger cycle.
Returns
Return true in case the simulation behavior was overridden by the method implementation. In case false is returned, the default behavior simulation is performed (by calling the OSAL TRIGGER at cycle 0 to produce the results and just simulating the latency by making the result(s) visible at correct time).

Referenced by MultiLatencyOperationExecutor::advanceClock().


The documentation for this class was generated from the following file: