OpenASIP  2.0
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
TTACore Class Reference

#include <tce_systemc.hh>

Inheritance diagram for TTACore:
Inheritance graph
Collaboration diagram for TTACore:
Collaboration graph

Public Member Functions

 SC_HAS_PROCESS (TTACore)
 
 TTACore (sc_module_name name, std::string machineFile, std::string programFile)
 
uint64_t lockCycles () const
 
uint64_t instructionCycles () const
 
- Public Member Functions inherited from SimpleSimulatorFrontend
 SimpleSimulatorFrontend (TCEString machineFile, bool useCompiledSimulation=false)
 
 SimpleSimulatorFrontend (TCEString machineFile, TCEString programFile, bool useCompiledSimulation=false, bool useDetailedSimulation=false)
 
 SimpleSimulatorFrontend (const TTAMachine::Machine &machine, const TTAProgram::Program &program)
 
virtual ~SimpleSimulatorFrontend ()
 
void step ()
 
void run ()
 
void stop ()
 
uint64_t cycleCount () const
 
bool isInitialized () const
 
bool isStopped () const
 
bool isRunning () const
 
bool isFinished () const
 
bool hadRuntimeError () const
 
virtual void setOperationSimulator (const TCEString &fuName, DetailedOperationSimulator &sim)
 
MemorySystemmemorySystem ()
 
void initializeDataMemories (const TTAMachine::AddressSpace *onlyOne=NULL)
 
void loadProgram (const std::string &fileName)
 
const TTAMachine::Machinemachine () const
 
const TTAProgram::Programprogram () const
 
SimulatorFrontendfrontend ()
 
virtual bool registerEventListener (int event, Listener *listener)
 
virtual bool unregisterEventListener (int event, Listener *listener)
 

Public Attributes

sc_in< bool > clock
 
sc_in< bool > global_lock
 

Private Member Functions

void step ()
 

Private Attributes

uint64_t instructionCycles_
 
uint64_t lockCycles_
 

Detailed Description

A sc_module wrapper for the whole TTA core simulation model.

This model is sentive to clock signal. Propagates the clock signal internally to other clocked datapath models (mainly FU models).

Definition at line 50 of file tce_systemc.hh.

Constructor & Destructor Documentation

◆ TTACore()

TTACore::TTACore ( sc_module_name  name,
std::string  machineFile,
std::string  programFile 
)
inline

Definition at line 57 of file tce_systemc.hh.

59  :
60  sc_module(name),
61  SimpleSimulatorFrontend(machineFile, programFile, false, true) {
62  SC_METHOD(step);
63  sensitive << clock.pos();
64  lockCycles_ = 0;
66  }

References clock, instructionCycles_, lockCycles_, and step().

Here is the call graph for this function:

Member Function Documentation

◆ instructionCycles()

uint64_t TTACore::instructionCycles ( ) const
inline

Definition at line 71 of file tce_systemc.hh.

71 { return instructionCycles_; }

References instructionCycles_.

◆ lockCycles()

uint64_t TTACore::lockCycles ( ) const
inline

Definition at line 69 of file tce_systemc.hh.

69 { return lockCycles_; }

References lockCycles_.

◆ SC_HAS_PROCESS()

TTACore::SC_HAS_PROCESS ( TTACore  )

◆ step()

void TTACore::step ( )
inlineprivate

Definition at line 73 of file tce_systemc.hh.

73  {
74  if (!global_lock) {
77  } else {
78  ++lockCycles_;
79  }
80  }

References global_lock, instructionCycles_, lockCycles_, and SimpleSimulatorFrontend::step().

Referenced by TTACore().

Here is the call graph for this function:

Member Data Documentation

◆ clock

sc_in<bool> TTACore::clock

Definition at line 52 of file tce_systemc.hh.

Referenced by TTACore().

◆ global_lock

sc_in<bool> TTACore::global_lock

Definition at line 53 of file tce_systemc.hh.

Referenced by step().

◆ instructionCycles_

uint64_t TTACore::instructionCycles_
private

Definition at line 81 of file tce_systemc.hh.

Referenced by instructionCycles(), step(), and TTACore().

◆ lockCycles_

uint64_t TTACore::lockCycles_
private

Definition at line 82 of file tce_systemc.hh.

Referenced by lockCycles(), step(), and TTACore().


The documentation for this class was generated from the following file:
TTACore::lockCycles_
uint64_t lockCycles_
Definition: tce_systemc.hh:82
TTACore::step
void step()
Definition: tce_systemc.hh:73
TTACore::instructionCycles_
uint64_t instructionCycles_
Definition: tce_systemc.hh:81
TTACore::clock
sc_in< bool > clock
Definition: tce_systemc.hh:52
TTACore::global_lock
sc_in< bool > global_lock
Definition: tce_systemc.hh:53
SimpleSimulatorFrontend::step
void step()
Definition: SimpleSimulatorFrontend.cc:105
SimpleSimulatorFrontend::SimpleSimulatorFrontend
SimpleSimulatorFrontend(TCEString machineFile, bool useCompiledSimulation=false)
Definition: SimpleSimulatorFrontend.cc:38