packet.hh (2814:b723c79f5349) packet.hh (2855:5ca2cdb32521)
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;

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

178 public:
179 /** List of all commands associated with a packet. */
180 enum Command
181 {
182 InvalidCmd = 0,
183 ReadReq = IsRead | IsRequest | NeedsResponse,
184 WriteReq = IsWrite | IsRequest | NeedsResponse,
185 WriteReqNoAck = IsWrite | IsRequest,
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;

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

178 public:
179 /** List of all commands associated with a packet. */
180 enum Command
181 {
182 InvalidCmd = 0,
183 ReadReq = IsRead | IsRequest | NeedsResponse,
184 WriteReq = IsWrite | IsRequest | NeedsResponse,
185 WriteReqNoAck = IsWrite | IsRequest,
186 ReadResp = IsRead | IsResponse,
187 WriteResp = IsWrite | IsResponse,
186 ReadResp = IsRead | IsResponse | NeedsResponse,
187 WriteResp = IsWrite | IsResponse | NeedsResponse,
188 Writeback = IsWrite | IsRequest,
189 SoftPFReq = IsRead | IsRequest | IsSWPrefetch | NeedsResponse,
190 HardPFReq = IsRead | IsRequest | IsHWPrefetch | NeedsResponse,
188 Writeback = IsWrite | IsRequest,
189 SoftPFReq = IsRead | IsRequest | IsSWPrefetch | NeedsResponse,
190 HardPFReq = IsRead | IsRequest | IsHWPrefetch | NeedsResponse,
191 SoftPFResp = IsRead | IsRequest | IsSWPrefetch | IsResponse,
192 HardPFResp = IsRead | IsRequest | IsHWPrefetch | IsResponse,
191 SoftPFResp = IsRead | IsResponse | IsSWPrefetch | NeedsResponse,
192 HardPFResp = IsRead | IsResponse | IsHWPrefetch | NeedsResponse,
193 InvalidateReq = IsInvalidate | IsRequest,
194 WriteInvalidateReq = IsWrite | IsInvalidate | IsRequest,
193 InvalidateReq = IsInvalidate | IsRequest,
194 WriteInvalidateReq = IsWrite | IsInvalidate | IsRequest,
195 UpgradeReq = IsInvalidate | NeedsResponse,
196 UpgradeResp = IsInvalidate | IsResponse,
197 ReadExReq = IsRead | IsInvalidate | NeedsResponse,
198 ReadExResp = IsRead | IsInvalidate | IsResponse
195 UpgradeReq = IsInvalidate | IsRequest | NeedsResponse,
196 UpgradeResp = IsInvalidate | IsResponse | NeedsResponse,
197 ReadExReq = IsRead | IsInvalidate | IsRequest | NeedsResponse,
198 ReadExResp = IsRead | IsInvalidate | IsResponse | NeedsResponse
199 };
200
201 /** Return the string name of the cmd field (for debugging and
202 * tracing). */
203 const std::string &cmdString() const;
204
205 /** Reutrn the string to a cmd given by idx. */
206 const std::string &cmdIdxToString(Command idx);

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

306 /** Take a request packet and modify it in place to be suitable
307 * for returning as a response to that request. Used for timing
308 * accesses only. For atomic and functional accesses, the
309 * request packet is always implicitly passed back *without*
310 * modifying the command or destination fields, so this function
311 * should not be called. */
312 void makeTimingResponse() {
313 assert(needsResponse());
199 };
200
201 /** Return the string name of the cmd field (for debugging and
202 * tracing). */
203 const std::string &cmdString() const;
204
205 /** Reutrn the string to a cmd given by idx. */
206 const std::string &cmdIdxToString(Command idx);

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

306 /** Take a request packet and modify it in place to be suitable
307 * for returning as a response to that request. Used for timing
308 * accesses only. For atomic and functional accesses, the
309 * request packet is always implicitly passed back *without*
310 * modifying the command or destination fields, so this function
311 * should not be called. */
312 void makeTimingResponse() {
313 assert(needsResponse());
314 assert(isRequest());
314 int icmd = (int)cmd;
315 int icmd = (int)cmd;
315 icmd &= ~(IsRequest | NeedsResponse);
316 icmd &= ~(IsRequest);
316 icmd |= IsResponse;
317 cmd = (Command)icmd;
318 dest = src;
319 srcValid = false;
320 }
321
322 /** Take a request packet that has been returned as NACKED and modify it so
323 * that it can be sent out again. Only packets that need a response can be

--- 46 unchanged lines hidden ---
317 icmd |= IsResponse;
318 cmd = (Command)icmd;
319 dest = src;
320 srcValid = false;
321 }
322
323 /** Take a request packet that has been returned as NACKED and modify it so
324 * that it can be sent out again. Only packets that need a response can be

--- 46 unchanged lines hidden ---