orca-sim
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
orcasim::gdbrsp::GdbProcessorBase< T > Class Template Referenceabstract

#include <GdbProcessorBase.hpp>

Inheritance diagram for orcasim::gdbrsp::GdbProcessorBase< T >:
orcasim::modeling::ProcessorBase< T > orcasim::base::TimedModel orcasim::base::Model

Public Member Functions

 GdbProcessorBase (std::string name, MemoryAddr initial_pc, Memory *mem, std::string gdb_ip, int gdb_prt)
 
SimulationTime Run ()
 Run method from the base TimedModel class, overloaded. More...
 
GdbProcessorState< T > * GetState ()
 
MemoryGetMemory ()
 This method returns a pointer to the object that models the memory core. More...
 
virtual void Reset ()=0
 Resets the instance to its starting state. More...
 
a name that identifies the model, advisably not empty.

Default ctor.

std::string GetName ()
 Getter method for the <_name> field. More...
 
void SetName (std::string s)
 Setter method for the <_name> field. More...
 

Static Public Attributes

static uint32_t GDBSERVER_PORT
 

Private Attributes

RspServer< T > * _gdbserver
 
GdbProcessorState< T > * _state
 

Detailed Description

template<typename T>
class orcasim::gdbrsp::GdbProcessorBase< T >

Definition at line 49 of file GdbProcessorBase.hpp.

Constructor & Destructor Documentation

§ GdbProcessorBase()

template<typename T >
GdbProcessorBase::GdbProcessorBase ( std::string  name,
MemoryAddr  initial_pc,
Memory mem,
std::string  gdb_ip,
int  gdb_prt 
)

Definition at line 37 of file GdbProcessorBase.cpp.

39  : ProcessorBase<T>(name, initial_pc, mem) {
41  _gdbserver = new RspServer<T>(_state, mem, gdb_ip, gdb_port);
42 }
This class implements the base operation for generic processor implementations.
Defines a generic state model for use within processor models.
GdbProcessorState< T > * _state

Member Function Documentation

§ GetMemory()

template<typename T >
Memory * ProcessorBase::GetMemory ( )
inlineinherited

This method returns a pointer to the object that models the memory core.

It is made private to avoid being changed by the processor core implementation.

Returns
a pointers to the memory model

Definition at line 86 of file ProcessorBase.cpp.

86  {
87  return _memory;
88 }
Memory * _memory
We assume that every processor is attached to a memory core.

§ GetName()

std::string Model::GetName ( )
inherited

Getter method for the <_name> field.

Definition at line 34 of file Model.cpp.

34  {
35  return _name;
36 }
std::string _name
A name for the model.
Definition: Model.hpp:47

§ GetState()

template<typename T >
GdbProcessorState< T > * GdbProcessorBase::GetState ( )

Definition at line 55 of file GdbProcessorBase.cpp.

55  {
56  return _state;
57 }
GdbProcessorState< T > * _state

§ Reset()

virtual void orcasim::base::TimedModel::Reset ( )
pure virtualinherited

Resets the instance to its starting state.

Must be implemented by subclasses

Implemented in orcasim::models::orca::NetBridge, orcasim::models::orca::DmaNetif, and orcasim::models::hermes::HermesRouter.

§ Run()

template<typename T >
SimulationTime GdbProcessorBase::Run ( )
virtual

Run method from the base TimedModel class, overloaded.

We include in the overloading external components that would apply to all processors. Examples include energy estimation (through counters) and GDBRSP.

Returns
the number of cycles to skip until next schedule.

Implements orcasim::modeling::ProcessorBase< T >.

Definition at line 45 of file GdbProcessorBase.cpp.

45  {
46  _gdbserver->UpdateCpuState();
47 
48  // check whether the gdb client has sent any packet.
49  // if so, treat the packet.
50  _gdbserver->Receive();
51  return 1;
52 }

§ SetName()

void Model::SetName ( std::string  s)
inherited

Setter method for the <_name> field.

Parameters
sValue to be set

Definition at line 38 of file Model.cpp.

38  {
39  _name = name;
40 }
std::string _name
A name for the model.
Definition: Model.hpp:47

Member Data Documentation

§ _gdbserver

template<typename T >
RspServer<T>* orcasim::gdbrsp::GdbProcessorBase< T >::_gdbserver
private

Definition at line 51 of file GdbProcessorBase.hpp.

§ _state

template<typename T >
GdbProcessorState<T>* orcasim::gdbrsp::GdbProcessorBase< T >::_state
private

Definition at line 52 of file GdbProcessorBase.hpp.

§ GDBSERVER_PORT

template<typename T >
uint32_t orcasim::gdbrsp::GdbProcessorBase< T >::GDBSERVER_PORT
static

Definition at line 55 of file GdbProcessorBase.hpp.


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