summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.cc
diff options
context:
space:
mode:
authorallen <[email protected]>2020-11-09 21:46:01 +0900
committerGitHub <[email protected]>2020-11-09 21:46:01 +0900
commit07f77e1c3d1f1222de21bb77e4dcc5a6ab94a90f (patch)
tree0084d3bb358cd725d6315153eb225df38b441d17 /src/abstract_hardware_model.cc
parent2d73b61a51d9f7ed4c2af92ee214a79922c97925 (diff)
do not truncate 32 MSB bits of the memory address
Diffstat (limited to 'src/abstract_hardware_model.cc')
-rw-r--r--src/abstract_hardware_model.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc
index 5ad6f10..e0e1d23 100644
--- a/src/abstract_hardware_model.cc
+++ b/src/abstract_hardware_model.cc
@@ -205,8 +205,8 @@ gpgpu_t::gpgpu_t(const gpgpu_functional_sim_config &config, gpgpu_context *ctx)
gpu_tot_sim_cycle = 0;
}
-address_type line_size_based_tag_func(new_addr_type address,
- new_addr_type line_size) {
+new_addr_type line_size_based_tag_func(new_addr_type address,
+ new_addr_type line_size) {
// gives the tag for an address based on a given line size
return address & ~(line_size - 1);
}
@@ -448,7 +448,7 @@ void warp_inst_t::generate_mem_accesses() {
for (unsigned thread = 0; thread < m_config->warp_size; thread++) {
if (!active(thread)) continue;
new_addr_type addr = m_per_scalar_thread[thread].memreqaddr[0];
- unsigned block_address = line_size_based_tag_func(addr, cache_block_size);
+ new_addr_type block_address = line_size_based_tag_func(addr, cache_block_size);
accesses[block_address].set(thread);
unsigned idx = addr - block_address;
for (unsigned i = 0; i < data_size; i++) byte_mask.set(idx + i);
@@ -530,7 +530,7 @@ void warp_inst_t::memory_coalescing_arch(bool is_write,
(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);
+ new_addr_type 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?
@@ -552,7 +552,7 @@ void warp_inst_t::memory_coalescing_arch(bool is_write,
if (block_address != line_size_based_tag_func(
addr + data_size_coales - 1, segment_size)) {
addr = addr + data_size_coales - 1;
- unsigned block_address = line_size_based_tag_func(addr, segment_size);
+ new_addr_type block_address = line_size_based_tag_func(addr, segment_size);
unsigned chunk = (addr & 127) / 32;
transaction_info &info = subwarp_transactions[block_address];
info.chunks.set(chunk);
@@ -625,7 +625,7 @@ void warp_inst_t::memory_coalescing_arch_atomic(bool is_write,
if (!active(thread)) continue;
new_addr_type addr = m_per_scalar_thread[thread].memreqaddr[0];
- unsigned block_address = line_size_based_tag_func(addr, segment_size);
+ new_addr_type 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?