shader.cc (11435:0f1b46dde3fa) shader.cc (11698:d1ad31187fa5)
1/*
2 * Copyright (c) 2011-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:

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

219{
220 dispatcher = _dispatcher;
221}
222
223void
224Shader::doFunctionalAccess(RequestPtr req, MemCmd cmd, void *data,
225 bool suppress_func_errors, int cu_id)
226{
1/*
2 * Copyright (c) 2011-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:

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

219{
220 dispatcher = _dispatcher;
221}
222
223void
224Shader::doFunctionalAccess(RequestPtr req, MemCmd cmd, void *data,
225 bool suppress_func_errors, int cu_id)
226{
227 unsigned block_size = RubySystem::getBlockSizeBytes();
227 int block_size = cuList.at(cu_id)->cacheLineSize();
228 unsigned size = req->getSize();
229
230 Addr tmp_addr;
231 BaseTLB::Mode trans_mode;
232
233 if (cmd == MemCmd::ReadReq) {
234 trans_mode = BaseTLB::Read;
235 } else if (cmd == MemCmd::WriteReq) {

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

337}
338
339void
340Shader::AccessMem(uint64_t address, void *ptr, uint32_t size, int cu_id,
341 MemCmd cmd, bool suppress_func_errors)
342{
343 uint8_t *data_buf = (uint8_t*)ptr;
344
228 unsigned size = req->getSize();
229
230 Addr tmp_addr;
231 BaseTLB::Mode trans_mode;
232
233 if (cmd == MemCmd::ReadReq) {
234 trans_mode = BaseTLB::Read;
235 } else if (cmd == MemCmd::WriteReq) {

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

337}
338
339void
340Shader::AccessMem(uint64_t address, void *ptr, uint32_t size, int cu_id,
341 MemCmd cmd, bool suppress_func_errors)
342{
343 uint8_t *data_buf = (uint8_t*)ptr;
344
345 for (ChunkGenerator gen(address, size, RubySystem::getBlockSizeBytes());
345 for (ChunkGenerator gen(address, size, cuList.at(cu_id)->cacheLineSize());
346 !gen.done(); gen.next()) {
347 Request *req = new Request(0, gen.addr(), gen.size(), 0,
348 cuList[0]->masterId(), 0, 0, 0);
349
350 doFunctionalAccess(req, cmd, data_buf, suppress_func_errors, cu_id);
351 data_buf += gen.size();
352 delete req;
353 }

--- 58 unchanged lines hidden ---
346 !gen.done(); gen.next()) {
347 Request *req = new Request(0, gen.addr(), gen.size(), 0,
348 cuList[0]->masterId(), 0, 0, 0);
349
350 doFunctionalAccess(req, cmd, data_buf, suppress_func_errors, cu_id);
351 data_buf += gen.size();
352 delete req;
353 }

--- 58 unchanged lines hidden ---