40 #ifndef __DEV_PIXELPUMP_HH__
41 #define __DEV_PIXELPUMP_HH__
46 struct BasePixelPumpParams;
63 unsigned hbp,
unsigned h_sync,
unsigned hfp,
64 unsigned vbp,
unsigned v_sync,
unsigned vfp);
152 unsigned pixel_chunk);
273 const std::string
name()
const override {
return _name; }
322 #endif // __DEV_PIXELPUMP_HH__
unsigned vSync
Vertical sync signal in lines.
std::vector< PixelEvent * > pixelEvents
Convenience vector when doing operations on all events.
Timing generator for a pixel-based display.
void(BasePixelPump::* CallbackType)()
Cycles is a wrapper class for representing cycle counts, i.e.
unsigned lineFrontPorchStart() const
Calculate the first line of the back porch.
Internal gem5 representation of a frame buffer.
virtual void onFrameDone()
Finished displaying the visible region of a frame.
bool _underrun
Did a buffer underrun occur within this refresh interval?
DrainState
Object drain/handover states.
virtual void onHSyncBegin()
Start of the HSync region.
DrainState drain() override
Notify an object that it needs to drain its state.
unsigned line
Current line (including back porch, front porch, and vsync) within a frame.
bool scheduled() const
Determine if the current event is scheduled.
unsigned posY() const
Current pixel position within the visible area.
void stop()
Immediately stop pushing pixels.
unsigned hBackPorch
Horizontal back porch in pixels.
void renderLine()
Fast and event-free line rendering function.
unsigned linesPerFrame() const
Calculate the total number of lines in a frame.
unsigned vFrontPorch
Vertical front porch in lines.
Cycles cyclesPerLine() const
How many pixel clocks are required for one line?
void start()
Starting pushing pixels in timing mode.
unsigned posX() const
Current pixel position within the visible area.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
PixelEvent(const char *name, BasePixelPump *parent, CallbackType func)
const std::string name() const override
BasePixelPump(EventManager &em, ClockDomain &pxl_clk, unsigned pixel_chunk)
Callback helper class with suspend support.
Interface for objects that might require draining before checkpointing.
virtual void onUnderrun(unsigned x, unsigned y)
Buffer underrun occurred on a frame.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
bool active() const
Is the pixel pump active and refreshing the display?
void serialize(CheckpointOut &cp) const override
Serialize an object.
virtual void onVSyncEnd()
Callback on the first pixel of the line after the end VSync region (typically the first pixel of the ...
void renderFrame()
Render an entire frame in KVM execution mode.
virtual void onHSyncEnd()
Start of the first pixel after the HSync region.
uint64_t Tick
Tick count type.
bool visibleLine() const
Is the current line within the visible range?
void unserialize(CheckpointIn &cp) override
Unserialize an object.
ClockedObject declaration and implementation.
unsigned _posX
X-coordinate within the visible region of a frame.
void updateTimings(const DisplayTimings &timings)
Update frame size using display timing.
FrameBuffer fb
Output frame buffer.
virtual void onVSyncBegin()
First pixel clock of the first VSync line.
Helper class for objects that need to be clocked.
unsigned height
Display height in pixels.
Basic support for object serialization.
PixelEvent evRenderPixels
const unsigned pixelChunk
Maximum number of pixels to handle per render callback.
bool underrun() const
Did a buffer underrun occur within this refresh interval?
unsigned hFrontPorch
Horizontal front porch in pixels.
unsigned lineFirstVisible() const
Calculate the first line of the visible region.
unsigned hSync
Horizontal sync signal length in pixels.
void serialize(CheckpointOut &cp) const override
Serialize an object.
The ClockDomain provides clock to group of clocked objects bundled under the same clock domain...
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::ostream CheckpointOut
Cycles cyclesPerFrame() const
How many pixel clocks are required for one frame?
unsigned vBackPorch
Vertical back porch in lines.
static const DisplayTimings vga
virtual bool nextPixel(Pixel &p)=0
Get the next pixel from the scan line buffer.
Internal gem5 representation of a Pixel.
unsigned lineVBackPorchStart() const
Calculate the first line of the vertical back porch.
unsigned lineVSyncStart() const
Calculate the first line of the vsync signal.
void drainResume() override
Resume execution after a successful drain.
unsigned width
Display width in pixels.
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.
const DisplayTimings & timings() const
Get a constant reference of the current display timings.