summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.cc
diff options
context:
space:
mode:
authoraamir <[email protected]>2018-09-14 01:42:35 -0700
committeraamir <[email protected]>2018-09-14 01:42:35 -0700
commitcc14e087c164a25cd9e2374777fdc4e57d9cec39 (patch)
tree88861927016e54baa124fb52c7157bcff50a3371 /src/abstract_hardware_model.cc
parent7845388e64b9617033a496d110902fa345c0ef8b (diff)
corrected the bug in vpcore functional model
Diffstat (limited to 'src/abstract_hardware_model.cc')
-rw-r--r--src/abstract_hardware_model.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc
index b24a77e..83e76fe 100644
--- a/src/abstract_hardware_model.cc
+++ b/src/abstract_hardware_model.cc
@@ -389,7 +389,8 @@ void warp_inst_t::memory_coalescing_arch_13( bool is_write, mem_access_type acce
assert(num_accesses <= MAX_ACCESSES_PER_INSN_PER_THREAD);
- for(unsigned access=0; access<num_accesses; access++) {
+// for(unsigned access=0; access<num_accesses; access++) {
+ for(unsigned access=0; (access<MAX_ACCESSES_PER_INSN_PER_THREAD)&&(m_per_scalar_thread[thread].memreqaddr[access]!=0); access++) {
new_addr_type addr = m_per_scalar_thread[thread].memreqaddr[access];
unsigned block_address = line_size_based_tag_func(addr,segment_size);
unsigned chunk = (addr&127)/32; // which 32-byte chunk within in a 128-byte chunk does this thread access?