mem: Add support for WriteClean packets in the memory system

This change adds support for creating and handling WriteClean
packets. The WriteClean operation is almost identical to a
WritebackDirty with the exception that the cache generating a
WriteClean retains a copy of the block.

Change-Id: I63c8de62919fad0f9547d412f8266aa4292ebecd
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5045
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
This commit is contained in:
Nikos Nikoleris
2016-05-31 18:03:42 +01:00
parent d8afb86793
commit 2f6d69ee08
4 changed files with 97 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2013, 2015-2016 ARM Limited
* Copyright (c) 2012-2013, 2015-2017 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
@@ -111,9 +111,10 @@ WriteQueueEntry::allocate(Addr blk_addr, unsigned blk_size, PacketPtr target,
"Write queue entry %#llx should never have more than one "
"cacheable target", blkAddr);
panic_if(!((target->isWrite() && _isUncacheable) ||
(target->isEviction() && !_isUncacheable)),
"Write queue entry %#llx should either be uncacheable write or "
"a cacheable eviction");
(target->isEviction() && !_isUncacheable) ||
target->cmd == MemCmd::WriteClean),
"Write queue entry %#llx should be an uncacheable write or "
"a cacheable eviction or a writeclean");
targets.add(target, when_ready, _order);
}