mem-ruby: Fix Ruby handling of functional requests
This patch addresses multiple cases: - When a controller has read/write permissions while others have read only permissions, the one with r/w permissions performs the read as the others may have stale data - When controllers only have lines with stale or busy access permissions, a valid copy of the line may be in a message in transit in the network or in a message buffer (not seen by the controller yet). In this case, we forward the functional request accordingly. - Sequencer messages should not accept functional reads - Functional writes also update the packet data on the sequencer outstanding request lists and the cpu-side response queue. Change-Id: I6b0656f1a2b81d41bdcf6c783dfa522a77393981 Signed-off-by: Tiago Mück <tiago.muck@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22022 Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: John Alsop <johnathan.alsop@amd.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
@@ -323,6 +323,7 @@ class $c_ident : public AbstractController
|
||||
|
||||
void recordCacheTrace(int cntrl, CacheRecorder* tr);
|
||||
Sequencer* getCPUSequencer() const;
|
||||
DMASequencer* getDMASequencer() const;
|
||||
GPUCoalescer* getGPUCoalescer() const;
|
||||
|
||||
bool functionalReadBuffers(PacketPtr&);
|
||||
@@ -702,6 +703,12 @@ $c_ident::init()
|
||||
assert(param.pointer)
|
||||
seq_ident = "m_%s_ptr" % param.ident
|
||||
|
||||
dma_seq_ident = "NULL"
|
||||
for param in self.config_parameters:
|
||||
if param.ident == "dma_sequencer":
|
||||
assert(param.pointer)
|
||||
dma_seq_ident = "m_%s_ptr" % param.ident
|
||||
|
||||
coal_ident = "NULL"
|
||||
for param in self.config_parameters:
|
||||
if param.ident == "coalescer":
|
||||
@@ -728,6 +735,28 @@ $c_ident::getCPUSequencer() const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
''')
|
||||
|
||||
if dma_seq_ident != "NULL":
|
||||
code('''
|
||||
DMASequencer*
|
||||
$c_ident::getDMASequencer() const
|
||||
{
|
||||
if (NULL != $dma_seq_ident) {
|
||||
return $dma_seq_ident;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
''')
|
||||
else:
|
||||
code('''
|
||||
|
||||
DMASequencer*
|
||||
$c_ident::getDMASequencer() const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
''')
|
||||
|
||||
if coal_ident != "NULL":
|
||||
|
||||
Reference in New Issue
Block a user