packet.cc (4473:fa451e5f9f06) packet.cc (4489:381fcb5b6c31)
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" },
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 /* ReadResp */
60 { SET3(IsRead, IsResponse, HasData), InvalidCmd, "ReadResp" },
61 /* WriteReq */
62 { SET4(IsWrite, IsRequest, NeedsResponse, HasData),
63 WriteResp, "WriteReq" },
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" },
64 /* WriteResp */
65 { SET2(IsWrite, IsResponse), InvalidCmd, "WriteResp" },
66 /* Writeback */
66 /* WriteResp */
67 { SET2(IsWrite, IsResponse), InvalidCmd, "WriteResp" },
68 /* Writeback */
67 { SET4(IsWrite, IsRequest, HasData, NeedsResponse),
68 WritebackAck, "Writeback" },
69 /* WritebackAck */
70 { SET2(IsWrite, IsResponse), InvalidCmd, "WritebackAck" },
69 { SET3(IsWrite, IsRequest, HasData), InvalidCmd, "Writeback" },
71 /* SoftPFReq */
72 { SET4(IsRead, IsRequest, IsSWPrefetch, NeedsResponse),
73 SoftPFResp, "SoftPFReq" },
74 /* HardPFReq */
75 { SET4(IsRead, IsRequest, IsHWPrefetch, NeedsResponse),
76 HardPFResp, "HardPFReq" },
77 /* SoftPFResp */
78 { SET4(IsRead, IsResponse, IsSWPrefetch, HasData),

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

188 if (funcStart >= timingStart && funcEnd <= timingEnd) {
189 func->allocate();
190 std::memcpy(func->getPtr<uint8_t>(), timing->getPtr<uint8_t>() +
191 funcStart - timingStart, func->getSize());
192 func->result = Packet::Success;
193 func->flags |= SATISFIED;
194 return false;
195 } else {
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 {
196 // In this case the timing packet only partially satisfies the
197 // requset, so we would need more information to make this work.
198 // Like bytes valid in the packet or something, so the request could
199 // continue and get this bit of possibly newer data along with the
200 // older data not written to yet.
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 ---
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 ---