Beruflich Dokumente
Kultur Dokumente
com/print/51899
Technology Altera asic computer system cyclone-II fpga Design embedded system FPGA
FPGA dsp virtex-II fpga
This paper will explore a development package from Xilinx and one from Altera. A quick
introduction to the design tools included within each package will be presented and general
starting instructions will be given. Often, embedded systems are mass produced so cost is a
major concern. Usually there is no need for high performance hardware.
Processing speed or memory size can be sacrificed for cost. There are many new devices
that deliver a wide range of performance. For example, the Xilinx Virtex-II FPGA which has up
to 8 million system gates is extremely powerful and can be used in applications like DSP or
real time control. On the other hand an Altera Cyclone-II FPGA delivers 1000 logic elements
for just $0.64 and can be used for less demanding applications. Embedded systems are
usually light and small in size and due to their simpler architecture are safer and more
reliable. Also, since embedded systems are fully customized they are more efficient meaning
less electrical power is needed to perform their tasks. This also means that it is easier and
sometimes not even necessary to provide cooling to the system. From the business point of
view, a good solution is one that is developed quickly and inexpensively, as well it should be
upgradeable. In many cases the marketing department sells an idea before it’s even
developed. Fortunately, Xilinx and Altera have created software tools and hardware devices
that drastically reduce the time to market as well as the design costs. With these tools, one
can quickly design a processor, add peripheral cores, interconnect them using a bus, debug
the whole system and finally implement it on hardware. Some argue that CAD programs can
produce inefficient and unnecessarily large code. This may be true for basic applications,
however when it comes to larger and more complicated designs even a superior engineer is
incapable of dealing with all the complexities. Therefore using software like the Altera
Quartus-II or Xilinx EDK and Platform Studio, designs can be developed with little time and
effort at minimal non-recurring engineering costs. Typically embedded systems are used to
implement signal processing algorithms or control laws and therefore are perfect for
applications such as automotive, consumer electronics, test equipment, or real-time control
systems. It is very common that these systems are implemented or at least developed on
FPGA’s and soft processors. For any multimedia applications, Xilinx has come up with a
great development package that can be purchased for $1400.
It includes a fully loaded development board, ISE (evaluation version) and EDK development
software, Power Supply, Ethernet Cables (Straight & Cross over), RS 232 Cable, Xilinx
Parallel-4 Cable, SVGA Cable, and Compact Flash. It also comes with excellent
documentation, user guides and design examples. The board itself is equipped with a
Virtex-II XCV2000-FF896 FPGA, SVGA output, onboard network connection ,10/100
Ethernet, with a unique MAC address assigned to each board, RS232 port, button cell battery
to support FPGA configuration data encryption, embedded SystemACE controller for
high-speed FPGA configuration, keyboard and mouse, integrated power supplies, audio
CODEC compliant with AC97 and stereo amplifier with 18-bit sigma-delta A/Ds and D/As,
speaker output with adjustable volume, headphone and microphone, 10 pushbuttons as user
inputs to the board, and two DIP switches with two LEDs for visual feedback. It supports a
single channel of real time PAL or NTSC video output composite S-Video (Y/C) format and
RGB simultaneously, and a single channel of real time PAL or NTSC video input in either
composite or S-video (Y/C) format, as well five independent banks of 512K x 36bit 130MHz
ZBT RAM with byte write capability. The board can also act as the processing engine for the
Xilinx MicroBlaze 32-bit soft processor which can run at 150 MHz and delivers 102 D-MIPS.
After acquiring this development package a great first step would be to run through the EDK
MicroBlaze tutorial which can be accessed from the Help menu under EDK Examples in Xilinx
Platform Studio (XPS). This tutorial runs through the process of how to use the base system
builder wizard to create MHS files which define the systems hardware specification, create
NGC files that represent the processor system, implement the design and add the software,
compile the code, download it to the board, debug the design, and finally how to simulate it.
Also, there is a great online demo which demonstrates how to build a simple webserver
application. This demo is available at the demos on demand web site.
Lastly, you can find great multimedia examples on the Xilinx web site located at Xilinx By
now, one should be familiar with the basic concepts of EDK and how it is structured. Next, an
important skill in embedded system design is to know how to add more complex peripherals
that may use interrupts. Moreover, even though EDK comes with a huge peripherals library
most embedded designs will need a custom peripheral. Therefore it is important to know the
process of adding and interfacing user designed peripheral to a system. In order for XPS to
recognize a user defined core it has to be properly structured, a “pcores” directory needs to
be present in the root directory of the system. Within the “pcores” directory, a “data”
subdirectory has to contain the Peripheral Analyze Order (PAO) file and the Microprocessor
Peripheral Definition (MPD) file. In some cases it may also contain a Black Box Definition
(BBD) file. The PAO file contains a list of HDL files that are needed for synthesis and it
defines their order to resolve component architectures. The MPD file defines the interface of
the peripheral, which includes properties such as connectivity for bus interfaces. Finally, if
your peripheral uses a black box design, the BBD file manages the locations of optimized
hardware netlists for the black box. The “pcores” directory also needs to include a “HDL”
subdirectory, this is where the peripheral’s user logic is located. The logic can be defined in
either Verilog or VHDL. If this structure is followed, the core should now be visible in the
Add/Edit Hardware Platform Specifications window under the peripherals tab. The window
can be accessed from the Project menu under Add/Edit Cores. There are two ways to
approach the construction of all the necessary files for a custom core, using a reference
design or the Create and Import Peripheral Wizard. Xilinx provides user core reference
designs, which can be used as templates. The reference designs can be found in the “hw”
subdirectory at the location where EDK was installed. Each design has its own
documentation, so it is easy to find a design that best matches the required features and
services of the custom core. All one needs to do is fill in the template with user defined code
and copy it into the “pcores” directory of the system. The only precaution is with the naming of
the new core and its files, it is essential that the version names are consistent with the names
defined in the MHS file. If this is not true, errors like missing MPD will appear when trying to
compile the system. By using the wizard, one can create their own peripheral template
without searching through the reference designs.
The wizard can be run either before or after a project is started. If the project is not started,
the wizard can be accessed from XPS or even directly from the window start menu. In XPS it
is located under the file menu. If the project already exists, the wizard is invoked from the
tools menu under Import Peripheral Wizard. The wizard is quite easy to follow and well
documented, step by step instructions are also found in the embedded systems tools guide
which is included in EDK. This wizard helps optimize a system by allowing the user defined
peripheral to have exactly the required configuration without any extra properties. Some of
the software and hardware development tools that are included in the EDK package are a
C/C++ compiler for MicroBlaze and PowerPC, Xilinx Microprocessor Debug engine for
MicroBlaze and PowerPC, Graphical memory map manager, Platform Debug' support via
integrated software (GNU GDB), and hardware debuggers (ChipScope Pro). Once the
processor system is created and application software written for the system, users can debug
their system using any of the tools mentioned or simulate the system using Platform Studio’s
simulation options. There are two main design types, structural design and behavioral design.
Behavioral design has a much higher level of abstraction but both designs end up generating
a netlist description of connections and gate structures. XPS supplies simulation opportunities
for both types of designs. HDL is the preferred design language and the most popular
languages are Verilog and VHDL (take a look VHDL (I) or VHDL (II)), both are supported.
Once the system is debugged and simulated one can download it to the FPGA. There is a
parallel cable included in the EDK package, and it can be used to connect to the board. To
start the download, go to the tools menu in XPS and selecting download. The program will
automatically connect to the board and download all necessary files. Once this is done one
can use any of the tools to run and debug the system, however the most powerful tool is
XMD. It can be accessed from the tools menu in XPS. Once this tool is selected one can
write to memory, check specific register values, and perform other important debugging
actions. The way you connect to the system is by typing “mbconnect stub” in XMD. For a
detailed list of available commands type “help”, from this list one should get an idea of what
XMD can do. Altera also came up with an excellent development package that is comparable
to the Xilinx development kit.
Trademarks