Professional Documents
Culture Documents
INTRODUCTION
The term Video Graphics Array (VGA) refers specifically to the display
hardware first introduced with the IBM. VGA is referred to as an "array"
instead of an "adapter" because it was implemented from the start as a single
chip replacing the dozens of discreet logic chips.
The VGA Controller provides a simple, interface between a host processor
and any VGA-compatible monitor.
Taking a processor-generated picture (pixilated) from memory space, the
Controller provides digital RGB values for each pixel, as well as horizontal
and vertical synchronization signals, in order to correctly display the picture on
a connected monitor.
1
2. HISTORY
The term Video Graphics Array (VGA) refers specifically to the display
hardware first introduced with the IBM PS/2 line of computers in 1987, but
through its widespread adoption has also come to mean either an analog
computer display standard, the 15-pin D-subminiature VGA connector or the
640×480 resolution itself. While this resolution has been superseded in the
personal computer market, it is becoming a popular resolution on mobile
devices.
Video Graphics Array (VGA) was the last graphical standard introduced by
IBM that the majority of PC clone manufacturers conformed to, making it
today (as of 2009) the lowest common denominator that all PC graphics
hardware supports, before a device-specific driver is loaded into the computer.
For example, the MS-Windows splash screen appears while the machine is still
operating in VGA mode, which is the reason that this screen always appears in
reduced resolution and color depth.
VGA was officially superseded by IBM's XGA standard, but in reality it was
superseded by numerous slightly different extensions to VGA made by clone
manufacturers that came to be known collectively as "Super VGA".
2
2.2 The VGA specifications are as follows:
• 256 KB Video RAM (The very first cards could be ordered with 64KB or
128KB of RAM at the cost of losing some video modes).
• 16-color and 256-color modes
• 262,144-value color palette (six bits each for red, green, and blue)
• Selectable 25.175 MHz or 28.322 MHz master clock
• Maximum of 800 horizontal pixels
• Maximum of 600 lines
• Refresh rates at up to 70 Hz
• Vertical blank interrupt
• Packed-pixel mode: 256 colors
• Hardware smooth scrolling support
The VGA supports both All Points Addressable graphics modes, and
alphanumeric text modes. Standard graphics modes are:
• 640×480 in 16 colors
• 640×350 in 16 colors
• 320×200 in 16 colors
• 320×200 in 256 colors
3
3. DESCRIPTION ARCHITECTURE
VGA display device used for displaying the images taken from the
processor in an exact format. It can be used for displaying the output of any
projects. Analog, graphs etc… can be directly displayed on the VGA display
monitor.
Image or video
processing VGA Display
system Controller
4
4. CONTROLLER DESIGN
For this first we should know how the display device works. Consider an
image below,
640x480
Original image
5
Pixels of image
Display device also have pixels. Display resolution (640*480) is a
standard resolution of display.
Pixel
This article is about the picture element. For other uses, see Pixel
(disambiguation).
This example shows an image with a portion greatly enlarged, in which the
individual pixels are rendered as little squares and can easily be seen.
6
4.2 A photograph of sub-pixel display elements on a laptop's LCD screen
[1]
In digital imaging, a pixel (or picture element ) is a single point in a raster
image. The pixel is the smallest addressable screen element, it is the smallest
unit of picture which can be controlled. Each Pixel has its address. The address
of a pixel corresponds to its coordinate. Pixels are normally arranged in a 2-
dimensional grid, and are often represented using dots or squares. Each pixel is
a sample of an original image, where more samples typically provide more-
accurate representations of the original. The intensity of each pixel is variable.
In color image systems, a color is typically represented by three or four
component intensities such as red, green, and blue, or cyan, magenta, yellow,
and black.
• Color refreshing rate represents the number of frames that are transmitted per
second.
7
5. Hardware Description
8
The Synchronization Unit provides the horizontal and vertical
synchronization signals – HSYNC and VSYNC – that are required to correctly
display a picture frame within the confines of a monitor’s display area.
These synchronization signals are used as control inputs by the
monitor’s horizontal and vertical deflection circuits. These circuits deflect the
electrons emitted by the three primary color electron guns (Red, Green, Blue)
left to right and from top to bottom, respectively. HSYNC provides the start
and stop times for the horizontal deflection circuit, so that a line of pixels is
correctly drawn across the screen display. VSYNC provides the start and stop
times for the vertical deflection circuit, so that the lines of a frame are correctly
drawn from the top to the bottom of the screen display.
The resolution for the display is defined by the level on the
RESOLUTION input. If High, the 640x480 resolution is used (VGA). If Low,
the 800x600 resolution (SVGA) is used.
Although the resolution determines the area of a monitor’s screen
within which an image can be displayed, the full extents of the chosen
resolution do not have to be used. The actual extents of the image display area
on the screen can be controlled by the use of the DISPSIZE_H and
DISPSIZE_V inputs. These inputs determine the total number of pixels to be
used in a line and the total number of lines in a frame, respectively.
9
The color generated for a pixel in the Pixel Unit depends on whether
the particular pixel requires to be blanked or not. The Synchronization Unit
provides a signal to the Pixel Unit for this very reason. This is the line display
enable signal - en. The signal is checked on each rising edge of the external
clock signal (CLK) and is set as follows:
If (HCOUNT ≥ PixTotal) or (VCOUNT ≥ LinTotal) then
en = 0 (pixel requires to be blanked – set color to be black)
Else
en = 1 (pixel is a viewable pixel – generate RGB color accordingly).
For most common VGA mode 640x480 "60 Hz" non-interlaced the horizontal
timings are:
10
6.1 The vertical timings are:
640 x 400 @ 70 Hz is video mode used for booting most x86 personal
computers.
It should be noted that the actual timings vary slightly. For example for
640x480 @ 60fps a 25,17 µs active video time with a pixel frequency of
25,174 MHz gives 633 pixels rather than the expected 640 pixels.
11
The HSYNC signal is High (inactive) after an external reset signal
(RST) is received by the VGA Controller. The signal is updated on each rising
edge of the external clock signal (CLK).
The state of the HSYNC signal depends on the value stored in the horizontal
counter and is driven low when:
HCOUNT ≥ (PixTotal + BlankingLeft)
and remains low while:
HCOUNT < (PixTotal + BlankingLeft + TLSync)
Vertical (Frame) Period :
The address counter is used to store the position of the next consecutive
pixel in the frame. Its value is passed to the Pixel Unit on the internal bus
signal hvcnt, which is then used to provide the ADDR_PIXEL signal, to obtain
the next pixel from picture memory.
The counter is reset to zero when the VGA Controller receives an external
reset signal (RST). The size of the counter depends on the values chosen for
DISPSIZE_H and DISPSIZE_V, as the range is simply:
0 to (PixTotal x LinTotal) - 1
12
Taking the maximum number of pixels in a line and lines in a frame, for each
of the supported display resolutions, the maximum ranges for the counter are:
• 640x480: 0 to 307199
• 800x600: 0 to 479999.
The counter has 19-bit resolution.
While the value in the horizontal counter (HCOUNT) is less than the
total number of viewable pixels in a line (PixTotal, the integer value of
DISPSIZE_H), the counter is incremented on the rising edge of the external
clock signal (CLK). Pixel addressing within the frame is consecutive. When
the counter reaches the last pixel in a line, its incremented value is the first
pixel in the next line down.
The address counter will continue to be incremented until the value in the
vertical counter (VCOUNT) is greater than or equal to the total number of
viewable lines in a frame (LinTotal, the integer value of DISPSIZE_V). At this
point, it will be rolled over to zero.
13
7. VGA Controller
The VGA Controller provides a simple, 8-bit interface, between a host
microcontroller and any VGA-compatible monitor. This variant of the
Controller provides six modes of display, depending on the resolution chosen
(640x480 (VGA) or 800x600 (SVGA)) and the color palette (either Black &
White, 16 Colors, or 64 Colors).
=> For giving information for 1 pixel we use 1 clock (for controlling all
operations).
14
1 clock = 1 pixel
1 clock cycle period = 40ns.
Clock frequency = 1/time period =1/40ns = 25 mhz
1 clock frequency = 25 mhz.
So, if we use 25mhz clock and display 1 pixel information for each and enery
clock then we use can attain min. 60hz refreshing rate.
do not use the clock frequency less than 25mhz.
Ex:
15MHz 25MHz
30MHz
Decreases
Increases
(It is unable to display 60frames/sec)
R (Red)
G (Green)
B (Blue)
15
HSYNC (Horizontal Synchronous signal)
VSYNC (Vertical Synchronous signal)
All the above signals are used to control the image data to be correctly
displayed on the VGA display monitor.
16
8. FUNCTIONAL DESCRIPTION
8.1 Symbol:
Pin description:
The pin description is shown in the below table.
Table VGA Pin description:
17
60Hz
CLK = 30MHz, Refresh =
72Hz
800x600
CLK = 40MHz, Refresh =
60Hz
CLK = 50MHz, Refresh =
72Hz.
RST I High Global system reset
18
Synchronization Unit of the
Controller.
19
VGA monitor, so that the
start and end of a line of
pixels is correctly displayed
across the visible display
area of the screen. The
horizontal size of the display
area is controlled by the
DISPSIZE_H input to the
R1 O High / Low Provides the 2-bit digital
Controller
signal for the intensity of red
VSYNC O Falling Vertical synchronization
used in composing a pixel's
signal. This signal is used to
displayed color. These two
control the vertical
signals are inputs to a simple
deflection circuit in the VGA
2-bit DAC (external to the
monitor, so that the start and
Controller) that provides the
end of a frame (of lines) is
analog signal required by the
correctly displayed between
VGA monitor.
the top and bottom edges of
the visible display area of the
screen. The vertical size of
the display area is controlled
by the DISPSIZE_V input to
the Controller.
20
Figure 3 summarizes the signal timing involved in sending a line of
pixels and a frame of lines. The actual time values differ according to the
resolution selected (640x480 or 800x600), the processor-defined values for
DISPSIZE_H and DISPSIZE_V and the frequency of the external clock signal
(CLK).
21
9.1 VGA PIXEL UNIT:
The Pixel Unit provides access to the pixilated image stored in external
picture memory, reading in data a byte at a time and formatting each pixel to
be displayed. For each pixel, the 6-bit RGB value required for the control of
the monitor’s three, primary color electron guns is generated, so that the pixel
is displayed on the screen with the correct color.
22
The size of memory required to store a picture is determined by the total
number of viewable pixels in a line (determined by DISPSIZE_H), the total
number of viewable lines in a frame (determined by DISPSIZE_V) and the
number of pixels stored in each byte in memory space:
Memory required for picture = (PixTotal x LinTotal) / number of pixels per byte
The address in RAM where the next pixel is stored is determined using
an internal signal provided by the Synchronization Unit – hvcnt – which
reflects the current contents of the MEMADDR register. The exact addressing
is described below.
16 Colors mode
The picture memory address – the byte of data containing the next 2 pixels
– is determined by using bits 18..1 of hvcnt and right shifting the contents by
one:
ADDR_PIXEL = '0' & hvcnt[18..1]
64 Colors mode
The picture memory address – the byte of data containing the next pixel – is
determined by using the full value of hvcnt:
ADDR_PIXEL = hvcnt[18..0]
23
The register is updated on each rising edge of the CLK signal. Data can be
read from the memory space as long as the RD signal is active (High). The RD
signal is itself controlled by the external line display enable signal, enex. This
internally generated signal is defined as follows:
If ((HCOUNT > (PixTotal+1)) and (HCOUNT < Line Period)) or ((VCOUNT >
(LinTotal+1)) and (VCOUNT < Frame Period)) then enex = 0
Else
enex = 1
When enex is Low, read access from memory is disabled (RD = 0).
The point at which data is loaded from memory into PIXREG depends on the
particular color palette that is chosen – Black & White, 16 Colors, or 64
Colors.
16 Colors mode
The next byte of data will be loaded into the register whenever the
lowest bit of the hvcnt signal – received from the Synchronization Unit - is a
'0'.
For the currently loaded byte, the active pixel is always in the low order
nibble of the Pixel register. Remember that in this mode, each byte of data
contains two pixels. The second pixel is moved into this active pixel position
by shifting the contents of the register right by four bits, on the rising edge of
CLK.
24
64 Colors mode
The next byte of data will be loaded into the register on the rising edge
of the external system clock signal (CLK). In this mode, the read of pixel data
does not depend on the status of the hvcnt signal received from the
Synchronization Unit.
25
26
27
The RGB color code stored in the RGB register is output from the VGA
Controller as separate 2-bit R, G and B values (outputs R0, R1, G0, G1, B0
and B1).
The monitor itself expects analog signals as inputs to its electron gun control
circuits. This is achieved by using 2-bit digital to analog converter circuitry,
located on the Nano Board itself, as shown in Figure 4.
28
For each color, the 2-bit digital signal from the VGA Controller can be
converted into 4 distinct analog levels. These levels specify the intensity of
each of the three primary colors to use when displaying the pixel on the
monitor’s screen. The levels range from 0V (total darkness) to 0.7V (maximum
brightness).
With each analog input being one of four possible levels, the monitor
can display each pixel on the screen with one of 64 different color
permutations.
29
Table 2: Block RAM Available in Spartan-3E Devices
Devi R R T T T
ce A A o o o
M M t t t
Co Bl a a a
lu oc l l l
m ks R R R
ns pe A A A
r M M M
C B B K
ol l it b
u o s i
m c t
n k s
s
XC3 1 4 4 7 7
S100 3 2
E 7
2
8
XC3 2 6 1 2 2
S250 2 2 1
E 1 6
1
8
4
XC3 2 10 2 3 3
S500 0 6 6
E 8 0
6
4
0
30
XC3 2 14 2 5 5
S120 8 1 0
0E 6 4
0
9
6
XC3 2 18 3 6 6
S160 6 6 4
0E 3 8
5
5
2
Each block RAM contains 18,432 bits of fast static RAM, 16K bits of
which is allocated to data storage and, in some memory configurations, an
additional 2K bits allocated to parity or additional "plus" data bits. Physically,
the block RAM memory has two completely independent access ports, labeled
Port A and Port B. The structure is fully symmetrical, and both ports are
interchangeable and both ports support data read and write operations. Each
memory port is synchronous, with its own clock, clock enable, and write
enable. Read operations are also synchronous and require a clock edge and
clock enable. Though physically a dual-port memory, block RAM simulates
single-port memory in an application, as shown in Figure 1. Furthermore, each
block memory supports multiple configurations or aspect ratios. Table 3
summarizes the essential SelectRAM features. Cascade multiple block RAMs
to create deeper and wider memory organizations, with a minimal timing
penalty incurred through specialized routing resources.
31
32
10.HARDWARE DESCRIPTIVE LANGUAGE (VHDL)
• Interoperability
• Technology independence
• Design reuse
• Several levels of abstraction
• Readability
• Standard language
• Widely supported
What is VHDL?
33
• The first publicly available version was released in 1985.
• In 1986 IEEE (Institute of Electrical and Electronics Engineers, Inc.)
was presented with a proposal to standardize the VHDL.
• In 1987 standardization => IEEE 1076-1987
• An improved version of the language was released in 1994 => IEEE
standard1076-1993.
• IEEE 1076 doesn’t support simulation conditions such as unknown and high-
impedance.
• Soon after IEEE 1076-1987 was released, simulator companies began using
their own, non-standard types => VHDL was becoming a nonstandard.
• IEEE 1164 standard was developed by an IEEE.�IEEE 1164 contains
definitions for a nine-valued data type, std_logic.
• IEEE 1076.3 (Numeric or Synthesis Standard) defines data types as they relate
to actual hardware.
• Defines, e.g., two numeric types: signed and unsigned.
VHDL Environment:
34
Design Units:
Entities:
• A black box with interface definition.
• Defines the inputs/outputs of a component (define pins)
• A way to represent modularity in VHDL.
• Similar to symbol in schematic.
• Entity declaration describes entity.
Eg:
entity Comparator is
port (A, B : in std_logic_vector(7 downto0);
EQ : out std_logic);
end Comparator;
Ports:
• Provide channels of communication between the component and its
environment.
• Each port must have a name, direction and a type.
35
• An entity may have NO port declaration
Port directions:
• In: A value of a port can be read inside the component, but cannot be
assigned. Multiple reads of port are allowed.
• Out: Assignments can be made to a port, but data from a port cannot be
read. Multiple assignments are allowed.
• In out: Bi-directional, assignments can be made and data can be read.
Multiple assignments are allowed.
• Buffer: An out port with read capability. May have at most one
assignment. (are not recommended)
Architectures:
• Every entity has at least one architecture.
• One entity can have several architectures.
• Architectures can describe design using:
Behavior–Structure–Dataflow
• Architectures can describe design on many levels–Gate level–RTL (Register
Transfer Level)–Behavioral level
• Configuration declaration links architecture to entity.
Eg:
Architecture Comparator1 of Comparator is
Begin
EQ <= ’1’when (A=B) else ’0’;
End Comparator1;
Configurations:
• Links entity declaration and architecture body together.
• Concept of default configuration is a bit messy in VHDL ‘87.
–Last architecture analyzed links to entity?
• Can be used to change simulation behavior without re-analyzing the VHDL
source.
36
• Complex configuration declarations are ignored in synthesis.
• Some entities can have, e.g.,gate level architecture and behavioral
architecture.
• Are always optional.
Packages:
Packages contain information common to many design units.
1. Package declaration
--constant declarations
–type and subtype declarations
–function and procedure declarations
–global signal declarations
–file declarations
–component declarations
2. Package body
• Packages are meant for encapsuling data which can be shared globally among
Several design units.
Consists of declaration part and optional body part.
Package declaration can contain:
–type and subtype declarations
–subprograms
–constants,
Alias declarations
–global signal declarations
–file declarations
37
–component declarations
Package body consists of
–subprogram declarations and bodies
–type and subtype declarations
– deferred constants
– file declarations
Libraries:
Collection of VHDL design units (database).
1. Packages:
• package declaration
• package body
2. Entities (entity declaration)
3. Architectures (architecture body)
4. Configurations (configuration declarations)
• Usually directory in UNIX file system.
• Can be also any other kind of database.
Levels of Abstraction:
38
10.3 Dataflow VHDL Description:
39
10.4 Behavioral VHDL Description:
Processes:
40
• Quite similar to Unix process.
41
11. VGA CONTROLLER CODE
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.numeric_std.ALL;
component memory
port (
addr: IN std_logic_VECTOR(17 downto 0);
clk: IN std_logic;
dout: OUT std_logic_VECTOR(0 downto 0);
en: IN std_logic;
42
sinit: IN std_logic);
END component;
43
rd:out std_logic);
end component;
signal clk,hsync_s,vsync_s,h_en_s,v_en_s,v_en_reg_s,rd_s:std_logic;
signal line_count_s,c_hs_s,addr:integer;
signal data_s:std_logic_vector(0 downto 0);
signal addr_s:std_logic_vector(17 downto 0);
begin
--addr_s <= std_logic_vector(to_unsigned(addr,18));
process(clk50m,rstn)
begin
if(rstn = '0')then
clk <= '0';
elsif(clk50m = '1' and clk50m'event)then
clk <= not clk;
end if;
--end if;
end process;
hsync <= hsync_s;
vsync <= vsync_s;
sync: sync_unit port map(
clk => clk,
rstn => rstn,
hsync => hsync_s,
vsync => vsync_s,
v_en_reg => v_en_reg_s,
line_count => line_count_s,
h_en => h_en_s,
v_en => v_en_s,
44
c_hs => c_hs_s
);
45
end Behavioral;
-- hsync counter
46
process(clk,rstn)
begin
if(rstn = '0')then
c_hs_s <= 0;
else
if(clk = '1' and clk'event)then
if(c_hs_s=793)then
c_hs_s <= 0;
else
c_hs_s <= c_hs_s +1;
end if;
end if;
end if;
end process;
--vsync counter
--vertical line counter
process(h_en_s,rstn)
begin
if(rstn = '0')then
line_count_s <= 0;
elsif(h_en_s = '1' and h_en_s'event)then
line_count_s <= line_count_s + 1;
if (line_count_s=515)then
line_count_s <= 0;
end if;
end if;
--end if;
end process;
--hysnc pulse
47
process(clk,rstn)
begin
if(rstn = '0')then
hsync <= '1';
elsif(clk = '1' and clk'event)then
if(c_hs_s <=95)then
hsync <= '0';
else
hsync <= '1';
end if;
end if;
--end if;
end process;
---vysnc pulse
process(clk,rstn) -- Vertical Enable (Data is Valid in this Region)
48
begin
if(rstn = '0')then
v_en_s <= '0';
elsif(clk = '1' and clk'event)then
if((line_count_s>=35 and line_count_s<=515))then
v_en_s <= '1';
else
v_en_s <= '0';
end if;
end if;
--end if;
end process;
process(clk)
begin
if(clk = '1' and clk'event)then
v_en_reg<=v_en_s;
49
end if;
end process;
end arch_sync_unit;
PIXEL GENERATOR:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
50
addr <= addr_s;
process(clk,rstn)
begin
if(rstn = '0')then
rd <= '0';
red <= "0";
green <= "0";
blue <= "0";
addr_s <= x"0000" & "00";
elsif (clk = '1' and clk'event)then
if((v_en='1') and (v_en_reg='0'))then
addr_s<=(others =>'0');
end if;
if(v_en='1' and h_en='1')then
if(line_count<=514)then
if(c_hs <= 655)then
rd <= '1';
red <= data_in;
green <= data_in;
blue <= data_in;
addr_s <=addr_s +"000000000000000001";
else
rd <= '0';
red <= "0";
green <= "1";
blue <= "0";
end if;
else
rd <= '0';
red <= "1";
51
green <= "1";
blue <= "1";
end if;
if(addr_s="111011111111111111")then
addr_s<= (others =>'0');
end if;
else
red <= "0";
green <= "0";
blue <= "0";
end if;
end if;
-- end if;
--end if;
end process;
end behv;
52
12. FPGA ARCHITECTURE
53
input lookup tables (LUTs). More than 20 years later, Freeman was entered
into the National Inventor's Hall of Fame for his invention.
In the late 1980s the Naval Surface Warfare Department funded an experiment
proposed by Steve Casselman to develop a computer that would implement
600,000 reprogrammable gates. Casselman was successful and the system was
awarded a patent in 1992.
Xilinx continued unchallenged and quickly growing from 1985 to the mid-
1990s, when competitors sprouted up, eroding significant market-share. By
1993, Actel was serving about 18 percent of the market.
The 1990s were an explosive period of time for FPGAs, both in sophistication
and the volume of production. In the early 1990s, FPGAs were primarily used
in telecommunications and networking. By the end of the decade, FPGAs
found their way into consumer, automotive, and industrial applications.
FPGAs got a glimpse of fame in 1997, when Adrian Thompson merged genetic
algorithm technology and FPGAs to create a sound recognition device.
Thomson’s algorithm allowed an array of 64 x 64 cells in a Xilinx FPGA chip
to decide the configuration needed to accomplish a sound recognition task.
54
called the SB24. That work was done in 1982. Examples of such hybrid
technologies can be found in the Xilinx Virtex-II PRO and Virtex-4 devices,
which include one or more PowerPC processors embedded within the FPGA's
logic fabric. The Atmel FPSLIC is another such device, which uses an AVR
processor in combination with Atmel's programmable logic architecture.
Gates
Market size
55
• 2005: $1.9 billion
• 2010 estimates: $2.75 billion
Historically, FPGAs have been slower, less energy efficient and generally
achieved less functionality than their fixed ASIC counterparts. A combination
of volume, fabrication improvements, research and development, and the I/O
capabilities of new supercomputers have largely closed the performance gap
between ASICs and FPGAs.
Xilinx claims that several market and technology dynamics are changing the
ASIC/FPGA paradigm:
These trends make FPGAs a better alternative than ASICs for a growing
number of higher-volume applications than they have been historically used
for, which the company blames for the growing number of FPGA design starts
(see History).
56
The primary differences between CPLDs and FPGAs are architectural. A
CPLD has a somewhat restrictive structure consisting of one or more
programmable sum-of-products logic arrays feeding a relatively small number
of clocked registers. The result of this is less flexibility, with the advantage of
more predictable timing delays and a higher logic-to-interconnect ratio. The
FPGA architectures, on the other hand, are dominated by interconnect. This
makes them far more flexible (in terms of the range of designs that are
practical for implementation within them) but also far more complex to design
for.
Another notable difference between CPLDs and FPGAs is the presence in most
FPGAs of higher-level embedded functions (such as adders and multipliers)
and embedded memories, as well as to have logic blocks implement decoders
or mathematical functions.
Some FPGAs have the capability of partial re-configuration that lets one
portion of the device be re-programmed while other portions continue running.
12.3 Applications:
57
FPGAs especially find applications in any area or algorithm that can make use
of the massive parallelism offered by their architecture. One such area is code
breaking, in particular brute-force attack, of cryptographic algorithms.
Architecture :
58
An application circuit must be mapped into an FPGA with adequate resources.
While the number of CLBs and I/Os required is easily determined from the
design, the number of routing tracks needed may vary considerably even
among designs with the same amount of logic. (For example, a crossbar switch
requires much more routing than a systolic array with the same gate count.)
Since unused routing tracks increase the cost (and decrease the performance)
of the part without providing any benefit, FPGA manufacturers try to provide
just enough tracks so that most designs that will fit in terms of LUTs and IOs
can be routed. This is determined by estimates such as those derived from
Rent's rule or by experiments with existing designs.
A classic FPGA logic block consists of a 4-input lookup table (LUT), and a
flip-flop, as shown below. In recent years, manufacturers have started moving
to 6-input LUTs in their high performance parts, claiming increased
performance.
59
Typical logic block
There is only one output, which can be either the registered or the unregistered
LUT output. The logic block has four inputs for the LUT and a clock input.
Since clock signals (and often other high-fanout signals) are normally routed
via special-purpose dedicated routing networks in commercial FPGAs, they
and other signals are separately managed.
For this example architecture, the locations of the FPGA logic block pins are
shown below.
Each input is accessible from one side of the logic block, while the output pin
can connect to routing wires in both the channel to the right and the channel
below the logic block.
Each logic block output pin can connect to any of the wiring segments in the
channels adjacent to it.
60
Similarly, an I/O pad can connect to any one of the wiring segments in the
channel adjacent to it. For example, an I/O pad at the top of the chip can
connect to any of the W wires (where W is the channel width) in the horizontal
channel immediately below it.
Generally, the FPGA routing is unsegmented. That is, each wiring segment
spans only one logic block before it terminates in a switch box. By turning on
some of the programmable switches within a switch box, longer paths can be
constructed. For higher speed interconnect, some FPGA architectures use
longer routing lines that span multiple logic blocks.
61
Modern FPGA families expand upon the above capabilities to include higher
level functionality fixed into the silicon. Having these common functions
embedded into the silicon reduces the area required and gives those functions
increased speed compared to building them from primitives. Examples of these
include multipliers, generic DSP blocks, embedded processors, high speed IO
logic and embedded memories.
FPGAs are also widely used for systems validation including pre-silicon
validation, post-silicon validation, and firmware development. This allows chip
companies to validate their design before the chip is produced in the factory,
reducing the time to market.
To define the behavior of the FPGA, the user provides a hardware description
language (HDL) or a schematic design. The HDL form might be easier to work
with when handling large structures because it's possible to just specify them
numerically rather than having to draw every piece by hand. On the other hand,
schematic entry can allow for easier visualisation of a design.
62
FPGA/CPLD via a serial interface (JTAG) or to an external memory device
like an EEPROM.
The most common HDLs are VHDL and Verilog, although in an attempt to
reduce the complexity of designing in HDLs, which have been compared to the
equivalent of assembly languages, there are moves to raise the abstraction level
through the introduction of alternative languages.
63
• EPROM - Erasable Programmable Read-Only Memory technology. Usually
one-time programmable in production because of plastic packaging. Windowed
devices can be erased with ultraviolet (UV) light. CMOS.
• EEPROM - Electrically Erasable Programmable Read-Only Memory
technology. Can be erased, even in plastic packages. Some, but not all, EEPROM
devices can be in-system programmed. CMOS.
• Flash - Flash-erase EPROM technology. Can be erased, even in plastic
packages. Some, but not all, flash devices can be in-system programmed. Usually, a
flash cell is smaller than an equivalent EEPROM cell and is therefore less expensive
to manufacture. CMOS.
• Fuse - One-time programmable. Bipolar.
Major Manufacturers :
Xilinx and Altera are the current FPGA market leaders and long-time industry
rivals. Together, they control over 80 percent of the market, with Xilinx alone
representing over 50 percent.
Xilinx also provides free Windows and Linux design software, while Altera
provides free Windows tools; the Solaris and Linux tools are only available via
a rental scheme.
64
Main stream verification methods for hardware design and early software and
firmware co-design has become mainstream. Prototyping SoC and ASIC
design on FPGA has become a good method to do this.
65
13. SIMULATION RESULTS
66
GATE LEVEL
67
Fig:VGA CONTROLLER
GATE LEVEL
68
Fig: SYNC UNIT
TECHNOLOGY SCHEMATIC
69
14. APPLICATIONS:
70
Displaying Systems.
14.1 CONCLUTION
REFERENCES
1. http://en.wikipedia.org/wiki/Video_Graphics_Array
71
2. A VGA display controller by Eduardo Sanchez.
72