gem5  v20.1.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HDLcd::DmaEngine Class Reference

#include <hdlcd.hh>

Inheritance diagram for HDLcd::DmaEngine:
DmaReadFifo Drainable Serializable

Public Member Functions

 DmaEngine (HDLcd &_parent, size_t size, unsigned request_size, unsigned max_pending, size_t line_size, ssize_t line_pitch, unsigned num_lines)
 
void startFrame (Addr fb_base)
 
void abortFrame ()
 
void dumpSettings ()
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from DmaReadFifo
 DmaReadFifo (DmaPort &port, size_t size, unsigned max_req_size, unsigned max_pending, Request::Flags flags=0)
 
 ~DmaReadFifo ()
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
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...
 
bool tryGet (uint8_t *dst, size_t len)
 Try to read data from the FIFO. More...
 
template<typename T >
bool tryGet (T &value)
 
void get (uint8_t *dst, size_t len)
 Read data from the FIFO and panic on failure. More...
 
template<typename T >
get ()
 
size_t size () const
 Get the amount of data stored in the FIFO. More...
 
void flush ()
 Flush the FIFO. More...
 
void startFill (Addr start, size_t size)
 Start filling the FIFO. More...
 
void stopFill ()
 Stop the DMA engine. More...
 
bool atEndOfBlock () const
 Has the DMA engine sent out the last request for the active block? More...
 
bool isActive () const
 Is the DMA engine active (i.e., are there still in-flight accesses)? 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)
 

Protected Member Functions

void onEndOfBlock () override
 End of block callback. More...
 
void onIdle () override
 Last response received callback. More...
 
Callbacks
- Protected Member Functions inherited from Drainable
 Drainable ()
 
virtual ~Drainable ()
 
virtual void drainResume ()
 Resume execution after a successful drain. More...
 
void signalDrainDone () const
 Signal that an object is drained. More...
 

Protected Attributes

HDLcdparent
 
const size_t lineSize
 
const ssize_t linePitch
 
const unsigned numLines
 
Addr nextLineAddr
 
Addr frameEnd
 

Additional Inherited Members

- Static Public Member Functions inherited from Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 Serializes all the SimObjects. More...
 
static void unserializeGlobals (CheckpointIn &cp)
 

Detailed Description

Definition at line 364 of file hdlcd.hh.

Constructor & Destructor Documentation

◆ DmaEngine()

HDLcd::DmaEngine::DmaEngine ( HDLcd _parent,
size_t  size,
unsigned  request_size,
unsigned  max_pending,
size_t  line_size,
ssize_t  line_pitch,
unsigned  num_lines 
)

Definition at line 601 of file hdlcd.cc.

Member Function Documentation

◆ abortFrame()

void HDLcd::DmaEngine::abortFrame ( )

Definition at line 641 of file hdlcd.cc.

◆ dumpSettings()

void HDLcd::DmaEngine::dumpSettings ( )

Definition at line 650 of file hdlcd.cc.

References inform.

◆ onEndOfBlock()

void HDLcd::DmaEngine::onEndOfBlock ( )
overrideprotectedvirtual

End of block callback.

This callback is called once after the last access in a block has been sent. It is legal for a derived class to call startFill() from this method to initiate a transfer.

Reimplemented from DmaReadFifo.

Definition at line 658 of file hdlcd.cc.

◆ onIdle()

void HDLcd::DmaEngine::onIdle ( )
overrideprotectedvirtual

Last response received callback.

This callback is called when the DMA engine becomes idle (i.e., there are no pending requests).

It is possible for a DMA engine to reach the end of block and become idle at the same tick. In such a case, the onEndOfBlock() callback will be called first. This callback will NOT be called if that callback initiates a new DMA transfer.

Reimplemented from DmaReadFifo.

Definition at line 671 of file hdlcd.cc.

◆ serialize()

void HDLcd::DmaEngine::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

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

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 614 of file hdlcd.cc.

References DmaReadFifo::serialize(), and SERIALIZE_SCALAR.

◆ startFrame()

void HDLcd::DmaEngine::startFrame ( Addr  fb_base)

Definition at line 632 of file hdlcd.cc.

References HDLcd::fb_base.

◆ unserialize()

void HDLcd::DmaEngine::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

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

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 623 of file hdlcd.cc.

References DmaReadFifo::unserialize(), and UNSERIALIZE_SCALAR.

Member Data Documentation

◆ frameEnd

Addr HDLcd::DmaEngine::frameEnd
protected

Definition at line 388 of file hdlcd.hh.

◆ linePitch

const ssize_t HDLcd::DmaEngine::linePitch
protected

Definition at line 384 of file hdlcd.hh.

◆ lineSize

const size_t HDLcd::DmaEngine::lineSize
protected

Definition at line 383 of file hdlcd.hh.

◆ nextLineAddr

Addr HDLcd::DmaEngine::nextLineAddr
protected

Definition at line 387 of file hdlcd.hh.

◆ numLines

const unsigned HDLcd::DmaEngine::numLines
protected

Definition at line 385 of file hdlcd.hh.

◆ parent

HDLcd& HDLcd::DmaEngine::parent
protected

Definition at line 382 of file hdlcd.hh.


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

Generated on Wed Sep 30 2020 14:02:26 for gem5 by doxygen 1.8.17