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

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

163 return true;
164
165 if (func->isRead()) {
166 if (funcStart >= timingStart && funcEnd <= timingEnd) {
167 func->allocate();
168 memcpy(func->getPtr<uint8_t>(), timing->getPtr<uint8_t>() +
169 funcStart - timingStart, func->getSize());
170 func->result = Packet::Success;
171 return false;
172 } else {
173 // In this case the timing packet only partially satisfies the
174 // requset, so we would need more information to make this work.
175 // Like bytes valid in the packet or something, so the request could
176 // continue and get this bit of possibly newer data along with the
177 // older data not written to yet.
178 panic("Timing packet only partially satisfies the functional"
179 "request. Now what?");
180 }
181 } else if (func->isWrite()) {
182 if (funcStart >= timingStart) {
183 memcpy(timing->getPtr<uint8_t>() + (funcStart - timingStart),
184 func->getPtr<uint8_t>(),
185 std::min(funcEnd, timingEnd) - funcStart);
186 } else { // timingStart > funcStart
187 memcpy(timing->getPtr<uint8_t>(),
188 func->getPtr<uint8_t>() + (timingStart - funcStart),
189 std::min(funcEnd, timingEnd) - timingStart);
190 }
191 // we always want to keep going with a write
192 return true;
193 } else
194 panic("Don't know how to handle command type %#x\n",
195 func->cmdToIndex());
196
197}

--- 41 unchanged lines hidden ---