Title | color_maker-s3ansk (simple VGA tester) |
Author | Nikolaos Kavvadias (C) 2014 |
Contact | nikos@nkavvadias.com |
Source | Mike Field (for the VGA controller; see AUTHORS) |
Website | http://www.nkavvadias.com |
Release Date | 09 June 2014 |
Version | 1.0.0 |
Rev. history | |
v1.0.0 | 2014-06-09 Initial release for the Spartan-3AN Starter kit board. |
color_maker is a simple design for testing VGA output. This version of the color_maker produces 4-bit RGB color (R2G1B1), corresponding to 16 distinct colors out of a total of 4096 (R3G4B4) that are supported by the Xilinx Spartan-3AN starter kit board. The 4 available slide switches (SW3-SW0) are used for setting a specific color. The following table summarizes the exercised colors.
R G B Description 00 0 0 Black (Noir) 00 0 1 Blue 00 1 0 Green 00 1 1 Cyan 01 0 0 Brown 01 0 1 Deep Purple 01 1 0 Light Green 01 1 1 Medium Cyan 10 0 0 Blood Red 10 0 1 Medium Purple 10 1 0 Chartreuse 10 1 1 Light Cyan 11 0 0 Red 11 0 1 Magenta 11 1 0 Yellow 11 1 1 White
For the standard VGA resolution (640x480@60Hz), a 25MHz clock is used, as produced by the clockdiv clock divider (divide by 2). The VGA controller is implemented by vgactrl.vhd. The color selection logic is very simple and directly assigns SW3-SW2 to the R (two levels), SW1 to G and SW0 to the B component. For 800x600@72Hz, a 50 MHz clock should be used.
The vga_controller design has been adapted from the work by Mike Field: http://hamsterworks.co.nz/mediawiki/index.php/Hidef_snow
The color_maker distribution includes the following files:
/color_maker-s3ansk | Top-level directory |
AUTHORS | List of authors. |
COPYING | 3-clause modified BSD license. |
README | This file. |
README.html | HTML version of README. |
README.pdf | PDF version of README. |
clockdiv.vhd | Configurable, portable, clock divider. |
color_maker.vhd | Color assignment logic. |
color_maker_top.ucf | User Constraints File for the XC3S700AN-FGG484-4 device. |
color_maker_top.vhd | The top-level RTL VHDL design file. |
color_maker_top-syn.sh | Bash shell script for synthesizing the color_maker design with Xilinx ISE. |
impact_s3ansk.bat | Windows Batch file for automatically invoking Xilinx IMPACT in order to download the generated bitstream to the target hardware. |
rst2docs.sh | Bash script for generating the HTML and PDF versions. |
vgactrl.vhd | RTL VHDL code for the VGA controller. |
xst.mk | Standard Makefile for command-line usage of ISE. |
The color_maker distribution includes scripts for logic synthesis automation supporting Xilinx ISE. The corresponding synthesis script can be edited in order to specify the following for adapting to the user's setup:
For running the Xilinx ISE synthesis tool, generating FPGA configuration bistream and downloading to the target device, execute the corresponding script from within the color_maker-s3ansk directory:
In order to successfully run the entire process, you should have the target board connected to the host and it should be powered on.
The synthesis procedure invokes several Xilinx ISE command-line tools for logic synthesis as described in the corresponding Makefile, found in the the color_maker-s3ansk directory.
Typically, this process includes the following:
As a result of this process, the color_maker_top.bit bitstream file is produced.
Then, the shell script invokes the Xilinx IMPACT tool by a Windows batch file, automatically passing a series of commands that are necessary for configuring the target FPGA device: