request.hh (5735:a88e8e7dec75) | request.hh (5744:342cbc20a188) |
---|---|
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; --- 29 unchanged lines hidden (view full) --- 38 39#ifndef __MEM_REQUEST_HH__ 40#define __MEM_REQUEST_HH__ 41 42#include <cassert> 43 44#include "base/fast_alloc.hh" 45#include "base/flags.hh" | 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; --- 29 unchanged lines hidden (view full) --- 38 39#ifndef __MEM_REQUEST_HH__ 40#define __MEM_REQUEST_HH__ 41 42#include <cassert> 43 44#include "base/fast_alloc.hh" 45#include "base/flags.hh" |
46#include "base/misc.hh" |
|
46#include "sim/host.hh" 47#include "sim/core.hh" 48 49class Request; 50 51typedef Request* RequestPtr; 52 53class Request : public FastAlloc --- 174 unchanged lines hidden (view full) --- 228 setPaddr(Addr _paddr) 229 { 230 assert(flags.any(VALID_VADDR)); 231 paddr = _paddr; 232 flags.set(VALID_PADDR); 233 } 234 235 /** | 47#include "sim/host.hh" 48#include "sim/core.hh" 49 50class Request; 51 52typedef Request* RequestPtr; 53 54class Request : public FastAlloc --- 174 unchanged lines hidden (view full) --- 229 setPaddr(Addr _paddr) 230 { 231 assert(flags.any(VALID_VADDR)); 232 paddr = _paddr; 233 flags.set(VALID_PADDR); 234 } 235 236 /** |
237 * Generate two requests as if this request had been split into two 238 * pieces. The original request can't have been translated already. 239 */ 240 void splitOnVaddr(Addr split_addr, RequestPtr &req1, RequestPtr &req2) 241 { 242 assert(flags.any(VALID_VADDR)); 243 assert(flags.none(VALID_PADDR)); 244 assert(split_addr > vaddr && split_addr < vaddr + size); 245 req1 = new Request; 246 *req1 = *this; 247 req2 = new Request; 248 *req2 = *this; 249 req1->size = split_addr - vaddr; 250 req2->vaddr = split_addr; 251 req2->size = size - req1->size; 252 } 253 254 /** |
|
236 * Accessor for paddr. 237 */ 238 Addr 239 getPaddr() 240 { 241 assert(flags.any(VALID_PADDR)); 242 return paddr; 243 } --- 200 unchanged lines hidden --- | 255 * Accessor for paddr. 256 */ 257 Addr 258 getPaddr() 259 { 260 assert(flags.any(VALID_PADDR)); 261 return paddr; 262 } --- 200 unchanged lines hidden --- |