cache.hh (4626:ed8aacb19c03) | cache.hh (4628:17b3ce796176) |
---|---|
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; --- 165 unchanged lines hidden (view full) --- 174 * Does all the processing necessary to perform the provided request. 175 * @param pkt The memory request to perform. 176 * @param lat The latency of the access. 177 * @param writebacks List for any writebacks that need to be performed. 178 * @param update True if the replacement data should be updated. 179 * @return Pointer to the cache block touched by the request. NULL if it 180 * was a miss. 181 */ | 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; --- 165 unchanged lines hidden (view full) --- 174 * Does all the processing necessary to perform the provided request. 175 * @param pkt The memory request to perform. 176 * @param lat The latency of the access. 177 * @param writebacks List for any writebacks that need to be performed. 178 * @param update True if the replacement data should be updated. 179 * @return Pointer to the cache block touched by the request. NULL if it 180 * was a miss. 181 */ |
182 bool access(PacketPtr pkt, BlkType *blk, int & lat); | 182 bool access(PacketPtr pkt, BlkType *&blk, int &lat); |
183 184 /** 185 *Handle doing the Compare and Swap function for SPARC. 186 */ 187 void cmpAndSwap(BlkType *blk, PacketPtr pkt); 188 189 /** 190 * Populates a cache block and handles all outstanding requests for the --- 5 unchanged lines hidden (view full) --- 196 * @param writebacks List for any writebacks that need to be performed. 197 * @return Pointer to the new cache block. 198 */ 199 BlkType *handleFill(PacketPtr pkt, BlkType *blk, 200 PacketList &writebacks); 201 202 bool satisfyCpuSideRequest(PacketPtr pkt, BlkType *blk); 203 bool satisfyTarget(MSHR::Target *target, BlkType *blk); | 183 184 /** 185 *Handle doing the Compare and Swap function for SPARC. 186 */ 187 void cmpAndSwap(BlkType *blk, PacketPtr pkt); 188 189 /** 190 * Populates a cache block and handles all outstanding requests for the --- 5 unchanged lines hidden (view full) --- 196 * @param writebacks List for any writebacks that need to be performed. 197 * @return Pointer to the new cache block. 198 */ 199 BlkType *handleFill(PacketPtr pkt, BlkType *blk, 200 PacketList &writebacks); 201 202 bool satisfyCpuSideRequest(PacketPtr pkt, BlkType *blk); 203 bool satisfyTarget(MSHR::Target *target, BlkType *blk); |
204 void satisfyMSHR(MSHR *mshr, PacketPtr pkt, BlkType *blk); | 204 bool satisfyMSHR(MSHR *mshr, PacketPtr pkt, BlkType *blk); |
205 206 void doTimingSupplyResponse(PacketPtr req_pkt, uint8_t *blk_data); 207 208 /** 209 * Sets the blk to the new state. 210 * @param blk The cache block being snooped. 211 * @param new_state The new coherence state for the block. 212 */ --- 92 unchanged lines hidden (view full) --- 305 306 /** 307 * Allocate a new MSHR or write buffer to handle a miss. 308 * @param pkt The access that missed. 309 * @param time The time to continue processing the miss. 310 * @param isFill Whether to fetch & allocate a block 311 * or just forward the request. 312 */ | 205 206 void doTimingSupplyResponse(PacketPtr req_pkt, uint8_t *blk_data); 207 208 /** 209 * Sets the blk to the new state. 210 * @param blk The cache block being snooped. 211 * @param new_state The new coherence state for the block. 212 */ --- 92 unchanged lines hidden (view full) --- 305 306 /** 307 * Allocate a new MSHR or write buffer to handle a miss. 308 * @param pkt The access that missed. 309 * @param time The time to continue processing the miss. 310 * @param isFill Whether to fetch & allocate a block 311 * or just forward the request. 312 */ |
313 MSHR *allocateBuffer(PacketPtr pkt, Tick time, bool isFill, 314 bool requestBus); | 313 MSHR *allocateBuffer(PacketPtr pkt, Tick time, bool requestBus); |
315 316 /** 317 * Selects a outstanding request to service. 318 * @return The request to service, NULL if none found. 319 */ | 314 315 /** 316 * Selects a outstanding request to service. 317 * @return The request to service, NULL if none found. 318 */ |
319 PacketPtr getBusPacket(PacketPtr cpu_pkt, BlkType *blk, 320 bool needsExclusive); |
|
320 MSHR *getNextMSHR(); | 321 MSHR *getNextMSHR(); |
321 PacketPtr getPacket(); | 322 PacketPtr getTimingPacket(); |
322 323 /** 324 * Marks a request as in service (sent on the bus). This can have side 325 * effect since storage for no response commands is deallocated once they 326 * are successfully sent. 327 * @param pkt The request that was sent on the bus. 328 */ 329 void markInService(MSHR *mshr); 330 331 /** | 323 324 /** 325 * Marks a request as in service (sent on the bus). This can have side 326 * effect since storage for no response commands is deallocated once they 327 * are successfully sent. 328 * @param pkt The request that was sent on the bus. 329 */ 330 void markInService(MSHR *mshr); 331 332 /** |
332 * Collect statistics and free resources of a satisfied request. 333 * @param pkt The request that has been satisfied. 334 * @param time The time when the request is satisfied. 335 */ 336 void handleResponse(PacketPtr pkt, Tick time); 337 338 /** | |
339 * Perform the given writeback request. 340 * @param pkt The writeback request. 341 */ 342 void doWriteback(PacketPtr pkt); 343 344 /** 345 * Return whether there are any outstanding misses. 346 */ --- 19 unchanged lines hidden --- | 333 * Perform the given writeback request. 334 * @param pkt The writeback request. 335 */ 336 void doWriteback(PacketPtr pkt); 337 338 /** 339 * Return whether there are any outstanding misses. 340 */ --- 19 unchanged lines hidden --- |