Deleted Added
sdiff udiff text old ( 9939:735d73e394d3 ) new ( 10839:10cac0f0f419 )
full compact
1/*
2 * Copyright (c) 2010-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

--- 67 unchanged lines hidden (view full) ---

78 * specification is referenced for the different Versatile Express tiles.
79 * This implementation uses the larger 2 KB buffer by default.
80 */
81
82#ifndef __DEV_ARM_HDLCD_HH__
83#define __DEV_ARM_HDLCD_HH__
84
85#include <fstream>
86
87#include "dev/arm/amba_device.hh"
88#include "params/HDLcd.hh"
89#include "sim/serialize.hh"
90
91class VncInput;
92class Bitmap;
93
94class HDLcd: public AmbaDmaDevice
95{
96 protected:
97 /** fake AMBA ID -- unused */
98 static const uint64_t AMBA_ID = ULL(0xb105f00d00141000);
99
100 /** ARM HDLcd register offsets */

--- 36 unchanged lines hidden (view full) ---

137 static const size_t MAX_BURST_LEN = 16;
138
139 /** size of internal buffer in bytes */
140 static const size_t PIXEL_BUFFER_CAPACITY = 2048;
141
142 /** AXI port width in bytes */
143 static const size_t AXI_PORT_WIDTH = 8;
144
145 /**
146 * @name RegisterFieldLayouts
147 * Bit layout declarations for multi-field registers.
148 */
149 /**@{*/
150 BitUnion32(VersionReg)
151 Bitfield<7,0> version_minor;
152 Bitfield<15,8> version_major;

--- 84 unchanged lines hidden (view full) ---

237 ColorSelectReg red_select; /**< Red color select register */
238 ColorSelectReg green_select; /**< Green color select register */
239 ColorSelectReg blue_select; /**< Blue color select register */
240 /** @} */
241
242 /** Pixel clock period */
243 const Tick pixelClock;
244
245 /** VNC server */
246 VncInput *vnc;
247
248 /** Helper to write out bitmaps */
249 Bitmap *bmp;
250
251 /** Picture of what the current frame buffer looks like */
252 std::ostream *pic;
253
254 /**
255 * Event wrapper for dmaDone()
256 *
257 * This event call pushes its this pointer onto the freeDoneEvent vector

--- 62 unchanged lines hidden (view full) ---

320
321 /** Number of pending dma reads */
322 size_t dmaPendingNum;
323
324 /** Flag indicating whether current frame has underrun */
325 bool frameUnderrun;
326
327 /** HDLcd virtual display buffer */
328 uint8_t *virtualDisplayBuffer;
329
330 /** Size of the pixel buffer */
331 size_t pixelBufferSize;
332
333 /** Index of the next pixel to render */
334 size_t pixelIndex;
335
336 /** Flag indicating whether video parameters need updating */

--- 60 unchanged lines hidden (view full) ---

397 * Gets frame buffer height.
398 *
399 * @return frame buffer height (lines per panel)
400 */
401 inline size_t height() const {
402 return fb_line_count.fb_line_count;
403 }
404
405 /**
406 * Gets the total number of pixel clocks per display line.
407 *
408 * @return number of pixel clocks per display line including porch delays
409 * and horizontal sync time
410 */
411 inline uint64_t PClksPerLine() const {
412 return h_back_porch.val + 1 +

--- 18 unchanged lines hidden (view full) ---

431 void fillPixelBuffer();
432
433 /** DMA done event */
434 void dmaDone(DmaDoneEvent *event);
435
436 /** Called when it is time to render a pixel */
437 void renderPixel();
438
439 /** Start of frame event */
440 EventWrapper<HDLcd, &HDLcd::startFrame> startFrameEvent;
441
442 /** End of frame event */
443 EventWrapper<HDLcd, &HDLcd::endFrame> endFrameEvent;
444
445 /** Pixel render event */
446 EventWrapper<HDLcd, &HDLcd::renderPixel> renderPixelEvent;

--- 58 unchanged lines hidden ---