fetch_unit.cc (11696:80c30bd0c7d6) fetch_unit.cc (11697:c63431b7bbeb)
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:

--- 108 unchanged lines hidden (view full) ---

117 Addr vaddr = wavefront->pc();
118
119 /**
120 * the instruction buffer holds one instruction per entry, regardless
121 * of the underlying instruction's size. the PC, however, addresses
122 * instrutions on a 32b granularity so we must account for that here.
123 */
124 for (int i = 0; i < wavefront->instructionBuffer.size(); ++i) {
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:

--- 108 unchanged lines hidden (view full) ---

117 Addr vaddr = wavefront->pc();
118
119 /**
120 * the instruction buffer holds one instruction per entry, regardless
121 * of the underlying instruction's size. the PC, however, addresses
122 * instrutions on a 32b granularity so we must account for that here.
123 */
124 for (int i = 0; i < wavefront->instructionBuffer.size(); ++i) {
125 int current_inst_size =
125 vaddr +=
126 wavefront->instructionBuffer.at(i)->staticInstruction()->instSize();
126 wavefront->instructionBuffer.at(i)->staticInstruction()->instSize();
127 vaddr += current_inst_size / sizeof(uint32_t);
128 }
127 }
129 vaddr = wavefront->basePtr + vaddr * sizeof(GPUStaticInst*);
128 vaddr = wavefront->basePtr + vaddr;
130
131 DPRINTF(GPUTLB, "CU%d: WF[%d][%d]: Initiating fetch translation: %#x\n",
132 computeUnit->cu_id, wavefront->simdId, wavefront->wfSlotId, vaddr);
133
134 // Since this is an instruction prefetch, if you're split then just finish
135 // out the current line.
136 unsigned block_size = RubySystem::getBlockSizeBytes();
137 // check for split accesses

--- 179 unchanged lines hidden ---
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();
136 // check for split accesses

--- 179 unchanged lines hidden ---