Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

Data_Cache Class Reference

#include <dcache.h>

List of all members.

Public Member Functions

 Data_Cache ()
 ~Data_Cache ()
 Data_Cache (int c, int b, int s, int mhsr, int num_of_msp, int msp_latency)
void simulate (char rw, unsigned int address, unsigned int current_cycle, unsigned int &future_cycle, int &miss_or_hit)
int find_free_mhsr (unsigned int current_cycle)
int find_this_address (unsigned int address)
void show_cache (FILE *f)
void report (FILE *f)
 Data_Cache ()
 ~Data_Cache ()
 Data_Cache (int c, int b, int s, int mhsr, int num_of_msp, int msp_latency)
void simulate (char rw, unsigned int address, unsigned int current_cycle, unsigned int &future_cycle, int &miss_or_hit)
int find_free_mhsr (unsigned int current_cycle)
int find_this_address (unsigned int address)
void show_cache (FILE *f)
void report (FILE *f)

Private Attributes

MHSR_mhsr
int _num_of_mhsr
int _num_of_msp
int _msp_latency
int _c
int _b
int _s
int _bytes_in_cache
int _sets_in_cache
int _blocks_in_set
int _bytes_in_block
unsigned int * _tag_array
unsigned int * _time_array
char * _valid_array
char * _dirty_array
int * _mhsr_index_array
unsigned int _reads
unsigned int _writes
unsigned int _reads_in_miss
unsigned int _writes_in_miss
unsigned int _writebacks
MHSR_mhsr
unsigned int * _tag_array
unsigned int * _time_array
char * _valid_array
char * _dirty_array
int * _mhsr_index_array


Constructor & Destructor Documentation

Data_Cache::Data_Cache  )  [inline]
 

Definition at line 58 of file include/dcache.h.

References _mhsr, and _num_of_mhsr.

Data_Cache::~Data_Cache  )  [inline]
 

Definition at line 59 of file include/dcache.h.

References _dirty_array, _mhsr, _tag_array, _time_array, and _valid_array.

Data_Cache::Data_Cache int  c,
int  b,
int  s,
int  mhsr,
int  num_of_msp,
int  msp_latency
[inline]
 

Definition at line 69 of file include/dcache.h.

References _b, _blocks_in_set, _bytes_in_block, _bytes_in_cache, _c, _dirty_array, _mhsr, _mhsr_index_array, _msp_latency, _num_of_mhsr, _num_of_msp, _reads, _reads_in_miss, _s, _sets_in_cache, _tag_array, _time_array, _valid_array, _writebacks, _writes, _writes_in_miss, c, exit(), fprintf(), and i.

Data_Cache::Data_Cache  )  [inline]
 

Definition at line 58 of file src/dcache.h.

References _mhsr, and _num_of_mhsr.

Data_Cache::~Data_Cache  )  [inline]
 

Definition at line 59 of file src/dcache.h.

References _dirty_array, _mhsr, _tag_array, _time_array, and _valid_array.

Data_Cache::Data_Cache int  c,
int  b,
int  s,
int  mhsr,
int  num_of_msp,
int  msp_latency
[inline]
 

Definition at line 69 of file src/dcache.h.

References _b, _blocks_in_set, _bytes_in_block, _bytes_in_cache, _c, _dirty_array, _mhsr, _mhsr_index_array, _msp_latency, _num_of_mhsr, _num_of_msp, _reads, _reads_in_miss, _s, _sets_in_cache, _tag_array, _time_array, _valid_array, _writebacks, _writes, _writes_in_miss, c, exit(), fprintf(), and i.


Member Function Documentation

int Data_Cache::find_free_mhsr unsigned int  current_cycle  ) 
 

int Data_Cache::find_free_mhsr unsigned int  current_cycle  ) 
 

Definition at line 254 of file dcache.cpp.

References _mhsr, _mhsr_index_array, _num_of_mhsr, MHSR::address(), find_this_address(), i, index(), MHSR::reset(), and MHSR::resolved_cycle().

Referenced by simulate().

int Data_Cache::find_this_address unsigned int  address  ) 
 

int Data_Cache::find_this_address unsigned int  address  ) 
 

Definition at line 293 of file dcache.cpp.

References _b, _blocks_in_set, _c, _s, _tag_array, _valid_array, i, and index().

Referenced by find_free_mhsr().

void Data_Cache::report FILE *  f  ) 
 

void Data_Cache::report FILE *  f  ) 
 

Definition at line 319 of file dcache.cpp.

References _reads, _reads_in_miss, _writebacks, _writes, _writes_in_miss, and fprintf().

Referenced by VLIW::output().

void Data_Cache::show_cache FILE *  f  ) 
 

void Data_Cache::show_cache FILE *  f  ) 
 

Definition at line 312 of file dcache.cpp.

References _blocks_in_set, _bytes_in_block, _bytes_in_cache, and fprintf().

Referenced by VLIW::output().

void Data_Cache::simulate char  rw,
unsigned int  address,
unsigned int  current_cycle,
unsigned int &  future_cycle,
int &  miss_or_hit
 

void Data_Cache::simulate char  rw,
unsigned int  address,
unsigned int  current_cycle,
unsigned int &  future_cycle,
int &  miss_or_hit
 

Definition at line 33 of file dcache.cpp.

References _b, _blocks_in_set, _c, _dirty_array, _mhsr, _mhsr_index_array, _reads, _reads_in_miss, _s, _tag_array, _time_array, _valid_array, _writebacks, _writes, _writes_in_miss, D_CACHE_HIT_LATENCY, D_CACHE_MISS_LATENCY, find_free_mhsr(), i, index(), MHSR::resolved_cycle(), MHSR::set_address(), and MHSR::set_resolved_cycle().

Referenced by VLIW::process_pipeline().


Member Data Documentation

int Data_Cache::_b [private]
 

Definition at line 127 of file src/dcache.h.

Referenced by Data_Cache(), find_this_address(), and simulate().

int Data_Cache::_blocks_in_set [private]
 

Definition at line 132 of file src/dcache.h.

Referenced by Data_Cache(), find_this_address(), show_cache(), and simulate().

int Data_Cache::_bytes_in_block [private]
 

Definition at line 133 of file src/dcache.h.

Referenced by Data_Cache(), and show_cache().

int Data_Cache::_bytes_in_cache [private]
 

Definition at line 130 of file src/dcache.h.

Referenced by Data_Cache(), and show_cache().

int Data_Cache::_c [private]
 

Definition at line 126 of file src/dcache.h.

Referenced by Data_Cache(), find_this_address(), and simulate().

char* Data_Cache::_dirty_array [private]
 

Definition at line 138 of file src/dcache.h.

char* Data_Cache::_dirty_array [private]
 

Definition at line 138 of file include/dcache.h.

Referenced by Data_Cache(), simulate(), and ~Data_Cache().

MHSR* Data_Cache::_mhsr [private]
 

Definition at line 121 of file src/dcache.h.

MHSR* Data_Cache::_mhsr [private]
 

Definition at line 121 of file include/dcache.h.

Referenced by Data_Cache(), find_free_mhsr(), simulate(), and ~Data_Cache().

int* Data_Cache::_mhsr_index_array [private]
 

Definition at line 139 of file src/dcache.h.

int* Data_Cache::_mhsr_index_array [private]
 

Definition at line 139 of file include/dcache.h.

Referenced by Data_Cache(), find_free_mhsr(), and simulate().

int Data_Cache::_msp_latency [private]
 

Definition at line 124 of file src/dcache.h.

Referenced by Data_Cache().

int Data_Cache::_num_of_mhsr [private]
 

Definition at line 122 of file src/dcache.h.

Referenced by Data_Cache(), and find_free_mhsr().

int Data_Cache::_num_of_msp [private]
 

Definition at line 123 of file src/dcache.h.

Referenced by Data_Cache().

unsigned int Data_Cache::_reads [private]
 

Definition at line 141 of file src/dcache.h.

Referenced by Data_Cache(), report(), and simulate().

unsigned int Data_Cache::_reads_in_miss [private]
 

Definition at line 143 of file src/dcache.h.

Referenced by Data_Cache(), report(), and simulate().

int Data_Cache::_s [private]
 

Definition at line 128 of file src/dcache.h.

Referenced by Data_Cache(), find_this_address(), and simulate().

int Data_Cache::_sets_in_cache [private]
 

Definition at line 131 of file src/dcache.h.

Referenced by Data_Cache().

unsigned int* Data_Cache::_tag_array [private]
 

Definition at line 135 of file src/dcache.h.

unsigned int* Data_Cache::_tag_array [private]
 

Definition at line 135 of file include/dcache.h.

Referenced by Data_Cache(), find_this_address(), simulate(), and ~Data_Cache().

unsigned int* Data_Cache::_time_array [private]
 

Definition at line 136 of file src/dcache.h.

unsigned int* Data_Cache::_time_array [private]
 

Definition at line 136 of file include/dcache.h.

Referenced by Data_Cache(), simulate(), and ~Data_Cache().

char* Data_Cache::_valid_array [private]
 

Definition at line 137 of file src/dcache.h.

char* Data_Cache::_valid_array [private]
 

Definition at line 137 of file include/dcache.h.

Referenced by Data_Cache(), find_this_address(), simulate(), and ~Data_Cache().

unsigned int Data_Cache::_writebacks [private]
 

Definition at line 145 of file src/dcache.h.

Referenced by Data_Cache(), report(), and simulate().

unsigned int Data_Cache::_writes [private]
 

Definition at line 142 of file src/dcache.h.

Referenced by Data_Cache(), report(), and simulate().

unsigned int Data_Cache::_writes_in_miss [private]
 

Definition at line 144 of file src/dcache.h.

Referenced by Data_Cache(), report(), and simulate().


The documentation for this class was generated from the following files:
Generated on Mon Jul 21 20:30:58 2003 for TINKER LEGO DOC by doxygen 1.3.2