gem5  v21.1.0.2
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
gem5::DisplayTimings Struct Reference

#include <pixelpump.hh>

Inheritance diagram for gem5::DisplayTimings:
gem5::Serializable

Public Member Functions

 DisplayTimings (unsigned width, unsigned height, unsigned hbp, unsigned h_sync, unsigned hfp, unsigned vbp, unsigned v_sync, unsigned vfp)
 Create a display timing configuration struct. More...
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
Cycles cyclesPerLine () const
 How many pixel clocks are required for one line? More...
 
Cycles cyclesPerFrame () const
 How many pixel clocks are required for one frame? More...
 
unsigned lineVSyncStart () const
 Calculate the first line of the vsync signal. More...
 
unsigned lineVBackPorchStart () const
 Calculate the first line of the vertical back porch. More...
 
unsigned lineFirstVisible () const
 Calculate the first line of the visible region. More...
 
unsigned lineFrontPorchStart () const
 Calculate the first line of the back porch. More...
 
unsigned linesPerFrame () const
 Calculate the total number of lines in a frame. 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)
 

Public Attributes

unsigned width
 Display width in pixels. More...
 
unsigned height
 Display height in pixels. More...
 
unsigned hBackPorch
 Horizontal back porch in pixels. More...
 
unsigned hFrontPorch
 Horizontal front porch in pixels. More...
 
unsigned hSync
 Horizontal sync signal length in pixels. More...
 
unsigned vBackPorch
 Vertical back porch in lines. More...
 
unsigned vFrontPorch
 Vertical front porch in lines. More...
 
unsigned vSync
 Vertical sync signal in lines. More...
 

Static Public Attributes

static const DisplayTimings vga
 

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...
 

Detailed Description

Definition at line 51 of file pixelpump.hh.

Constructor & Destructor Documentation

◆ DisplayTimings()

gem5::DisplayTimings::DisplayTimings ( unsigned  width,
unsigned  height,
unsigned  hbp,
unsigned  h_sync,
unsigned  hfp,
unsigned  vbp,
unsigned  v_sync,
unsigned  vfp 
)

Create a display timing configuration struct.

Parameters
widthWidth of the visible area of the screen.
heightHeight of the visible area of the screen.
hfpHorizontal front porch in pixel clocks.
h_syncHorizontal sync in pixel clocks.
hbpHorizontal back porch in pixel clocks.
vfpVertical front porch in scan lines.
v_syncVertical sync in scan lines.
vbpVertical back porch in scan lines.

Definition at line 51 of file pixelpump.cc.

Member Function Documentation

◆ cyclesPerFrame()

Cycles gem5::DisplayTimings::cyclesPerFrame ( ) const
inline

How many pixel clocks are required for one frame?

Definition at line 81 of file pixelpump.hh.

References cyclesPerLine(), and linesPerFrame().

◆ cyclesPerLine()

Cycles gem5::DisplayTimings::cyclesPerLine ( ) const
inline

How many pixel clocks are required for one line?

Definition at line 74 of file pixelpump.hh.

References hBackPorch, hSync, and width.

Referenced by gem5::BasePixelPump::beginLine(), and cyclesPerFrame().

◆ lineFirstVisible()

unsigned gem5::DisplayTimings::lineFirstVisible ( ) const
inline

◆ lineFrontPorchStart()

unsigned gem5::DisplayTimings::lineFrontPorchStart ( ) const
inline

Calculate the first line of the back porch.

Definition at line 109 of file pixelpump.hh.

References height, and lineFirstVisible().

Referenced by gem5::BasePixelPump::beginLine(), linesPerFrame(), gem5::BasePixelPump::renderFrame(), and gem5::BasePixelPump::visibleLine().

◆ linesPerFrame()

unsigned gem5::DisplayTimings::linesPerFrame ( ) const
inline

Calculate the total number of lines in a frame.

Definition at line 116 of file pixelpump.hh.

References lineFrontPorchStart(), and vFrontPorch.

Referenced by gem5::BasePixelPump::beginLine(), cyclesPerFrame(), and gem5::BasePixelPump::updateTimings().

◆ lineVBackPorchStart()

unsigned gem5::DisplayTimings::lineVBackPorchStart ( ) const
inline

Calculate the first line of the vertical back porch.

Definition at line 95 of file pixelpump.hh.

References lineVSyncStart(), and vSync.

Referenced by gem5::BasePixelPump::beginLine(), lineFirstVisible(), and gem5::BasePixelPump::renderFrame().

◆ lineVSyncStart()

unsigned gem5::DisplayTimings::lineVSyncStart ( ) const
inline

Calculate the first line of the vsync signal.

Definition at line 88 of file pixelpump.hh.

Referenced by gem5::BasePixelPump::beginLine(), lineVBackPorchStart(), and gem5::BasePixelPump::renderFrame().

◆ serialize()

void gem5::DisplayTimings::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 61 of file pixelpump.cc.

References hBackPorch, height, hFrontPorch, hSync, SERIALIZE_SCALAR, vBackPorch, vFrontPorch, vSync, and width.

◆ unserialize()

void gem5::DisplayTimings::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 76 of file pixelpump.cc.

References hBackPorch, height, hFrontPorch, hSync, UNSERIALIZE_SCALAR, vBackPorch, vFrontPorch, vSync, and width.

Member Data Documentation

◆ hBackPorch

unsigned gem5::DisplayTimings::hBackPorch

Horizontal back porch in pixels.

Definition at line 127 of file pixelpump.hh.

Referenced by gem5::BasePixelPump::beginLine(), cyclesPerLine(), serialize(), and unserialize().

◆ height

unsigned gem5::DisplayTimings::height

◆ hFrontPorch

unsigned gem5::DisplayTimings::hFrontPorch

Horizontal front porch in pixels.

Definition at line 129 of file pixelpump.hh.

Referenced by serialize(), and unserialize().

◆ hSync

unsigned gem5::DisplayTimings::hSync

Horizontal sync signal length in pixels.

Definition at line 131 of file pixelpump.hh.

Referenced by gem5::BasePixelPump::beginLine(), cyclesPerLine(), serialize(), and unserialize().

◆ vBackPorch

unsigned gem5::DisplayTimings::vBackPorch

Vertical back porch in lines.

Definition at line 134 of file pixelpump.hh.

Referenced by lineFirstVisible(), serialize(), and unserialize().

◆ vFrontPorch

unsigned gem5::DisplayTimings::vFrontPorch

Vertical front porch in lines.

Definition at line 136 of file pixelpump.hh.

Referenced by linesPerFrame(), serialize(), and unserialize().

◆ vga

const DisplayTimings gem5::DisplayTimings::vga
static

Definition at line 140 of file pixelpump.hh.

◆ vSync

unsigned gem5::DisplayTimings::vSync

Vertical sync signal in lines.

Definition at line 138 of file pixelpump.hh.

Referenced by lineVBackPorchStart(), serialize(), and unserialize().

◆ width

unsigned gem5::DisplayTimings::width

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

Generated on Tue Sep 21 2021 12:27:29 for gem5 by doxygen 1.8.17