fetch_unit.cc (11697:c63431b7bbeb) | fetch_unit.cc (11698:d1ad31187fa5) |
---|---|
1/* 2 * Copyright (c) 2014-2015 Advanced Micro Devices, Inc. 3 * All rights reserved. 4 * 5 * For use for simulation and test purposes only 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are met: --- 118 unchanged lines hidden (view full) --- 127 } 128 vaddr = wavefront->basePtr + vaddr; 129 130 DPRINTF(GPUTLB, "CU%d: WF[%d][%d]: Initiating fetch translation: %#x\n", 131 computeUnit->cu_id, wavefront->simdId, wavefront->wfSlotId, vaddr); 132 133 // Since this is an instruction prefetch, if you're split then just finish 134 // out the current line. | 1/* 2 * Copyright (c) 2014-2015 Advanced Micro Devices, Inc. 3 * All rights reserved. 4 * 5 * For use for simulation and test purposes only 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are met: --- 118 unchanged lines hidden (view full) --- 127 } 128 vaddr = wavefront->basePtr + vaddr; 129 130 DPRINTF(GPUTLB, "CU%d: WF[%d][%d]: Initiating fetch translation: %#x\n", 131 computeUnit->cu_id, wavefront->simdId, wavefront->wfSlotId, vaddr); 132 133 // Since this is an instruction prefetch, if you're split then just finish 134 // out the current line. |
135 unsigned block_size = RubySystem::getBlockSizeBytes(); | 135 int block_size = computeUnit->cacheLineSize(); |
136 // check for split accesses 137 Addr split_addr = roundDown(vaddr + block_size - 1, block_size); | 136 // check for split accesses 137 Addr split_addr = roundDown(vaddr + block_size - 1, block_size); |
138 unsigned size = block_size; | 138 int size = block_size; |
139 140 if (split_addr > vaddr) { 141 // misaligned access, just grab the rest of the line 142 size = split_addr - vaddr; 143 } 144 145 // set up virtual request 146 Request *req = new Request(0, vaddr, size, Request::INST_FETCH, --- 169 unchanged lines hidden --- | 139 140 if (split_addr > vaddr) { 141 // misaligned access, just grab the rest of the line 142 size = split_addr - vaddr; 143 } 144 145 // set up virtual request 146 Request *req = new Request(0, vaddr, size, Request::INST_FETCH, --- 169 unchanged lines hidden --- |