physical.cc (3029:02fdde6319b7) | physical.cc (3091:dba513d68c16) |
---|---|
1/* 2 * Copyright (c) 2001-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; --- 168 unchanged lines hidden (view full) --- 177 memory->getAddressRanges(resp, snoop); 178} 179 180void 181PhysicalMemory::getAddressRanges(AddrRangeList &resp, AddrRangeList &snoop) 182{ 183 snoop.clear(); 184 resp.clear(); | 1/* 2 * Copyright (c) 2001-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; --- 168 unchanged lines hidden (view full) --- 177 memory->getAddressRanges(resp, snoop); 178} 179 180void 181PhysicalMemory::getAddressRanges(AddrRangeList &resp, AddrRangeList &snoop) 182{ 183 snoop.clear(); 184 resp.clear(); |
185 resp.push_back(RangeSize(params()->addrRange.start, params()->addrRange.size())); | 185 resp.push_back(RangeSize(params()->addrRange.start, 186 params()->addrRange.size())); |
186} 187 188int 189PhysicalMemory::MemoryPort::deviceBlockSize() 190{ 191 return memory->deviceBlockSize(); 192} 193 | 187} 188 189int 190PhysicalMemory::MemoryPort::deviceBlockSize() 191{ 192 return memory->deviceBlockSize(); 193} 194 |
194bool 195PhysicalMemory::MemoryPort::recvTiming(Packet *pkt) 196{ 197 assert(pkt->result != Packet::Nacked); 198 199 Tick latency = memory->calculateLatency(pkt); 200 201 memory->doFunctionalAccess(pkt); 202 203 pkt->makeTimingResponse(); 204 sendTiming(pkt, latency); 205 206 return true; 207} 208 | |
209Tick 210PhysicalMemory::MemoryPort::recvAtomic(Packet *pkt) 211{ 212 memory->doFunctionalAccess(pkt); 213 return memory->calculateLatency(pkt); 214} 215 216void 217PhysicalMemory::MemoryPort::recvFunctional(Packet *pkt) 218{ | 195Tick 196PhysicalMemory::MemoryPort::recvAtomic(Packet *pkt) 197{ 198 memory->doFunctionalAccess(pkt); 199 return memory->calculateLatency(pkt); 200} 201 202void 203PhysicalMemory::MemoryPort::recvFunctional(Packet *pkt) 204{ |
205 // Default implementation of SimpleTimingPort::recvFunctional() 206 // calls recvAtomic() and throws away the latency; we can save a 207 // little here by just not calculating the latency. |
|
219 memory->doFunctionalAccess(pkt); 220} 221 222unsigned int 223PhysicalMemory::drain(Event *de) 224{ 225 int count = port->drain(de); 226 if (count) --- 139 unchanged lines hidden --- | 208 memory->doFunctionalAccess(pkt); 209} 210 211unsigned int 212PhysicalMemory::drain(Event *de) 213{ 214 int count = port->drain(de); 215 if (count) --- 139 unchanged lines hidden --- |