Silicon Chip – April 2019

(Ben Green) #1

32 Silicon chip Australia’s electronics magazine siliconchip.com.au


F


or a long time, FPGA program-
ming and development has been
difficult, especially for the hob-
byist who doesn’t have access to the
often expensive tools that are needed.
On top of this, understanding the lan-
guage that is used to describe a design
can be a challenge, as is getting one’s
head around the ways FPGAs work dif-
ferently to microcontrollers.
The iCEstick development board
from Lattice Semiconductor (a major
FPGA IC manufacturer) is a compact
unit which plugs into a USB port.
Thus the board and programming
hardware are one and the same, re-
quiring only the extra components for
a particular application to be added on.
Even this is not always necessary, as
the board sports five LEDs which can
be controlled by I/O pins, plus an on-
board infrared transceiver.
The code for the iCEstick can be gen-
erated using Lattice iCEcube develop-
ment software, available with a free


licence. The Diamond programmer
software is then used to program the
iCEstick with the resulting file.
We also tried an open-source alterna-
tive called IceStudio. It has a graphical
interface, allowing logic blocks to be
dragged and dropped, then connected
by virtual wires to create a represen-
tation of the circuit to be synthesised.
It is a complete IDE, allowing design,
building and uploading to occur.
For users who are comfortable with
how logic gates and other basic ele-
ments like flip-flops work, this is an
ideal way to bridge the gap of under-
standing between having an idea in
one’s mind and turning it into a func-
tioning circuit.
IceStudio also allows ‘code blocks’
containing Verilog code to be created,
so those who are familiar with Verilog
are not limited by the included graphi-
cal symbols.
Verilog is a bit like the C language,
as used to program Arduinos, but is de-

signed to produce logic block structures
rather than machine code.

What is an FPGA?
While we briefly touched on FPGAs
in our recent review of the Ardui-
no MKR Vidor 4000 (March 2019;
siliconchip.com.au/Article/11448),
here is a brief overview.
As mentioned above, FPGA stands
for “field programmable gate array”,
and this means that it consists of logic
gates, flip-flops and other ‘glue’ logic
which can be reconfigured to perform
different functions.
While this is an over-simplification,
you can think of an FPGA as an IC con-
taining thousands of 4000B/74HC/74LS
chips connected via crossbars, in effect
allowing you to change how the inputs
and outputs of those devices are con-
nected, to form virtually any function.
And since they are all inside the same
chip, very high speeds are possible; up
to 500-1000MHz in some parts.

An easy way to program FPGAs


Field programmable


gate arrays (FPGAs)


are extremely powerful


but until recently,


programming them has


been an arcane*art.


Now, thankfully, it has been made


much simpler and easier due


to the availability of beginner-friendly


development boards and free, open


source graphical programming


software. We explore what


you can do with the low-


cost and compact


iCEstick board, and


free IceStudio


software.



  • arcane:
    a “black art”,
    details of which
    are known only to
    very few


iCEstickiCEstick


Tim Blythman


introduces the

Free download pdf