summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/gpu-sim.cc
diff options
context:
space:
mode:
authorTimothy G Rogers <[email protected]>2018-10-03 17:52:06 -0400
committerGitHub Enterprise <[email protected]>2018-10-03 17:52:06 -0400
commit73c95f79a8cc6fef19d787855b4c50df0edcb743 (patch)
tree6a118dd1529d647a0e01748b5e96e35a8b8cf56e /src/gpgpu-sim/gpu-sim.cc
parent067eac2a618bbca0c6be019f047f14ecdb266efb (diff)
parentab80c6b75b7479caf8f0711ea1a6fbd7f93697f9 (diff)
Merge pull request #21 from abdallm/dev-purdue-integration
A few little things and some sizeable changes: Added memory partition indexing, some configuration file updates, fixed the texture cache so apps that use tex memory will no longer crash.
Diffstat (limited to 'src/gpgpu-sim/gpu-sim.cc')
-rw-r--r--src/gpgpu-sim/gpu-sim.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index c5d4464..08d4525 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -250,6 +250,12 @@ void shader_core_config::reg_options(class OptionParser * opp)
"per-shader L1 data cache config "
" {<nsets>:<bsize>:<assoc>,<rep>:<wr>:<alloc>:<wr_alloc>,<mshr>:<N>:<merge>,<mq> | none}",
"none" );
+ option_parser_register(opp, "-l1_latency", OPT_UINT32, &m_L1D_config.l1_latency,
+ "L1 Hit Latency",
+ "0");
+ option_parser_register(opp, "-smem_latency", OPT_UINT32, &smem_latency,
+ "smem Latency",
+ "3");
option_parser_register(opp, "-gpgpu_cache:dl1PrefL1", OPT_CSTR, &m_L1D_config.m_config_stringPrefL1,
"per-shader L1 data cache config "
" {<nsets>:<bsize>:<assoc>,<rep>:<wr>:<alloc>:<wr_alloc>,<mshr>:<N>:<merge>,<mq> | none}",
@@ -1495,7 +1501,8 @@ void gpgpu_sim::cycle()
} else {
mem_fetch* mf = (mem_fetch*) icnt_pop( m_shader_config->mem2device(i) );
m_memory_sub_partition[i]->push( mf, gpu_sim_cycle + gpu_tot_sim_cycle );
- partiton_reqs_in_parallel_per_cycle++;
+ if(mf)
+ partiton_reqs_in_parallel_per_cycle++;
}
m_memory_sub_partition[i]->cache_cycle(gpu_sim_cycle+gpu_tot_sim_cycle);
m_memory_sub_partition[i]->accumulate_L2cache_stats(m_power_stats->pwr_mem_stat->l2_cache_stats[CURRENT_STAT_IDX]);
@@ -1548,12 +1555,12 @@ void gpgpu_sim::cycle()
issue_block2core();
- // Depending on configuration, flush the caches once all of threads are completed.
+ // Depending on configuration, invalidate the caches once all of threads are completed.
int all_threads_complete = 1;
if (m_config.gpgpu_flush_l1_cache) {
for (unsigned i=0;i<m_shader_config->n_simt_clusters;i++) {
if (m_cluster[i]->get_not_completed() == 0)
- m_cluster[i]->cache_flush();
+ m_cluster[i]->cache_invalidate();
else
all_threads_complete = 0 ;
}
@@ -1575,7 +1582,7 @@ void gpgpu_sim::cycle()
int dlc = 0;
for (unsigned i=0;i<m_memory_config->m_n_mem;i++) {
dlc = m_memory_sub_partition[i]->flushL2();
- assert (dlc == 0); // need to model actual writes to DRAM here
+ assert (dlc == 0); // TODO: need to model actual writes to DRAM here
printf("Dirty lines flushed from L2 %d is %d\n", i, dlc );
}
}