diff options
| author | Tor Aamodt <[email protected]> | 2010-11-28 20:48:33 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-11-28 20:48:33 -0800 |
| commit | 6e06c2e1de8c51a88845b7f35cea219dca7456f2 (patch) | |
| tree | 28b3daed248f3f4dca9ca49f9d939f6edae10238 /src/gpgpu-sim/gpu-cache.cc | |
| parent | 23d096dd1f1d4f0387087ffff0605fbf349556d2 (diff) | |
enabling L2 data cache... it is write through, write evict like L1.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 8154]
Diffstat (limited to 'src/gpgpu-sim/gpu-cache.cc')
| -rw-r--r-- | src/gpgpu-sim/gpu-cache.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gpgpu-sim/gpu-cache.cc b/src/gpgpu-sim/gpu-cache.cc index 594e683..202511d 100644 --- a/src/gpgpu-sim/gpu-cache.cc +++ b/src/gpgpu-sim/gpu-cache.cc @@ -241,3 +241,21 @@ void tag_array::print( FILE *stream, unsigned &total_access, unsigned &total_mis total_misses+=m_miss; total_access+=m_access; } + +bool was_write_sent( const std::list<cache_event> &events ) +{ + for( std::list<cache_event>::const_iterator e=events.begin(); e!=events.end(); e++ ) { + if( *e == WRITE_REQUEST_SENT ) + return true; + } + return false; +} + +bool was_read_sent( const std::list<cache_event> &events ) +{ + for( std::list<cache_event>::const_iterator e=events.begin(); e!=events.end(); e++ ) { + if( *e == READ_REQUEST_SENT ) + return true; + } + return false; +} |
