cache.cc (12691:8e1371fde4be) cache.cc (12700:c44381b89f9e)
1/*
2 * Copyright (c) 2010-2018 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

1606 clockEdge());
1607 if (next_pf_time != MaxTick)
1608 schedMemSideSendEvent(next_pf_time);
1609 }
1610 }
1611 // reset the xbar additional timinig as it is now accounted for
1612 pkt->headerDelay = pkt->payloadDelay = 0;
1613
1/*
2 * Copyright (c) 2010-2018 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

1606 clockEdge());
1607 if (next_pf_time != MaxTick)
1608 schedMemSideSendEvent(next_pf_time);
1609 }
1610 }
1611 // reset the xbar additional timinig as it is now accounted for
1612 pkt->headerDelay = pkt->payloadDelay = 0;
1613
1614 // copy writebacks to write buffer
1615 doWritebacks(writebacks, forward_time);
1616
1617 // if we used temp block, check to see if its valid and then clear it out
1618 if (blk == tempBlock && tempBlock->isValid()) {
1614 // if we used temp block, check to see if its valid and then clear it out
1615 if (blk == tempBlock && tempBlock->isValid()) {
1619 // We use forwardLatency here because we are copying
1620 // Writebacks/CleanEvicts to write buffer. It specifies the latency to
1621 // allocate an internal buffer and to schedule an event to the
1622 // queued port.
1623 if (blk->isDirty() || writebackClean) {
1624 PacketPtr wbPkt = writebackBlk(blk);
1625 allocateWriteBuffer(wbPkt, forward_time);
1626 // Set BLOCK_CACHED flag if cached above.
1627 if (isCachedAbove(wbPkt))
1628 wbPkt->setBlockCached();
1629 } else {
1630 PacketPtr wcPkt = cleanEvictBlk(blk);
1631 // Check to see if block is cached above. If not allocate
1632 // write buffer
1633 if (isCachedAbove(wcPkt))
1634 delete wcPkt;
1635 else
1636 allocateWriteBuffer(wcPkt, forward_time);
1637 }
1638 invalidateBlock(blk);
1616 PacketPtr wb_pkt = tempBlock->isDirty() || writebackClean ?
1617 writebackBlk(blk) : cleanEvictBlk(blk);
1618 writebacks.push_back(wb_pkt);
1619 invalidateBlock(tempBlock);
1639 }
1640
1620 }
1621
1622 // copy writebacks to write buffer
1623 doWritebacks(writebacks, forward_time);
1624
1641 DPRINTF(CacheVerbose, "%s: Leaving with %s\n", __func__, pkt->print());
1642 delete pkt;
1643}
1644
1645PacketPtr
1646Cache::writebackBlk(CacheBlk *blk)
1647{
1648 chatty_assert(!isReadOnly || writebackClean,

--- 1231 unchanged lines hidden ---
1625 DPRINTF(CacheVerbose, "%s: Leaving with %s\n", __func__, pkt->print());
1626 delete pkt;
1627}
1628
1629PacketPtr
1630Cache::writebackBlk(CacheBlk *blk)
1631{
1632 chatty_assert(!isReadOnly || writebackClean,

--- 1231 unchanged lines hidden ---