From a009318f6ffae0c71b5735c3e6b49b5a0bd09029 Mon Sep 17 00:00:00 2001 From: Mahmoud Date: Tue, 12 Nov 2019 18:48:46 -0500 Subject: handling the atomics in trace-driven and add the missing two instructions of Nvbits --- src/gpgpu-sim/l2cache.cc | 2 +- src/gpgpu-sim/shader.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gpgpu-sim') diff --git a/src/gpgpu-sim/l2cache.cc b/src/gpgpu-sim/l2cache.cc index fb4ce32..8bbe91c 100644 --- a/src/gpgpu-sim/l2cache.cc +++ b/src/gpgpu-sim/l2cache.cc @@ -755,7 +755,7 @@ mem_fetch* memory_sub_partition::pop() { mem_fetch* mf = m_L2_icnt_queue->pop(); m_request_tracker.erase(mf); - if ( mf && mf->isatomic() ) + if ( mf && mf->isatomic() && !m_gpu->get_config().is_trace_driven_mode() ) mf->do_atomic(); if( mf && (mf->get_access_type() == L2_WRBK_ACC || mf->get_access_type() == L1_WRBK_ACC) ) { delete mf; diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index acf40e5..de33026 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -2311,7 +2311,8 @@ void ldst_unit::writeback() if( !m_pipeline_reg[0]->empty() ) { m_next_wb = *m_pipeline_reg[0]; if(m_next_wb.isatomic()) { - m_next_wb.do_atomic(); + if(!m_core->get_gpu()->get_config().is_trace_driven_mode()) + m_next_wb.do_atomic(); m_core->decrement_atomic_count(m_next_wb.warp_id(), m_next_wb.active_count()); } m_core->dec_inst_in_pipeline(m_pipeline_reg[0]->warp_id()); -- cgit v1.3