In computer graphics, a frame buffer is a memory section that holds a bitmap of an image. Software will write into memory the picture to be drawn, and the display controller will read from memory to draw the picture on the screen.
The frame buffer controller is the hardware component that reads the frame buffer memory in sequential order. A consequence of this sequential nature is that the software can write to the buffer at any time — which may result in image artifacts or tearing.
Double buffering
Double buffering involves two distinct frame buffers: the front and back buffers. In this case, the display controller actively reads a front buffer, and the CPU actively updates the back buffer. Once the CPU has finished writing an image to the back buffer, it performs a frame buffer swap to swap the values of the front and back buffers. In other words, the image to be drawn is always done by the CPU to the back buffer. The controller always displays the front buffer.
On the DE1-SoC, the frame buffer is within the SDRAM with base address 0x0
. This conflicts with the executable code, so the frame controller register should be given a different address. A frame buffer swap is done by writing 1 to the buffer register.