Professional Documents
Culture Documents
Chandkheda, Ahmedabad
A Project Report
On
(Electronics Engineering)
Submitted by:
CERTIFICATE
This is to certify that the project entitled ‘Video Graphics Array (VGA)’ has
been carried out by Harshvardhan Patel (130070110047) and Parth Sarvaiya (130070110060)
under my guidance and supervise, on for the award of the degree of the Bachelor of Engineering
in Electronics Engineering (Semester: V) at Birla Vishvakarma Mahavidyalaya, Engineering
College during the academic year 2015 – 16.
Date:
We take this opportunity to express our profound gratitude and deep regards to our Head of Dept.
Dr. T. D. Pawar for giving us opportunity to undertake this project work.
We would like to express our heartfelt gratitude to our faculty and Project guide Prof. C. S. Patel
for his exemplary guidance, monitor and constant encouragement throughout the term work. The
blessings, help and guidance given by him time to time shall carry us a long way in the academic journey
of our life.
We are obliged to the staff members of Electronics Dept. for their support. We are grateful to
Parth Parikh (Semester VII) for his cooperation during the project work.
Lastly, we thankful to almighty, our parents and classmates for constant support.
1) Introduction 6
4) VGA Controller 11
5) VHDL codes 13
6) Constraints file 7
7) Output 20
8) Reference 21
Technical Specification:
Specifications:
The original VGA specifications are as follows:
256 kB Video RAM (The very first cards could be ordered with 64 kB or 128 kB of RAM, at
the cost of losing some or all high-resolution 16-color modes.)
16-color and 256-color palette display modes.
Selectable 25.175 MHz[4] or 28.322 MHz master pixel clock
Usual line rate fixed at 31.469 kHz
Maximum of 800 horizontal pixels[5]
Maximum of 600 lines[5]
Refresh rates at up to 70 Hz
0.7 V peak-to-peak[7]
75 ohm double-terminated impedance (18.7 mA, 13 mW)
Signal Timings:
All derived VGA timings can be varied widely by software that bypasses the VGA firmware
interface and communicates directly with the VGA hardware.
Total horizontal sync and blanking time = 6.356 µs; equivalent to pixel widths of A = 16, B = 96,
640x400 @ 70 Hz is traditionally the video mode used for booting most VGA-
compatible x86 personal computers which show a graphical boot screen (text-mode boot
uses 720x400 @ 70 Hz).
640x480 @ 60 Hz is the default Windows graphics mode (usually with 16 colors) up to
Windows 2000. It remains an option in XP and later versions via the boot menu "low
resolution video" option and per-application compatibility mode settings.
320x200 @ 70 Hz is the most common mode for VGA-era PC games, using exactly the same
timings as the 640x400 mode, but halving the pixel rate (and, in 256 color mode, doubling
the bit-depth of each pixel) and displaying each line of pixels twice.
P. S.: In our application, we have used the 640*480 pixels VGA mode with 8 bit color code.
VGA Connectors:
Overview:
The Basys3 board is a complete, ready-to-use digital circuit development platform based on the
latest Artix -7 Field Programmable Gate Array (FPGA) from Xilinx. With its high-capacity
FPGA, low overall cost, and collection of USB, VGA, and other ports, the Basys3 can host
designs ranging from introductory combinational circuits to complex sequential circuits like
embedded processors and controllers. It includes enough switches, LEDs, and other I/O devices
to allow a large number of designs to be completed without the need for any additional hardware,
and enough uncommitted FPGA I/O pins to allow designs to be expanded using Digilent Pmods
or other custom boards and circuits.
The Artix-7 FPGA is optimized for high performance logic, and offers more capacity, higher
performance, and more resources than earlier designs. Artix-7 35T features include:
• 33,280 logic cells in 5200 slices (each slice contains four 6-input LUTs and 8 flip-flops)
• 1,800 Kbits of fast block RAM
• Five clock management tiles, each with a phase-locked loop (PLL)
• 90 DSP slices
• Internal clock speeds exceeding 450MHz
• On-chip analog-to-digital converter (XADC)
BasysTM – 3 Layouts:
VGA (video graphics array) is a video display standard introduced in the late 1980s in
IBM PCs and is widely supported by PC graphics hardware and monitors. We discuss the design
of a basic eight-color 640-by-480 resolution interface for CRT (cathode ray tube) Monitors /
LCD monitor in this section. CRT synchronization and basic graphic processing are examined in
this part.
The conceptual sketch of a monochrome CRT monitor is shown in fig.. The electron gun
(cathode) generates a focused electron beam, which traverses a vacuum tube and eventually hits
the phosphorescent screen; Light is emitted at the instant that electrons hit a phosphor dot on the
screen. The intensity of the electron beam and the brightness of the dot are determined by the
voltage level of the external video input signal, labeled mono in Figure 12.1. The mono signal is
an analog signal whose voltage level is between 0 and 0.7 V.
VGA Synchronization:
The video synchronization circuit generates the hsync signal, which specifies the required time to
traverse (scan) a row, and the vsync signal, which specifies the required time to traverse (scan)
the entire screen. Subsequent discussions are based on a 640-by-480 VGA screen with a 25-MHz
pixel rate, which means that 25M pixels are processed in a second.
Note that this resolution is also known as the VGA mode. The screen of a CRT monitor
usually includes a small black border. The middle rectangle is the visible portion. Note that the
co ordinate of the vertical axis increases downward. The coordinates of the top-left and bottom-
right corners are (0, 0) and (639,479), respectively.
Figure 3 illustrates the timing signals produced by the VGA controller. The controller contains
two counters. One counters increments on pixel clocks and controls the timing of
VHDL Code:
Vivado Design Suite is a software suite produced by Xilinx for synthesis and analysis
of HDL designs, superseding Xilinx ISE with additional features for system on a
chip development and high-level synthesis.[3][4][5] Vivado represents a ground-up rewrite and re
thinking of the entire design flow (compared to ISE), and has been described by reviewers as
"well conceived, tightly integrated, blazing fast, scalable, maintainable, and intuitive".[6][7][8]
Unlike ISE which relied on ModelSim for simulation,[9][10] the Vivado System Edition includes
an in-built logic simulator.[11] Vivado also introduces high-level synthesis, with a toolchain that
XILINX VIVADO _new project and parameters to select the BASYSTM – 3 FPGA board.
----------------------------------------------------------------------------------
entity VGA_sync is
Port ( clk : in STD_LOGIC;
hsync : out STD_LOGIC;
vsync : out STD_LOGIC;
Red : out STD_LOGIC_VECTOR (2 downto 0);
Green : out STD_LOGIC_VECTOR (2 downto 0);
Blue : out STD_LOGIC_VECTOR (2 downto 1));
end VGA_sync;
component clkGen is
port(CLK_IN1:in std_logic;CLK_OUT1:out std_logic);
end component;
component ram
port(clka:in std_logic;
begin
clk1: clkGen port map(CLK_IN1 =>clk,CLK_OUT1=>v_clk);
pic_ram:ram port map(clka=>v_clk,addra=>addr,douta=>data);
--Frame Reset
process(v_clk)
begin
if v_clk'event and v_clk='0' then
if hcount = 799 then
hcount <= 0;
if vcount = 524 then
vcount <= 0;
else
vcount <= vcount + 1;
end if;
else
hcount<=hcount +1;
end if;
end if;
end process;
--Sync process
process(hcount,vcount)
begin
if hcount >= 656 and hcount <752 then
hsync <= '0';
else
hsync <= '1';
end if;
---------------------------------------------------------------------------------------------------
It is very important to map your variables of code to I/O ports of FPGA board. It seems that
converting the high level language into machine level language. To generate the Constraints
file….it required to perform the following steps……
1) Write your VGA – synchronization and controller code in XILINX VIVADO software
and check it for probable error.
2) If code is logical and errorless then perform ‘ Run Synthesis ‘….It will check your code
and give three options…..
1) Open Synthesis Design
2) Run implementations
3) View Report
3) To generate the constraint file, perform the first step and Open I/O planning. Every FPGA
board has its unique I/O port that we have to assign it according to our application. In
BASYSTM – 3 board, Shown in below fig.
Map the variables of codes, add ‘VCCO’ and ‘CONFIG. VOLTAGE’ through ‘ EDIT DEVICE
PROPERTIES’ and save it as a Constraint file. It will convert the high level language to machine
level language.
After generating ‘constraint file’ , it is necessary to generate block ram and clock wizard for
image, and image must be in extracted form via ‘MATLAB’ or ‘PYTHON’ software to convert
VGA Controller BASYSTM - 3 Page 18
image into .COE file that can be understood by FPGA board, which will show as a output on
desktop screen.
XILINX Vivado block ram and clock wizard generator using Existing inbuilt IP.
After generating block ram and clock wizard, click on ‘ Run implementation’ and ‘ generate
bitstream’, it will give two options to user.
1) View reports
2) Open Hardware manager….
First option will give each and every specifications about project.
Second option will give access to interface the FPGA board with PC to check the output on
hardware through dump code via Mini USB port on FPGA board.
155*175 pixels image of tiger with 8 bit color code is shown on LCD monitor