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; --- 42 unchanged lines hidden (view full) --- 51 52const MemCmd::CommandInfo 53MemCmd::commandInfo[] = 54{ 55 /* InvalidCmd */ 56 { 0, InvalidCmd, "InvalidCmd" }, 57 /* ReadReq */ 58 { SET3(IsRead, IsRequest, NeedsResponse), ReadResp, "ReadReq" }, |
59 /* WriteReq */ 60 { SET4(IsWrite, IsRequest, NeedsResponse, HasData), 61 WriteResp, "WriteReq" }, |
62 /* WriteReqNoAck */ 63 { SET3(IsWrite, IsRequest, HasData), InvalidCmd, "WriteReqNoAck" }, 64 /* ReadResp */ 65 { SET3(IsRead, IsResponse, HasData), InvalidCmd, "ReadResp" }, |
66 /* WriteResp */ 67 { SET2(IsWrite, IsResponse), InvalidCmd, "WriteResp" }, 68 /* Writeback */ |
69 { SET3(IsWrite, IsRequest, HasData), InvalidCmd, "Writeback" }, |
70 /* SoftPFReq */ 71 { SET4(IsRead, IsRequest, IsSWPrefetch, NeedsResponse), 72 SoftPFResp, "SoftPFReq" }, 73 /* HardPFReq */ 74 { SET4(IsRead, IsRequest, IsHWPrefetch, NeedsResponse), 75 HardPFResp, "HardPFReq" }, 76 /* SoftPFResp */ 77 { SET4(IsRead, IsResponse, IsSWPrefetch, HasData), --- 109 unchanged lines hidden (view full) --- 187 if (funcStart >= timingStart && funcEnd <= timingEnd) { 188 func->allocate(); 189 std::memcpy(func->getPtr<uint8_t>(), timing->getPtr<uint8_t>() + 190 funcStart - timingStart, func->getSize()); 191 func->result = Packet::Success; 192 func->flags |= SATISFIED; 193 return false; 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("Timing packet only partially satisfies the functional" 202 "request. Now what?"); 203 } 204 } else if (func->isWrite()) { 205 if (funcStart >= timingStart) { 206 std::memcpy(timing->getPtr<uint8_t>() + (funcStart - timingStart), 207 func->getPtr<uint8_t>(), 208 (std::min(funcEnd, timingEnd) - funcStart) + 1); --- 55 unchanged lines hidden --- |