diff options
| author | Tor Aamodt <[email protected]> | 2010-07-17 10:29:05 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-07-17 10:29:05 -0800 |
| commit | d3d0b38b90f14660ecb6243373daa921f8ae02b1 (patch) | |
| tree | 9211056ccf334f37babafcecc662400bc42d278b /src/cuda-sim/memory.cc | |
| parent | 9b43d5685c269331ea6d15fe3ed0dade063a798a (diff) | |
integrating Wilson's bugfixes from release branch
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6869]
Diffstat (limited to 'src/cuda-sim/memory.cc')
| -rw-r--r-- | src/cuda-sim/memory.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cuda-sim/memory.cc b/src/cuda-sim/memory.cc index c6a1a9b..754fe7f 100644 --- a/src/cuda-sim/memory.cc +++ b/src/cuda-sim/memory.cc @@ -104,11 +104,24 @@ template<unsigned BSIZE> void memory_space_impl<BSIZE>::read( mem_addr_t addr, s } } +template<unsigned BSIZE> void memory_space_impl<BSIZE>::print( const char *format, FILE *fout ) const +{ + typename map_t::const_iterator i_page; + for (i_page = m_data.begin(); i_page != m_data.end(); ++i_page) { + fprintf(fout, "%s - %#x:", m_name.c_str(), i_page->first); + i_page->second.print(format, fout); + } +} + template class memory_space_impl<32>; template class memory_space_impl<64>; template class memory_space_impl<8192>; template class memory_space_impl<16*1024>; +void g_print_memory_space(memory_space *mem, const char *format = "%08x", FILE *fout = stdout) +{ + mem->print(format,fout); +} #ifdef UNIT_TEST |
