From e1cffaf08733754ab55052b6a2729dae57665d29 Mon Sep 17 00:00:00 2001 From: Inderpreet Singh Date: Wed, 25 May 2011 16:01:16 -0800 Subject: Fix bug #100: local memory address translation returns multiple addresses Fix bug #101: Coalescing allows multiple accesses per thread for local memory access This will break atomics which assume at most one thread per mem_fetch. It did not break scoreboard as that logic tracks mem_fetches at warp level, not thread level. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 9303] --- src/abstract_hardware_model.cc | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'src/abstract_hardware_model.cc') diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc index e883455..1cce2f2 100644 --- a/src/abstract_hardware_model.cc +++ b/src/abstract_hardware_model.cc @@ -123,7 +123,7 @@ void warp_inst_t::generate_mem_accesses() for( unsigned thread=subwarp*subwarp_size; thread < (subwarp+1)*subwarp_size; thread++ ) { if( !active(thread) ) continue; - new_addr_type addr = m_per_scalar_thread[thread].memreqaddr; + new_addr_type addr = m_per_scalar_thread[thread].memreqaddr[0]; //FIXME: deferred allocation of shared memory should not accumulate across kernel launches //assert( addr < m_config->gpgpu_shmem_size ); unsigned bank = m_config->shmem_bank_func(addr); @@ -211,15 +211,26 @@ void warp_inst_t::generate_mem_accesses() for( unsigned thread=subwarp*subwarp_size; threadwarp_size; thread++ ) { if( !active(thread) ) continue; - new_addr_type addr = m_per_scalar_thread[thread].memreqaddr; + new_addr_type addr = m_per_scalar_thread[thread].memreqaddr[0]; unsigned block_address = line_size_based_tag_func(addr,cache_block_size); accesses[block_address].set(thread); unsigned idx = addr-block_address; -- cgit v1.3