Advanced Digital Design Using Digilent FPGA Boards – VHDL / VGA Graphics Examples
Over 30 complete VHDL examples of advanced digital circuit designs. Covers complex state machines, data paths, timing requirements, external peripherals (memory, PS/2 keyboard/mouse, UART). Focuses on VGA graphics. Works on Nexys2, Nexys3, Nexys4 boards. Assumes knowledge from the main Digital Design book.
Preface
This book contains over 30 complete VHDL examples of more advanced digital circuit designs using more complex state machines, data paths, timing requirements, and external peripherals including external memory, PS/2 keyboard and mouse control, and transmitting data via the UART to the memory. These topics are covered by designing circuits that will display images and graphics on a VGA monitor using the Digilent Nexys2, Nexys3, or Nexys4 FPGA board. This approach allows you to learn and practice more advanced digital design topics visually. This book picks up where the book Digital Design Using Digilent FPGA Boards – VHDL / Active-HDL Edition (DDDF-VHDL) leaves off. That book, which is available from www.digilentinc.com and www.lbebooks.com, contains over 75 VHDL examples covering basic digital design of both combinational and sequential circuits. All of the examples in that book were simulated using the Aldec Active-HDL simulator. We will use the same simulator in this book. A free student version of this simulator is available from http://www.aldec.com/Downloads/default.aspx.
The design of a VGA controller was introduced in the DDDF-VHDL book. However, all of the examples were limited to those that would run on both the Nexys boards and the BASYS2 board. This eliminated all examples that require the external RAM and external flash memories that are available only on the Nexys2, Nexys3, and Nexys4 boards. These external memories can contain color data for every pixel displayed on a VGA display. These video data can be refreshed to the VGA monitor sixty times per second to produce real-time video displays. Changing the contents of the video RAM will change the video display. This is the method that we use in this book to plot lines and circles on a video display.
The book contains over 30 examples divided among five chapters. Chapter 1 reviews the design of a VGA controller presented in DDDF-VHDL and includes new examples to design a checkerboard, a color palette, multiple sprites, moving sprites, and character fonts. Chapter 2 contains six examples that use the external RAM and external flash memory. Chapter 3 includes examples of using a PS/2 keyboard and PS/2 mouse to control images on the VGA screen. Chapter 4 covers the design of a UART that is used to download characters to the video screen through the serial port. The video graphics examples in Chapter 5 include plotting a dot, line and circle.
Many colleagues, students and reviewers have influenced the development of this book. Their stimulating discussions, probing questions, and critical comments are greatly appreciated.
Richard E. Haskell
Darrin M. Hanna
Table of Contents
1. VGA Controller
Example 1: VGA-Stripes
Example 2: VGA-Checkerboard
Example 3: VGA-Color Palette
Example 4: VHDL Sprite
Example 5: Sprites in Block ROM
Example 6: Screen Saver
Example 7: Resizing Sprites
Example 8: Rotating Sprites
Example 9: Multiple Sprites
Example 10: Character Fos
Example 11: Resize Character Fonts
Example 12: Multiple Characters with Sprite Image
2. Video RAM/Flash
Example 13: Displaying an Image Read from Video RAM
Example 14: Displaying an Image Read from Flash Memory
Example 15: Moving Sprites with Flash Background
Example 16: Flash Memory Slide Show
3. Input Devices for Controlling Video Images
Example 17: PS/2 Keyboard Interface
Example 18: Keyboard Controlling Block ROM Sprite
Example 19: PS/2 Mouse Interface
Example 20 : Mouse Controlling Cursor Sprite
Example 21: Mouse Controlling Block ROM Sprite
Example 22: SPI Joystick Interface
Example 23: Joystick Controlling Block ROM Sprite
4. UART
Example 24: Transmit Module
Example 25: Receive Module
Example 26: PC Keyboard Controlling Block ROM Sprite
Example 27: Sending Characters to the Video Screen
5. Graphics
Example 28: Clearing the Screen
Example 29: Plotting a Dot
Example 30: Plotting a Line
Example 31: Plotting a Star
Example 32: Plotting a Circle
Appendix A – Installing the Xilinx ISE/WebPACK, Aldec Active-HDL, and Digilent Adept2 Software
Appendix B –Digilent FPGA Boards Comparison Chart
Appendix C – Making a Turnkey System
Appendix D – VHDL Quick Reference Guide
Index
(237 pages)