With the basic logic gates (NAND, NOR, NOT etc.) we can
build a simple adder to multiplier to complete processor.
If we can connect these logic elements inside a chip the
way we want using a software program, then that's the FPGA;
field-programmable gate array.
The software program to define the hardware circuit is
called hardware description language (HDL). FPGAs can be
used to implement any logical function otherwise available
readily by IC vendors.
The logic components/logic blocks configured to perform
complex combinational functions, or merely simple logic
gates like AND and XOR. Logic blocks also include memory
elements, which is nothing but a Flip Flop. There will be
millions of logic elements in today's FPGA IC.
The benefits of FPGAs are, circuit flexibility, programmable
hardware, customized circuits can be implemented at lower
cost, higher design speed, and can be reprogrammed to fix
bugs on field.
The flexibility and programming of FPGA is shadowed by few
drawbacks too. The drawbacks of FPGA are, they are slower
and consume more power, also are more expensive.
Once the designer finalizes the hardware circuit on FPGA
and if the quantity of the device to be used is large in
number (in thousands), than the cheaper solutions is to
ASICize the FPGA.
These days FPGAs are getting popular due their ability to
work as customized embedded microprocessors with related
peripherals.These systems called with a new name "system
on a programmable chip". Designer can put his own processor,
may be a dual core, and his own programming instructions.
Good thing is most of the programmable logic vendors, offer
ready to use HDL code for processor, memory, and any such
complex logic.
Latest FPGAs can be used as reconfigurable systems - CPUs
that reconfigure themselves to suit the task at hand.
Applications: Specific design applications of FPGAs
are visual processing (electronic eyes), DSP, software-defined
radio, aerospace and defense systems (can be customized
as per this field's unique requirement), ASIC prototyping,
medical imaging, speech recognition, cryptography, bioinformatics,
and many more emerging areas.
When it comes to security, FPGAs can be configured for some
customized fuzzy and some other crypto logic to protect
the system from reverse engineering and hacking.
In High performance computing, computational kernels such
as FFT or Convolution are performed on the FPGA instead
of a microprocessor.
Architecture of a logic block
FPGA consists of an array of configurable logic blocks
(CLBs) and routing channels.
Basic FPGA logic block as shown in the figure below has
a 4-input (also 6-input) lookup table (LUT), and a flip-flop.

Fiure: logic block in FPGA
The logic block has four inputs for the look up table and
a clock input. Since clock signals are routed via special-purpose
dedicated routing networks in commercial FPGAs they are
separately managed.
Each logic block output pins and input pins can be connected
between many such logic blocks through a grid of wires (horizontal
and vertical) as per requirements.
FPGA design and programming
The FPGA starts with hardware description language (HDL)
or a schematic design. The HDL is preferred over schematic
design due to HDL's capability in handling large design
blocks. It easy to specify them numerically rather than
schematic diagram type entry. The advantage of schematic
entry is it's easy to visualize a design. Please note advanced
EDA tools make the life of FPGA designer far easier by offering
lot of automation.
Few of the software tools used in FPGA design:
Viewlogic pro Series
Synopsis
Cadence VHDL
Data I/O Synario
Xilinx - XACT
Exemplar Logic Synthesis System
Aldec Active FPGA
Through such EDA tools technology-mapped netlist is generated.
The netlist is fitted into the actual FPGA architecture
by using a process called place-and-route, mostly done by
the proprietary place-and-route software supplied by FPGA
vendor. Designer got to validate the map, place and route
results by using timing analysis, simulation, and other
verification methodologies. After the validation process,
the binary file is generated. Binary file is transferred
into FPGA/CPLD via a serial interface (JTAG) or to an external
memory device like an EEPROM to make the device to work
as per the design.
In recent times, FPGA design process is simplified and
speeded up by using libraries of predefined complex functions
and circuits that have been tested and optimized. The other
name for these ready to use function is IP core. FPGA vendors
increase their selling strength by providing huge caches
of third party and own IP cores. With all these tools and
advancement FPGA development is made easier.
The figure explains the stages of FPGA design