Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/abstract_hardware_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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?
Expand All @@ -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);
Expand Down Expand Up @@ -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?
Expand Down