gem5  v22.1.0.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
gem5::CopyEngine::CopyEngineChannel Class Reference
Inheritance diagram for gem5::CopyEngine::CopyEngineChannel:
gem5::Drainable gem5::Serializable

Public Member Functions

 CopyEngineChannel (CopyEngine *_ce, int cid)
 
virtual ~CopyEngineChannel ()
 
PortgetPort ()
 
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
 Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight. 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 gem5::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 gem5::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 ()
 

Private Attributes

DmaPort cePort
 
CopyEnginece
 
copy_engine_reg::ChanRegs cr
 
int channelId
 
copy_engine_reg::DmaDesccurDmaDesc
 
uint8_t * copyBuffer
 
bool busy
 
bool underReset
 
bool refreshNext
 
Addr lastDescriptorAddr
 
Addr fetchAddress
 
Tick latBeforeBegin
 
Tick latAfterCompletion
 
uint64_t completionDataReg
 
ChannelState nextState
 
EventFunctionWrapper fetchCompleteEvent
 
EventFunctionWrapper addrCompleteEvent
 
EventFunctionWrapper readCompleteEvent
 
EventFunctionWrapper writeCompleteEvent
 
EventFunctionWrapper statusCompleteEvent
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it. More...
 
- Protected Member Functions inherited from gem5::Drainable
 Drainable ()
 
virtual ~Drainable ()
 
void signalDrainDone () const
 Signal that an object is drained. More...
 

Detailed Description

Definition at line 63 of file copy_engine.hh.

Member Enumeration Documentation

◆ ChannelState

Enumerator
Idle 
AddressFetch 
DescriptorFetch 
DMARead 
DMAWrite 
CompletionWrite 

Definition at line 84 of file copy_engine.hh.

Constructor & Destructor Documentation

◆ CopyEngineChannel()

gem5::CopyEngine::CopyEngineChannel::CopyEngineChannel ( CopyEngine _ce,
int  cid 
)

Definition at line 83 of file copy_engine.cc.

References fetchDescComplete().

◆ ~CopyEngineChannel()

gem5::CopyEngine::CopyEngineChannel::~CopyEngineChannel ( )
virtual

Definition at line 112 of file copy_engine.cc.

Member Function Documentation

◆ channelRead()

void gem5::CopyEngine::CopyEngineChannel::channelRead ( PacketPtr  pkt,
Addr  daddr,
int  size 
)

◆ channelWrite()

void gem5::CopyEngine::CopyEngineChannel::channelWrite ( PacketPtr  pkt,
Addr  daddr,
int  size 
)

◆ continueProcessing()

void gem5::CopyEngine::CopyEngineChannel::continueProcessing ( )
private

Definition at line 552 of file copy_engine.cc.

◆ drain()

DrainState gem5::CopyEngine::CopyEngineChannel::drain ( )
overridevirtual

Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight.

Draining is mostly used before forking and creating a check point.

This function notifies 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.

Note
An object that has entered the Drained state can be disturbed by other objects in the system and consequently stop being drained. These perturbations are not visible in the drain state. The simulator therefore repeats the draining process until all objects return DrainState::Drained on the first call to drain().
Returns
DrainState::Drained if the object is drained at this point in time, DrainState::Draining if it needs further simulation.

Implements gem5::Drainable.

Definition at line 641 of file copy_engine.cc.

References gem5::MipsISA::ce, DPRINTF, gem5::Drained, gem5::Draining, and gem5::Running.

◆ drainResume()

void gem5::CopyEngine::CopyEngineChannel::drainResume ( )
overridevirtual

Resume execution after a successful drain.

Reimplemented from gem5::Drainable.

Definition at line 732 of file copy_engine.cc.

References DPRINTF.

◆ fetchAddrComplete()

void gem5::CopyEngine::CopyEngineChannel::fetchAddrComplete ( )
private

Definition at line 612 of file copy_engine.cc.

References DPRINTF.

◆ fetchDescComplete()

void gem5::CopyEngine::CopyEngineChannel::fetchDescComplete ( )
private

◆ fetchDescriptor()

void gem5::CopyEngine::CopyEngineChannel::fetchDescriptor ( Addr  address)
private

Definition at line 453 of file copy_engine.cc.

References gem5::MipsISA::ce, DPRINTF, and gem5::MemCmd::ReadReq.

◆ fetchNextAddr()

void gem5::CopyEngine::CopyEngineChannel::fetchNextAddr ( Addr  address)
private

Definition at line 601 of file copy_engine.cc.

References gem5::MipsISA::ce, DPRINTF, and gem5::MemCmd::ReadReq.

◆ getPort()

Port & gem5::CopyEngine::CopyEngineChannel::getPort ( )

Definition at line 135 of file copy_engine.cc.

◆ inDrain()

bool gem5::CopyEngine::CopyEngineChannel::inDrain ( )
private

◆ name()

std::string gem5::CopyEngine::CopyEngineChannel::name ( )
inline

Definition at line 102 of file copy_engine.hh.

References ce, channelId, gem5::csprintf(), and gem5::Named::name().

◆ read()

virtual Tick gem5::CopyEngine::CopyEngineChannel::read ( PacketPtr  pkt)
inlinevirtual

Definition at line 108 of file copy_engine.hh.

References panic.

◆ readCopyBytes()

void gem5::CopyEngine::CopyEngineChannel::readCopyBytes ( )
private

Definition at line 499 of file copy_engine.cc.

References gem5::MipsISA::ce, DPRINTF, and gem5::MemCmd::ReadReq.

◆ readCopyBytesComplete()

void gem5::CopyEngine::CopyEngineChannel::readCopyBytesComplete ( )
private

Definition at line 509 of file copy_engine.cc.

References DPRINTF.

◆ recvCommand()

void gem5::CopyEngine::CopyEngineChannel::recvCommand ( )
private

Definition at line 141 of file copy_engine.cc.

References gem5::MipsISA::ce, gem5::X86ISA::misc_reg::cr(), panic, and gem5::Running.

◆ restartStateMachine()

void gem5::CopyEngine::CopyEngineChannel::restartStateMachine ( )
private

Definition at line 706 of file copy_engine.cc.

References panic.

◆ serialize()

void gem5::CopyEngine::CopyEngineChannel::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 670 of file copy_engine.cc.

References gem5::arrayParamOut, gem5::MipsISA::ce, gem5::X86ISA::misc_reg::cr(), SERIALIZE_ARRAY, and SERIALIZE_SCALAR.

◆ unserialize()

void gem5::CopyEngine::CopyEngineChannel::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 687 of file copy_engine.cc.

References gem5::arrayParamIn(), gem5::MipsISA::ce, gem5::X86ISA::misc_reg::cr(), UNSERIALIZE_ARRAY, and UNSERIALIZE_SCALAR.

◆ write()

virtual Tick gem5::CopyEngine::CopyEngineChannel::write ( PacketPtr  pkt)
inlinevirtual

Definition at line 110 of file copy_engine.hh.

References panic.

◆ writeCompletionStatus()

void gem5::CopyEngine::CopyEngineChannel::writeCompletionStatus ( )
private

◆ writeCopyBytes()

void gem5::CopyEngine::CopyEngineChannel::writeCopyBytes ( )
private

Definition at line 519 of file copy_engine.cc.

References gem5::MipsISA::ce, DPRINTF, and gem5::MemCmd::WriteReq.

◆ writeCopyBytesComplete()

void gem5::CopyEngine::CopyEngineChannel::writeCopyBytesComplete ( )
private

◆ writeStatusComplete()

void gem5::CopyEngine::CopyEngineChannel::writeStatusComplete ( )
private

Definition at line 594 of file copy_engine.cc.

References DPRINTF.

Member Data Documentation

◆ addrCompleteEvent

EventFunctionWrapper gem5::CopyEngine::CopyEngineChannel::addrCompleteEvent
private

Definition at line 129 of file copy_engine.hh.

◆ busy

bool gem5::CopyEngine::CopyEngineChannel::busy
private

Definition at line 73 of file copy_engine.hh.

◆ ce

CopyEngine* gem5::CopyEngine::CopyEngineChannel::ce
private

Definition at line 67 of file copy_engine.hh.

Referenced by name().

◆ cePort

DmaPort gem5::CopyEngine::CopyEngineChannel::cePort
private

Definition at line 66 of file copy_engine.hh.

◆ channelId

int gem5::CopyEngine::CopyEngineChannel::channelId
private

Definition at line 69 of file copy_engine.hh.

Referenced by name().

◆ completionDataReg

uint64_t gem5::CopyEngine::CopyEngineChannel::completionDataReg
private

Definition at line 82 of file copy_engine.hh.

◆ copyBuffer

uint8_t* gem5::CopyEngine::CopyEngineChannel::copyBuffer
private

Definition at line 71 of file copy_engine.hh.

◆ cr

copy_engine_reg::ChanRegs gem5::CopyEngine::CopyEngineChannel::cr
private

Definition at line 68 of file copy_engine.hh.

◆ curDmaDesc

copy_engine_reg::DmaDesc* gem5::CopyEngine::CopyEngineChannel::curDmaDesc
private

Definition at line 70 of file copy_engine.hh.

◆ fetchAddress

Addr gem5::CopyEngine::CopyEngineChannel::fetchAddress
private

Definition at line 77 of file copy_engine.hh.

◆ fetchCompleteEvent

EventFunctionWrapper gem5::CopyEngine::CopyEngineChannel::fetchCompleteEvent
private

Definition at line 125 of file copy_engine.hh.

◆ lastDescriptorAddr

Addr gem5::CopyEngine::CopyEngineChannel::lastDescriptorAddr
private

Definition at line 76 of file copy_engine.hh.

◆ latAfterCompletion

Tick gem5::CopyEngine::CopyEngineChannel::latAfterCompletion
private

Definition at line 80 of file copy_engine.hh.

◆ latBeforeBegin

Tick gem5::CopyEngine::CopyEngineChannel::latBeforeBegin
private

Definition at line 79 of file copy_engine.hh.

◆ nextState

ChannelState gem5::CopyEngine::CopyEngineChannel::nextState
private

Definition at line 94 of file copy_engine.hh.

◆ readCompleteEvent

EventFunctionWrapper gem5::CopyEngine::CopyEngineChannel::readCompleteEvent
private

Definition at line 133 of file copy_engine.hh.

◆ refreshNext

bool gem5::CopyEngine::CopyEngineChannel::refreshNext
private

Definition at line 75 of file copy_engine.hh.

◆ statusCompleteEvent

EventFunctionWrapper gem5::CopyEngine::CopyEngineChannel::statusCompleteEvent
private

Definition at line 141 of file copy_engine.hh.

◆ underReset

bool gem5::CopyEngine::CopyEngineChannel::underReset
private

Definition at line 74 of file copy_engine.hh.

◆ writeCompleteEvent

EventFunctionWrapper gem5::CopyEngine::CopyEngineChannel::writeCompleteEvent
private

Definition at line 137 of file copy_engine.hh.


The documentation for this class was generated from the following files:

Generated on Wed Dec 21 2022 10:23:20 for gem5 by doxygen 1.9.1