summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-10-18 08:16:22 -0700
committerSteve Reinhardt <stever@eecs.umich.edu>2006-10-18 08:16:22 -0700
commit6cd187e1f066b084740b4b202f1de644ba06f299 (patch)
tree32db5b9458ccf1d39669b94693baff56afbb47d2 /src/mem/cache/tags
parent0128b73d0588ecdf66fcb482fddad2853216edce (diff)
downloadgem5-6cd187e1f066b084740b4b202f1de644ba06f299.tar.xz
Get rid of obsolete in-cache copy support.
--HG-- extra : convert_revision : a701ed9d078c67718a33f4284c0403a8aaac7b25
Diffstat (limited to 'src/mem/cache/tags')
-rw-r--r--src/mem/cache/tags/fa_lru.hh19
-rw-r--r--src/mem/cache/tags/iic.cc94
-rw-r--r--src/mem/cache/tags/iic.hh16
-rw-r--r--src/mem/cache/tags/lru.cc45
-rw-r--r--src/mem/cache/tags/lru.hh16
-rw-r--r--src/mem/cache/tags/split.cc13
-rw-r--r--src/mem/cache/tags/split.hh16
-rw-r--r--src/mem/cache/tags/split_lifo.cc46
-rw-r--r--src/mem/cache/tags/split_lifo.hh16
-rw-r--r--src/mem/cache/tags/split_lru.cc46
-rw-r--r--src/mem/cache/tags/split_lru.hh16
11 files changed, 0 insertions, 343 deletions
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index f9d4d7109..0fc54902b 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -322,25 +322,6 @@ public:
PacketList &writebacks)
{
}
-
- /**
- * Unimplemented. Perform a cache block copy from block aligned addresses.
- * @param source The block aligned source address.
- * @param dest The block aligned destination adddress.
- * @param asid The address space ID.
- * @param writebacks List for any generated writeback pktuests.
- */
- void doCopy(Addr source, Addr dest, PacketList &writebacks)
- {
- }
-
- /**
- * Unimplemented.
- */
- void fixCopy(Packet * &pkt, PacketList &writebacks)
- {
- }
-
};
#endif
diff --git a/src/mem/cache/tags/iic.cc b/src/mem/cache/tags/iic.cc
index 1377c8613..0fdfadd32 100644
--- a/src/mem/cache/tags/iic.cc
+++ b/src/mem/cache/tags/iic.cc
@@ -750,10 +750,6 @@ IIC::writeData(IICTag *blk, uint8_t *write_data, int size,
// can free data blocks
for (int i=num_subs; i < blk->numData; ++i){
// decrement reference count and compare to zero
- /**
- * @todo
- * Make this work with copying.
- */
if (--dataReferenceCount[blk->data_ptr[i]] == 0) {
freeDataBlock(blk->data_ptr[i]);
}
@@ -775,96 +771,6 @@ IIC::writeData(IICTag *blk, uint8_t *write_data, int size,
}
-/**
- * @todo This code can break if the src is evicted to get a tag for the dest.
- */
-void
-IIC::doCopy(Addr source, Addr dest, PacketList &writebacks)
-{
-//Copy unsuported now
-#if 0
- IICTag *dest_tag = findBlock(dest);
-
- if (dest_tag) {
- for (int i = 0; i < dest_tag->numData; ++i) {
- if (--dataReferenceCount[dest_tag->data_ptr[i]] == 0) {
- freeDataBlock(dest_tag->data_ptr[i]);
- }
- }
- // Reset replacement entry
- } else {
- dest_tag = getFreeTag(hash(dest), writebacks);
- dest_tag->re = (void*) repl->add(dest_tag - tagStore);
- dest_tag->set = hash(dest);
- dest_tag->tag = extractTag(dest);
- dest_tag->status = BlkValid | BlkWritable;
- }
- // Find the source tag here since it might move if we need to find a
- // tag for the destination.
- IICTag *src_tag = findBlock(source);
- assert(src_tag);
- assert(!cache->doData() || src_tag->size <= trivialSize
- || src_tag->numData > 0);
- // point dest to source data and inc counter
- for (int i = 0; i < src_tag->numData; ++i) {
- dest_tag->data_ptr[i] = src_tag->data_ptr[i];
- ++dataReferenceCount[dest_tag->data_ptr[i]];
- }
-
- // Maintain fast access data.
- memcpy(dest_tag->data, src_tag->data, blkSize);
-
- dest_tag->xc = src_tag->xc;
- dest_tag->size = src_tag->size;
- dest_tag->numData = src_tag->numData;
- if (src_tag->numData == 0) {
- // Data is stored in the trivial data, just copy it.
- memcpy(dest_tag->trivialData, src_tag->trivialData, src_tag->size);
- }
-
- dest_tag->status |= BlkDirty;
- if (dest_tag->size < blkSize) {
- dest_tag->status |= BlkCompressed;
- } else {
- dest_tag->status &= ~BlkCompressed;
- }
-#endif
-}
-
-void
-IIC::fixCopy(Packet * &pkt, PacketList &writebacks)
-{
-#if 0
- // if reference counter is greater than 1, do copy
- // else do write
- Addr blk_addr = blkAlign(pkt->getAddr);
- IICTag* blk = findBlock(blk_addr);
-
- if (blk->numData > 0 && dataReferenceCount[blk->data_ptr[0]] != 1) {
- // copy the data
- // Mark the block as referenced so it doesn't get replaced.
- blk->status |= BlkReferenced;
- for (int i = 0; i < blk->numData; ++i){
- unsigned long new_data = getFreeDataBlock(writebacks);
- // Need to refresh pointer
- /**
- * @todo Remove this refetch once we change IIC to pointer based
- */
- blk = findBlock(blk_addr);
- assert(blk);
- if (cache->doData()) {
- memcpy(&(dataBlks[new_data][0]),
- &(dataBlks[blk->data_ptr[i]][0]),
- subSize);
- }
- dataReferenceCount[blk->data_ptr[i]]--;
- dataReferenceCount[new_data]++;
- blk->data_ptr[i] = new_data;
- }
- }
-#endif
-}
-
void
IIC::cleanupRefs()
{
diff --git a/src/mem/cache/tags/iic.hh b/src/mem/cache/tags/iic.hh
index 2357bdce3..905d480c5 100644
--- a/src/mem/cache/tags/iic.hh
+++ b/src/mem/cache/tags/iic.hh
@@ -498,22 +498,6 @@ class IIC : public BaseTags
PacketList & writebacks);
/**
- * Perform a block aligned copy from the source address to the destination.
- * @param source The block-aligned source address.
- * @param dest The block-aligned destination address.
- * @param asid The address space DI.
- * @param writebacks List for any generated writeback pktuests.
- */
- void doCopy(Addr source, Addr dest, PacketList &writebacks);
-
- /**
- * If a block is currently marked copy on write, copy it before writing.
- * @param pkt The write request.
- * @param writebacks List for any generated writeback pktuests.
- */
- void fixCopy(Packet * &pkt, PacketList &writebacks);
-
- /**
* Called at end of simulation to complete average block reference stats.
*/
virtual void cleanupRefs();
diff --git a/src/mem/cache/tags/lru.cc b/src/mem/cache/tags/lru.cc
index 976bbeff2..a9ae049c3 100644
--- a/src/mem/cache/tags/lru.cc
+++ b/src/mem/cache/tags/lru.cc
@@ -251,51 +251,6 @@ LRU::invalidateBlk(Addr addr)
}
void
-LRU::doCopy(Addr source, Addr dest, PacketList &writebacks)
-{
- assert(source == blkAlign(source));
- assert(dest == blkAlign(dest));
- LRUBlk *source_blk = findBlock(source);
- assert(source_blk);
- LRUBlk *dest_blk = findBlock(dest);
- if (dest_blk == NULL) {
- // Need to do a replacement
- Request *search = new Request(dest,1,0);
- Packet * pkt = new Packet(search, Packet::ReadReq, -1);
- BlkList dummy_list;
- dest_blk = findReplacement(pkt, writebacks, dummy_list);
- if (dest_blk->isValid() && dest_blk->isModified()) {
- // Need to writeback data.
-/* pkt = buildWritebackReq(regenerateBlkAddr(dest_blk->tag,
- dest_blk->set),
- dest_blk->req->asid,
- dest_blk->xc,
- blkSize,
- dest_blk->data,
- dest_blk->size);
-*/
- Request *writebackReq = new Request(regenerateBlkAddr(dest_blk->tag,
- dest_blk->set),
- blkSize, 0);
- Packet *writeback = new Packet(writebackReq, Packet::Writeback, -1);
- writeback->allocate();
- memcpy(writeback->getPtr<uint8_t>(),dest_blk->data, blkSize);
- writebacks.push_back(writeback);
- }
- dest_blk->tag = extractTag(dest);
- delete search;
- delete pkt;
- }
- /**
- * @todo Can't assume the status once we have coherence on copies.
- */
-
- // Set this block as readable, writeable, and dirty.
- dest_blk->status = 7;
- memcpy(dest_blk->data, source_blk->data, blkSize);
-}
-
-void
LRU::cleanupRefs()
{
for (int i = 0; i < numSets*assoc; ++i) {
diff --git a/src/mem/cache/tags/lru.hh b/src/mem/cache/tags/lru.hh
index a3a56a0e6..9f0a05ee8 100644
--- a/src/mem/cache/tags/lru.hh
+++ b/src/mem/cache/tags/lru.hh
@@ -303,22 +303,6 @@ public:
}
/**
- * Perform a block aligned copy from the source address to the destination.
- * @param source The block-aligned source address.
- * @param dest The block-aligned destination address.
- * @param asid The address space DI.
- * @param writebacks List for any generated writeback pktuests.
- */
- void doCopy(Addr source, Addr dest, PacketList &writebacks);
-
- /**
- * No impl.
- */
- void fixCopy(Packet * &pkt, PacketList &writebacks)
- {
- }
-
- /**
* Called at end of simulation to complete average block reference stats.
*/
virtual void cleanupRefs();
diff --git a/src/mem/cache/tags/split.cc b/src/mem/cache/tags/split.cc
index 690eea22e..cad18e885 100644
--- a/src/mem/cache/tags/split.cc
+++ b/src/mem/cache/tags/split.cc
@@ -422,19 +422,6 @@ Split::invalidateBlk(Addr addr)
}
void
-Split::doCopy(Addr source, Addr dest, PacketList &writebacks)
-{
- if (lru->probe( source))
- lru->doCopy(source, dest, writebacks);
- else {
- if (lifo && lifo_net)
- lifo_net->doCopy(source, dest, writebacks);
- else if (lru_net)
- lru_net->doCopy(source, dest, writebacks);
- }
-}
-
-void
Split::cleanupRefs()
{
lru->cleanupRefs();
diff --git a/src/mem/cache/tags/split.hh b/src/mem/cache/tags/split.hh
index f0091e971..708058e96 100644
--- a/src/mem/cache/tags/split.hh
+++ b/src/mem/cache/tags/split.hh
@@ -311,22 +311,6 @@ class Split : public BaseTags
}
/**
- * Perform a block aligned copy from the source address to the destination.
- * @param source The block-aligned source address.
- * @param dest The block-aligned destination address.
- * @param asid The address space DI.
- * @param writebacks List for any generated writeback pktuests.
- */
- void doCopy(Addr source, Addr dest, PacketList &writebacks);
-
- /**
- * No impl.
- */
- void fixCopy(Packet * &pkt, PacketList &writebacks)
- {
- }
-
- /**
* Called at end of simulation to complete average block reference stats.
*/
virtual void cleanupRefs();
diff --git a/src/mem/cache/tags/split_lifo.cc b/src/mem/cache/tags/split_lifo.cc
index 6fcbf3597..4e9375070 100644
--- a/src/mem/cache/tags/split_lifo.cc
+++ b/src/mem/cache/tags/split_lifo.cc
@@ -347,52 +347,6 @@ SplitLIFO::invalidateBlk(Addr addr)
}
void
-SplitLIFO::doCopy(Addr source, Addr dest, PacketList &writebacks)
-{
-//Copy Unsuported for now
-#if 0
- assert(source == blkAlign(source));
- assert(dest == blkAlign(dest));
- SplitBlk *source_blk = findBlock(source);
- assert(source_blk);
- SplitBlk *dest_blk = findBlock(dest);
- if (dest_blk == NULL) {
- // Need to do a replacement
- Packet * pkt = new Packet();
- pkt->paddr = dest;
- BlkList dummy_list;
- dest_blk = findReplacement(pkt, writebacks, dummy_list);
- if (dest_blk->isValid() && dest_blk->isModified()) {
- // Need to writeback data.
- pkt = buildWritebackReq(regenerateBlkAddr(dest_blk->tag,
- dest_blk->set),
- dest_blk->xc,
- blkSize,
- (cache->doData())?dest_blk->data:0,
- dest_blk->size);
- writebacks.push_back(pkt);
- }
- dest_blk->tag = extractTag(dest);
- /**
- * @todo Do we need to pass in the execution context, or can we
- * assume its the same?
- */
- assert(source_blk->xc);
- dest_blk->xc = source_blk->xc;
- }
- /**
- * @todo Can't assume the status once we have coherence on copies.
- */
-
- // Set this block as readable, writeable, and dirty.
- dest_blk->status = 7;
- if (cache->doData()) {
- memcpy(dest_blk->data, source_blk->data, blkSize);
- }
-#endif
-}
-
-void
SplitLIFO::cleanupRefs()
{
for (int i = 0; i < numBlks; ++i) {
diff --git a/src/mem/cache/tags/split_lifo.hh b/src/mem/cache/tags/split_lifo.hh
index 355a66162..ddc7fdeec 100644
--- a/src/mem/cache/tags/split_lifo.hh
+++ b/src/mem/cache/tags/split_lifo.hh
@@ -326,22 +326,6 @@ public:
}
/**
- * Perform a block aligned copy from the source address to the destination.
- * @param source The block-aligned source address.
- * @param dest The block-aligned destination address.
- * @param asid The address space DI.
- * @param writebacks List for any generated writeback pktuests.
- */
- void doCopy(Addr source, Addr dest, PacketList &writebacks);
-
- /**
- * No impl.
- */
- void fixCopy(Packet * &pkt, PacketList &writebacks)
- {
- }
-
- /**
* Called at end of simulation to complete average block reference stats.
*/
virtual void cleanupRefs();
diff --git a/src/mem/cache/tags/split_lru.cc b/src/mem/cache/tags/split_lru.cc
index 4381923bd..4aba1c37f 100644
--- a/src/mem/cache/tags/split_lru.cc
+++ b/src/mem/cache/tags/split_lru.cc
@@ -272,52 +272,6 @@ SplitLRU::invalidateBlk(Addr addr)
}
void
-SplitLRU::doCopy(Addr source, Addr dest, PacketList &writebacks)
-{
-//Copy not supported for now
-#if 0
- assert(source == blkAlign(source));
- assert(dest == blkAlign(dest));
- SplitBlk *source_blk = findBlock(source);
- assert(source_blk);
- SplitBlk *dest_blk = findBlock(dest);
- if (dest_blk == NULL) {
- // Need to do a replacement
- Packet * pkt = new Packet();
- pkt->paddr = dest;
- BlkList dummy_list;
- dest_blk = findReplacement(pkt, writebacks, dummy_list);
- if (dest_blk->isValid() && dest_blk->isModified()) {
- // Need to writeback data.
- pkt = buildWritebackReq(regenerateBlkAddr(dest_blk->tag,
- dest_blk->set),
- dest_blk->xc,
- blkSize,
- (cache->doData())?dest_blk->data:0,
- dest_blk->size);
- writebacks.push_back(pkt);
- }
- dest_blk->tag = extractTag(dest);
- /**
- * @todo Do we need to pass in the execution context, or can we
- * assume its the same?
- */
- assert(source_blk->xc);
- dest_blk->xc = source_blk->xc;
- }
- /**
- * @todo Can't assume the status once we have coherence on copies.
- */
-
- // Set this block as readable, writeable, and dirty.
- dest_blk->status = 7;
- if (cache->doData()) {
- memcpy(dest_blk->data, source_blk->data, blkSize);
- }
-#endif
-}
-
-void
SplitLRU::cleanupRefs()
{
for (int i = 0; i < numSets*assoc; ++i) {
diff --git a/src/mem/cache/tags/split_lru.hh b/src/mem/cache/tags/split_lru.hh
index 72aebac9c..71f921177 100644
--- a/src/mem/cache/tags/split_lru.hh
+++ b/src/mem/cache/tags/split_lru.hh
@@ -309,22 +309,6 @@ public:
}
/**
- * Perform a block aligned copy from the source address to the destination.
- * @param source The block-aligned source address.
- * @param dest The block-aligned destination address.
- * @param asid The address space DI.
- * @param writebacks List for any generated writeback pktuests.
- */
- void doCopy(Addr source, Addr dest, PacketList &writebacks);
-
- /**
- * No impl.
- */
- void fixCopy(Packet * &pkt, PacketList &writebacks)
- {
- }
-
- /**
* Called at end of simulation to complete average block reference stats.
*/
virtual void cleanupRefs();