Sei sulla pagina 1di 5

FPGAs versus Microcontrollers as Design Platforms in African Colleges

Tinashe Chamunorwa Bsc phy(hons) Zim, Msc elec, China

“Simple tools are for simple tasks” unknown

Abstract

Microcontrollers have been the usual electronics design platform for undergraduates
in many African colleges. My colleagues (from Ethiopia, Sudan, Tanzania and
Morocco) and I from Zimbabwe had a chance to use different design platforms in
China namely:
• Microcontroller (MCU)
• Digital Signal Processor (DSP)
• Field Programmable Gate Arrays (FPGA)
• Complex Programmable Logic Arrays (CPLD) 1
I took particular interest in FPGA and which I believe can help an African student
grow in electronics knowledge. One point to stress before I continue, as long as we
stay with simple electronic designs then the microcontroller remains our platform but
if we are to rise to today electronic design complexity then FPGA comes into play

Introduction

To start with a question ,if one is to build a system X using a microcontroller or


FPGA which way should they go and why? Well there are many factors which affect
the decision but the bottom line is knowing FPGAs will no doubt increase one’s
design capabilities

Background theory

Field programmable gate arrays (FPGAs) are digital integrated circuits that contain
configurable (programmable) blocks of logic along with configurable interconnects
between these blocks. Design engineers can configure (program) such devices to
perform tremendous variety of tasks. Depending on the way in which they are
implemented some FPGAs may only be programmed a single time, while others may
be reproduced over and over again. The “field programmable” portion of the FPGA’s
name refers to the fact that its programming takes place “in the field” (as opposed to
devices whose internal functionality is hardwired by the manufacturer) this simply
means an FPGA is configured in the lab. 3
In onother way it is a semiconductor device containing programmable logic
components and programmable interconnects. The programmable logic components
can be programmed to duplicate the functionality of basic logic gates such as AND,
OR, XOR, NOT or more complex combinatorial functions such as decoders or simple
math functions. In most FPGAs, these programmable logic components also include
memory elements, which may be simple flip-flops or complete blocks of memory.
A hierarchy of programmable interconnects allows the logic blocks of an FPGA
to be interconnected as needed by the system designer. These logic blocks and
interconnects can be programmed after the manufacturing process by the
customer so that the FPGA can perform whatever logical function that is needed

Below is a general block of an FPGA although different architectures differs with


different manufacturers

For completeness sake I will briefly define the microcontrollers


A microcontroller (sometimes abbreviated µC, uC or MCU) is a small computer on
a single integrated containing a processor core, memory, and programmable output
peripherals. There are based on a CPU architecture (executes a set of instructions in a
sequential manner). Microcontrollers have on-chip peripherals that also execute in
parallel with their CPU. But they are still much less configurable than FPGAs.

A general diagram of a microcontroller is shown below.


Methodology

In our experiment to investigate the functionality of these two devices, we


constructed two circuits. One for FPGA and one for microcontroller . These circuits
were almost similar except for the devices themselves.

This experiment was divided into two parts: MCU and FPGA and each part was divided
into two sections

i) soldering and diagnosis


ii) Programming and debugging

The MCU control system was soldered on a circuit board and it has various parts which
are:
The 89s52 microcontroller: A 40 pin integrated circuit which is the central part of the
circuit which does all the control and the coded programs are downloaded into this part.

The display

The display constituted of 16 LEDs, six 7 –segment display chips and the SN74LS47
decoder/driver

Programming

The MCU unit was programmed and tested for various code programs and it worked
according to expectations. The programming was done on the Keil IDE. Keil provides a
broad range of development tools like ANSI C compiler, macro assemblers,
debuggers and simulators, linkers, IDE, library managers, real-time operating
systems and evaluation boards for 8051, 251, ARM, and XC16x/C16x/ST10 families.
C and assembly languages were used to describe a variety of circuits like lights display
and the programs worked according to the expectations

The FPGA unit

This control unit constituted the FPGA as the central controller, the display, pulse
generator, power switch, reset, oscillator and JTAG connector

Programming

The programming was done on quartus II development environment, a software tool


produced by Altera for analysis and synthesis of HDL designs, which enables the
developer to compile their designs, perform timing analysis, examine RTL diagrams,
simulate a design's reaction to different stimuli, and configure the target device with the
programmer. VHD (Very High Speed Integrated Circuit Hardware Description
Language.) Was used to describe the digital circuits and the written codes were
compiled and downloaded into the target hardware described above.
Several digital circuits like digital clock, decimal counter were tested on the circuit and
they all worked according to the expectations.

Results

The results obtained were qualitative .the following is what we observed :

Both the microcontroller and the FPGA almost worked efficiently with the small
programs like the LED display and simple counters (like decade counters)
When the complexity of the application the C codes for the microcontroller became to
large as compared to the VHDL codes for FPGA
Some projects a lot of inputs and outputs as they used busses instead of single ports,
which the FPGA could only provide because it had more pins than the microcontroller
With the FPGA we could use soft cores to implement some projects and this could not be
done in microcontroller

Conclusions

While microcontroller is ideal for small applications because that makes economy sense,
it cannot cope when the complexity of applications increase
When the frequency or the speed increase the microcontroller is found wanting
Microcontrollers already have their own circuitry and instruction set that the programmer
must follow in order to write code for that microcontroller which restricts it to certain
tasks, but very basic nature of FPGAs allows it to be more flexible than most
microcontrollers
While the difference between the FPGAs and microcontroller cannot be fully distingshed
for most projects. They should be used even for smaller projects to remove the ‘fear’
associated with using them, understanding the it’s application in simple projects helps to
know the complex ones.
It should be noted that a microcontroller soft core can be implemted in an FPGA .
In summary, FPGAs will never replace MCUs as they are needed at low cost for many
functions with modest speeds and computational load. But as the need for fast intense
computation grows even for consumer applications (like computer graphic cards,
biometrics signal processing, etc.) they do by parallelizing what MCUs cannot do by
increasing the clock frequency 4 .

Recommendations

With the FPGAs taking over from laboratory prototyping to industrial use they is no
better way to join the ‘tide’ than to introduce HDLs( hardware description languages)
and FPGAs short and long courses and particularly for HIT we would have scored a first
in Zimbabwe in line with the ultimate goal of Innovation!
References:

1. Comparing and Contrasting FPGA and Microprocessor System Design and


Development Karen Parnell, Roger Bryner, 2004
2. FPGA Technology Overview Carl Lebsack
3. The Design warriors Guide to FPGA design Clive “Max” Maxfield,2004
4. FPGAs. The alternative to microcontrollers? www.jcelectronica.com/articles

Potrebbero piacerti anche