Deleted Added
sdiff udiff text old ( 6221:58a3c04e6344 ) new ( 6223:3623155c0e95 )
full compact
1/*
2 * Copyright (c) 2002-2005 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;

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

147 /** Private flags for field validity checking. */
148 PrivateFlags privateFlags;
149
150 /**
151 * The time this request was started. Used to calculate
152 * latencies. This field is set to curTick any time paddr or vaddr
153 * is written.
154 */
155 Tick time;
156
157 /** The address space ID. */
158 int asid;
159
160 /** The virtual address of the request. */
161 Addr vaddr;
162
163 /**

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

183 * just physical address, size, flags, and timestamp (to curTick).
184 * These fields are adequate to perform a request.
185 */
186 Request(Addr paddr, int size, Flags flags)
187 {
188 setPhys(paddr, size, flags);
189 }
190
191 Request(int asid, Addr vaddr, int size, Flags flags, Addr pc,
192 int cid, ThreadID tid)
193 {
194 setVirt(asid, vaddr, size, flags, pc);
195 setThreadContext(cid, tid);
196 }
197
198 ~Request() {} // for FastAlloc

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

208 privateFlags.set(VALID_CONTEXT_ID|VALID_THREAD_ID);
209 }
210
211 /**
212 * Set up a physical (e.g. device) request in a previously
213 * allocated Request object.
214 */
215 void
216 setPhys(Addr _paddr, int _size, Flags _flags)
217 {
218 assert(_size >= 0);
219 paddr = _paddr;
220 size = _size;
221 time = curTick;
222
223 flags.clear(~STICKY_FLAGS);
224 flags.set(_flags);
225 privateFlags.clear(~STICKY_PRIVATE_FLAGS);
226 privateFlags.set(VALID_PADDR|VALID_SIZE);
227 }
228
229 /**
230 * Set up a virtual (e.g., CPU) request in a previously
231 * allocated Request object.
232 */
233 void
234 setVirt(int _asid, Addr _vaddr, int _size, Flags _flags, Addr _pc)
235 {
236 assert(_size >= 0);
237 asid = _asid;
238 vaddr = _vaddr;
239 size = _size;
240 flags = _flags;
241 pc = _pc;
242 time = curTick;
243
244 flags.clear(~STICKY_FLAGS);
245 flags.set(_flags);
246 privateFlags.clear(~STICKY_PRIVATE_FLAGS);
247 privateFlags.set(VALID_VADDR|VALID_SIZE|VALID_PC);
248 }
249
250 /**

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

308 getSize()
309 {
310 assert(privateFlags.isSet(VALID_SIZE));
311 return size;
312 }
313
314 /** Accessor for time. */
315 Tick
316 getTime()
317 {
318 assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR));
319 return time;
320 }
321
322 /** Accessor for flags. */
323 Flags
324 getFlags()
325 {
326 assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR));
327 return flags;
328 }
329

--- 134 unchanged lines hidden ---