gem5  v20.1.0.0
hdlcd.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2013, 2015, 2017 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
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 #include "dev/arm/hdlcd.hh"
39 
40 #include "base/output.hh"
41 #include "base/trace.hh"
42 #include "base/vnc/vncinput.hh"
43 #include "debug/Checkpoint.hh"
44 #include "debug/HDLcd.hh"
45 #include "dev/arm/amba_device.hh"
46 #include "dev/arm/base_gic.hh"
47 #include "enums/ImageFormat.hh"
48 #include "mem/packet.hh"
49 #include "mem/packet_access.hh"
50 #include "params/HDLcd.hh"
51 #include "sim/system.hh"
52 
53 using std::vector;
54 
55 
56 // initialize hdlcd registers
57 HDLcd::HDLcd(const HDLcdParams *p)
58  : AmbaDmaDevice(p, 0xFFFF),
59  // Parameters
60  vnc(p->vnc),
61  workaroundSwapRB(p->workaround_swap_rb),
62  workaroundDmaLineCount(p->workaround_dma_line_count),
63  addrRanges{RangeSize(pioAddr, pioSize)},
64  enableCapture(p->enable_capture),
65  pixelBufferSize(p->pixel_buffer_size),
66  virtRefreshRate(p->virt_refresh_rate),
67 
68  // Registers
69  version(VERSION_RESETV),
70  int_rawstat(0), int_mask(0),
71 
72  fb_base(0), fb_line_length(0), fb_line_count(0), fb_line_pitch(0),
73  bus_options(BUS_OPTIONS_RESETV),
74 
75  v_sync(0), v_back_porch(0), v_data(0), v_front_porch(0),
76  h_sync(0), h_back_porch(0), h_data(0), h_front_porch(0),
77  polarities(0),
78 
79  command(0),
80 
81  pixel_format(0),
82  red_select(0), green_select(0), blue_select(0),
83 
84  virtRefreshEvent([this]{ virtRefresh(); }, name()),
85  // Other
86  imgFormat(p->frame_format), pic(NULL), conv(PixelConverter::rgba8888_le),
87  pixelPump(*this, *p->pxl_clk, p->pixel_chunk)
88 {
89  if (vnc)
90  vnc->setFrameBuffer(&pixelPump.fb);
91 
92  imgWriter = createImgWriter(imgFormat, &pixelPump.fb);
93 }
94 
96 {
97 }
98 
99 void
101 {
103 
104  using namespace Stats;
105 
106  stats.underruns
107  .name(name() + ".underruns")
108  .desc("number of buffer underruns")
109  .flags(nozero)
110  ;
111 }
112 
113 void
115 {
116  DPRINTF(Checkpoint, "Serializing ARM HDLCD\n");
117 
120 
126 
131 
136 
138 
144 
146  if (enabled())
147  dmaEngine->serializeSection(cp, "dmaEngine");
148 }
149 
150 void
152 {
153  DPRINTF(Checkpoint, "Unserializing ARM HDLCD\n");
154 
157 
163 
168 
173 
175 
181 
182  {
183  // Try to unserialize the pixel pump. It might not exist if
184  // we're unserializing an old checkpoint.
185  ScopedCheckpointSection sec(cp, "pixelPump");
186  if (cp.sectionExists(Serializable::currentSection()))
188  }
189 
190  if (enabled()) {
191  // Create the DMA engine and read its state from the
192  // checkpoint. We don't need to worry about the pixel pump as
193  // it is a proper SimObject.
194  createDmaEngine();
195  dmaEngine->unserializeSection(cp, "dmaEngine");
196 
197  conv = pixelConverter();
198  }
199 }
200 
201 void
203 {
205 
206  if (enabled()) {
207  if (sys->bypassCaches()) {
208  // We restart the HDLCD if we are in KVM mode. This
209  // ensures that we always use the fast refresh logic if we
210  // resume in KVM mode.
211  cmdDisable();
212  cmdEnable();
213  } else if (!pixelPump.active()) {
214  // We restored from an old checkpoint without a pixel
215  // pump, start an new refresh. This typically happens when
216  // restoring from old checkpoints.
217  cmdEnable();
218  }
219  }
220 
221  // We restored from a checkpoint and need to update the VNC server
222  if (pixelPump.active() && vnc)
223  vnc->setDirty();
224 }
225 
226 void
228 {
231 }
232 
233 // read registers and frame buffer
234 Tick
236 {
237  assert(pkt->getAddr() >= pioAddr &&
238  pkt->getAddr() < pioAddr + pioSize);
239 
240  const Addr daddr(pkt->getAddr() - pioAddr);
241  panic_if(pkt->getSize() != 4,
242  "Unhandled read size (address: 0x.4x, size: %u)",
243  daddr, pkt->getSize());
244 
245  const uint32_t data(readReg(daddr));
246  DPRINTF(HDLcd, "read register 0x%04x: 0x%x\n", daddr, data);
247 
248  pkt->setLE<uint32_t>(data);
249  pkt->makeAtomicResponse();
250  return pioDelay;
251 }
252 
253 // write registers and frame buffer
254 Tick
256 {
257  assert(pkt->getAddr() >= pioAddr &&
258  pkt->getAddr() < pioAddr + pioSize);
259 
260  const Addr daddr(pkt->getAddr() - pioAddr);
261  panic_if(pkt->getSize() != 4,
262  "Unhandled read size (address: 0x.4x, size: %u)",
263  daddr, pkt->getSize());
264  const uint32_t data(pkt->getLE<uint32_t>());
265  DPRINTF(HDLcd, "write register 0x%04x: 0x%x\n", daddr, data);
266 
267  writeReg(daddr, data);
268 
269  pkt->makeAtomicResponse();
270  return pioDelay;
271 }
272 
273 uint32_t
275 {
276  switch (offset) {
277  case Version: return version;
278 
279  case Int_RawStat: return int_rawstat;
280  case Int_Clear:
281  panic("HDLCD INT_CLEAR register is Write-Only\n");
282  case Int_Mask: return int_mask;
283  case Int_Status: return intStatus();
284 
285  case Fb_Base: return fb_base;
286  case Fb_Line_Length: return fb_line_length;
287  case Fb_Line_Count: return fb_line_count;
288  case Fb_Line_Pitch: return fb_line_pitch;
289  case Bus_Options: return bus_options;
290 
291  case V_Sync: return v_sync;
292  case V_Back_Porch: return v_back_porch;
293  case V_Data: return v_data;
294  case V_Front_Porch: return v_front_porch;
295  case H_Sync: return h_sync;
296  case H_Back_Porch: return h_back_porch;
297  case H_Data: return h_data;
298  case H_Front_Porch: return h_front_porch;
299  case Polarities: return polarities;
300 
301  case Command: return command;
302  case Pixel_Format: return pixel_format;
303  case Red_Select: return red_select;
304  case Green_Select: return green_select;
305  case Blue_Select: return blue_select;
306 
307  default:
308  panic("Tried to read HDLCD register that doesn't exist\n", offset);
309  }
310 }
311 
312 void
313 HDLcd::writeReg(Addr offset, uint32_t value)
314 {
315  switch (offset) {
316  case Version:
317  panic("HDLCD VERSION register is read-Only\n");
318 
319  case Int_RawStat:
320  intRaise(value);
321  return;
322  case Int_Clear:
323  intClear(value);
324  return;
325  case Int_Mask:
326  intMask(value);
327  return;
328  case Int_Status:
329  panic("HDLCD INT_STATUS register is read-Only\n");
330  break;
331 
332  case Fb_Base:
333  fb_base = value;
334  return;
335 
336  case Fb_Line_Length:
337  fb_line_length = value;
338  return;
339 
340  case Fb_Line_Count:
341  fb_line_count = value;
342  return;
343 
344  case Fb_Line_Pitch:
345  fb_line_pitch = value;
346  return;
347 
348  case Bus_Options: {
349  const BusOptsReg old_bus_options(bus_options);
350  bus_options = value;
351 
352  if (bus_options.max_outstanding != old_bus_options.max_outstanding) {
353  DPRINTF(HDLcd,
354  "Changing HDLcd outstanding DMA transactions: %d -> %d\n",
355  old_bus_options.max_outstanding,
356  bus_options.max_outstanding);
357 
358  }
359 
360  if (bus_options.burst_len != old_bus_options.burst_len) {
361  DPRINTF(HDLcd,
362  "Changing HDLcd DMA burst flags: 0x%x -> 0x%x\n",
363  old_bus_options.burst_len, bus_options.burst_len);
364  }
365  } return;
366 
367  case V_Sync:
368  v_sync = value;
369  return;
370  case V_Back_Porch:
371  v_back_porch = value;
372  return;
373  case V_Data:
374  v_data = value;
375  return;
376  case V_Front_Porch:
377  v_front_porch = value;
378  return;
379 
380  case H_Sync:
381  h_sync = value;
382  return;
383  case H_Back_Porch:
384  h_back_porch = value;
385  return;
386  case H_Data:
387  h_data = value;
388  return;
389  case H_Front_Porch:
390  h_front_porch = value;
391  return;
392 
393  case Polarities:
394  polarities = value;
395  return;
396 
397  case Command: {
398  const CommandReg new_command(value);
399 
400  if (new_command.enable != command.enable) {
401  DPRINTF(HDLcd, "HDLCD switched %s\n",
402  new_command.enable ? "on" : "off");
403 
404  if (new_command.enable) {
405  cmdEnable();
406  } else {
407  cmdDisable();
408  }
409  }
410  command = new_command;
411  } return;
412 
413  case Pixel_Format:
414  pixel_format = value;
415  return;
416 
417  case Red_Select:
418  red_select = value;
419  return;
420  case Green_Select:
421  green_select = value;
422  return;
423  case Blue_Select:
424  blue_select = value;
425  return;
426 
427  default:
428  panic("Tried to write HDLCD register that doesn't exist\n", offset);
429  return;
430  }
431 }
432 
435 {
436  ByteOrder byte_order(
437  pixel_format.big_endian ? ByteOrder::big : ByteOrder::little);
438 
439  /* Some Linux kernels have a broken driver that swaps the red and
440  * blue color select registers. */
441  if (!workaroundSwapRB) {
442  return PixelConverter(
443  pixel_format.bytes_per_pixel + 1,
444  red_select.offset, green_select.offset, blue_select.offset,
445  red_select.size, green_select.size, blue_select.size,
446  byte_order);
447  } else {
448  return PixelConverter(
449  pixel_format.bytes_per_pixel + 1,
450  blue_select.offset, green_select.offset, red_select.offset,
451  blue_select.size, green_select.size, red_select.size,
452  byte_order);
453  }
454 }
455 
458 {
459  return DisplayTimings(
460  h_data.val + 1, v_data.val + 1,
461  h_back_porch.val + 1, h_sync.val + 1, h_front_porch.val + 1,
462  v_back_porch.val + 1, v_sync.val + 1, v_front_porch.val + 1);
463 }
464 
465 void
467 {
468  if (bus_options.max_outstanding == 0) {
469  warn("Maximum number of outstanding DMA transfers set to 0.");
470  return;
471  }
472 
473  const uint32_t dma_burst_flags(bus_options.burst_len);
474  const uint32_t dma_burst_len(
475  dma_burst_flags ?
476  (1UL << (findMsbSet(dma_burst_flags) - 1)) :
477  MAX_BURST_LEN);
478  // Some drivers seem to set the DMA line count incorrectly. This
479  // could either be a driver bug or a specification bug. Unlike for
480  // timings, the specification does not require 1 to be added to
481  // the DMA engine's line count.
482  const uint32_t dma_lines(
484 
485  dmaEngine.reset(new DmaEngine(
486  *this, pixelBufferSize,
487  AXI_PORT_WIDTH * dma_burst_len,
488  bus_options.max_outstanding,
489  fb_line_length, fb_line_pitch, dma_lines));
490 }
491 
492 void
494 {
495  createDmaEngine();
496  conv = pixelConverter();
497 
498  // Update timing parameter before rendering frames
500 
501  if (sys->bypassCaches()) {
503  } else {
504  pixelPump.start();
505  }
506 }
507 
508 void
510 {
511  pixelPump.stop();
512  // Disable the virtual refresh event
513  if (virtRefreshEvent.scheduled()) {
514  assert(sys->bypassCaches());
516  }
517  dmaEngine->abortFrame();
518 }
519 
520 bool
522 {
523  uint8_t pixel_data[MAX_PIXEL_SIZE];
524  assert(conv.length <= sizeof(pixel_data));
525  if (dmaEngine->tryGet(pixel_data, conv.length)) {
526  p = conv.toPixel(pixel_data);
527  return true;
528  } else {
529  return false;
530  }
531 }
532 
533 void
535 {
536  DPRINTF(HDLcd, "Raising VSYNC interrupt.\n");
538 }
539 
540 void
542 {
543  DPRINTF(HDLcd, "End of VSYNC, starting DMA engine\n");
544  dmaEngine->startFrame(fb_base);
545 }
546 
547 void
549 {
550  DPRINTF(HDLcd, "Buffer underrun, stopping DMA fill.\n");
551  ++stats.underruns;
553  dmaEngine->abortFrame();
554 }
555 
556 void
558 {
559  DPRINTF(HDLcd, "Reached end of last visible line.\n");
560 
561  if (dmaEngine->size()) {
562  warn("HDLCD %u bytes still in FIFO after frame: Ensure that DMA "
563  "and PixelPump configuration is consistent\n",
564  dmaEngine->size());
565  dmaEngine->dumpSettings();
567  }
568 
569  if (vnc)
570  vnc->setDirty();
571 
572  if (enableCapture) {
573  if (!pic) {
574  pic = simout.create(
575  csprintf("%s.framebuffer.%s",
576  sys->name(), imgWriter->getImgExtension()),
577  true);
578  }
579 
580  assert(pic);
581  pic->stream()->seekp(0);
582  imgWriter->write(*pic->stream());
583  }
584 }
585 
586 void
587 HDLcd::setInterrupts(uint32_t ints, uint32_t mask)
588 {
589  const bool old_ints(intStatus());
590 
591  int_mask = mask;
592  int_rawstat = ints;
593 
594  if (!old_ints && intStatus()) {
595  interrupt->raise();
596  } else if (old_ints && !intStatus()) {
597  interrupt->clear();
598  }
599 }
600 
602  unsigned request_size, unsigned max_pending,
603  size_t line_size, ssize_t line_pitch, unsigned num_lines)
604  : DmaReadFifo(
605  _parent.dmaPort, size, request_size, max_pending,
606  Request::UNCACHEABLE),
607  parent(_parent),
608  lineSize(line_size), linePitch(line_pitch), numLines(num_lines),
609  nextLineAddr(0)
610 {
611 }
612 
613 void
615 {
617 
618  SERIALIZE_SCALAR(nextLineAddr);
619  SERIALIZE_SCALAR(frameEnd);
620 }
621 
622 void
624 {
626 
627  UNSERIALIZE_SCALAR(nextLineAddr);
628  UNSERIALIZE_SCALAR(frameEnd);
629 }
630 
631 void
633 {
634  nextLineAddr = fb_base;
635  frameEnd = fb_base + numLines * linePitch;
636 
637  startFill(nextLineAddr, lineSize);
638 }
639 
640 void
642 {
643  nextLineAddr = frameEnd;
644  stopFill();
645  flush();
646 }
647 
648 
649 void
651 {
652  inform("DMA line size: %u bytes", lineSize);
653  inform("DMA line pitch: %i bytes", linePitch);
654  inform("DMA num lines: %u", numLines);
655 }
656 
657 void
659 {
660  if (nextLineAddr == frameEnd)
661  // We're done with this frame. Ignore calls to this method
662  // until the next frame has been started.
663  return;
664 
665  nextLineAddr += linePitch;
666  if (nextLineAddr != frameEnd)
667  startFill(nextLineAddr, lineSize);
668 }
669 
670 void
672 {
673  parent.intRaise(INT_DMA_END);
674 }
675 
676 void
678 {
679  const DisplayTimings &t(timings());
680 
681  inform("PixelPump width: %u", t.width);
682  inform("PixelPump height: %u", t.height);
683 
684  inform("PixelPump horizontal back porch: %u", t.hBackPorch);
685  inform("PixelPump horizontal fron porch: %u", t.hFrontPorch);
686  inform("PixelPump horizontal fron porch: %u", t.hSync);
687 
688  inform("PixelPump vertical back porch: %u", t.vBackPorch);
689  inform("PixelPump vertical fron porch: %u", t.vFrontPorch);
690  inform("PixelPump vertical fron porch: %u", t.vSync);
691 }
692 
693 
694 HDLcd *
695 HDLcdParams::create()
696 {
697  return new HDLcd(this);
698 }
HDLcd::burst_len
burst_len
Definition: hdlcd.hh:184
HDLcd::intMask
void intMask(uint32_t mask)
Convenience function to update the interrupt mask.
Definition: hdlcd.hh:295
HDLcd::Fb_Line_Count
@ Fb_Line_Count
Definition: hdlcd.hh:128
Stats::Group::regStats
virtual void regStats()
Callback to set stat parameters.
Definition: group.cc:64
HDLcd::v_data
TimingReg v_data
Vertical data width register.
Definition: hdlcd.hh:241
Event::scheduled
bool scheduled() const
Determine if the current event is scheduled.
Definition: eventq.hh:460
HDLcd::pxlVSyncBegin
void pxlVSyncBegin()
Definition: hdlcd.cc:534
DmaReadFifo::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: dma_device.cc:317
HDLcd::stats
struct HDLcd::@52 stats
Packet::makeAtomicResponse
void makeAtomicResponse()
Definition: packet.hh:1016
HDLcd::pixelPump
PixelPump pixelPump
Definition: hdlcd.hh:361
HDLcd::DmaEngine::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: hdlcd.cc:601
warn
#define warn(...)
Definition: logging.hh:239
HDLcd::INT_UNDERRUN
static constexpr uint32_t INT_UNDERRUN
Definition: hdlcd.hh:176
HDLcd::Int_Status
@ Int_Status
Definition: hdlcd.hh:125
HDLcd::workaroundDmaLineCount
const bool workaroundDmaLineCount
Definition: hdlcd.hh:112
system.hh
hdlcd.hh
data
const char data[]
Definition: circlebuf.test.cc:42
HDLcd::enableCapture
const bool enableCapture
Definition: hdlcd.hh:114
AmbaDmaDevice
Definition: amba_device.hh:97
UNSERIALIZE_SCALAR
#define UNSERIALIZE_SCALAR(scalar)
Definition: serialize.hh:797
HDLcd::MAX_PIXEL_SIZE
static constexpr size_t MAX_PIXEL_SIZE
Maximum number of bytes per pixel.
Definition: hdlcd.hh:160
Packet::getAddr
Addr getAddr() const
Definition: packet.hh:754
HDLcd::V_Back_Porch
@ V_Back_Porch
Definition: hdlcd.hh:132
HDLcd::displayTimings
DisplayTimings displayTimings() const
Definition: hdlcd.cc:457
HDLcd::Red_Select
@ Red_Select
Definition: hdlcd.hh:142
PixelConverter
Configurable RGB pixel converter.
Definition: pixel.hh:87
HDLcd::regStats
void regStats() override
Callback to set stat parameters.
Definition: hdlcd.cc:100
BasePixelPump::active
bool active() const
Is the pixel pump active and refreshing the display?
Definition: pixelpump.hh:173
HDLcd::Bus_Options
@ Bus_Options
Definition: hdlcd.hh:130
HDLcd::pxlNext
bool pxlNext(Pixel &p)
Definition: hdlcd.cc:521
HDLcd::Blue_Select
@ Blue_Select
Definition: hdlcd.hh:144
findMsbSet
int findMsbSet(uint64_t val)
Returns the bit position of the MSB that is set in the input.
Definition: bitfield.hh:234
HDLcd::fb_base
uint32_t fb_base
Frame buffer base address register.
Definition: hdlcd.hh:234
HDLcd::Int_RawStat
@ Int_RawStat
Definition: hdlcd.hh:122
ArmInterruptPin::clear
virtual void clear()=0
Clear a signalled interrupt.
HDLcd::v_back_porch
TimingReg v_back_porch
Vertical back porch width register.
Definition: hdlcd.hh:240
HDLcd::HDLcd
HDLcd(const HDLcdParams *p)
Definition: hdlcd.cc:57
HDLcd::PixelPump::dumpSettings
void dumpSettings()
Definition: hdlcd.cc:677
amba_device.hh
HDLcd::h_front_porch
TimingReg h_front_porch
Horizontal front porch width reg.
Definition: hdlcd.hh:246
HDLcd::Pixel_Format
@ Pixel_Format
Definition: hdlcd.hh:141
base_gic.hh
HDLcd::blue_select
ColorSelectReg blue_select
Blue color select register.
Definition: hdlcd.hh:252
HDLcd::command
CommandReg command
Command register.
Definition: hdlcd.hh:248
vncinput.hh
ArmInterruptPin::raise
virtual void raise()=0
Signal an interrupt.
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
OutputDirectory::create
OutputStream * create(const std::string &name, bool binary=false, bool no_gz=false)
Creates a file in this directory (optionally compressed).
Definition: output.cc:209
HDLcd::Command
@ Command
Definition: hdlcd.hh:140
BasePixelPump::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: pixelpump.cc:121
HDLcd::Int_Mask
@ Int_Mask
Definition: hdlcd.hh:124
PixelConverter::rgba8888_le
static const PixelConverter rgba8888_le
Predefined 32-bit RGB (red in least significant bits, 8 bits/channel, little endian) conversion helpe...
Definition: pixel.hh:198
EventManager::deschedule
void deschedule(Event &event)
Definition: eventq.hh:1014
Packet::getSize
unsigned getSize() const
Definition: packet.hh:764
HDLcd::V_Front_Porch
@ V_Front_Porch
Definition: hdlcd.hh:134
HDLcd::green_select
ColorSelectReg green_select
Green color select register.
Definition: hdlcd.hh:251
HDLcd::offset
offset
Definition: hdlcd.hh:217
HDLcd::Version
@ Version
Definition: hdlcd.hh:121
output.hh
HDLcd::virtRefreshEvent
EventFunctionWrapper virtRefreshEvent
Definition: hdlcd.hh:347
HDLcd::pixelBufferSize
const Addr pixelBufferSize
Definition: hdlcd.hh:115
HDLcd::dmaEngine
std::unique_ptr< DmaEngine > dmaEngine
Definition: hdlcd.hh:391
HDLcd::intStatus
uint32_t intStatus() const
Masked interrupt status register.
Definition: hdlcd.hh:318
PixelConverter::toPixel
Pixel toPixel(uint32_t word) const
Get the Pixel representation of a color word.
Definition: pixel.hh:133
HDLcd::DmaEngine::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: hdlcd.cc:614
VncInput::setDirty
virtual void setDirty()
The frame buffer uses this call to notify the vnc server that the frame buffer has been updated and a...
Definition: vncinput.cc:92
HDLcd::intClear
void intClear(uint32_t ints)
Convenience function to clear interrupts.
Definition: hdlcd.hh:313
packet.hh
PioDevice::sys
System * sys
Definition: io_device.hh:102
HDLcd::pixel_format
PixelFormatReg pixel_format
Pixel format register.
Definition: hdlcd.hh:249
DmaDevice::dmaPort
DmaPort dmaPort
Definition: dma_device.hh:168
HDLcd::polarities
PolaritiesReg polarities
Polarities register.
Definition: hdlcd.hh:247
BasePixelPump::start
void start()
Starting pushing pixels in timing mode.
Definition: pixelpump.cc:154
Drainable::drainResume
virtual void drainResume()
Resume execution after a successful drain.
Definition: drain.hh:289
HDLcd::bus_options
BusOptsReg bus_options
Bus options register.
Definition: hdlcd.hh:238
HDLcd::MAX_BURST_LEN
static constexpr size_t MAX_BURST_LEN
max number of beats delivered in one dma burst
Definition: hdlcd.hh:157
AmbaDmaDevice::interrupt
ArmInterruptPin *const interrupt
Definition: amba_device.hh:104
HDLcd::fb_line_length
uint32_t fb_line_length
Frame buffer Line length register.
Definition: hdlcd.hh:235
HDLcd::Fb_Line_Pitch
@ Fb_Line_Pitch
Definition: hdlcd.hh:129
cp
Definition: cprintf.cc:40
createImgWriter
std::unique_ptr< ImgWriter > createImgWriter(Enums::ImageFormat type, const FrameBuffer *fb)
Factory Function which allocates a ImgWriter object and returns a smart pointer to it.
Definition: imgwriter.cc:50
EventManager::schedule
void schedule(Event &event, Tick when)
Definition: eventq.hh:1005
HDLcd::DmaEngine::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: hdlcd.cc:623
HDLcd::read
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: hdlcd.cc:235
HDLcd::setInterrupts
void setInterrupts(uint32_t ints, uint32_t mask)
Assign new interrupt values and update interrupt signals.
Definition: hdlcd.cc:587
HDLcd::virtRefreshRate
const Tick virtRefreshRate
Definition: hdlcd.hh:116
HDLcd::h_back_porch
TimingReg h_back_porch
Horizontal back porch width register.
Definition: hdlcd.hh:244
HDLcd::DmaEngine::onEndOfBlock
void onEndOfBlock() override
End of block callback.
Definition: hdlcd.cc:658
OutputStream::stream
std::ostream * stream() const
Get the output underlying output stream.
Definition: output.hh:59
PixelConverter::length
unsigned length
Bytes per pixel when stored in memory (including padding)
Definition: pixel.hh:179
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:234
SERIALIZE_OBJ
#define SERIALIZE_OBJ(obj)
Definition: serialize.hh:882
HDLcd::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: hdlcd.cc:151
HDLcd::v_front_porch
TimingReg v_front_porch
Vertical front porch width register.
Definition: hdlcd.hh:242
HDLcd::vnc
VncInput * vnc
Definition: hdlcd.hh:110
HDLcd::Green_Select
@ Green_Select
Definition: hdlcd.hh:143
HDLcd::Fb_Line_Length
@ Fb_Line_Length
Definition: hdlcd.hh:127
Clocked::clockEdge
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
Definition: clocked_object.hh:174
RangeSize
AddrRange RangeSize(Addr start, Addr size)
Definition: addr_range.hh:638
HDLcd::H_Data
@ H_Data
Definition: hdlcd.hh:137
HDLcd::h_sync
TimingReg h_sync
Horizontal sync width register.
Definition: hdlcd.hh:243
HDLcd::AXI_PORT_WIDTH
static constexpr size_t AXI_PORT_WIDTH
AXI port width in bytes.
Definition: hdlcd.hh:154
System::bypassCaches
bool bypassCaches() const
Should caches be bypassed?
Definition: system.hh:279
HDLcd::pic
OutputStream * pic
Picture of what the current frame buffer looks like.
Definition: hdlcd.hh:356
HDLcd::cmdDisable
void cmdDisable()
Definition: hdlcd.cc:509
HDLcd::DmaEngine::startFrame
void startFrame(Addr fb_base)
Definition: hdlcd.cc:632
HDLcd::size
Bitfield< 11, 8 > size
Definition: hdlcd.hh:219
HDLcd::V_Data
@ V_Data
Definition: hdlcd.hh:133
CommandReg
Definition: ide_disk.hh:124
HDLcd::int_mask
uint32_t int_mask
Interrupt mask register.
Definition: hdlcd.hh:233
HDLcd::Int_Clear
@ Int_Clear
Definition: hdlcd.hh:123
DmaReadFifo
Buffered DMA engine helper class.
Definition: dma_device.hh:325
HDLcd::H_Back_Porch
@ H_Back_Porch
Definition: hdlcd.hh:136
HDLcd::pxlUnderrun
void pxlUnderrun()
Definition: hdlcd.cc:548
HDLcd::conv
PixelConverter conv
Cached pixel converter, set when the converter is enabled.
Definition: hdlcd.hh:359
Pixel
Internal gem5 representation of a Pixel.
Definition: pixel.hh:54
HDLcd::fb_line_pitch
int32_t fb_line_pitch
Frame buffer Line pitch register.
Definition: hdlcd.hh:237
AmbaDmaDevice::pioAddr
Addr pioAddr
Definition: amba_device.hh:101
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
BasePixelPump::updateTimings
void updateTimings(const DisplayTimings &timings)
Update frame size using display timing.
Definition: pixelpump.cc:138
Serializable::ScopedCheckpointSection
Definition: serialize.hh:175
name
const std::string & name()
Definition: trace.cc:50
SERIALIZE_SCALAR
#define SERIALIZE_SCALAR(scalar)
Definition: serialize.hh:790
Request
Definition: request.hh:87
HDLcd::h_data
TimingReg h_data
Horizontal data width register.
Definition: hdlcd.hh:245
HDLcd::enabled
bool enabled() const
Definition: hdlcd.hh:266
packet_access.hh
Stats::nozero
const FlagsType nozero
Don't print if this is zero.
Definition: info.hh:57
HDLcd::DmaEngine
Definition: hdlcd.hh:364
HDLcd::DmaEngine::abortFrame
void abortFrame()
Definition: hdlcd.cc:641
HDLcd::DmaEngine::dumpSettings
void dumpSettings()
Definition: hdlcd.cc:650
SimObject::name
virtual const std::string name() const
Definition: sim_object.hh:133
HDLcd::writeReg
void writeReg(Addr offset, uint32_t value)
Definition: hdlcd.cc:313
DmaReadFifo::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: dma_device.cc:327
AmbaDmaDevice::pioSize
Addr pioSize
Definition: amba_device.hh:102
panic_if
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Definition: logging.hh:197
Packet::getLE
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
Definition: packet_access.hh:75
HDLcd::imgWriter
std::unique_ptr< ImgWriter > imgWriter
Helper to write out bitmaps.
Definition: hdlcd.hh:350
HDLcd::H_Sync
@ H_Sync
Definition: hdlcd.hh:135
inform
#define inform(...)
Definition: logging.hh:240
HDLcd::Fb_Base
@ Fb_Base
Definition: hdlcd.hh:126
X86ISA::vector
Bitfield< 15, 8 > vector
Definition: intmessage.hh:44
ArmISA::t
Bitfield< 5 > t
Definition: miscregs_types.hh:67
HDLcd::readReg
uint32_t readReg(Addr offset)
Definition: hdlcd.cc:274
HDLcd::int_rawstat
uint32_t int_rawstat
Interrupt raw status register.
Definition: hdlcd.hh:232
HDLcd::INT_VSYNC
static constexpr uint32_t INT_VSYNC
Definition: hdlcd.hh:175
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
HDLcd::virtRefresh
void virtRefresh()
Handler for fast frame refresh in KVM-mode.
Definition: hdlcd.cc:227
HDLcd
Definition: hdlcd.hh:90
HDLcd::pxlVSyncEnd
void pxlVSyncEnd()
Definition: hdlcd.cc:541
HDLcd::H_Front_Porch
@ H_Front_Porch
Definition: hdlcd.hh:138
HDLcd::intRaise
void intRaise(uint32_t ints)
Convenience function to raise a new interrupt.
Definition: hdlcd.hh:303
HDLcd::V_Sync
@ V_Sync
Definition: hdlcd.hh:131
Packet::setLE
void setLE(T v)
Set the value in the data pointer to v as little endian.
Definition: packet_access.hh:105
HDLcd::red_select
ColorSelectReg red_select
Red color select register.
Definition: hdlcd.hh:250
HDLcd::DmaEngine::onIdle
void onIdle() override
Last response received callback.
Definition: hdlcd.cc:671
CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:63
AmbaDmaDevice::pioDelay
Tick pioDelay
Definition: amba_device.hh:103
HDLcd::write
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: hdlcd.cc:255
HDLcd::pxlFrameDone
void pxlFrameDone()
Definition: hdlcd.cc:557
Stats
Definition: statistics.cc:61
Serializable::currentSection
static const std::string & currentSection()
Gets the fully-qualified name of the active section.
Definition: serialize.cc:239
HDLcd::pixelConverter
PixelConverter pixelConverter() const
Definition: hdlcd.cc:434
trace.hh
DisplayTimings
Definition: pixelpump.hh:46
HDLcd::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: hdlcd.cc:114
simout
OutputDirectory simout
Definition: output.cc:61
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
HDLcd::workaroundSwapRB
const bool workaroundSwapRB
Definition: hdlcd.hh:111
HDLcd::~HDLcd
~HDLcd()
Definition: hdlcd.cc:95
CheckpointIn
Definition: serialize.hh:67
BasePixelPump::stop
void stop()
Immediately stop pushing pixels.
Definition: pixelpump.cc:161
HDLcd::v_sync
TimingReg v_sync
Vertical sync width register.
Definition: hdlcd.hh:239
HDLcd::fb_line_count
fb_line_count
Definition: hdlcd.hh:179
HDLcd::drainResume
void drainResume() override
Resume execution after a successful drain.
Definition: hdlcd.cc:202
BasePixelPump::renderFrame
void renderFrame()
Render an entire frame in KVM execution mode.
Definition: pixelpump.cc:250
csprintf
std::string csprintf(const char *format, const Args &...args)
Definition: cprintf.hh:158
HDLcd::createDmaEngine
void createDmaEngine()
Definition: hdlcd.cc:466
HDLcd::cmdEnable
void cmdEnable()
Definition: hdlcd.cc:493
ArmISA::mask
Bitfield< 28, 24 > mask
Definition: miscregs_types.hh:711
HDLcd::Polarities
@ Polarities
Definition: hdlcd.hh:139
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
curTick
Tick curTick()
The current simulated tick.
Definition: core.hh:45
HDLcd::max_outstanding
Bitfield< 11, 8 > max_outstanding
Definition: hdlcd.hh:186

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