diff options
author | Sean Wilson <spwilson2@wisc.edu> | 2017-06-07 16:32:15 -0500 |
---|---|---|
committer | Sean Wilson <spwilson2@wisc.edu> | 2017-06-20 18:03:21 +0000 |
commit | c8668a663992264911545f8001d462e0885b114c (patch) | |
tree | b91e2fd0b64f01f4606b4d3c9efae91623276652 /src/dev/pci | |
parent | 475f613f2661f3be5f7479c5c7229e5adcb74d93 (diff) | |
download | gem5-c8668a663992264911545f8001d462e0885b114c.tar.xz |
dev: Replace EventWrapper use with EventFunctionWrapper
Change-Id: I6b03cc6f67e76dffb79940431711ae6171901c6a
Signed-off-by: Sean Wilson <spwilson2@wisc.edu>
Reviewed-on: https://gem5-review.googlesource.com/3748
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/dev/pci')
-rw-r--r-- | src/dev/pci/copy_engine.cc | 14 | ||||
-rw-r--r-- | src/dev/pci/copy_engine.hh | 15 |
2 files changed, 13 insertions, 16 deletions
diff --git a/src/dev/pci/copy_engine.cc b/src/dev/pci/copy_engine.cc index 326c51d11..3c7df7d3a 100644 --- a/src/dev/pci/copy_engine.cc +++ b/src/dev/pci/copy_engine.cc @@ -81,12 +81,14 @@ CopyEngine::CopyEngine(const Params *p) CopyEngine::CopyEngineChannel::CopyEngineChannel(CopyEngine *_ce, int cid) : cePort(_ce, _ce->sys), ce(_ce), channelId(cid), busy(false), underReset(false), - refreshNext(false), latBeforeBegin(ce->params()->latBeforeBegin), - latAfterCompletion(ce->params()->latAfterCompletion), - completionDataReg(0), nextState(Idle), - fetchCompleteEvent(this), addrCompleteEvent(this), - readCompleteEvent(this), writeCompleteEvent(this), - statusCompleteEvent(this) + refreshNext(false), latBeforeBegin(ce->params()->latBeforeBegin), + latAfterCompletion(ce->params()->latAfterCompletion), + completionDataReg(0), nextState(Idle), + fetchCompleteEvent([this]{ fetchDescComplete(); }, name()), + addrCompleteEvent([this]{ fetchAddrComplete(); }, name()), + readCompleteEvent([this]{ readCopyBytesComplete(); }, name()), + writeCompleteEvent([this]{ writeCopyBytesComplete(); }, name()), + statusCompleteEvent([this]{ writeStatusComplete(); }, name()) { cr.status.dma_transfer_status(3); diff --git a/src/dev/pci/copy_engine.hh b/src/dev/pci/copy_engine.hh index f548c478b..1ec29f02e 100644 --- a/src/dev/pci/copy_engine.hh +++ b/src/dev/pci/copy_engine.hh @@ -115,28 +115,23 @@ class CopyEngine : public PciDevice private: void fetchDescriptor(Addr address); void fetchDescComplete(); - EventWrapper<CopyEngineChannel, &CopyEngineChannel::fetchDescComplete> - fetchCompleteEvent; + EventFunctionWrapper fetchCompleteEvent; void fetchNextAddr(Addr address); void fetchAddrComplete(); - EventWrapper<CopyEngineChannel, &CopyEngineChannel::fetchAddrComplete> - addrCompleteEvent; + EventFunctionWrapper addrCompleteEvent; void readCopyBytes(); void readCopyBytesComplete(); - EventWrapper<CopyEngineChannel, &CopyEngineChannel::readCopyBytesComplete> - readCompleteEvent; + EventFunctionWrapper readCompleteEvent; void writeCopyBytes(); void writeCopyBytesComplete(); - EventWrapper <CopyEngineChannel, &CopyEngineChannel::writeCopyBytesComplete> - writeCompleteEvent; + EventFunctionWrapper writeCompleteEvent; void writeCompletionStatus(); void writeStatusComplete(); - EventWrapper <CopyEngineChannel, &CopyEngineChannel::writeStatusComplete> - statusCompleteEvent; + EventFunctionWrapper statusCompleteEvent; void continueProcessing(); |