Sampa::TwoPortL1Cpu Class Reference

#include <processor.h>

Inheritance diagram for Sampa::TwoPortL1Cpu:

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
< TwoPortL1Cpu
AdaptingInitiator

Public Member Functions

 TwoPortL1Cpu (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 Member Functions

 SAMPA_MODULE (TwoPortL1Cpu)
void complete_restart ()
void execute ()
void fetch1 ()
bool fetch_hit (const Address &)
Opcode get_instruction (Address)
void decode1 ()
void execute1 ()
Opcode predict ()
bool read_hit ()
bool write_hit ()
void execute2 ()
void invalidate_pipeline ()
void read1 ()
bool eviction ()
void write1 ()

Private Attributes

AdaptingInitiator p_fetch
AdaptingInitiator p_data
EventListener e_rising
IntParameter m_cache_line_capacity
Gated< Addressm_pc
Address m_old_pc
Gated< Opcodem_inst
Gated< bool > m_fetch_response_present
Gated< bool > m_fetch_miss
int m_fetch_pending
int m_fetch_query
Request m_fetch_request
Gated< Opcodem_decoded
Gated< Opcodem_stage1
Gated< Opcodem_stage2
Opcode m_prediction [2]
Gated< bool > m_read
Gated< bool > m_read_response_present
Gated< bool > m_request_done
int m_read_pending
int m_read_query
Request m_read_request
Gated< bool > m_write
int m_pending_write
IntParameter m_write_buffer_capacity
Request m_eviction_request
Gated< 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
double m_branch_read_write_ratio
double m_read_write_ratio


Detailed Description

Definition at line 26 of file processor.h.


Member Typedef Documentation

typedef AdaptingInitiator<TwoPortL1Cpu> Sampa::TwoPortL1Cpu::AdaptingInitiator

Definition at line 42 of file processor.h.


Member Enumeration Documentation

enum Sampa::TwoPortL1Cpu::Opcode

Enumerator:
NOP 
STALL 
BRANCH 
READ 
WRITE 
READ_MISS 
WRITE_MISS 
MISPREDICTED 

Definition at line 41 of file 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::TwoPortL1Cpu::TwoPortL1Cpu ( const Name name  ) 


Member Function Documentation

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

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

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

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

Definition at line 33 of file processor.h.

References p_fetch.

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

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

Definition at line 36 of file processor.h.

References p_data.

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

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

void Sampa::TwoPortL1Cpu::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.

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

void Sampa::TwoPortL1Cpu::fetch1 (  )  [private]

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

Opcode Sampa::TwoPortL1Cpu::get_instruction ( Address   )  [private]

void Sampa::TwoPortL1Cpu::decode1 (  )  [private]

void Sampa::TwoPortL1Cpu::execute1 (  )  [private]

Opcode Sampa::TwoPortL1Cpu::predict (  )  [private]

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

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

void Sampa::TwoPortL1Cpu::execute2 (  )  [private]

void Sampa::TwoPortL1Cpu::invalidate_pipeline (  )  [private]

void Sampa::TwoPortL1Cpu::read1 (  )  [private]

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

void Sampa::TwoPortL1Cpu::write1 (  )  [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::TwoPortL1Cpu::p_fetch [private]

Definition at line 61 of file processor.h.

Referenced by get_fetch_initiator().

AdaptingInitiator Sampa::TwoPortL1Cpu::p_data [private]

Definition at line 62 of file processor.h.

Referenced by get_data_initiator().

EventListener Sampa::TwoPortL1Cpu::e_rising [private]

Definition at line 63 of file processor.h.

IntParameter Sampa::TwoPortL1Cpu::m_cache_line_capacity [private]

Definition at line 64 of file processor.h.

Gated<Address> Sampa::TwoPortL1Cpu::m_pc [private]

Definition at line 65 of file processor.h.

Address Sampa::TwoPortL1Cpu::m_old_pc [private]

Definition at line 66 of file processor.h.

Gated<Opcode> Sampa::TwoPortL1Cpu::m_inst [private]

Definition at line 67 of file processor.h.

Gated<bool> Sampa::TwoPortL1Cpu::m_fetch_response_present [private]

Definition at line 68 of file processor.h.

Gated<bool> Sampa::TwoPortL1Cpu::m_fetch_miss [private]

Definition at line 69 of file processor.h.

int Sampa::TwoPortL1Cpu::m_fetch_pending [private]

Definition at line 70 of file processor.h.

int Sampa::TwoPortL1Cpu::m_fetch_query [private]

Definition at line 71 of file processor.h.

Request Sampa::TwoPortL1Cpu::m_fetch_request [private]

Definition at line 72 of file processor.h.

Gated<Opcode> Sampa::TwoPortL1Cpu::m_decoded [private]

Definition at line 73 of file processor.h.

Gated<Opcode> Sampa::TwoPortL1Cpu::m_stage1 [private]

Definition at line 74 of file processor.h.

Gated<Opcode> Sampa::TwoPortL1Cpu::m_stage2 [private]

Definition at line 75 of file processor.h.

Opcode Sampa::TwoPortL1Cpu::m_prediction[2] [private]

Definition at line 76 of file processor.h.

Gated<bool> Sampa::TwoPortL1Cpu::m_read [private]

Definition at line 77 of file processor.h.

Gated<bool> Sampa::TwoPortL1Cpu::m_read_response_present [private]

Definition at line 78 of file processor.h.

Gated<bool> Sampa::TwoPortL1Cpu::m_request_done [private]

Definition at line 79 of file processor.h.

int Sampa::TwoPortL1Cpu::m_read_pending [private]

Definition at line 80 of file processor.h.

int Sampa::TwoPortL1Cpu::m_read_query [private]

Definition at line 81 of file processor.h.

Request Sampa::TwoPortL1Cpu::m_read_request [private]

Definition at line 82 of file processor.h.

Gated<bool> Sampa::TwoPortL1Cpu::m_write [private]

Definition at line 83 of file processor.h.

int Sampa::TwoPortL1Cpu::m_pending_write [private]

Definition at line 84 of file processor.h.

IntParameter Sampa::TwoPortL1Cpu::m_write_buffer_capacity [private]

Definition at line 85 of file processor.h.

Request Sampa::TwoPortL1Cpu::m_eviction_request [private]

Definition at line 86 of file processor.h.

Gated<int> Sampa::TwoPortL1Cpu::m_eviction_pending [private]

Definition at line 87 of file processor.h.

Request Sampa::TwoPortL1Cpu::m_write_request [private]

Definition at line 88 of file processor.h.

DoubleParameter Sampa::TwoPortL1Cpu::m_mispredicted_branch_ratio [private]

Definition at line 89 of file processor.h.

DoubleParameter Sampa::TwoPortL1Cpu::m_fetch_ratio [private]

Definition at line 90 of file processor.h.

DoubleParameter Sampa::TwoPortL1Cpu::m_fetch_miss_ratio [private]

Definition at line 91 of file processor.h.

DoubleParameter Sampa::TwoPortL1Cpu::m_read_miss_ratio [private]

Definition at line 92 of file processor.h.

DoubleParameter Sampa::TwoPortL1Cpu::m_write_miss_ratio [private]

Definition at line 93 of file processor.h.

DoubleParameter Sampa::TwoPortL1Cpu::m_branch_ratio [private]

Definition at line 94 of file processor.h.

DoubleParameter Sampa::TwoPortL1Cpu::m_read_ratio [private]

Definition at line 95 of file processor.h.

DoubleParameter Sampa::TwoPortL1Cpu::m_write_ratio [private]

Definition at line 96 of file processor.h.

DoubleParameter Sampa::TwoPortL1Cpu::m_dirty_ratio [private]

Definition at line 97 of file processor.h.

double Sampa::TwoPortL1Cpu::m_branch_read_write_ratio [private]

Definition at line 98 of file processor.h.

double Sampa::TwoPortL1Cpu::m_read_write_ratio [private]

Definition at line 99 of file processor.h.


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