Sampa::StochasticCpu Class Reference

#include <stochastic_processor.h>

Inheritance diagram for Sampa::StochasticCpu:

Sampa::Module Sampa::ContainerObject Sampa::Object

List of all members.

Public Types

enum  Opcode {
  NOP, STALL, BRANCH, READ,
  WRITE, READ_MISS, WRITE_MISS, MISPREDICTED
}
typedef
AdaptingInitiator
< StochasticCpu
AdaptingInitiator

Public Member Functions

 StochasticCpu (const Name &name)
void bind_clock (Clock *clock)
void bind_fetch_target (Target *target)
Initiatorget_fetch_initiator ()
void bind_data_target (Target *target)
Initiatorget_data_initiator ()
bool recieve_fetch_response (const Response &)
bool recieve_data_response (const Response &)
 SAMPA_PERSISTENT (Module)
const char * get_name () const
const char * get_full_name () const
 name can be ([^. ]+.)*[^. ]+
Objectget_parent () const
 return object containing this one
Objectget_sibling () const
 return next object with same parent or NULL if none
Objectget_first_child () const
 return first child object or NULL if none
int is_debug () const

Protected Types

enum  Severity { S_INFO, S_WARNING, S_ERROR, S_FATAL }

Protected Member Functions

void set_next_trigger (EventListenerSingle &)
ProcessBase__get_process_by_name (const std::string &name)
void debug (const char *,...)
void error (Severity severity, const char *,...)

Private Types

enum  State {
  EXECUTE, READ_FETCH_STALL, READ_STALL, WRITE_FETCH_STALL,
  WRITE_STALL, BRANCH_FETCH_STALL, BRANCH_STALL, FETCH_STALL,
  FETCHED
}

Private Member Functions

 SAMPA_MODULE (StochasticCpu)
void complete_restart ()
bool fetch_hit (const Address &)
Opcode decode ()
void fetch ()
void execute ()
void request_data ()
bool read_hit ()
bool write_hit ()
bool eviction ()

Private Attributes

AdaptingInitiator p_fetch
AdaptingInitiator p_data
EventListener e_rising
IntParameter m_cache_line_capacity
IntParameter m_clock_ratio
IntParameter m_pipeline_depth
Address m_pc
Address m_read_address
Address m_write_address
Address m_eviction_address
int m_max_cycles
State m_state
ClockedEventSingle e_play_cycle
ClockedEventSingle e_request
ClockedEventSingle e_fetch
ClockedEventSingle e_fetched
ClockedEventSingle e_read_response
ClockedEventSingle e_write_posted
ClockedEventSingle e_eviction
EventListenerSingle e_fetched_and_read_response
EventListenerSingle e_fetched_and_write_posted
EventListenerSingle e_fetched_and_play_cycle
EventListenerSingle e_fetch_word
EventListenerSingle e_data_word
bool m_fetch_miss
int m_fetch_pending
int m_fetch_query
Request m_fetch_request
bool m_read
int m_read_pending
int m_read_query
Request m_read_request
bool m_write
int m_pending_write
IntParameter m_write_buffer_capacity
Request m_eviction_request
int m_eviction_pending
Request m_write_request
DoubleParameter m_mispredicted_branch_ratio
DoubleParameter m_fetch_ratio
DoubleParameter m_fetch_miss_ratio
DoubleParameter m_read_miss_ratio
DoubleParameter m_write_miss_ratio
DoubleParameter m_branch_ratio
DoubleParameter m_read_ratio
DoubleParameter m_write_ratio
DoubleParameter m_dirty_ratio
IntParameter m_word_size
double m_branch_read_write_ratio
double m_read_write_ratio


Detailed Description

Definition at line 26 of file stochastic_processor.h.


Member Typedef Documentation

typedef AdaptingInitiator<StochasticCpu> Sampa::StochasticCpu::AdaptingInitiator

Definition at line 41 of file stochastic_processor.h.


Member Enumeration Documentation

enum Sampa::StochasticCpu::Opcode

Enumerator:
NOP 
STALL 
BRANCH 
READ 
WRITE 
READ_MISS 
WRITE_MISS 
MISPREDICTED 

Definition at line 42 of file stochastic_processor.h.

enum Sampa::StochasticCpu::State [private]

Enumerator:
EXECUTE 
READ_FETCH_STALL 
READ_STALL 
WRITE_FETCH_STALL 
WRITE_STALL 
BRANCH_FETCH_STALL 
BRANCH_STALL 
FETCH_STALL 
FETCHED 

Definition at line 44 of file stochastic_processor.h.

enum Sampa::Object::Severity [protected, inherited]

Enumerator:
S_INFO 
S_WARNING 
S_ERROR 
S_FATAL 

Definition at line 48 of file object.h.


Constructor & Destructor Documentation

Sampa::StochasticCpu::StochasticCpu ( const Name name  ) 


Member Function Documentation

Sampa::StochasticCpu::SAMPA_MODULE ( StochasticCpu   )  [private]

void Sampa::StochasticCpu::bind_clock ( Clock clock  ) 

void Sampa::StochasticCpu::bind_fetch_target ( Target target  ) 

Initiator* Sampa::StochasticCpu::get_fetch_initiator (  )  [inline]

Definition at line 33 of file stochastic_processor.h.

References p_fetch.

void Sampa::StochasticCpu::bind_data_target ( Target target  ) 

Initiator* Sampa::StochasticCpu::get_data_initiator (  )  [inline]

Definition at line 36 of file stochastic_processor.h.

References p_data.

bool Sampa::StochasticCpu::recieve_fetch_response ( const Response  ) 

bool Sampa::StochasticCpu::recieve_data_response ( const Response  ) 

void Sampa::StochasticCpu::complete_restart (  )  [private, virtual]

is called to finalize restart. On restart, one shall update pointers, or reopen ressources (files, ...).

Most of pointers are restored by the thanks to the post++ library provided that the CLASSINFO() was correctly set.

However, some pointers are not relocated by the library. These are for example the method pointers used for the processes. Take a look at

See also:
Module::restart_process, to see how this is handled

Reimplemented from Sampa::Object.

bool Sampa::StochasticCpu::fetch_hit ( const Address  )  [private]

Opcode Sampa::StochasticCpu::decode (  )  [private]

void Sampa::StochasticCpu::fetch (  )  [private]

void Sampa::StochasticCpu::execute (  )  [private]

void Sampa::StochasticCpu::request_data (  )  [private]

bool Sampa::StochasticCpu::read_hit (  )  [private]

bool Sampa::StochasticCpu::write_hit (  )  [private]

bool Sampa::StochasticCpu::eviction (  )  [private]

void Sampa::Module::set_next_trigger ( EventListenerSingle  )  [protected, inherited]

ProcessBase* Sampa::Module::__get_process_by_name ( const std::string &  name  )  [protected, inherited]

Sampa::Module::SAMPA_PERSISTENT ( Module   )  [inherited]

const char* Sampa::Object::get_name (  )  const [inherited]

returns the local name

const char* Sampa::Object::get_full_name (  )  const [inherited]

name can be ([^. ]+.)*[^. ]+

Object* Sampa::Object::get_parent (  )  const [inherited]

return object containing this one

Object* Sampa::Object::get_sibling (  )  const [inherited]

return next object with same parent or NULL if none

Object* Sampa::Object::get_first_child (  )  const [inherited]

return first child object or NULL if none

int Sampa::Object::is_debug (  )  const [inline, inherited]

Definition at line 44 of file object.h.

void Sampa::Object::debug ( const char *  ,
  ... 
) [protected, inherited]

void Sampa::Object::error ( Severity  severity,
const char *  ,
  ... 
) [protected, inherited]


Member Data Documentation

AdaptingInitiator Sampa::StochasticCpu::p_fetch [private]

Definition at line 66 of file stochastic_processor.h.

Referenced by get_fetch_initiator().

AdaptingInitiator Sampa::StochasticCpu::p_data [private]

Definition at line 67 of file stochastic_processor.h.

Referenced by get_data_initiator().

EventListener Sampa::StochasticCpu::e_rising [private]

Definition at line 68 of file stochastic_processor.h.

IntParameter Sampa::StochasticCpu::m_cache_line_capacity [private]

Definition at line 69 of file stochastic_processor.h.

IntParameter Sampa::StochasticCpu::m_clock_ratio [private]

Definition at line 70 of file stochastic_processor.h.

IntParameter Sampa::StochasticCpu::m_pipeline_depth [private]

Definition at line 71 of file stochastic_processor.h.

Address Sampa::StochasticCpu::m_pc [private]

Definition at line 72 of file stochastic_processor.h.

Address Sampa::StochasticCpu::m_read_address [private]

Definition at line 73 of file stochastic_processor.h.

Address Sampa::StochasticCpu::m_write_address [private]

Definition at line 74 of file stochastic_processor.h.

Address Sampa::StochasticCpu::m_eviction_address [private]

Definition at line 75 of file stochastic_processor.h.

int Sampa::StochasticCpu::m_max_cycles [private]

Definition at line 76 of file stochastic_processor.h.

State Sampa::StochasticCpu::m_state [private]

Definition at line 77 of file stochastic_processor.h.

ClockedEventSingle Sampa::StochasticCpu::e_play_cycle [private]

Definition at line 78 of file stochastic_processor.h.

ClockedEventSingle Sampa::StochasticCpu::e_request [private]

Definition at line 79 of file stochastic_processor.h.

ClockedEventSingle Sampa::StochasticCpu::e_fetch [private]

Definition at line 80 of file stochastic_processor.h.

ClockedEventSingle Sampa::StochasticCpu::e_fetched [private]

Definition at line 81 of file stochastic_processor.h.

ClockedEventSingle Sampa::StochasticCpu::e_read_response [private]

Definition at line 82 of file stochastic_processor.h.

ClockedEventSingle Sampa::StochasticCpu::e_write_posted [private]

Definition at line 83 of file stochastic_processor.h.

ClockedEventSingle Sampa::StochasticCpu::e_eviction [private]

Definition at line 84 of file stochastic_processor.h.

EventListenerSingle Sampa::StochasticCpu::e_fetched_and_read_response [private]

Definition at line 85 of file stochastic_processor.h.

EventListenerSingle Sampa::StochasticCpu::e_fetched_and_write_posted [private]

Definition at line 86 of file stochastic_processor.h.

EventListenerSingle Sampa::StochasticCpu::e_fetched_and_play_cycle [private]

Definition at line 87 of file stochastic_processor.h.

EventListenerSingle Sampa::StochasticCpu::e_fetch_word [private]

Definition at line 88 of file stochastic_processor.h.

EventListenerSingle Sampa::StochasticCpu::e_data_word [private]

Definition at line 89 of file stochastic_processor.h.

bool Sampa::StochasticCpu::m_fetch_miss [private]

Definition at line 90 of file stochastic_processor.h.

int Sampa::StochasticCpu::m_fetch_pending [private]

Definition at line 91 of file stochastic_processor.h.

int Sampa::StochasticCpu::m_fetch_query [private]

Definition at line 92 of file stochastic_processor.h.

Request Sampa::StochasticCpu::m_fetch_request [private]

Definition at line 93 of file stochastic_processor.h.

bool Sampa::StochasticCpu::m_read [private]

Definition at line 94 of file stochastic_processor.h.

int Sampa::StochasticCpu::m_read_pending [private]

Definition at line 95 of file stochastic_processor.h.

int Sampa::StochasticCpu::m_read_query [private]

Definition at line 96 of file stochastic_processor.h.

Request Sampa::StochasticCpu::m_read_request [private]

Definition at line 97 of file stochastic_processor.h.

bool Sampa::StochasticCpu::m_write [private]

Definition at line 98 of file stochastic_processor.h.

int Sampa::StochasticCpu::m_pending_write [private]

Definition at line 99 of file stochastic_processor.h.

IntParameter Sampa::StochasticCpu::m_write_buffer_capacity [private]

Definition at line 100 of file stochastic_processor.h.

Request Sampa::StochasticCpu::m_eviction_request [private]

Definition at line 101 of file stochastic_processor.h.

int Sampa::StochasticCpu::m_eviction_pending [private]

Definition at line 102 of file stochastic_processor.h.

Request Sampa::StochasticCpu::m_write_request [private]

Definition at line 103 of file stochastic_processor.h.

DoubleParameter Sampa::StochasticCpu::m_mispredicted_branch_ratio [private]

Definition at line 104 of file stochastic_processor.h.

DoubleParameter Sampa::StochasticCpu::m_fetch_ratio [private]

Definition at line 105 of file stochastic_processor.h.

DoubleParameter Sampa::StochasticCpu::m_fetch_miss_ratio [private]

Definition at line 106 of file stochastic_processor.h.

DoubleParameter Sampa::StochasticCpu::m_read_miss_ratio [private]

Definition at line 107 of file stochastic_processor.h.

DoubleParameter Sampa::StochasticCpu::m_write_miss_ratio [private]

Definition at line 108 of file stochastic_processor.h.

DoubleParameter Sampa::StochasticCpu::m_branch_ratio [private]

Definition at line 109 of file stochastic_processor.h.

DoubleParameter Sampa::StochasticCpu::m_read_ratio [private]

Definition at line 110 of file stochastic_processor.h.

DoubleParameter Sampa::StochasticCpu::m_write_ratio [private]

Definition at line 111 of file stochastic_processor.h.

DoubleParameter Sampa::StochasticCpu::m_dirty_ratio [private]

Definition at line 112 of file stochastic_processor.h.

IntParameter Sampa::StochasticCpu::m_word_size [private]

Definition at line 113 of file stochastic_processor.h.

double Sampa::StochasticCpu::m_branch_read_write_ratio [private]

Definition at line 114 of file stochastic_processor.h.

double Sampa::StochasticCpu::m_read_write_ratio [private]

Definition at line 115 of file stochastic_processor.h.


The documentation for this class was generated from the following file:
Generated on Sat Feb 16 16:23:19 2008 for Sampa by  doxygen 1.5.3