base.hh (7676:92274350b953) | base.hh (7823:dac01f14f20f) |
---|---|
1/* 2 * Copyright (c) 2003-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; --- 420 unchanged lines hidden (view full) --- 429 * also sets the blocked flag in the slave interface. 430 * @param cause The reason for the cache blocking. 431 */ 432 void setBlocked(BlockedCause cause) 433 { 434 uint8_t flag = 1 << cause; 435 if (blocked == 0) { 436 blocked_causes[cause]++; | 1/* 2 * Copyright (c) 2003-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; --- 420 unchanged lines hidden (view full) --- 429 * also sets the blocked flag in the slave interface. 430 * @param cause The reason for the cache blocking. 431 */ 432 void setBlocked(BlockedCause cause) 433 { 434 uint8_t flag = 1 << cause; 435 if (blocked == 0) { 436 blocked_causes[cause]++; |
437 blockedCycle = curTick; | 437 blockedCycle = curTick(); |
438 cpuSidePort->setBlocked(); 439 } 440 blocked |= flag; 441 DPRINTF(Cache,"Blocking for cause %d, mask=%d\n", cause, blocked); 442 } 443 444 /** 445 * Marks the cache as unblocked for the given cause. This also clears the 446 * blocked flags in the appropriate interfaces. 447 * @param cause The newly unblocked cause. 448 * @warning Calling this function can cause a blocked request on the bus to 449 * access the cache. The cache must be in a state to handle that request. 450 */ 451 void clearBlocked(BlockedCause cause) 452 { 453 uint8_t flag = 1 << cause; 454 blocked &= ~flag; 455 DPRINTF(Cache,"Unblocking for cause %d, mask=%d\n", cause, blocked); 456 if (blocked == 0) { | 438 cpuSidePort->setBlocked(); 439 } 440 blocked |= flag; 441 DPRINTF(Cache,"Blocking for cause %d, mask=%d\n", cause, blocked); 442 } 443 444 /** 445 * Marks the cache as unblocked for the given cause. This also clears the 446 * blocked flags in the appropriate interfaces. 447 * @param cause The newly unblocked cause. 448 * @warning Calling this function can cause a blocked request on the bus to 449 * access the cache. The cache must be in a state to handle that request. 450 */ 451 void clearBlocked(BlockedCause cause) 452 { 453 uint8_t flag = 1 << cause; 454 blocked &= ~flag; 455 DPRINTF(Cache,"Unblocking for cause %d, mask=%d\n", cause, blocked); 456 if (blocked == 0) { |
457 blocked_cycles[cause] += curTick - blockedCycle; | 457 blocked_cycles[cause] += curTick() - blockedCycle; |
458 cpuSidePort->clearBlocked(); 459 } 460 } 461 462 /** 463 * Request the master bus for the given cause and time. 464 * @param cause The reason for the request. 465 * @param time The time to make the request. --- 78 unchanged lines hidden --- | 458 cpuSidePort->clearBlocked(); 459 } 460 } 461 462 /** 463 * Request the master bus for the given cause and time. 464 * @param cause The reason for the request. 465 * @param time The time to make the request. --- 78 unchanged lines hidden --- |