Deleted Added
sdiff udiff text old ( 8436:5648986156db ) new ( 8668:be72c2a127b2 )
full compact
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * Copyright (c) 2010 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer;

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

187 int offset = func_start - val_start;
188
189 if (isRead()) {
190 if (func_start >= val_start && func_end <= val_end) {
191 allocate();
192 memcpy(getPtr<uint8_t>(), data + offset, getSize());
193 return true;
194 } else {
195 // In this case the timing packet only partially satisfies
196 // the request, so we would need more information to make
197 // this work. Like bytes valid in the packet or
198 // something, so the request could continue and get this
199 // bit of possibly newer data along with the older data
200 // not written to yet.
201 panic("Memory value only partially satisfies the functional "
202 "request. Now what?");
203 }
204 } else if (isWrite()) {
205 if (offset >= 0) {
206 memcpy(data + offset, getPtr<uint8_t>(),
207 (min(func_end, val_end) - func_start) + 1);
208 } else {
209 // val_start > func_start
210 memcpy(data, getPtr<uint8_t>() - offset,

--- 76 unchanged lines hidden ---