summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorInderpreet Singh <[email protected]>2012-05-07 01:19:35 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:19:37 -0700
commit5b4b678642d36eac16d637886c7f44d0e2e74ccb (patch)
treec4aebf1be3156f571988eb6c16dd17396d3b6a41 /src
parent4505c33872fc5c665bee0060be1fdbfa8c77fdb6 (diff)
Integrated in CL12342 from coherence branch; fix for bug #160
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 12343]
Diffstat (limited to 'src')
-rw-r--r--src/gpgpu-sim/gpu-sim.cc2
-rw-r--r--src/gpgpusim_entrypoint.cc7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index 83c57b2..c96ed9e 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -528,6 +528,7 @@ void gpgpu_sim::init()
// run a CUDA grid on the GPU microarchitecture simulator
gpu_sim_cycle = 0;
gpu_sim_insn = 0;
+ last_gpu_sim_insn = 0;
m_total_cta_launched=0;
reinit_clock_domains();
@@ -861,7 +862,6 @@ void gpgpu_sim::cycle()
icnt_transfer();
}
- last_gpu_sim_insn = 0;
if (clock_mask & CORE) {
// L1 cache + shader core pipeline stages
for (unsigned i=0;i<m_shader_config->n_simt_clusters;i++) {
diff --git a/src/gpgpusim_entrypoint.cc b/src/gpgpusim_entrypoint.cc
index 325bac6..76c63b5 100644
--- a/src/gpgpusim_entrypoint.cc
+++ b/src/gpgpusim_entrypoint.cc
@@ -68,10 +68,11 @@ void *gpgpu_sim_thread_sequential(void*)
if( g_the_gpu->get_more_cta_left() ) {
done = false;
g_the_gpu->init();
- while( g_the_gpu->active() )
+ while( g_the_gpu->active() ) {
g_the_gpu->cycle();
+ g_the_gpu->deadlock_check();
+ }
g_the_gpu->print_stats();
- g_the_gpu->deadlock_check();
print_simulation_time();
}
sem_post(&g_sim_signal_finish);
@@ -120,8 +121,8 @@ void *gpgpu_sim_thread_concurrent(void*)
if( g_the_gpu->active() ) {
g_the_gpu->cycle();
sim_cycles = true;
+ g_the_gpu->deadlock_check();
}
- g_the_gpu->deadlock_check();
active = g_the_gpu->active() || !g_stream_manager->empty();
} while( active );
if(g_debug_execution >= 3) {