From cca02c10622f5a3f29d864abad23e8138909dc18 Mon Sep 17 00:00:00 2001 From: Inderpreet Singh Date: Mon, 15 Oct 2012 13:36:31 -0800 Subject: Added functional execution support for shared memory atomic operations. Integrated in CL14335 and CL14336 [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14366] --- src/gpgpu-sim/shader.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gpgpu-sim') diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index 0dd8fd0..fb8165f 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -1169,6 +1169,10 @@ void ldst_unit::writeback() case 0: // shared memory if( !m_pipeline_reg[0]->empty() ) { m_next_wb = *m_pipeline_reg[0]; + if(m_next_wb.isatomic()) { + 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()); m_pipeline_reg[0]->clear(); serviced_client = next_client; -- cgit v1.3