|
gem5
v19.0.0.0
|
Public Member Functions | |
| CopyEngineChannel (CopyEngine *_ce, int cid) | |
| virtual | ~CopyEngineChannel () |
| Port & | getPort () |
| std::string | name () |
| virtual Tick | read (PacketPtr pkt) |
| virtual Tick | write (PacketPtr pkt) |
| void | channelRead (PacketPtr pkt, Addr daddr, int size) |
| void | channelWrite (PacketPtr pkt, Addr daddr, int size) |
| DrainState | drain () override |
| Notify an object that it needs to drain its state. More... | |
| void | drainResume () override |
| Resume execution after a successful drain. More... | |
| void | serialize (CheckpointOut &cp) const override |
| Serialize an object. More... | |
| void | unserialize (CheckpointIn &cp) override |
| Unserialize an object. More... | |
Public Member Functions inherited from Drainable | |
| DrainState | drainState () const |
| Return the current drain state of an object. More... | |
| virtual void | notifyFork () |
| Notify a child process of a fork. More... | |
Public Member Functions inherited from Serializable | |
| Serializable () | |
| virtual | ~Serializable () |
| void | serializeSection (CheckpointOut &cp, const char *name) const |
| Serialize an object into a new section. More... | |
| void | serializeSection (CheckpointOut &cp, const std::string &name) const |
| void | unserializeSection (CheckpointIn &cp, const char *name) |
| Unserialize an a child object. More... | |
| void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Private Types | |
| enum | ChannelState { Idle, AddressFetch, DescriptorFetch, DMARead, DMAWrite, CompletionWrite } |
Private Member Functions | |
| void | fetchDescriptor (Addr address) |
| void | fetchDescComplete () |
| void | fetchNextAddr (Addr address) |
| void | fetchAddrComplete () |
| void | readCopyBytes () |
| void | readCopyBytesComplete () |
| void | writeCopyBytes () |
| void | writeCopyBytesComplete () |
| void | writeCompletionStatus () |
| void | writeStatusComplete () |
| void | continueProcessing () |
| void | recvCommand () |
| bool | inDrain () |
| void | restartStateMachine () |
| void | anBegin (const char *s) |
| void | anWait () |
| void | anDq () |
| void | anPq () |
| void | anQ (const char *s, uint64_t id, int size=1) |
Additional Inherited Members | |
Static Public Member Functions inherited from Serializable | |
| static const std::string & | currentSection () |
| Get the fully-qualified name of the active section. More... | |
| static void | serializeAll (const std::string &cpt_dir) |
| static void | unserializeGlobals (CheckpointIn &cp) |
Static Public Attributes inherited from Serializable | |
| static int | ckptCount = 0 |
| static int | ckptMaxCount = 0 |
| static int | ckptPrevCount = -1 |
Protected Member Functions inherited from Drainable | |
| Drainable () | |
| virtual | ~Drainable () |
| void | signalDrainDone () const |
| Signal that an object is drained. More... | |
Definition at line 63 of file copy_engine.hh.
|
private |
| Enumerator | |
|---|---|
| Idle | |
| AddressFetch | |
| DescriptorFetch | |
| DMARead | |
| DMAWrite | |
| CompletionWrite | |
Definition at line 84 of file copy_engine.hh.
| CopyEngine::CopyEngineChannel::CopyEngineChannel | ( | CopyEngine * | _ce, |
| int | cid | ||
| ) |
Definition at line 81 of file copy_engine.cc.
References addrCompleteEvent, ce, CopyEngineReg::ChanRegs::completionAddr, copyBuffer, cr, curDmaDesc, CopyEngineReg::ChanRegs::descChainAddr, fetchAddrComplete(), fetchDescComplete(), name(), CopyEngine::params(), readCompleteEvent, readCopyBytesComplete(), CopyEngineReg::ChanRegs::status, statusCompleteEvent, writeCompleteEvent, writeCopyBytesComplete(), and writeStatusComplete().
|
virtual |
Definition at line 110 of file copy_engine.cc.
References copyBuffer, and curDmaDesc.
|
inlineprivate |
Definition at line 141 of file copy_engine.hh.
References CPA::cpa(), CPA::FL_NONE, CPA::hwBegin(), and PioDevice::sys.
Referenced by continueProcessing(), fetchAddrComplete(), fetchDescComplete(), fetchDescriptor(), fetchNextAddr(), readCopyBytes(), writeCompletionStatus(), and writeCopyBytes().
|
inlineprivate |
Definition at line 153 of file copy_engine.hh.
References CPA::cpa(), CPA::FL_NONE, CPA::hwDq(), and PioDevice::sys.
Referenced by fetchDescriptor().
|
inlineprivate |
Definition at line 159 of file copy_engine.hh.
References CPA::cpa(), CPA::FL_NONE, CPA::hwDq(), and PioDevice::sys.
|
inlineprivate |
Definition at line 165 of file copy_engine.hh.
References CPA::cpa(), CPA::FL_NONE, CPA::hwQ(), and PioDevice::sys.
Referenced by writeCopyBytesComplete().
|
inlineprivate |
Definition at line 147 of file copy_engine.hh.
References CPA::cpa(), CPA::FL_NONE, CPA::hwWe(), and PioDevice::sys.
Referenced by continueProcessing(), fetchAddrComplete(), and fetchDescComplete().
Definition at line 242 of file copy_engine.cc.
References bits(), busy, CopyEngineReg::CHAN_CHAINADDR, CopyEngineReg::CHAN_CHAINADDR_HIGH, CopyEngineReg::CHAN_CMPLNADDR, CopyEngineReg::CHAN_CMPLNADDR_HIGH, CopyEngineReg::CHAN_COMMAND, CopyEngineReg::CHAN_CONTROL, CopyEngineReg::CHAN_ERROR, CopyEngineReg::CHAN_STATUS, channelId, CopyEngineReg::ChanRegs::command, CopyEngineReg::ChanRegs::completionAddr, cr, CopyEngineReg::ChanRegs::ctrl, CopyEngineReg::ChanRegs::descChainAddr, CopyEngineReg::ChanRegs::error, panic, Packet::setLE(), and CopyEngineReg::ChanRegs::status.
Referenced by write().
Definition at line 370 of file copy_engine.cc.
References CopyEngineReg::CHAN_CHAINADDR, CopyEngineReg::CHAN_CHAINADDR_HIGH, CopyEngineReg::CHAN_CMPLNADDR, CopyEngineReg::CHAN_CMPLNADDR_HIGH, CopyEngineReg::CHAN_COMMAND, CopyEngineReg::CHAN_CONTROL, CopyEngineReg::CHAN_ERROR, CopyEngineReg::CHAN_STATUS, channelId, CopyEngineReg::ChanRegs::command, CopyEngineReg::ChanRegs::completionAddr, cr, CopyEngineReg::ChanRegs::ctrl, CopyEngineReg::ChanRegs::descChainAddr, DPRINTF, CopyEngineReg::ChanRegs::error, Packet::getLE(), ArmISA::mask, panic, and recvCommand().
Referenced by write().
|
private |
Definition at line 559 of file copy_engine.cc.
References AddressFetch, anBegin(), anWait(), busy, curDmaDesc, DescriptorFetch, fetchAddress, fetchDescriptor(), fetchNextAddr(), Idle, inDrain(), lastDescriptorAddr, CopyEngineReg::DmaDesc::next, nextState, refreshNext, and underReset.
Referenced by writeCopyBytesComplete(), and writeStatusComplete().
|
overridevirtual |
Notify an object that it needs to drain its state.
If the object does not need further simulation to drain internal buffers, it returns DrainState::Drained and automatically switches to the Drained state. If the object needs more simulation, it returns DrainState::Draining and automatically enters the Draining state. Other return values are invalid.
Implements Drainable.
Definition at line 656 of file copy_engine.cc.
References ce, DPRINTF, Drained, Draining, Drainable::drainState(), Idle, nextState, and Running.
Referenced by write().
|
overridevirtual |
Resume execution after a successful drain.
Reimplemented from Drainable.
Definition at line 747 of file copy_engine.cc.
References CopyEngine::CopyEngine(), DPRINTF, nextState, and restartStateMachine().
Referenced by write().
|
private |
Definition at line 625 of file copy_engine.cc.
References anBegin(), anWait(), busy, curDmaDesc, DescriptorFetch, DPRINTF, fetchAddress, fetchDescriptor(), Idle, inDrain(), CopyEngineReg::DmaDesc::next, and nextState.
Referenced by CopyEngineChannel().
|
private |
Definition at line 471 of file copy_engine.cc.
References anBegin(), anWait(), busy, CopyEngineReg::DmaDesc::command, CompletionWrite, curDmaDesc, CopyEngineReg::DESC_CTRL_CP_STS, CopyEngineReg::DESC_CTRL_NULL, DMARead, DPRINTF, Idle, inDrain(), nextState, panic, readCopyBytes(), and writeCompletionStatus().
Referenced by CopyEngineChannel(), and write().
|
private |
Definition at line 452 of file copy_engine.cc.
References anBegin(), anDq(), busy, ce, cePort, curDmaDesc, DmaPort::dmaAction(), DPRINTF, fetchCompleteEvent, lastDescriptorAddr, latBeforeBegin, PciDevice::pciToDma(), and MemCmd::ReadReq.
Referenced by continueProcessing(), fetchAddrComplete(), recvCommand(), restartStateMachine(), and write().
|
private |
Definition at line 613 of file copy_engine.cc.
References addrCompleteEvent, anBegin(), busy, ce, cePort, curDmaDesc, DmaPort::dmaAction(), DPRINTF, PciDevice::pciToDma(), and MemCmd::ReadReq.
Referenced by continueProcessing(), recvCommand(), and restartStateMachine().
| Port & CopyEngine::CopyEngineChannel::getPort | ( | ) |
Definition at line 133 of file copy_engine.cc.
References cePort.
Referenced by CopyEngine::params().
|
private |
Definition at line 645 of file copy_engine.cc.
References ce, DPRINTF, Draining, Drainable::drainState(), Running, and Drainable::signalDrainDone().
Referenced by continueProcessing(), fetchAddrComplete(), fetchDescComplete(), readCopyBytesComplete(), and writeCopyBytesComplete().
|
inline |
Definition at line 100 of file copy_engine.hh.
References csprintf(), and SimObject::name().
Referenced by CopyEngineChannel(), and CopyEngine::regStats().
Definition at line 101 of file copy_engine.hh.
References panic.
Referenced by CopyEngine::params().
|
private |
Definition at line 502 of file copy_engine.cc.
References anBegin(), ce, cePort, copyBuffer, curDmaDesc, CopyEngineReg::DmaDesc::dest, DmaPort::dmaAction(), DPRINTF, CopyEngineReg::DmaDesc::len, PciDevice::pciToDma(), readCompleteEvent, MemCmd::ReadReq, and CopyEngineReg::DmaDesc::src.
Referenced by fetchDescComplete(), and restartStateMachine().
|
private |
Definition at line 513 of file copy_engine.cc.
References DMAWrite, DPRINTF, inDrain(), nextState, and writeCopyBytes().
Referenced by CopyEngineChannel().
|
private |
Definition at line 139 of file copy_engine.cc.
References AddressFetch, busy, ce, CopyEngineReg::ChanRegs::command, cr, CopyEngineReg::ChanRegs::descChainAddr, DescriptorFetch, Drainable::drainState(), fetchAddress, fetchDescriptor(), fetchNextAddr(), Idle, lastDescriptorAddr, nextState, panic, refreshNext, Running, CopyEngineReg::ChanRegs::status, and underReset.
Referenced by channelWrite().
|
private |
Definition at line 721 of file copy_engine.cc.
References AddressFetch, CompletionWrite, DescriptorFetch, DMARead, DMAWrite, fetchAddress, fetchDescriptor(), fetchNextAddr(), Idle, lastDescriptorAddr, nextState, panic, readCopyBytes(), writeCompletionStatus(), and writeCopyBytes().
Referenced by drainResume().
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
| cp | Checkpoint state |
Implements Serializable.
Definition at line 685 of file copy_engine.cc.
References arrayParamOut(), busy, ce, channelId, completionDataReg, copyBuffer, cr, curDmaDesc, fetchAddress, lastDescriptorAddr, nextState, CopyEngine::params(), refreshNext, CopyEngineReg::ChanRegs::serialize(), SERIALIZE_ARRAY, SERIALIZE_SCALAR, and underReset.
Referenced by CopyEngine::params(), and write().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
| cp | Checkpoint state |
Implements Serializable.
Definition at line 702 of file copy_engine.cc.
References arrayParamIn(), busy, ce, channelId, completionDataReg, copyBuffer, cr, curDmaDesc, fetchAddress, lastDescriptorAddr, nextState, CopyEngine::params(), refreshNext, underReset, CopyEngineReg::ChanRegs::unserialize(), UNSERIALIZE_ARRAY, and UNSERIALIZE_SCALAR.
Referenced by CopyEngine::params(), and write().
Definition at line 103 of file copy_engine.hh.
References channelRead(), channelWrite(), drain(), drainResume(), fetchDescComplete(), fetchDescriptor(), panic, serialize(), and unserialize().
Referenced by CopyEngine::params().
|
private |
Definition at line 592 of file copy_engine.cc.
References anBegin(), ce, cePort, CopyEngineReg::ChanRegs::completionAddr, completionDataReg, cr, DmaPort::dmaAction(), DPRINTF, latAfterCompletion, PciDevice::pciToDma(), statusCompleteEvent, and MemCmd::WriteReq.
Referenced by fetchDescComplete(), restartStateMachine(), and writeCopyBytesComplete().
|
private |
Definition at line 523 of file copy_engine.cc.
References anBegin(), CopyEngine::bytesCopied, ce, cePort, channelId, CopyEngine::copiesProcessed, copyBuffer, curDmaDesc, CopyEngineReg::DmaDesc::dest, DmaPort::dmaAction(), DPRINTF, CopyEngineReg::DmaDesc::len, PciDevice::pciToDma(), writeCompleteEvent, and MemCmd::WriteReq.
Referenced by readCopyBytesComplete(), and restartStateMachine().
|
private |
Definition at line 538 of file copy_engine.cc.
References anQ(), channelId, CopyEngineReg::DmaDesc::command, completionDataReg, CompletionWrite, continueProcessing(), cr, curDmaDesc, CopyEngineReg::DESC_CTRL_CP_STS, DPRINTF, inDrain(), lastDescriptorAddr, CopyEngineReg::DmaDesc::len, nextState, CopyEngineReg::ChanRegs::status, CopyEngineReg::DmaDesc::user1, and writeCompletionStatus().
Referenced by CopyEngineChannel().
|
private |
Definition at line 606 of file copy_engine.cc.
References continueProcessing(), and DPRINTF.
Referenced by CopyEngineChannel().
|
private |
Definition at line 122 of file copy_engine.hh.
Referenced by CopyEngineChannel(), and fetchNextAddr().
|
private |
Definition at line 73 of file copy_engine.hh.
Referenced by channelRead(), continueProcessing(), fetchAddrComplete(), fetchDescComplete(), fetchDescriptor(), fetchNextAddr(), recvCommand(), serialize(), and unserialize().
|
private |
Definition at line 67 of file copy_engine.hh.
Referenced by CopyEngineChannel(), drain(), fetchDescriptor(), fetchNextAddr(), inDrain(), readCopyBytes(), recvCommand(), serialize(), unserialize(), writeCompletionStatus(), and writeCopyBytes().
|
private |
Definition at line 66 of file copy_engine.hh.
Referenced by fetchDescriptor(), fetchNextAddr(), getPort(), readCopyBytes(), writeCompletionStatus(), and writeCopyBytes().
|
private |
Definition at line 69 of file copy_engine.hh.
Referenced by channelRead(), channelWrite(), serialize(), unserialize(), writeCopyBytes(), and writeCopyBytesComplete().
|
private |
Definition at line 82 of file copy_engine.hh.
Referenced by serialize(), unserialize(), writeCompletionStatus(), and writeCopyBytesComplete().
|
private |
Definition at line 71 of file copy_engine.hh.
Referenced by CopyEngineChannel(), readCopyBytes(), serialize(), unserialize(), writeCopyBytes(), and ~CopyEngineChannel().
|
private |
Definition at line 68 of file copy_engine.hh.
Referenced by channelRead(), channelWrite(), CopyEngineChannel(), recvCommand(), serialize(), unserialize(), writeCompletionStatus(), and writeCopyBytesComplete().
|
private |
Definition at line 70 of file copy_engine.hh.
Referenced by continueProcessing(), CopyEngineChannel(), fetchAddrComplete(), fetchDescComplete(), fetchDescriptor(), fetchNextAddr(), readCopyBytes(), serialize(), unserialize(), writeCopyBytes(), writeCopyBytesComplete(), and ~CopyEngineChannel().
|
private |
Definition at line 77 of file copy_engine.hh.
Referenced by continueProcessing(), fetchAddrComplete(), recvCommand(), restartStateMachine(), serialize(), and unserialize().
|
private |
Definition at line 118 of file copy_engine.hh.
Referenced by fetchDescriptor().
|
private |
Definition at line 76 of file copy_engine.hh.
Referenced by continueProcessing(), fetchDescriptor(), recvCommand(), restartStateMachine(), serialize(), unserialize(), and writeCopyBytesComplete().
|
private |
Definition at line 80 of file copy_engine.hh.
Referenced by writeCompletionStatus().
|
private |
Definition at line 79 of file copy_engine.hh.
Referenced by fetchDescriptor().
|
private |
Definition at line 93 of file copy_engine.hh.
Referenced by continueProcessing(), drain(), drainResume(), fetchAddrComplete(), fetchDescComplete(), readCopyBytesComplete(), recvCommand(), restartStateMachine(), serialize(), unserialize(), and writeCopyBytesComplete().
|
private |
Definition at line 126 of file copy_engine.hh.
Referenced by CopyEngineChannel(), and readCopyBytes().
|
private |
Definition at line 75 of file copy_engine.hh.
Referenced by continueProcessing(), recvCommand(), serialize(), and unserialize().
|
private |
Definition at line 134 of file copy_engine.hh.
Referenced by CopyEngineChannel(), and writeCompletionStatus().
|
private |
Definition at line 74 of file copy_engine.hh.
Referenced by continueProcessing(), recvCommand(), serialize(), and unserialize().
|
private |
Definition at line 130 of file copy_engine.hh.
Referenced by CopyEngineChannel(), and writeCopyBytes().