Skip to content

rogerwwww/VGA_Display_VHDL

Repository files navigation

VGA_display VHDL

This is a VHDL project for a 800*600 VGA displayer.

This project has been tested on the STEP-MXO2 Development Board (see this page for information). Some useful information is listed below.

Develop info

Device family: Lattice MachXO2

Device: LCMXO2-4000HC

IDE & synthesis tool: Lattice Diamond

Function discription

This VGA display project can generate a VGA signal of 800*600 resolution that can be displayed on most monitors you can find on the market. You can swithch among three display modes and change the displayed color on screen by two buttons.

Display modes

  1. Vertical color bands

    Display 8 vertical color bands (RED, GREEN, BLUE, YELLOW, MAGENTA, CYAN1, WHITE, BLACK) on screen. You can left-shift these color bands by pressing button 2.

  2. Horizonal color bands

    Display 8 horizonal color bands (RED, GREEN, BLUE, YELLOW, MAGENTA, CYAN1, WHITE, BLACK) on screen. You can up-shift these color bands by pressing button 2.

  3. Letter display

    Display a message of "I ❤ VHDL" on the screen. The color of the words can be changed by pressing button 2.

Control methods

I've designed two physical buttons to control the system.

  1. The button 1, specified as state_inp in vga_main.vhd, can switch this system among 3 states listed above.
  2. The button 2, specified as shift_inp in vga_mian.vhd, can change the color displayed on the screen.

Project files info

This project include 5 VHDL files and 3 Python files. Their functions are specified below.

VHDL files

  • vga_main.vhd

    The top module of this project. It create instances of other modules and connects them together.

  • vga_disp.vhd

    Inculudes vga_disp module. It works at 40 MHz clock frequency created by the pll_module in pll_module.vhd. It reads button infromation from two jitter-eliminate button (button_as_switch_nodist module in button_nodist.vhd), changes the current display mode and switches the color display.

    A testbench is created for this module, written in vga_tb.vhd.

  • pll_mocule.vhd

    Includes pll_module module. This module uses an onboard PLL to shift the 12MHz onboard oscillator frequency to the desired 40MHz working frequency for 800*600 VGA display.

    The module was automatically generated by IPExpress, which is inluded in Lattice Diamond Toolchain.

  • button_nodist.vhd

    This button_as_switch_nodist module eliminates jitter caused by physical switches. It reads the signal input and changes the voltage output level whenever a valid signal is detected.

  • vga_tb.vhd

    A Testbench file for vga_disp module in vga_disp.vhd.

Python files

Python is used to generate the display range of "I ❤ VHDL".

  • heart_generator.py

    Generates the display range of heart (❤) on the screen.

  • V_generator.py

    Generate the display range of letter V on the screen.

  • D_generator.py

    Generate the display range of letter D on the screen.

Change Log

1.0 2017-06-01 initial commit

About

A 800*600 VGA display project with testbench in VHDL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages