summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gpgpu-sim/dram.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gpgpu-sim/dram.cc b/src/gpgpu-sim/dram.cc
index dcc0a7d..5c1ddab 100644
--- a/src/gpgpu-sim/dram.cc
+++ b/src/gpgpu-sim/dram.cc
@@ -189,11 +189,12 @@ dram_req_t::dram_req_t( class mem_fetch *mf, unsigned banks, unsigned dram_bnk_i
const addrdec_t &tlx = mf->get_tlx_addr();
if(dram_bnk_indexing_policy == 0) {
- int lbank = log2(banks);
- bk = tlx.bk ^ (((1<<lbank)-1) & tlx.row);
+ bk = tlx.bk;
}
- else if(dram_bnk_indexing_policy == 1)
- bk = tlx.bk;
+ else if(dram_bnk_indexing_policy == 1) {
+ int lbank = log2(banks);
+ bk = tlx.bk ^ (((1<<lbank)-1) & tlx.row);
+ }
else
assert(1);