diff options
Diffstat (limited to 'src/gpgpu-sim')
| -rw-r--r-- | src/gpgpu-sim/gpu-sim.cc | 2 | ||||
| -rw-r--r-- | src/gpgpu-sim/gpu-sim.h | 1 | ||||
| -rw-r--r-- | src/gpgpu-sim/shader.cc | 13 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc index b2b00a4..9d3145b 100644 --- a/src/gpgpu-sim/gpu-sim.cc +++ b/src/gpgpu-sim/gpu-sim.cc @@ -759,7 +759,7 @@ void gpgpu_sim::gpu_print_stat() m_memory_partition_unit[i]->set_icnt_power_stats(temp); total_mem_to_simt += temp; } - for(unsigned i=0; i<m_config.num_shader(); i++){ + for(unsigned i=0; i<m_config.num_cluster(); i++){ unsigned temp=0; m_cluster[i]->set_icnt_stats(temp); total_simt_to_mem += temp; diff --git a/src/gpgpu-sim/gpu-sim.h b/src/gpgpu-sim/gpu-sim.h index 7866688..98f719f 100644 --- a/src/gpgpu-sim/gpu-sim.h +++ b/src/gpgpu-sim/gpu-sim.h @@ -302,6 +302,7 @@ public: } unsigned num_shader() const { return m_shader_config.num_shader(); } + unsigned num_cluster() const { return m_shader_config.n_simt_clusters; } unsigned get_max_concurrent_kernel() const { return max_concurrent_kernel; } private: diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index 4095cbc..ad097e8 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -971,10 +971,15 @@ void ldst_unit::set_icnt_power_stats(unsigned &simt_to_mem) const{ unsigned tex=0; unsigned l1c=0; - m_L1D->set_icnt_power_stats(l1d); - m_L1T->set_icnt_power_stats(tex); - m_L1C->set_icnt_power_stats(l1c); - + if( m_L1D ) { + m_L1D->set_icnt_power_stats(l1d); + } + if( m_L1T ){ + m_L1T->set_icnt_power_stats(tex); + } + if( m_L1C ){ + m_L1C->set_icnt_power_stats(l1c); + } simt_to_mem = n_simt_to_mem+l1d+tex+l1c; // All components that push packets into the interconnect } |
