Você está na página 1de 7

How AGP Works

by Jeff Tyson
Modern computers rely heavily on graphics. For example, you are most likely reading this
article on a computer whose operating system is based on a graphical user interface (GUI)
that serves as the primary interface between user and computer. You may enjoy playing
video games or creating 3-D graphics and animations. In fact, if you are using your computer
for anything other than the most basic business-oriented tasks (word processing,
spreadsheets), you probably use lots of graphics.

Image courtesy 3DO


Games like 3DO's Might & Magic VIII need extremely fast graphics cards.

The graphics card in a modern PC can connect in one of several different ways:

• Onboard - The graphics chips and memory are built right onto the motherboard.
• PCI - The graphics card plugs into the PCI bus.
• AGP - The graphics card plugs into a slot dedicated to graphics use.

In this edition of HowStuffWorks, you will learn about AGP, or Accelerated Graphics Port.
AGP was developed by Intel as a way to enhance the performance and speed of the
graphics hardware connected to a PC. You will learn how AGP came about, how it works
and what the future holds for PC graphics subsystems.

Step on the Accelerator


The need for streaming video and real-time-rendered 3-D games requires an even faster
throughput than that provided by PCI. In 1996, Intel debuted the Accelerated Graphics Port
(AGP), a modification of the PCI bus designed specifically to facilitate the use of streaming
video and high-performance graphics.
Image courtesy Intel Corporation
Diagram of the standard architecture of a Pentium III-based system using AGP

Like virtually all other components in a computer, graphics cards prior to AGP relied on a
bus to connect to the central processing unit (CPU). Essentially, a bus is the channel or path
between the components in a computer.

While AGP is based on the PCI bus, and is often referred to as the "AGP bus," it is not
actually a bus system. Instead, it is a point-to-point connection. In other words, the only
device connecting through AGP to the CPU and system memory is the graphics card. There
are no other "stops" to make on the path. Therefore, it is not truly a bus.

AGP provides two major enhancements over PCI:

• Faster performance
• Direct access to system memory

Let's look at exactly how AGP works so we can understand what these enhancements
mean.
This is a typical example of an AGP-based graphics card.

AGP uses several techniques to achieve faster performance:

• AGP is a 32-bit bus with a clock rate of 66 megahertz (MHz, or million cycles per
second). This means that in one second, it can transfer 32 bits (4 bytes) of data 66-
million times. The transfer rate increases when you go to 2x and 4x mode (more
about modes in this section).
• There are no other devices on the AGP bus, which means that the graphics card
does not have to share the bus. The graphics card is always able to operate at the
maximum capacity of the connection.
• AGP uses pipelining to increase speed. Pipelining organizes data retrieval into a
sort of assembly-line process. The graphics card receives multiple chunks of data in
response to a single request.

Think of pipelining as placing an order for a seven-course dinner: You can tell the
waiter the first thing that you want, wait for him to bring it, then tell him the next thing
you want, wait for him to bring it and so on until you're done with your order. Or you
can tell the waiter everything you want at once and let him start bringing it to you.
You'll get the courses in the same sequence either way, but it's much more efficient
without the additional discussions.

• AGP uses sideband addressing, which allows the graphics card to request and
issue addressing information using eight additional address lines that are separate
from the 32-bit path used to transfer data.

A good analogy for sideband addressing is the request line at a radio station.
Consider the music that the station is playing as data flowing from system memory to
the graphics card. You call in to the station's request line and ask for a song to be
played next. Your request does not interfere with the current song that is playing, but
it does tell the station what should be queued next. Sideband addressing essentially
does the same thing for AGP.

RAMming Speed
Aside from performance speed, the other enhancement over PCI is that AGP-based graphics
cards can directly access system memory through the AGP bus at full speed. This is a very
important component of AGP. Texture maps are a key part of computer graphics and take up
a huge amount of memory on a typical graphics card. Because video RAM normally costs
more and is restricted by the size of the graphics card, the number and size of textures used
onscreen was limited in earlier graphics cards. But AGP-based systems can take advantage
of the system memory to store textures and other data normally maintained in the video RAM
on a card.

In a typical non-AGP system, such as one that uses a PCI-based graphics card, every
texture map is stored twice. First, it is loaded from the hard drive to system memory. When
the texture map is about to be used, it is pulled from system memory to the CPU for
processing. It is then sent back through the PCI bus to the graphics card, where it is stored
again in the card's framebuffer. In effect, every texture map is processed and stored twice --
once by the system and once by the graphics card.

Image courtesy Intel Corporation


With PCI, texture maps are loaded from the hard drive to system memory,
processed by the CPU and then loaded into the framebuffer of the graphics card.

AGP stores texture maps only once. The key to this is a part of the AGP chipset called the
Graphics Address Remapping Table (GART). The GART allocates portions of system
memory to hold texture maps, but makes the CPU and graphics card think that the texture
maps are all in the card's framebuffer. The GART may have to put bits and pieces of the
texture maps in different addresses within system memory, but it all appears as one large
chunk of memory to the graphics card.
Image courtesy Intel Corporation
In AGP, texture maps are loaded from the hard drive to system memory to be used
directly by the graphics card.

As you can see, in a non-AGP card, each texture is redundant (stored twice), the CPU has to
do extra work and the size and number of textures are limited by the framebuffer. All of these
factors combine to limit the card's capability compared to an AGP-based card.

Down The Road


Currently, there are three specifications of AGP:

• AGP 1.0
• AGP 2.0
• AGP Pro

AGP 2.0, which includes the original 1.0 version, provides for three modes of operation. The
interesting thing about the various modes is that they are all running at the AGP bus speed
of 66 MHz. But a 2x AGP graphics card sends data twice every clock cycle instead of once,
and a 4x AGP card sends data four times per cycle. Look at the chart below to see how the
modes compare.

Approximate Transfer Rate


Mode
Clock Rate (MBps)
1x 66 MHz 266 MBps
2x 133 MHz 533 MBps
4x 266 MHz 1,066 MBps

AGP Pro is based on AGP 2.0, but provides a longer slot with additional power for
professional-level graphics cards. A computer with either an AGP Pro or AGP 2.0 slot will
work with both AGP 1.0 and AGP 2.0 cards. But an AGP 1.0 slot is not compatible with either
of the other specifications.
This motherboard has an AGP 2.0 connector.

Intel is currently working on a new specification called AGP8x. Although it is based on the
same 66-MHz clock, the AGP8x specification is different in that features that were not being
utilized have been removed in order to simplify and streamline the design, while other
features have been added. Most importantly, performance will be increased significantly.
Look at the chart below to see what AGP8x could offer.

Approximate Transfer Rate


Mode
Clock Rate (MBps)
8x 533 MHz 2,133 MBps

A motherboard that supports the AGP8x specification will be backwards-compatible with


existing AGP. For more information, you can review the draft for AGP8x on this page.

Before There Was AGP


The original PC bus operated at 4.77 MHz and was 8 bits wide, meaning it could process 8
bits of data in each cycle. In 1982, it improved to 16 bits at 8 MHz and officially became
known as Industry Standard Architecture (ISA). This bus design is capable of passing
along data at a rate of up to 16 MBps.

Early graphics cards, from the Monochrome Display Adapter of the early 1980s through
Super Video Graphics Array (SVGA) adapters in the 1990s, plugged into an ISA slot on the
motherboard of the computer. As the number of colors and resolution of the display
increased, ISA-based graphics cards were simply too slow. The ISA bus could not pump the
image data to the CPU fast enough.

Over the years, ISA-based graphics cards were replaced with VESA Local Bus (VL-Bus)
graphics cards. The Video Electronics Standards Association (VESA) agreed on a standard
implementation of SVGA that provided up to 16.8-million colors and 1280x1024 resolution.
These cards plugged into a special slot on the motherboard that was on a separate bus from
ISA. The graphics bus was considered a local bus because it was connected directly to the
CPU and had to be physically near it.

The VL-Bus was 32 bits wide and operated at the speed of the local bus, which was normally
the speed of the processor itself. The VL-Bus essentially tied directly into the CPU. This
worked okay for a single device, or maybe even two. But connecting more than two devices
to the VL-Bus introduced the possibility of interference with the performance of the CPU.
Because of this, the VL-Bus was typically used only for connecting a graphics card, a
component that really benefits from high-speed access to the CPU.
VL-Bus cards communicated with the CPU at the same speed as the CPU's clock. What this
means is that if a CPU were rated at 100 MHz, the graphics card transferred 32 bits of data
100-million times per second. There were two problems with this approach:

• The graphics-card manufacturer had no idea how fast a customer's system would be.
• Tying directly into the CPU could actually slow the CPU down, resulting in poorer
performance.

The introduction of the PCI bus greatly improved graphics-card performance, but it
still wasn't enough.

Along comes Peripheral Component Interconnect (PCI), a completely new bus standard.
The PCI bus is something of a hybrid between ISA and VL-Bus. It provides direct access to
system memory for connected devices, but uses a bridge to connect to the CPU. Basically,
this means that it is capable of even higher performance than VL-Bus while eliminating the
potential for interference with the CPU.

Now, AGP provides higher-performance graphics processing than PCI. With even more
improvements in the queue for AGP, it looks like graphics technology will continue to keep
up with graphic designers, meaning the coolest computer images are yet to come.

Você também pode gostar