Categories: Microcontroller circuits
Number of views: 21445
Comments on the article: 0

What is FPGA a simple language for beginners

 

What is digital electronics associated with? First of all, with logical elements AND, OR, NOT. Further, shift registers, decoders, multiplexers, etc., come into memory. However, as the complexity of electronic devices and the trend towards miniaturization increase, the creation of devices based on integrated circuits (ICs) from the above components became more difficult, custom ICs of the required topology and circuitry proved to be worthwhile only when the device was replicated in large numbers, in other cases it was unreasonably expensive.

The way out of this situation was the development of programmable integrated logic circuits (abbreviated as FPGA, foreign abbreviation as programmable logic device, PLD). What is it and where is it used we will tell in this article.

What is FPGA a simple language for beginners

Differences from microcontrollers

With the word "programmable", most beginners associate with microcontrollers. Despite the fact that they are also programmed, FPGAs are a completely different device.

For developers in microcontrollers, a fixed set of solutions and means is available that are inherent in a particular chip, it will not work in any way to retreat from architecture. You are given a set of commands with which you perform operations of interaction with the environment, by reading data from digital and analog inputs and sending signals to actuators using outputs.

In addition, you can perform calculations, save data in registers or ROMs, as well as operate with data flashed into the memory of the microcontroller. On this, in essence, is the purpose and features of working with microcontrollers.

Programmable 769; log 769; integer 769; flax 769; ma (FPGA, programmable logic device, PLD)

Programmable logic integrated circuits (FPGAs) are different in that when you program a device, you yourself create an architecture from basic logic elements. Thus, you get high speed and flexibility of the chip. This makes it possible, without changing one chip, to make a number of projects.

Generally, the internal FPGA device can be divided into three main groups:

1. An array of logical elements (macrocells, logical blocks).

2. Input / output blocks (IO).

3. Communication lines between them and the device that controls these connections.

However, such structuring is very generalized, we will consider this issue in more detail below.

By programming, you connect the elements in the same way as you would, assembling a device from individual elements and connecting their inputs and outputs with conductors.

Note:

The main difference between FPGAs and microcontrollers is that in a microcontroller you cannot change the internal connections between the simplest elements, and programming and working with them is based on registering connections.

The choice of microcontrollers is based on many criteria, such as:

  • Speed ​​and clock speed;

  • The amount of ROM and RAM;

  • The number of inputs and outputs.

Other functional features and peripherals, such as support for communication lines and protocols (I2C, one-wire, PWM signal, etc.).

When choosing an FPGA, the main criterion is the number of programmable blocks - they should be enough to implement the task.

Depending on the specific FPGA, the number of blocks can vary within wide limits, and the cost accordingly.

The microcontroller performs sequentially all the operations prescribed in its program, while FPGA blocks perform the task in parallel and independently of each other, therefore, comparing these devices by clock frequency is impractical. Their principle of operation is too different.

FPGA Types

Kinds

Currently relevant are two main types of FPGAs:


1. CPLD (Complex Programmable Logic Device - Programmable Logic Integrated Circuit, in fact, this is FPGA in its classical sense). It usually has a built-in non-volatile memory into which the firmware is loaded.

The internal structure is built on a matrix of macrocells or logical blocks, and the number of elements in them lies in the range of hundreds and thousands of pieces. Due to their relative simplicity, they are cheaper than the next type of programmable logic. All this leads to the fact that CPLD is used mainly in circuits where high speed and a large number of outputs are needed, while performing simple tasks.


2. FPGA (Field-Programmable Gate Array - User Programmable Gate Array, however it is often referred to as FPGA) - more developed and complex devices compared to CPLD, are built on logical blocks with flexible switching and contain a larger number of elements (tens or hundreds of thousands of pieces).

Firmware is usually stored in external non-volatile memory. In addition to the simplest logic elements, FPGAs can contain ready-made blocks for performing any operations, for example, DSP signal processing blocks. All this allows you to implement a processor, signal processing devices and other complex devices.


Interesting:

Although in fact the presence of non-volatile memory does not make programmable logic CPLD. This is partially misleading. The main difference between CPLD and FPGA is the internal structure.

The difference between CPLD and FPGA is the internal structure

The internal CPLD device is shown in more detail in the figure below.

CPLD internal device

And the approximate scheme of its macrocell looks like this:

Sample CPLD macrocell layout

The macrocell consists of programmable multiplexers, triggers (one or more) and forms a group of output FB signals in several versions.

Below is another example - a block diagram of the CPLD chip family of MAX II from Altera.

Altera MAX II CPLD Flowchart

And the structural plan of the chips of the same family.

Altera MAX II CPLD block diagram

Intermediate tires are assigned to macrocells using a node such as a distributor in English. it sounds like a Logic Allocator, which is shown in the diagram below, it also shows the matrix of switching (Global Routing Pool), and at the output macrocells (macrocells) have two feedbacks.

Distributor and switching matrix

The external outputs of the microcircuit are connected to the outputs of the macrocells through another block (matrix) - ORP (Output Routing Pool), note that through it the INPUT logic is connected to GRP, as shown in the illustration below.

Note:

Some CPLDs have so-called direct inputs (Direct Input) - they are connected to the inputs of the cells directly, which reduces delays.

The FPGA structure has the form:

FPGA structure
  • L - logical configurable block;

  • S (substitution block) - a substitution block, it receives a certain number of bits per move, converts, according to a certain algorithm, and outputs a different number of bits at the output. In other words, a decoder, an encryptor, and a switch.

  • C (connection block) - connection block.

S-block diagram:

 

S-block diagram



Programming


HDL (Hardware Description Language) - this is the language with which FPGAs are programmed. Popular and versatile are Verilog HDL and VHDL. Other languages ​​exist, such as those specific to manufacturers, such as AHDL for ALTERA products.

Graphic programming is available to developers who work with FPGAs. That is, you can simply draw logic circuits or combine code with graphics. The latter is called the modular development method, when specific modules are prescribed, and the top module, in which everything is combined, is programmed graphically.


Examples of popular manufacturers and series

At the time of writing, the most famous are the products of two manufacturers.

  • Altera (founded in 1983);

  • Xilinx (Founded in 1984).

Altera

Altera has several major series of programmable logic:

  • MAX, MAX II, MAX IIZ;

  • 7000S;

  • 3000A;

  • MAX V;

  • Cyclone

  • Arria;

  • Stratix

Let's consider each of them in more detail. In the tables below you see general information about the chips of the family.

Characteristics of the main series of programmable logic
Characteristics of the main series of programmable logic

Altera 3 CPLD CPLD:

  • MAX is a CPLD for use in mobile devices, the hallmarks are relatively low power consumption and heat dissipation. Depending on the complexity and years of release, the following modifications are distinguished:

  • 7000S is outdated to date, it was released in 1995.

  • 3000A - released in 2002, is manufactured using 300nm technology. Consists of a small number of macrocells (32-512)

  • MAX II released in 2004, is manufactured using 100nm technology, consists of a larger number of units (240-2210) operating at frequencies up to 304 MHz. The product is made in cases of type TQFP 0.5 mill with 100 or more legs.

  • MAX IIZ - 2007, the main feature is reduced power consumption - this is a positive point, however, the frequencies are reduced to 152 MHz. These microcircuits are powered from 1.8 V.

  • MAX V - 2010 year. It is produced according to 180nm technology, it can contain from 40 to 2210 blocks and operate at frequencies up to 152MHz or 304MHz - it depends on the number of blocks.

Altera 3 CPLD CPLD

FPGA:

  • Cyclone is a budget FPGA type chip. There are five generations that are marked with Greek numbers (from I to V, respectively). The first generation was launched in 2002, produced using 180nm technology, and the fifth generation was released in 2011 and manufactured using 28nm technology. It is worth noting that all generations remain relevant.

  • Arria - also refer to the mid-range FPGA.

  • Stratix - Powerful FPGAs.

Below are the Altera FPGA Programmable Logic Pivot Tables.

FPGA Features
FPGA Features
FPGA Features

And the full table at the link:https://env.electricianexp.com/tablitsa.docx

The manufacturer Xilinx CPLD presented in series:

  • XC9500XL of 36-288 macrocells. They operate at frequencies up to 178 MHz, and models at 288 macrocells at 208 MHz. It is carried out as in small cases with 44 pins (leads) at a distance of 0.8 mm from each other - such cases are considered to be easily soldered. Also available with 64 and 100 legs in increments of 0.5 mm, as well as models in PLCC-type enclosures.

  • The CoolRunner-II Series is an energy-efficient yet productive CPLD. A feature is powered by a voltage of 1.8V, the inputs and outputs are designed to operate in the range of 1.5-3.3V. They consist of 32-512 macrocells and are produced using 180nm technology. Depending on the number of cells, they work in the frequency range 179-323 MHz, and the smaller the cells, the more frequency they can work in this case. They are found in different cases, including easily soldered, as in the microcircuits of the series considered above.

Xilinx company did not pass by and FPGA:

  • Spartan-6 - consist of 6-input logic blocks, their number lies in the range of 3840-147443 pieces. Interesting in that they may contain controllers for exchanging data such as DDR2, DDR3, PCI-EXPRESS, Ethernet 1Gbit, SerialATA etc ...

  • The Vitrex-7 series is complex, microcircuits can contain up to 2,000,000 logic blocks and 1,200 contacts.

Below you can find the summary tables with the CPLD and FPGA specifications from the Xilinx 6 and 7 series, as well as the Zynq-7000.

Xilinx 6 and 7 Series FPGA Features
Characteristics of Virtex-6 FPGAs
Characteristics of the FPGA family Spartan-6
Characteristics of the FPGA family Spartan-6
FPGA Features
FPGA Features

Conclusion

FPGAs and PPVMs are also produced by other companies such as Lattice Semiconductor (in 2002 began to produce FPGAs), Actel, and its well-known readers of our site. microcontrollers ATMEL and many others. On the programmable logic, it is possible to implement a number of devices, to implement parallel calculations independent of each other in one device, however, for home projects, their purchase is often financially unjustified, but quite reasonable on a production scale, as an alternative to custom integrated circuits.

P.S.Watch the video, in it you will see an example of the implementation of the Nintendo game console on the FPGA:

See also at bgv.electricianexp.com:

  • Functional Block Diagram Language (FBD) and its Application
  • Types of modern integrated circuits - types of logic, cases
  • Logic chips. Part 1.
  • PIC microcontrollers for beginners
  • Programmable Logic Controllers for Home Automation

  •