diff options
| author | Inderpreet Singh <[email protected]> | 2011-12-26 00:07:19 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:19:01 -0700 |
| commit | 20b3ca2e081e9ee076483ca06e382002709b54dd (patch) | |
| tree | 0a23508d0d20a17457479f44b969e88a0e0a8474 /src/abstract_hardware_model.cc | |
| parent | b916cd600d109938a1621345bfc3c46da4bff4c6 (diff) | |
Fix for Bug 124 - ld.local.s8 instructions are not supported
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 11231]
Diffstat (limited to 'src/abstract_hardware_model.cc')
| -rw-r--r-- | src/abstract_hardware_model.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc index 19c3091..1a06001 100644 --- a/src/abstract_hardware_model.cc +++ b/src/abstract_hardware_model.cc @@ -313,9 +313,19 @@ void warp_inst_t::memory_coalescing_arch_13( bool is_write, mem_access_type acce if( !active(thread) ) continue; - // local memory can only be accessed in 4B chunks by one thread - unsigned data_size_coales = (space.get_type() == local_space || space.get_type() == param_space_local ) ? 4 : data_size; - unsigned num_accesses = (space.get_type() == local_space || space.get_type() == param_space_local ) ? data_size/4 : 1; + unsigned data_size_coales = data_size; + unsigned num_accesses = 1; + + if( space.get_type() == local_space || space.get_type() == param_space_local ) { + // Local memory accesses >4B were split into 4B chunks + if(data_size >= 4) { + data_size_coales = 4; + num_accesses = data_size/4; + } + // Otherwise keep the same data_size for sub-4B access to local memory + } + + assert(num_accesses <= MAX_ACCESSES_PER_INSN_PER_THREAD); for(unsigned access=0; access<num_accesses; access++) { |
