mem-ruby: sequencer callback for unique writes
A controller may complete a write without obtaining a full copy of the line. This patch adds a specific callback for this purpose that prevents reads to be coalesced with a write on a potentially incomplete line. Change-Id: I3775f81699f38e406fee28f92c9c8e06deb3d528 Signed-off-by: Tiago Mück <tiago.muck@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31269 Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Bradford Beckmann <bradford.beckmann@gmail.com>
This commit is contained in:
@@ -129,6 +129,7 @@ structure (Sequencer, external = "yes") {
|
||||
void writeCallback(Addr, DataBlock, bool, MachineType);
|
||||
void writeCallback(Addr, DataBlock, bool, MachineType,
|
||||
Cycles, Cycles, Cycles);
|
||||
void writeUniqueCallback(Addr, DataBlock);
|
||||
|
||||
// ll/sc support
|
||||
void writeCallbackScFail(Addr, DataBlock);
|
||||
|
||||
@@ -352,7 +352,8 @@ Sequencer::writeCallback(Addr address, DataBlock& data,
|
||||
const bool externalHit, const MachineType mach,
|
||||
const Cycles initialRequestTime,
|
||||
const Cycles forwardRequestTime,
|
||||
const Cycles firstResponseTime)
|
||||
const Cycles firstResponseTime,
|
||||
const bool noCoales)
|
||||
{
|
||||
//
|
||||
// Free the whole list as we assume we have had the exclusive access
|
||||
@@ -370,6 +371,15 @@ Sequencer::writeCallback(Addr address, DataBlock& data,
|
||||
int aliased_loads = 0;
|
||||
while (!seq_req_list.empty()) {
|
||||
SequencerRequest &seq_req = seq_req_list.front();
|
||||
|
||||
if (noCoales && !ruby_request) {
|
||||
// Do not process follow-up requests
|
||||
// (e.g. if full line no present)
|
||||
// Reissue to the cache hierarchy
|
||||
issueRequest(seq_req.pkt, seq_req.m_second_type);
|
||||
break;
|
||||
}
|
||||
|
||||
if (ruby_request) {
|
||||
assert(seq_req.m_type != RubyRequestType_LD);
|
||||
assert(seq_req.m_type != RubyRequestType_Load_Linked);
|
||||
|
||||
@@ -103,7 +103,15 @@ class Sequencer : public RubyPort
|
||||
const MachineType mach = MachineType_NUM,
|
||||
const Cycles initialRequestTime = Cycles(0),
|
||||
const Cycles forwardRequestTime = Cycles(0),
|
||||
const Cycles firstResponseTime = Cycles(0));
|
||||
const Cycles firstResponseTime = Cycles(0),
|
||||
const bool noCoales = false);
|
||||
|
||||
// Write callback that prevents coalescing
|
||||
void writeUniqueCallback(Addr address, DataBlock& data)
|
||||
{
|
||||
writeCallback(address, data, true, MachineType_NUM, Cycles(0),
|
||||
Cycles(0), Cycles(0), true);
|
||||
}
|
||||
|
||||
void readCallback(Addr address,
|
||||
DataBlock& data,
|
||||
|
||||
Reference in New Issue
Block a user