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

Cache Class Reference

#include <cache.h>

List of all members.

Public Member Functions

 Cache ()
 ~Cache ()
 Cache (int c, int b, int s, int p, int wp, int use)
void show_cache (FILE *f)
void print_this_index (int this_index, int location)
int simulate (char rw, unsigned int address, unsigned int global_time)
void report (FILE *f)
int bytes_in_block ()
int total_num_of_miss ()
 Cache ()
 ~Cache ()
 Cache (int c, int b, int s, int p, int wp, int use)
void show_cache (FILE *f)
void print_this_index (int this_index, int location)
int simulate (char rw, unsigned int address, unsigned int global_time)
void report (FILE *f)
int bytes_in_block ()
int total_num_of_miss ()

Private Attributes

int _c
int _b
int _s
int _p
int _wp
int _use_stream_buffer
int _bytes_in_cache
int _sets_in_cache
int _blocks_in_set
int _bytes_in_block
unsigned int * _tag_array
unsigned int * _time_array
int * _miss_or_hit_array
char * _valid_array
char * _dirty_array
unsigned int * _tag_array_in_stream_buffer
char * _valid_array_in_stream_buffer
int _reads
int _writes
int _reads_in_miss
int _writes_in_miss
int _writebacks
int _sb_reads_in_miss
int _sb_writes_in_miss
unsigned int * _tag_array
unsigned int * _time_array
int * _miss_or_hit_array
char * _valid_array
char * _dirty_array
unsigned int * _tag_array_in_stream_buffer
char * _valid_array_in_stream_buffer


Constructor & Destructor Documentation

Cache::Cache  )  [inline]
 

Definition at line 31 of file include/cache.h.

References _dirty_array, _miss_or_hit_array, _tag_array, _tag_array_in_stream_buffer, _time_array, _valid_array, and _valid_array_in_stream_buffer.

Cache::~Cache  )  [inline]
 

Definition at line 33 of file include/cache.h.

References _dirty_array, _miss_or_hit_array, _tag_array, _tag_array_in_stream_buffer, _time_array, _valid_array, and _valid_array_in_stream_buffer.

Cache::Cache int  c,
int  b,
int  s,
int  p,
int  wp,
int  use
[inline]
 

Definition at line 45 of file include/cache.h.

References _b, _blocks_in_set, _bytes_in_block, _bytes_in_cache, _c, _dirty_array, _miss_or_hit_array, _p, _reads, _reads_in_miss, _s, _sb_reads_in_miss, _sb_writes_in_miss, _sets_in_cache, _tag_array, _tag_array_in_stream_buffer, _time_array, _use_stream_buffer, _valid_array, _valid_array_in_stream_buffer, _wp, _writebacks, _writes, _writes_in_miss, c, exit(), fprintf(), i, and index().

Cache::Cache  )  [inline]
 

Definition at line 31 of file src/cache.h.

References _dirty_array, _miss_or_hit_array, _tag_array, _tag_array_in_stream_buffer, _time_array, _valid_array, and _valid_array_in_stream_buffer.

Cache::~Cache  )  [inline]
 

Definition at line 33 of file src/cache.h.

References _dirty_array, _miss_or_hit_array, _tag_array, _tag_array_in_stream_buffer, _time_array, _valid_array, and _valid_array_in_stream_buffer.

Cache::Cache int  c,
int  b,
int  s,
int  p,
int  wp,
int  use
[inline]
 

Definition at line 45 of file src/cache.h.

References _b, _blocks_in_set, _bytes_in_block, _bytes_in_cache, _c, _dirty_array, _miss_or_hit_array, _p, _reads, _reads_in_miss, _s, _sb_reads_in_miss, _sb_writes_in_miss, _sets_in_cache, _tag_array, _tag_array_in_stream_buffer, _time_array, _use_stream_buffer, _valid_array, _valid_array_in_stream_buffer, _wp, _writebacks, _writes, _writes_in_miss, c, exit(), fprintf(), i, and index().


Member Function Documentation

int Cache::bytes_in_block  )  [inline]
 

Definition at line 89 of file src/cache.h.

References _bytes_in_block.

int Cache::bytes_in_block  )  [inline]
 

Definition at line 89 of file include/cache.h.

References _bytes_in_block.

void Cache::print_this_index int  this_index,
int  location
 

void Cache::print_this_index int  this_index,
int  location
 

Definition at line 305 of file cache.cpp.

References _blocks_in_set, _dirty_array, _tag_array, _valid_array, fprintf(), i, and index().

void Cache::report FILE *  f  ) 
 

void Cache::report FILE *  f  ) 
 

Definition at line 331 of file cache.cpp.

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

Referenced by Banked_Cache::report().

void Cache::show_cache FILE *  f  ) 
 

void Cache::show_cache FILE *  f  ) 
 

Definition at line 342 of file cache.cpp.

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

Referenced by Banked_Cache::show_cache().

int Cache::simulate char  rw,
unsigned int  address,
unsigned int  global_time
 

int Cache::simulate char  rw,
unsigned int  address,
unsigned int  global_time
 

Definition at line 30 of file cache.cpp.

References _b, _blocks_in_set, _c, _dirty_array, _miss_or_hit_array, _reads, _reads_in_miss, _s, _tag_array, _time_array, _valid_array, _wp, _writebacks, _writes, _writes_in_miss, i, and index().

Referenced by Banked_Cache::simulate().

int Cache::total_num_of_miss  )  [inline]
 

Definition at line 98 of file src/cache.h.

References _reads_in_miss, and _writes_in_miss.

int Cache::total_num_of_miss  )  [inline]
 

Definition at line 98 of file include/cache.h.

References _reads_in_miss, and _writes_in_miss.

Referenced by Banked_Cache::total_num_of_miss().


Member Data Documentation

int Cache::_b [private]
 

Definition at line 105 of file src/cache.h.

Referenced by Cache(), and simulate().

int Cache::_blocks_in_set [private]
 

Definition at line 117 of file src/cache.h.

Referenced by Cache(), print_this_index(), show_cache(), and simulate().

int Cache::_bytes_in_block [private]
 

Definition at line 118 of file src/cache.h.

Referenced by bytes_in_block(), Cache(), and show_cache().

int Cache::_bytes_in_cache [private]
 

Definition at line 115 of file src/cache.h.

Referenced by Cache(), and show_cache().

int Cache::_c [private]
 

Definition at line 104 of file src/cache.h.

Referenced by Cache(), and simulate().

char* Cache::_dirty_array [private]
 

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

char* Cache::_dirty_array [private]
 

Definition at line 124 of file include/cache.h.

Referenced by Cache(), print_this_index(), simulate(), and ~Cache().

int* Cache::_miss_or_hit_array [private]
 

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

int* Cache::_miss_or_hit_array [private]
 

Definition at line 122 of file include/cache.h.

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

int Cache::_p [private]
 

Definition at line 109 of file src/cache.h.

Referenced by Cache().

int Cache::_reads [private]
 

Definition at line 129 of file src/cache.h.

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

int Cache::_reads_in_miss [private]
 

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

Referenced by Cache(), report(), simulate(), and total_num_of_miss().

int Cache::_s [private]
 

Definition at line 106 of file src/cache.h.

Referenced by Cache(), and simulate().

int Cache::_sb_reads_in_miss [private]
 

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

Referenced by Cache().

int Cache::_sb_writes_in_miss [private]
 

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

Referenced by Cache().

int Cache::_sets_in_cache [private]
 

Definition at line 116 of file src/cache.h.

Referenced by Cache().

unsigned int* Cache::_tag_array [private]
 

Definition at line 120 of file src/cache.h.

unsigned int* Cache::_tag_array [private]
 

Definition at line 120 of file include/cache.h.

Referenced by Cache(), print_this_index(), simulate(), and ~Cache().

unsigned int* Cache::_tag_array_in_stream_buffer [private]
 

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

unsigned int* Cache::_tag_array_in_stream_buffer [private]
 

Definition at line 126 of file include/cache.h.

Referenced by Cache(), and ~Cache().

unsigned int* Cache::_time_array [private]
 

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

unsigned int* Cache::_time_array [private]
 

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

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

int Cache::_use_stream_buffer [private]
 

Definition at line 112 of file src/cache.h.

Referenced by Cache().

char* Cache::_valid_array [private]
 

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

char* Cache::_valid_array [private]
 

Definition at line 123 of file include/cache.h.

Referenced by Cache(), print_this_index(), simulate(), and ~Cache().

char* Cache::_valid_array_in_stream_buffer [private]
 

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

char* Cache::_valid_array_in_stream_buffer [private]
 

Definition at line 127 of file include/cache.h.

Referenced by Cache(), and ~Cache().

int Cache::_wp [private]
 

Definition at line 110 of file src/cache.h.

Referenced by Cache(), show_cache(), and simulate().

int Cache::_writebacks [private]
 

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

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

int Cache::_writes [private]
 

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

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

int Cache::_writes_in_miss [private]
 

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

Referenced by Cache(), report(), simulate(), and total_num_of_miss().


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