1NH14LVS61
1NH14LVS61
A dissertation Report on
Master of Technology
In
VLSI DESIGN AND EMBEDDED SYSTEMS
Submitted by
I also declare that, to the best of my knowledge and belief, the work reported herein does
not form part of any other report or dissertation on the basis of which a degree or award
was conferred on an earlier occasion on this by any student.
Basically, VGA is used for implementing basic characters/Symbols and images that
can be either used in advertisements that deals with real-time applications. So, using VGA as
a standard for this implementation as it is the basic graphics array and compatible with other
graphical arrays. This project describes about the design of VGA (Video Graphic Array)
Controller using combination of three bit input data to control eight different colors to display
text or image on monitor. The three color signals referred to collectively as R (Red), G
(Green) and B (Blue) signal (i.e. RGB). The VGA monitor using resolution of 800X600 to
ISE software for interfacing the required peripheral to the Xilinx FPGA Spartan Series.
Where, implementing the application of VGA with the help of Verilog HDL on Xilinx
The satisfaction and exhilaration that accompany the successful completion of any
task would be incomplete without the mention of people who made it possible, whose
consistent guidance and encouragement crowned our efforts with success.
I consider it as my privilege to express the gratitude to all those who guided in the
completion of my internship.
First and foremost, I wish to express my profound gratitude to our respected Principal
Dr. Manjunatha, New Horizon College of Engineering, Bengaluru, for providing us with a
congenial environment to work in.
I would like to express my sincere thanks to Dr. Sanjay Jain, the HOD of Electronics
and Communication, New Horizon College of Engineering, Bengaluru, for his continuous
support and encouragement.
Last but not the least, heartfelt thanks to my parents, and friends for their direct and
indirect support.
Above all, I thank the Lord Almighty for his grace on us to succeed in this endeavour.
LEELA RANI J
TABLE OF CONTENTS
CHAPTERS PAGE NO’S
1 INTRODUCTION 1
1.1. Introduction 2
1.2. Objective 3
1.3. Problem Formulation 3
2 LITERATURE SURVEY 5
2.1. Literature survey 6
3 PROPOSED WORK 8
3.1. Introduction 9
3.2. Description of the proposed work 10
3.2.1. Horizontal Synchronous Block 11
3.2.2. Vertical Synchronous Block 12
3.2.3. Color Code Generation Block 13
3.2.4. Top Module of VGA Controller 13
3.3. VGA Standard Details 14
3.4. VGA Controller 15
3.5. VGA Color Signal 17
3.6. Flow Charts 18
3.6.1. Horizontal Synchronization 18
3.6.2. Vertical Synchronization 20
3.6.3. Color Code Generation 21
3.7. System Requirements 22
3.7.1. Software Requirements 22
3.7.2. Hardware Requirements 22
4 SOFTWARE REQUIREMENTS 23
4.1. Xilinx ISE Design Suite 13.2 24
4.2. Hardware Description Language(verilog) 26
5 HARDWARE REQUIREMENTS 28
5.1. Xilinx Spartan 3 FPGA 29
5.2. VGA Monitor 30
5.3. VGA Display Port 31
7 SNAPSHORTS 38
7.1. Horizontal Synchronization 39
7.2. Vertical Synchronization 39
7.3. Color Code Generation 40
7.4. Top Module of VGA Controller 40
9 SYNTHESIS REPORT 45
9.1. RTL Schematic of Hsync Block 46
9.2. RTL Schematic of Vsync Block 46
9.3. RTL Schematic of Color Code Generation Block 47
9.4. RTL Schematic of Top Module VGA Controller Block 47
9.5. RTL Schematic of Overall Internal Diagram 48
9.6. Technology Diagram 48
9.7. Device Utilization Summary 49
REFERNCES 55
APPENDEX 58
APPENDEX A 59
APPENDEX B 62
Synthesis Report 62
LIST OF TABLES
Tale 3.1. VGA Color Combinations 17
LIST OF FIGURES
CHAPTER 1
INTRODUCTION
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
As embedded devices grow in their processing capabilities and complex use cases
that they handle which also involves a fair bit of image processing there is an ever-
increasing need to improve the efficiency in displaying complex graphical content in real
time to align hand in hand with the developments on the high-speed image processing
arena. It is undeniable that there is a need to implement associated display interface
controllers and associated timing logic in a low-cost enablement platform using a design
model that helps in emulations / synthesis and validations early on with low turnaround
times and low overall implementation cost.
VGA (Video Graphics Array) is one of the very widely used video display
standards that enables an easy interfacing to a display device like monitor for displaying
graphical images / information. VGA has gained a lot of popularity and acceptance in the
embedded space with and is widely being used as display interface for video conferencing
devices, portable video players, ATM machines etc. The quality and performance
requirements widely vary across a spectrum of these devices. While some systems
demand high performance, some may be resources constrained with basic display
capability demands.
This project aims at designing a VGA (Video Graphic Array) Controller using an
FPGA hardware platform keeping in consideration the ever-increasing needs to
effectively control the image and synchronization signaling as constrained by the VGA
standard. The image data inputs (RGB Signals) and the synchronization signals are
effectively controlled by the FPGA based VGA controller to interface with a standard
monitor that supports 800 x 600 pixel resolution. This platform shall have the capability
to display Characters, Text, Images in different colors. Verilog Hardware description
language with Xilinx ISE software is used for VGA controller design and enabling the
same on a Xilinx Spartan Series FPGA.
1.2 OBJECTIVE
Problems:
As we move towards higher display density (resolutions), timing issues on FPGAs will be
more prominent.
Desired:
Processing time constraints need to be met so that the Display timing constraints and
VGA standard display requirements are not violated.
Solution:
Hardware logic resources overhead shall be kept minimal. This ensures efficient
Hardware description which eventually leads to efficient HDL code. Unnecessary
and redundant code will be avoided to ensure that the hardware resources are
optimally utilized.
Desired:
Fine and smooth display can be achieved by precisely tuning the electron beam
modulated frequency. This frequency is determined by the VGA controller which
produces relevance signals. By accurately generating these signals electron beam
can be properly controlled.
By ensuring proper signal timings for H_Sync, V_Sync and “Blanking” any
undesired effects due to timing violations can be totally avoided. In addition,
display refresh timing constraints shall be properly adhered to.
CHAPTER 2
LITERATURE SURVEY
CHAPTER 2
LITERATURE SURVEY
As part of literature survey several research papers and publications are thoroughly
reviewed and analyzed. The key publications that are relevant for current project are
indicated in this section.
In the paper reference #1, the authors Nagarjuna et al. have proposed a solution to
implement VGA controller on FPGA with focus on geometrical shape generation which
can be set into motion. Usage of Finite State machine approach is very well presented.
Usage of File out operations is a good approach that enables pre-verification of the
functionality without a need for additional FIFO storage.
In another paper reference #2, the authors Radi et al. have emphasized the
advantages of using FPGAs for implementing the VGA controller. The adaptability,
power and the low-cost solutions that can be achieved with the usage of FPGAs are
elaborated in detail. The up sides of using the abstract VHDL language are very well
presented. With easy to modify and make relevant corrections, usage of VHDL is a very
attractive proposition as it reduces the turn-around time for any subsequent churn in the
design.
Multiple research papers point out the flexibility in using FPGA based
approaches. For example, Ying et al. from reference #4, presented an implementation of
display controller on Altera FPGA with a focus on simulating the timing signals. This
paper also emphasized the portability that is achievable by having the timing logic
implemented in abstract hardware description languages. Presented results indicated the
advantages in processing efficiency, optimized resource utilization and very low power
consumption.
In another paper reference #5, Kannadasan et al. indicated the value that can be
derived through FPGA and VHDL based approaches that enable us to achieve high
resolution displays with very low storage needs / foot print. Concerns with inadequate
bandwidth can be effectively tackled with these approaches. Usage of a software library
for handling text is well presented and demonstrated through real applications.
In another work Reference #6, Nivedita et al. have indicated the advantages of
using VHDL language in implementing a controller on Altera DE2-115 board.
Programming convenience and flexibility stand out as a note-worthy benefits of this
approach.
CHAPTER 3
PROPOSED WORK
CHAPTER 3
PROPOSED WORK
3.1 INTRODUCTION
The proposed block diagram is represented below. The top model of the VGA
controller block diagram consists of three internal block diagrams. One is horizontal
synchronization block, vertical synchronization block and color code generation block.
Blue_out
Clk50
0 Green_out
Hsync_out
Vsync_out
The video Graphics Array is mostly used for computer screens, with a high quality
resolution video standard. It has a good ability to transmit a accurate detailed image.
Blue_out
Color code Green_out
generation
Block Red_out
Hsync_out
Clk50
0 Hsync Block Line_out
Vsync_out
Blank_out
Clk50
HSYNC BLOCK Hsync_out
Newline_out
This signal helps to adjust the display control to the next the horizontal line in of
the displayed image. From counter values ranging from 0 to 799, RGB signals are
conveyed, following which Hsync signal will sent.
It is a short signal pulse with front and back porches adhering to the timing
requirements of the display. A new line indication is also generated as an output from the
Hsync block and this will be used as an input to the Vsync block.
Blank_out
Line_Clk
VSYNC BLOCK
Vsync_out
Blanking signal too is asserted during the VSync pulse active time. This ensures
that the pixel data is not conveyed / sampled during the sync signal active time periods.
Vsync signal along with Hsync signal helps to properly control the display position to get
the complete picture properly displayed on the display.
Blank Blue_out
Clk Red_out
The combination of the three primary colors, Blue, Green, Red color can generate
different colors. In this work 800x600 screen resolution is chosen and the color of each of
these pixels on the display are decided by the RGB Output signals from this color
module. These signals are present only in the active region. During horizontal and
Vertical synchronization, these Signals are blanked out.
800
600
Both the horizontal and vertical sync pulses are of the same format as indicated in
the figure above. They start with a front porch followed by an active pulse followed by a
back porch. These three segments together make up a Hsync or a Vsync signal. While
these signals are active the RGB data lines are ignored by the monitor as this corresponds
to a blanking interval.
For clocking out the pixel data and for conveying the Hsync and Vsync pulses a
clock of 50MHz frequency is used. These clock rates are generally in proportion to the
screen resolution. Higher resolutions may demand higher clock frequencies so that we
can still perceive all the pixel updates as a single image displayed on the screen. Time
period for each pulse on the 50MHz clock corresponds to 20ns. And this time period
determines the pulse widths of front and back porches and the active pulse width of the
Hsync and Vsync signals.
T = 1 = 20ns
50MHZ
While the front porch, back porch and active Sync pulses are conveyed, the actual
pixel information is not conveyed on the RGB signals. These signals must be set to zero.
These periods of active Hsync and Vsync signals is a blank out duration from RGB
signals perspective. Typically the horizontal timing is controlled by a counter clocked
accordingly. Both the pixel location and the timing information and duration of the
synchronization pulses is computed based on these clocked counters.
For vertical timing a similar counter is used. However, this counter needs to count
the number of new lines and once all the rows are scanned, when the end of the frame is
reached, the Vertical Synchronization signaling is initiated. The counter for Vsync thus
increments for every new line switch that happens (which in turn aligns with every Hsync
signal generation).
if (clk50 rising No
edge)
Yes
Yes No
if (count < 1040)
No Yes
if (count == 0)
newline = 0 newline = 1
No Yes
if (count > 800)
Check range of
count
if (line_clk No
rising edge)
Yes
Yes No
if (count < 666)
if (clk50 rising No
edge)
Yes
if (blank == 1)
No Yes
CHAPTER 4
SOFTWARE
REQUIREMENTS
CHAPTER 4
SOFTWARE REQUIREMENTS
Design creation
Improve the
Implementation
Simulate the Design Enter the Constraints Results
Implementation of Design
Analyize the
Implementation Results
BEHAVIORAL LEVEL
This aspect of the design abstraction deals with the behavior of the system (like
what the system does, behaves in response to different inputs, state transitions, changes in
outputs etc.). This abstraction does not deal with the components and how they
communicate with each other. Rather it establishes the relationship between inputs and
outputs if the system. This relationship can be deduced to a Boolean expression or it can
be a much more abstract description or an algorithmic relation.
STRUCTURAL LEVEL
While the behavioral aspects talk about the relation between inputs and outputs,
the structural level of abstraction gives a view of the components that make up the
platform. At structural level of abstraction, the system can be viewed as an
Verilog HDL that is chosen as the description language for the design here as it
allows well for describing the system both from structural and from behavioral aspects. In
addition, it offers capabilities to represent the behavioral aspects both in Data flow style
and in Algorithmic style. Such multiple views enable and equip the developers with a
much greater insight into the physical interconnections as well as the flow of data and
dynamic behavior of the system. With both concurrent and sequential flows that can be
easily handled Verilog HDL offers itself to be a good choice for hardware design.
CHAPTER 5
HARDWARE
REQUIREMENTS
CHAPTER 5
HARDWARE REQUIREMENTS
5.1 XILINX SPARTAN3 FPGA
For this project Spartan3 FPGA is chosen as it offers all the relevant capabilities
both from the logic cells and from the performance point of view. Various FPGAs that
are available in Spartan3 family are indicated below. We have chosen XC3S200 for the
purpose of this project.
With very good reconfigurability the Spartan3 FPGAs turned out to be a very
good option for prototype building. Being standard programmable parts these units offer
good capability to quickly program any synthesized design and be ready with a usable
chip. The turnaround time for any changes is very low and this greatly helps in faster
design freezes and very short sprints from prototype to product.
800
600
CHAPTER 6
PROCEDURE
FOR CREATING A NEW
PROJECT
CHAPTER 6
PROCEDURE FOR CREATING A NEW PROJECT
Step1: Create a folder in any one of the drive. Double click on ISE Design suite
13.2. ISE project Navigator window will open. In this window click file and
select New project. New project wizard window will open. Give project name,
browse location, automatically working Directory field occur and the press
Next.
Step 2: Select Device specifications according to the project requirements. press Next
and Finish.
Step 3: Press New Text File Ok. Empty file opened, where we have to type the
Program
Step 4: We have to type the program in the Empty view file. After typing save the
Program
Step 5: Select the project in the left top corner (project Hierarchy).Right Click on Project
select Add SourceSelect Project file OpenOk. Added Source file that
particular project.
Step 6: Select main program fileSelect SimulationIn the Isim simulator Press
Behavioral check syntax after doing this Press Simulate Behavioral Model
Step7: Isim window opened in that press Restartto give clk Right click on Value
FieldDefine clock window opened. Enter Leading edge value:1, Trailing edge
file Add Source …. Browse ucf file Ok. Ucf file added to the Main
Project file.
Step10: Press two times on Boundary Scan double click On top of ISE IMPACT
Window Right click Add Xilinx device and browse bit fileRight click on
device(XC3S200)Select ProgramOk.
CHAPTER 7
SNAPSHOTS
CHAPTER 7
SNAPSHOTS
CHAPTER 8
IMPLEMENTATION OF
VGA CONTROLLER ON
FPGA WITH THE
RESOLUTION OF
800X600
&
FINAL OUTPUT IMAGE
CHAPTER 8
IMPLEMENTATION OF VGA CONTROLLER ON FPGA
WITH THE RESOLUTION OF 800X600
8.2 SETUP
CHAPTER 9
SYNTHESIS REPORT
CHAPTER 9
SYNTHESIS REPORT
9.1 RTL SCHEMATIC OF HSYNC BLOCK
CHAPTER 10
ADVANTAGES
AND
APPLICATIONS
CHAPTER 10
ADVANTAGES AND APPLICATIONS
10.1 ADVANTAGES
The VGA controller system accurately generates the patterns with the help of
RGB signals.
In order to generate the patterns on the VGA monitor there is no need of direct
line of vision.
The system is easy to setup.
The system is easy to understand.
Low cost.
10.2 APPLICATIONS
Usually, this VGA controller system can be used for standard display interface. The VGA
finds applications in the areas such as
CHAPTER 11
CONCLUSION
&
FUTURE
ENHANCEMENTS
CHAPTER 11
11.1 CONCLUSION
The implementation of VGA controller with the resolution of 800x600 on
FPGA using the ISE design suite 13.2 software tool is an efficient work. With Verilog
hardware description language on FPGA, we could construct VGA Controller manually.
Based on the logic flows Verilog Code is written, and the circuits are simulated and
synthesized. With properly controlled timing for both RGB data and for Synchronization
signal generation a smooth display is achieved on the monitor.
REFERENCES
REFERENCES
[1] Ila.Nagarjuna, Pillem. Ramesh, “An FSM Based VGA Controller with 640×480
Resolutions”, International Journal of Engineering and Advanced Technology (IJEAT),
Vol. 2, Issue – 4, pp. 881-885, April 2013.
[2] M.Bharathi and A.Yogananth, “Design of VGA monitor control using Altera FPGA
based system” ,International Journal of VLSI and Embedded Systems (IJVES), Vol. 5,
pp. 866-870, March 2014.
[3] Anand k. Pathrikar , Pooja m.bhangale, “Design of VGA Display System Based On
CPLD And SRAM”, in 2013
[4] Fangqin Ying, Xiaoqing Feng,” Design and Implementation of VGA Controller Using
FPGA” in 2012
[6] Niveditha Yadav M, Yaseen Basha,” Algorithm to Design VGA Controller on FPGA
Board” in 2016
[8] Guohui Wang, Yong Guan and Yan Zhang, “Designing of VGA Character String
Display Module Based on FPGA”, International Symposium on Intelligent Ubiquitous
Computing and Education, Chengdu, China 2009.
[9] Khan HumaAftab and MonauwerAlam, “Design of VGA Controller using VHDL for
LCD Display using FPGA”, Vol. 4, Issue – 6, pp. 43-49, June 2014.
[11] Altera Corporation, “Introduction to Quartus II”, Feb. 2013, [Online]. Available:
http://www.altera.com/education/univ/software/quartus2/ unvquartus-2.html.
[12] Wayne Wolf, “FPGA-Based System Design”, Pearson Education Inc., India, 2004.
[13] SamirPalnitkar, Verilog HDL: A Guide to Digital Design and Synthesis”, Sun
Microsystems, Inc., USA, 2003.
NATIONAL CONFERENCE
CERTIFICATE
The following paper entitled “The Design and Implementation of VGA Controller on
FPGA with the Resolution of 800X600” is presented at the national conference held at
New Horizon College of Engineering.
APPENDEX
APPENDEX A
HORIZONTAL SYNCHRONOUS VERILOG CODE
endmodule
begin
if (count < 637)
vsync <= 1;
else if (count >= 637 && count < 643)
vsync <= 0;
else if (count >= 643)
vsync <= 1;
end
endmodule // vsync
endmodule // color
endmodule // top
APPENDIX B
SYNTHESIS REPORT:
==============================================
* Final Report *
==============================================
Final Results
Keep Hierarchy : NO
Design Statistics
# IOs :6
Cell Usage :
# BELS : 137
# GND :1
# INV :8
# LUT1 : 33
# LUT2 :4
# LUT3 :3
# LUT3_L :1
# LUT4 : 10
# LUT4_L :5
Department of Electronics & Communication, NHCE 2016-17
The Design and Implementation of VGA Controller on FPGA with the Resolution of 800X600 63
# MUXCY : 42
# MUXF5 :1
# VCC :1
# XORCY : 28
# FlipFlops/Latches : 36
# FDR : 34
# FDS :2
# Clock Buffers :1
# BUFGP :1
# IO Buffers :5
# OBUF :5
============================================
-----------------------------------------------------------------------
Number of IOs: 6
------------------------------------------------------------------------
--------------------------------------------------------------------------
--------------------------------------------------------------------------
TIMING REPORT
Clock Information:
-------------------------------------------------------------------------
-----------------------------------+------------------------+-------+
-----------------------------------+------------------------+-------+
clk50 | BUFGP | 23 |
hs/newline | NONE(vs/count_2) | 13 |
-----------------------------------+------------------------+-------+
INFO:Xst:2169 - HDL ADVISOR - Some clock signals were not automatically buffered
by XST with BUFG/BUFR resources. Please use the buffer_type constraint in order to
insert these buffers to the clock signals to help prevent skew problems.
-------------------------------------------------------------------------------
Timing Summary:
--------------------------------------------------------------------------------
Speed Grade: -4
Timing Detail:
-------------------------------------------------------------------------------------
==================================================
-------------------------------------------------------------------------------------
Gate Net
-------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
=====================================================
----------------------------------------------------------------------------------------
Gate Net
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------
==================================================
------------------------------------------------------------------------------------
Gate Net
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
==================================================
-------------------------------------------------------------------------------------
Gate Net
--------------------------------------------------------------------------
---------------------------------------------------------------------------
==============================================