New Horizons






<< April 2007 >>
Sun Mon Tue Wed Thu Fri Sat
01 02 03 04 05 06 07
08 09 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30


Table of content

New Horizons
What's new
Starting a blog
Writing a blog
I got a job

SystemC
SystemC from scratch. Part 1
SystemC from scratch. Part 2
SystemC from scratch. Part 3

ASIC/FPGA Design
Table of content
Index
FPGA design from scratch. Part 1
FPGA design from scratch. Part 2
FPGA design from scratch. Part 3
FPGA design from scratch. Part 4
FPGA design from scratch. Part 5
FPGA design from scratch. Part 6
FPGA design from scratch. Part 7
FPGA design from scratch. Part 8
FPGA design from scratch. Part 9
FPGA design from scratch. Part 10
FPGA design from scratch. Part 11
FPGA design from scratch. Part 12
FPGA design from scratch. Part 13
FPGA design from scratch. Part 14
FPGA design from scratch. Part 15
FPGA design from scratch. Part 16
FPGA design from scratch. Part 17
FPGA design from scratch. Part 18
FPGA design from scratch. Part 19
FPGA design from scratch. Part 20
FPGA design from scratch. Part 21
FPGA design from scratch. Part 22
FPGA design from scratch. Part 23
FPGA design from scratch. Part 24
FPGA design from scratch. Part 25
FPGA design from scratch. Part 26
FPGA design from scratch. Part 27
FPGA design from scratch. Part 28
FPGA design from scratch. Part 29
FPGA design from scratch. Part 30
FPGA design from scratch. Part 31
FPGA design from scratch. Part 32
FPGA design from scratch. Part 33
FPGA design from scratch. Part 34
FPGA design from scratch. Part 35
FPGA design from scratch. Part 36
FPGA design from scratch. Part 37
FPGA design from scratch. Part 38
FPGA design from scratch. Part 39
FPGA design from scratch. Part 40
FPGA design from scratch. Part 41
FPGA design from scratch. Part 42
FPGA design from scratch. Part 43
FPGA design from scratch. Part 44
FPGA design from scratch. Part 45
FPGA design from scratch. Part 46
FPGA design from scratch. Part 47
FPGA design from scratch. Part 48
FPGA design from scratch. Part 49
FPGA design from scratch. Part 50
Links
Acronyms and abbreviations
XCell Journals
CAD
A hardware designer's best friend
Zoo Design Platform
Linux
Installing Ubuntu Linux on a MacBook
Customizing Ubuntu Linux 1
Customizing Ubuntu Linux 2
Upgrading to Ubuntu 7.04
Install Ubuntu 7.04 with VMware
Making the virtual machine run faster
Ubuntu Links
A processor benchmark
Mac
Porting a Unix program to Mac OS X
Fixing a HyperTerminal in Mac OS X
A dream come true
Wireless freedom
Running
The New York City Marathon
Skiing/Skating
Kittelfjäll Lappland
Tour skating in Sweden and around the world
Top
Introduction
SSSK
Wild skating
Tour day
Safety equipment
A look at the equipment you need
Skate maintenance
Calendar
Links
Books, photos, films and videos
Weather forecasts
Travel
38000 feet above see level
A trip to Spain
Florida the sunshine state


Example Files
Verilog Testbench Body
Verilog Testcase
Verilog Setup
Simulation Result File
Simulation Report File




Photo Albums
Seaside Florida
Ronda Spain
Sevilla Spain
Cordoba Spain
Alhambra Spain
Kittelfjäll Lapland
Landsort Art Walk
Skating on thin ice


Favorites
Adventures in ASIC
ChipHit
Computer History Museum
Community of Sweden
DeepChip
Design & Reuse
Dilbert
EDA Cafe
EDA DesignLine
Embedded.com
EmbeddedRelated.com
FPGA Arcade
FPGA Blog
FPGA Central
FPGA Journal
FPGA World
MacApper
Mac geekery
Mac 2 Ubuntu
Get Perpendicular
Programmable Logic DesignLine
History of Linux
OpenCores
ORSoC
Simplehelp
SOCcentral
World of ASIC



New York City Marathon




If you want to be updated on this weblog Enter your email here:



rss feed



 
Apr 10, 2007
FPGA design from scratch. Part 16
IP creation overview

Any piece of IP you create must be compliant with the system that is in place. To ensure compliance, the following must occur:
  1. The interface required by your IP must be determined.
    The bus to which your custom peripheral will attach must be identified. For example:
    a. Processor Local Bus (PLB). The PLB provides a high-speed interface between the processor and high-performance peripherals.
    b. On-chip Peripheral Bus (OPB). The OPB allows processor access to low-speed, low-performance system resources.
  2. Functionality must be implemented and verified.
    Your custom functionality must be implemented and verified, with awareness that common functionality available from the EDK peripherals library can be reused. Your
    stand-alone core must be verified. Isolating the core ensures easier debug in the future.
  3. The IP must be imported to EDK.
    Your peripheral must be copied to an EDK-appropriate directory, and the Platform
    Specification Format (PSF) interface files (MPD and PAO) must be created, so other
    EDK tools can recognize your peripheral.
  4. Your peripheral must be added to the processor system created in XPS.
Create or import an user peripheral

One of the key advantages of building an embedded system in an FPGA is the ability to include customer IP and interface that IP to the processor. To start the Create and Import Peripheral Wizard select Hardware->Create or Import Peripheral.



Click the More Info button for more information. We will import an existing peripheral.






We will call our peripheral ETC (the name of the top module) and add a version to the name.




The peripheral is made up of Verilog files (.v).



We will use the ISE project file to define the Verilog source code.



Here are all the verilog source files.



The ETC peripheral will operate as an OPB slave (SOPB) and the OPB interface is already designed and verified. The
On-chip Peripheral Bus (OPB) is an IBM standard and is also used in the Power PC processor.




The wizard tries to map the ETC interface names to the standard naming convention for OPB. All the names that don't match have to be manually inserted.




It seems like we are missing some of the optional OPB signals. I have to add these signals to the top module
ETC.vI will add the missing pins and also some parameter statements defining register and memory address ranges. Like this:

parameter REGISTER_BASE_ADDR    = 32'h2000;
parameter REGISTER_HIGH_ADDR    = 32'h200c;
parameter MEM_BANK0_BASE_ADDR   = 32'h0;
parameter MEM_BANK0_HIGH_ADDR   = 32'hffc;
parameter MEM_BANK1_BASE_ADDR   = 32'h1000;
parameter MEM_BANK1_HIGH_ADDR   = 32'h1ffc;


In this window we have to select the right parameters defining the address range for registers and memory banks.




Here we define the interrupt signal and the operation of the interrupt.




Congratulations! We have added our peripheral to the current XPS project. Good work.





Here are all files in the pcores directory.



File description

XPS provides an interactive development environment that allows you to specify all aspects of your hardware platform. XPS maintains your hardware platform description in a high-level form, known as the Microprocessor Hardware Specification (MHS) file. The MHS, an editable text file, is the principal source file representing the hardware component of your embedded system. XPS synthesizes the MHS source file into Hardware Description Language (HDL) netlists ready for FPGA place and route.

The MHS File

The MHS file is integral to your design process. It contains all peripherals along with their parameters. The MHS file defines the configuration of the embedded processor system and includes information on the bus architecture, peripherals, processor, connectivity, and address space. For more detailed information on the MHS file, refer to the "Microprocessor Hardware Specification (MHS)" chapter of the Platform Specification Format Reference Manual, available at
http://www.xilinx.com/ise/embedded/edk_docs.htm.

XPS Project Files

Here are more information about the
XPS project files used.

Xilinx IP center

There are many IP blocks available from Xilinx. Find out more in the
Xilinx IP center.


Top  Next  Previous


Posted at 10:02 pm by svenand
Comment (1)  

 
Apr 9, 2007
FPGA design from scratch. Part 15
EDK is a suite of tools and IP that enables you to design a complete embedded processor system for implementation in a Xilinx FPGA device. To run EDK, ISE must be installed as well. Think of it as an umbrella covering all things related to embedded processor systems and their design.

Xilinx Platform Studio (XPS)

XPS is the development environment or GUI used for designing the hardware portion of your embedded processor system.

Software Development Kit (SDK)

Platform Studio SDK is an integrated development environment, complimentary to XPS, that is used for C/C++ embedded software application creation and verification. SDK is built on the Eclipse™ open-source framework. Because many other software development tools are being built on the Eclipse infrastructure, this software development tool might already be familiar to you or members of your design team.

EDK includes other elements such as:
•    Hardware IP for the Xilinx embedded processors
•    Drivers and libraries for embedded software development
•    GNU Compiler and debugger for C/C++ software development targeting the MicroBlaze™ and PowerPC™ processors
•    Documentation
•    Sample projects

The utilities provided with EDK are designed to assist in all phases of the embedded design process.



                                                                                                                                        
(Courtesy of Xilinx)
Using Xilinx Platform Studio

This is going to be fun. Let's start xps. We will use the
EDK 9.1 MicroBlaze Tutorial in Virtex-4 and the EDK 9.1i Concepts, Tools and Techniques Guide (CTTG) as we go along.

For more documents go to the
Xilinx Platform Studio Documentation.

XPS Design checklist

This page
provides a summary of all necessary steps and commonly used optional steps to complete an embedded processor system design.

==> cd $ETC_PROJECT
==> xps&
[1] 4463
==>
Xilinx Platform Studio
Xilinx EDK 9.1 Build EDK_J.19
Copyright (c) 1995-2007 Xilinx, Inc.  All rights reserved.

Launching XPS GUI...
Overriding Xilinx file <mdtgui/images/xps-splash-screen.bmp> with local file
</home/svenand/cad/edk91i/data/mdtgui/images/xps-splash-screen.bmp>




We will create a new project using the Base System Builder wizard (see chapter 2 in CTTG).



First we have to create a new top-level project file (ETC_system.xmp). A Xilinx Microprocessor Project (XMP) file is the top-level file description of the embedded system under development. All XPS project information is saved in the XMP file, including the location of the Microprocessor Hardware Specification (MHS) and Microprocessor  Software Specification (MSS) files. The MHS and MSS files are described in detail later.




When I click the OK button I get the following error message:

ERROR:PersonalityModule:7 - Unable to open Xilinx data file for Vendor/Device
   Module "qrvirtex2".  Please make sure that it has been correctly installed
   before continuing.


I just realized there is a service pack 1 available for EDK 9.1i. I will download this sevice pack and see if it fixes the problem. The service pack fixed the problem. Sorry to bother you Xilinx.



We would like to create a new design for the ML403 evaluation board.



We will use the MicroBlaze soft processor.



We will use the 100MHz system clock available on the board, an active low reset signal and we will have an on-chip debug module. We don't need memory caches and a floating point unit.



In the next four pages we will select the peripherals to use:



We will change the baudrate to 57600 at a later stage.









The UART will be used for the serial communication between the board and the terminal.



Here are more information about available IO devices:

 IO Device
 Xilinx Name
 Description
RS232 UART UARTLITE opb_uartlite.pdf
IIC EEPROM IIC_EEPROM xapp979.pdf
CompactFlash SysACE_CompactFlash opb_sysace.pdf
USB Cypress_USB xapp925.pdf
DDR SDRAM DDR_SDRAM_64Mx32 DDR/DDR2 SDRAM
Ethernet MACEthernet_MAC
ug074.pdf
SRAMSRAM_256Kx32
Memory corner
Flash memoryFLASH_2Mx32






When we click the Generate button, we will start the generation of our embedded system.




We have now put together our embedded system. We can always go back and add or remove IO interfaces at a later stage. Here is the file tree generated from XPS.



  • blkdiagram - contains the blockdiagram of our system that can be displayed in a web browser (ETC_system.html).
  • data - contains the UCF (user constraints file) for the target board
  • etc - contains system settings for JTAG configuration on the board that is used when downloading the bit file and the default parameters that are passed to the ISE tools
  • pcores - is empty right now, but is utilized for custom peripherals
  • TestApp_Memory - contains a user application in C code source, for testing the memory in the system

Look at project options

Select Project->Project Options to display the current project setup.



Generate a design report file


To generate a design report file select Project->Generate and view design report. The design report will be stored in the report directory and can be viewed in a web browser (ETC_system.html).


Now it's time to add our own IP block, the Embedded Test Controller (ETC). That is the subject of the next part.


Top  Next  Previous


Posted at 08:59 am by svenand
Comments (3)  

 
Mar 26, 2007
FPGA design from scratch. Part 14
Putting it all together

Here is a simple overview of the simulation setup we are going to use when verifying the operation of the full system.




Memory Architecture

MicroBlaze is implemented with a Harvard memory architecture, i.e. instruction and data accesses are done in separate address spaces. Each address space has a 32 bit range (i.e. handles up to 4 gigabytes of instructions and data memory respectively). The instruction and data memory ranges can be made to overlap by mapping them both to the same physical memory. The latter is useful for software debugging. Both instruction and data interfaces of MicroBlaze are 32 bit wide and use big endian, bit-reversed format. MicroBlaze supports word, halfword, and byte accesses to data memory.

MicroBlaze does not separate data accesses to I/O and memory (i.e. it uses memory mapped I/O). The processor has up to three interfaces for memory accesses: Local Memory Bus (LMB), On-Chip Peripheral Bus (OPB), and Xilinx CacheLink (XCL). The LMB memory address range must not overlap with OPB or XCL ranges.

In our simulation setup we will use two memory modules, one for storing the control program (instruction memory) and one for storing data (ETC test program and test result). The Embedded Test Controller will be connected to the DOPB bus using a reserved address space.

We need help

We have to figure out how to connect everything and we need help. We will take a look at the Xilinix
tutorial web page to see if we can find some help there. EDK 9.1 MicroBlaze Tutorial Virtex-4 seems like a good start. This tutorial demonstrates the process of creating and testing a MicroBlaze system design using the Embedded Development Kit (EDK). The tutorial contains these sections:
  • System Requirements
  • MicroBlaze System Description
  • Tutorial Steps
The tutorial illustrates an Windows XP setup but we will use Ubuntu Linux.

Xilinx Platform Studio

The Xilinx Platform Studio (XPS) integrated development environment contains a wide variety of embedded tools, IP, libraries, wizards, and design generators to quickly facilitate the creation of a custom embedded platform. Sounds good, let's try it.

==> xps
$XILINX does not point to an iSE 8.1 installation

Press enter to close.

Software upgrade

Here is the answer to the question I asked in part 1. It is not possible to run different versions of ISE and EDK. After talking to Xilinx I decided to upgrade to ISE WebPACK 9.1i. Now we will find out how easy an upgrade is. First we will visit the 
Xilinx Download Center to download ISE WebPACK 9.1i. You will be asked for a Product ID and you must use the one specified. I was confused and changed it to the Product ID for my old ISE 8.1i WebPACK DVD and I was not able to download anything. To download ISE WebPACK 9.1i follow the instructions here. When I started the installation I got the following error message: Archive could not be located

Here is the answer from Xilinx's
Answer Database #23669:

This message is normally seen when WebInstall cannot connect to the Xilinx Web site. Please verify that your proxy settings are correct. If you have chosen to use IE proxy settings on Windows, try setting the proxy address and port manually in the WebInstaller instead.
Additionally, you can work around the issue by:
- Downloading the Single File Download version of WebPACK.
or
- Ordering a WebPACK DVD for a nominal fee.

It was not as easy as we thought. Let's try the single file download instead (1.4GB). Two hours later the file WebPACK_SFD_91i.zip is downloaded.
  1. Create a temporary directory: mkdir temp
  2. cd temp
  3. unzip WebPACK_SFD_91i.zip
  4. Become root : sudo -i
  5. ./setup to start installation



We will install ISE 9.1i in a new directory (xilinx91i) and leave the old ISE 8.2 installation until we know that the new one works.



When the installation has finished we can remove the temp directory and the WebPACK_SFD_91.i.zip file. Before we when can start ISE 9.1 we have to change to the new setting.sh file in our .bashrc startup script. Now we are ready to start ISE.

==> cd /home/svenand/root/projects/ETC
==> ise &



There is no turning back. Let's click the yes button.

Downloading the latest Service Pack.

When we thought we were finished it is time to download the latest Service Pack. We have to visit the Xilinx
Download Center again and download the file 9_1_03i_lin.zip (468MB).

One hour later the file 9_1_03i_lin.zip is downloaded.
  1. Create a temporary directory: mkdir temp
  2. cd temp
  3. unzip 9_1_03i_lin.zip
  4. Become root : sudo -i
  5. ./setup to start installation of Service Pack 3



The installation takes time. Be patient.




When the installation is finished we start ISE and see the following startup window. We have the latest version of ISE installed. It took us half a day to fix.




Upgrading from EDK 8.1 to EDK 9.1i

Here is the last part of our upgrading odyssey. Let's first find out
what's new in EDK 9.1i. It looks like a lot of good stuff, especially the new version (v6.0) of MicroBlaze is interesting to us. The only problem is that I can't find a place to download EDK v9.1i. I have looked all over Xilinx's web page but nowhere I can find a download page for EDK 9.1i. Read more.

When I can't find EDK 9.1i I will try to download EDK 8.2 instead. When I click the EDK 8.2 download link I am transfered to the
Electronic Fulfillment page. Here is what the electronic fulfillment is all about:

Electronic Fulfillment is an online software delivery service provided by Xilinx to in-maintenance ISE™ and EDK design tool customers. Xilinx Electronic Fulfillment provides you with:
  • Email notifications and online access to software.
  • Personalized download site for in-warranty customers.
  • 24x7 access with four secure file transfer options.
  • Immediate access to your software and registration ID.

Electronic Fulfillment is a service provided to in-maintenance customers only; new customers are not eligible. Electronic Fulfillment does not replace regular product update shipments, which will still be mailed to all in-warranty customers. When I proceed to the Electronic Fulfillment Download Center I get the following message:

We encountered a problem with your request. Our system records indicate you are not entitled to access the Xilinx Download at this time.

This is a case for Xilinx WebCase. Before we can start using WebCase we have to register and get an approval from Xilinx. One working day later I get an email telling me I can start using WebCase. Here are the questions I am going to send to Xilinx:

1. I bought a PowerPC and MicroBlaze development kit DO-ML403-EDK-ISE-USB-EC from Avnet including the software ISE WebPACK and EDK 8.1. Shouldn't I be entitled to a one year in-maintenance for this product.

2. Are all software updates distributed on DVD. Why haven't I received the EDK 8.2 DVD.

3. When will EDK 9.1i be available from the download center.

4. How can I extend the in-maintenance period after one year.

I am sitting here waiting for an answer. I can't continue my design. I can't use IES 9.1 together with EDK 8.1 and I can't download a newer version of EDK. I am stuck.

All of a sudden (on Good Friday) I received the following email from Xilinx:

Dear Valued Customer,

Thank you for choosing the Xilinx Embedded Development Kit (EDK) as your embedded hardware and software development solution for Virtex(tm)-5, Virtex-4, Virtex-II Pro and Spartan(tm) Series PowerPC(tm) and MicroBlaze(tm) processing systems. Your Xilinx EDK 9.1i software is now available for download!*

The Xilinx EDK software is built from much the same core technology as the industry's favorite FPGA design environment, Xilinx ISE(tm). The graphical user interface for EDK, DesignVision Award winning Xilinx Platform Studio(tm)(XPS), is the technology that integrates all the processes from design entry to debug and verification, helping you quickly get started with your embedded designs.

Please be aware that EDK 9.1i requires a valid installation of ISE 9.1i, including ISE Service Pack 1, to function properly.

You can navigate to your XEF site through the Software Download Center at the following link:

http://www.xilinx.com/xlnx/xil_sw_updates_home.jsp

Thanks Shelly. Here we go again! Let's start the download. This time nothing stops us.




We will download EDK 9.1i



One hour later the file EDK91.zip is downloaded.
  1. Create a temporary directory: mkdir temp
  2. cd temp
  3. unzip EDK91.zip
  4. Become root : sudo -i
  5. cd /home/svenand/temp/EDK
  6. ./setup to start installation of the Linux version of EDK 9.1i
  7. When finished source the file install_dir/setting.sh
After installing new software versions of ISE and EDK we have to compile all simulation libraries again. See part 13 Compiling everything for instructions.

We are now ready to start using EDK 9.1i and the Xilinx Platform Studio. Read part 15 to find out more.

Top  Next  Previous



Posted at 09:49 am by svenand
Make a comment  

 
Feb 11, 2007
Links to information about wild skating


Links to information in English
Links to information in Swedish
Ice

Tour arrangements (guided tours)

Wild skating clubs in Sweden
Wild skating around the world
Races
Links to equipment manufacturer
Links to outdoor equipment stores in Sweden
Equipment rentals in Stockholm
Maps
Weather forecasts





Top


Posted at 03:43 pm by svenand
Make a comment  

 
Feb 10, 2007
Wild skating books, photos, films and videos
 
Jan 28, 2007
Porting a Unix program to Mac OS X
After the successful porting of all my Zoo Design Platform programs from Solaris Unix to Ubuntu Linux I am ready for a new challenge; porting some of my programs from Linux to Mac OS X. Mac OS X is my favorite OS and having my programs running in Mac OS X would be a great thing. Before we can run a Linux or Unix program in Mac OS X we have to make sure we have the X11 software installed.

X11 for Mac OS X

X11 for Mac OS X offers a complete
X Window System implementation for running X11-based applications on Mac OS X. The X11 program is part of the normal Mac OS X 10.5 installation and can be found in the /Application/Utilities directory. After starting the X11 program we can start the terminal program xterm from the Program menu.




From the xterm window it is now possible to run almost any X11 compliant program compiled for Max OS X.

Xcode development environment

To compile and link programs we have to install the
Xcode development environment. The Xcode package includes the GNU Compiler Collection (GCC) and other useful tools. You can download the Xcode package from Apple's developer web site. You must be an Apple Developer Connection member to download Xcode. Online membership is free. If you have another account at Apple, enter your existing username (Apple ID) and password in the ADC Member Log In area and complete your membership registration. Or sign up today for your ADC online membership. The latest version of Xcode is 3.1.3 and it requires Mac OS X 10.5 The package is almost 1GB so you better look for a high-speed connection. The package will be installed in the Developer folder in Macintosh HD.

Get the source code

I will start by copying the Cobra source code to my MacBook.

Cobra.info              Cobra_globals.h         Cobra_stubs.c           Make_linux
Cobra_define.h          Cobra_include.h         Cobra_tree.c            Make_macosx
Cobra_find_mac.c        Cobra_main.c            Cobra_ui.c              RunCobra
Cobra_function.c        Cobra_popup.c           Cobra_ui.h             

Header files

Header files serve two purposes.
  • System header files declare the interfaces to parts of the operating system. You include them in your program to supply the definitions and declarations you need to invoke system calls and libraries.
  • Your own header files contain declarations for interfaces between the source files of your program. Each time you have a group of related declarations and macro definitions all or most of which are needed in several different source files, it is a good idea to create a header file for them.
The header files for the xview, olgx and slingshot library functions must be included in the compilation. The xview header files can be downloaded from Physionet. The slingshot header files can be downloaded from this site.

This screen plot shows the /usr/openwin directory which is the default installation directory for the header files used in the SUN OS. This is where I put the header fils.



Makefile


I use a makefile (Make_macosx) to compile and build the program. The following command is used to run the makefile:  make -f
Make_macosx

Shared libraries

Cobra makes use of some shared libraries that are not part of the normal X11 installation. These libraries have to be compiled for Mac OS X. These libraries will be linked to the Cobra program when it is starting. The libraries can be downloaded from
here. They are included in the file cobra_9.9macosx.tar.gz.

 Library Name
 Description
 libxview.dylib  The XView toolkit
 libolgx.dylib  The OLGX toolkit (used by XView)
 libsspkg.dylib  The Slingshot toolkit

I add the following command in the startup script to tell the program where to find the shared libraries: export DYLD_LIBRARY_PATH=$INSTALL_DIR/libraries

Running Cobra

I compiled and linked the Cobra program and here it runs on my MacBook. I am happy as a child.



Download Cobra

You can download and try the Cobra program yourself. Here is the
download site.

Running X11 applications in Mac OS X

You can read more about configuring and running X11 applications in Mac OS X
here. xterm provides a significant advantage: when you start an xterm session, it sets up the X11 environment for you. You can then easily run X11 applications from the command-line. By contrast, in Terminal you need to run the /usr/bin/open-x11 script to set up the X11 environment and launch X11 applications, as shown here: /usr/bin/open-x11 ./cobra &

Launching Aqua apps from the Terminal window

One way to launch Aqua applications from the Terminal or xterm windows is the open command. To start Firefox use the following command:
open /Applications/firefox.app or
open -a /Application/firefox.app http://www.google.com


The Fink project

The
Fink project wants to bring the full world of Unix Open Source software to Darwin and Mac OS X. We modify Unix software so that it compiles and runs on Mac OS X ("port" it) and make it available for download as a coherent distribution. Fink uses Debian tools like dpkg and apt-get to provide powerful binary package management. You can choose whether you want to download precompiled binary packages or build everything from source. Here is a good description of how to run X11 on Darwin and Mac OS X.


Useful links
Top



Posted at 03:40 pm by svenand
Comment (1)  

 
Jan 22, 2007
FPGA design from scratch. Index
A
Assembly code and hex machine code
B
Bitstream generation
Bitstream, downloading

C
Cable drivers, installing
C application program, creating
C header files
C prgram examples
C-program, access ETC registers
Configurable Logic Block (CLB)

D
Design object
Digital Clock Manager (DCM)
DDR SDRAM, adding
Download program

E
EDK 8.1 to EDK 9.1 upgrading
Embedded Development Kit (EDK) installation
Embedded Test Controller (ETC), adding
Ethernet MAC

F
Field Programmable Gate Array (FPGA)
Floorplanner, Xilinx

G
Generating memory blocks
Gmake
GNU Compiler Tools (GCC)

H
Hardware setup
HDL Analysis and Lint (HAL)
Hello World, program
Hello World, finished

I
iMPACT, FPGA configuration tool
iMPACT, using
Implementing the hardware platform
Introduction
Integrated Software Environment (ISE)
IP center, Xilinx
IP, import or create

J
JTAG, IEEE 1149.1

K

L
Learning-by-doing
Let's get started
LCD display controller, adding
LCD driver, simulation
LCD driver, timing
Libgen
Logic cell

M
MicroBlaze soft processor
MicroBlaze program execution simulation
ML403 evaluation board
ML403 Reference Systems on the CD
Mongoose
Mongoose setup
Mongoose user buttons

N
Netlist generation (ETC)
NCSIM, cds.lib file
NCSIM, compiling ETC
NCSIM, elaboration
NCSIM, first simulation
NCSIM system simulation

O
On-chip Peripheral Bus (OPB), debugging

P
PACE, Pin Area Constraints Editor
Parallels Desktop
Pin assingment closure
Pin constraints, specifying
PlanAhead, Xilinx
Power calculations
PowerPC processor block
Program disassembly

Q

R
Register software
Regression testing
Running a program

S
Service pack, downloading
Simgen
Simulation, compiling everything
Simulation environment
Simulation debugging
Simulation debugging, MicroBlaze reset
Simulation, generate HDL files
Simulation libraries
Simulation process
Simulating the design
Software Development Kit (SDK), using
Software installation (ISE)
Software setup
Synthesis contraints, adding
Synthesizing the design
System simulations
System simualtion, DDR SDRAM controller
System simualtion, LED display and push buttons
System simualtion, Embedded Test Controller

T
Testbench design
Testbench body
Timing constraints (synthesis)
Timing constraints, implementation
Topi, Top Code Generator, using

U
Using ISE

V
Verilog testbench generation
Verilog testcase
Verilog task files
Virtex-4 FPGA family
VMware Fusion

W

X
XFlow
Xilinx Microprocessor Debugger (XMD)
Xilinx Platform Studio (XPS)
XPS, using
Xilinx software upgrade
XPower
XtremeDSP Slices

Y

Z

Top


Posted at 07:50 am by svenand
Make a comment  

 
Jan 21, 2007
Skiing in Kittelfjäll Lapland
It is January 17th and the winter has not come to Stockholm. I call my brother and ask him if he would like to come skiing with me. Where are we going he asks? Let's go to Kittelfjäll in Lapland. They have more than one meter of snow and they are famous for their off-pist skiing. I take the train to Hudiksvall close to where my brother lives and from his house we take the car. A 520 km drive will take us to Kittelfjäll in southern Lapland (latitude 65.25, longitude 15.50). We have booked a room at hotel Granen (The Spruce) only 3 km from the lift station. We start our trip at 9:30 in the morning and 7 hours later we arrive in Kittelfjäll after a long drive through a wintry Sweden. If you don't want to drive you can take the night bus from Stockholm to Kittelfjäll. You can also fly with Skyways from Stockholm Arlanda to Vilhelmina where you can rent a car and drive the last 140 km to Kittelfjäll or take the transfer bus.

Kittelfjäll is an off-pist paradise. There are only a few prepared slopes, everything else is left for off-pist skiing. The
heli-skiing is one of the best in Sweden and it is cheap. We missed the heli-skiing this time, it starts first week of February.
But there are a lot of other things you can discover in this wide off-pist ski area. You can ski almost everywhere in the woods, down in the ravines Storgrova and Konsumravinen and if you like you can join a guided tour up to one of the nearby mountain tops. When we were here it had snowed for a couple of days and we found unspoiled snow everywhere. We had a lot of fun.




Here are some more
photos from Kittelfjäll.




Read more about Kittelfjäll in
Skidguiden and Ĺka Skidor (in Swedish).


Posted at 09:43 pm by svenand
Comment (1)  

 
Dec 28, 2006
FPGA design from scratch. Table of content
Part 1

Introduction
Ordering the MicroBlaze development kit
Installing the Integrated Software Environment (ISE)
Running a board demo test

Part 2

Design object description

Part 3

Setting up the ISE design software
Running the
ISE design software

Part 4

Adding Verilog source code
Generating memories using Coregen
Synthesizing the design
Simulating the design (Introduction)


Part 5

Setting up the simulation environment using Mongoose

Part 6

The simulation process
Compiling macro libraries
Compiling the design
Compiling the testbench
Elaborating everything

Part 7

Testbench description

Part 8

Using HAL the HDL analysis and linting tool from Cadence

Part 9

Regression testing using Mongoose

Part 10

Synthesis using timing constraints (Introduction)

Part 11


The Field Programmable Gate Array (FPGA) description

Part 12

Adding synthesis constraints

Part 13

The MicroBlaze soft processor core
Compiling simulation libraries using compedklib


Part 14

Putting everything together
Installing ISE WebPack 9.1i
Installing EDK 9.1i


Part 15

Xilinx Platform Studio XPS
Software Development Kit SDK
Create a new project in XPS
Generate a design report file


Part 16

Create or import an user peripheral
The MHS file
XPS project files
Xilinx IP center


Part 17

Adding the ETC IP
Generate the system netlist using platgen
What happend during the netlist gener
ation
Generate simulation HDL files

Part 18

Putting together a system simulation environment
The simulation database
The cds.lib file
Compiling the ETC IP
Compiling the block RAM
Compiling Verilog wrappers
Compiling VHDL wrappers
Elaborating the design
Warning messages


Part 19

Generating a Verilog testbench

Part 20

Running our first simulation
Adding the DDR SDRAM
Suppressing assert messages in IEEE packages

Part 21

Debugging the simulation testbench
The reset logic

Part 22

Using the XPS software development kit (SDK)
Software development flow
GNU compiler collection (gcc)
Running SDK
Creating a new C appilcation project

Part 23

Simulating program execution in the MicroBlaze processor
Verification strategy
Verification flow
Writing a simple c program
Loading the program
Running an NCSIM simulation
Simulation result
Compile and build the program inside SDK
Generate assembly code and hex code
Make a NCSIM memory load file
Running a simulation


Part 24

System simulations
DDR SDRAM controller
LED displays and push buttons
OPB GPIO registers
Embedded test controller
Debugging the On-Chip Peripheral bus


Part 25

Implementing the hardware platform
User constraints file
Setting up our constraints file
Specify pin constraints
Specify timing constraints
The implementation directory
Start bitstrem generation
Bitstream generation flow
Scriptfile to run XFlow
Bitstream generation result
Configuration of the FPGA
Using the platform cable USB
ML403 evaluation board
ML403 block diagram
Installing cable drivers
Xilinx JTAG tools on Linux without proprietary kernel modules
Setting up the USB cable
iMPACT FPGA configuration tool
Starting iMPACT


Part 26

Using the iMPACT configuration tool
Boundary Scan and JTAG configuration
IEE standard 1149.1 (JTAG)
The identification register
Read IDCODE
Read the FPGA status register
Device configuration
Using Xilinx Platform Studio


Part 27

Pin assignment closure process
PACE Pin and Area Constraint Editor
Running PACE
Topi the Top Code Generator
Topi setup
Using Topi to modify the Xilinx user constraints file
Xilinx Floorplanner
Viewing pin placement
Xilinx PlanAhead


Part 28

Power calculations
XPower
Low power consumption


Part 29

Hardware setup
Software setup
Download and execute a simple program
Download the bitstream
Get program size
Running the program


Part 30

Running demonstration software applications
ML403 Reference Systemson the CD


Part 31

Adding a 16x2 character LCD display
Set address range
Connecting ports
The easy way to add a new block
Configure the IP block
The LCD driver
LCD display timing
8-bit write operation
Programming sequence
Display setup
More reading
Signal wiring on the ML403 board
Adding constraints
Generate netlist
Generate bitstream


Part 32

Writing the "Hello World" program
SDK platform settings
C program build
C header files
The GPIO API definitions
C program examples

Device configuartion in SDK

Part 33

Simulating the LCD driver
C program
Program execution (Waveform plot)
Generating the software libraries and BSPs
GNU compiler tools
Input files
Output files
Output from SDK build process
Display program size


Part 34

Program disassembly
MicroBlaze software reference guide
System memory layout
Reset sequence
ELF file content
Startup files
First stage initialization files
Second stage initialization files


Part 35

Generate simulation HDL files
Simgen
Data2MEM memory tool
ETC_system_sim.bmm
ETC_system_init.vhd
ETC_system_tb.vhd
Modifying the testbench file
Compiling the BRAM initialization file
Compiling the testbench
Simulating program execution

Part 36

The LCD driver (once more)
Editing the user constraints file
Generate new bitstream
Device configuration
Application program
Displaying "Hello World"

Part 37

Debugging our design
Xilinx microprocessor debugger and GNU software debugging tools
Xilinx microprocessor debugger (XMD)
MicroBlaze processor target
MicroBlaze MDM hardware setup
Debug session
Reading registers in MicroBlaze
Load program
Set breakpoint
Remove breakpoint
Display breakpoints
Start program execution
Single step
Stop program execution
Display program code
Getting help
Using XMD in Xilinx Platform Studio


Part 38

Writing software for our embedded system
Writing a software device driver
Software development overview
Device driver programmer guide
Platform specification format reference manual
Microprocessor Driver Definition (MDD)
Libraries and driver generation
Device driver architecture
xparameters.h
Software driver source code
Source code repository
Software device drivers used
SDK project directory
Header source files


Part 39

Fixing our software driver
etc_v2_1_0.tcl
etc_v2_1_0.mdd
Makefile
xetc_g.c
xetc.h
xetc_l.h
Writing an application program
Print statements
Printout from program
Generate HDL simulation files
Generating the BRAM initialization file
Running a simulation


Part 40

Debugging our hardware design
ChipScope Pro
Trying out ChipScope Pro
ChipScope installation


Part 41

Adding an interrupt controller
Finding an interrupt controller
OPB_INTC
Register map
Configuring the interrupt controller
Making connections
Software setup
xparameters.h
xintc_l.h
Generate a software interrupt
Generate a hardware interrupt
MicroBlaze interrupt handling
MicroBlaze interrupt timing

Part 42

Adding a timer
Connect the interrupt signal
OPB Timer/Counter
Register address map
Library generation
Application program
Simulation results


Part 43

Installing a Linux OS
Why using a Linux OS
Embedded Linux OS
µClinux
Finding a linux OS
Choosing a Linux OS
PetaLinux



Part 44

Adding an external memory controller
Generate addresses
Software platform settings
OPB External Memory Controller


Part 45

A computer cache
Enabling MicroBlaze caches
Specify cacheable memory segment
Instruction cache operation
Data cache operation
Xilinx cachelink XCL
Adding the MCH_OPB_DDR_SDRAM controller
Connect IXCL and DXCL
Connecting ports
ETC_system.mhs

Part 46

Installing and running the Linux OS
Disassembly of the Linux kernel
Download the Linux kernel



Top




Posted at 07:38 am by svenand
Comments (7)  

 
Dec 27, 2006
FPGA design from scratch. Part 1
I have been designing ASICs for more than 15 years. A few years ago I started to realize that there is another player in town and that is the FPGA circuit. With increasing NRE costs and with the long turn-around times, ASIC designs have become high-risk projects. At the same time FPGAs are getting bigger and faster and many companies have therefore decided to only use FPGAs. I also realized that I have to learn how to design using FPGAs, if I were to get any consulting jobs, especially here in Sweden. This is my story of how I hopefully will learn to use FPGAs in my future designs.

Learning-by-doing

John Dewey (1859-1952) was an American philosopher and educator whose writings and teachings have had profound influences on education in the United States. Dewey's philosophy of education, instrumentalism (also called pragmatism), focused on learning-by-doing rather than rote learning and dogmatic instruction, the current practice of his day.
For Dewey, it was vitally important that education should not be the teaching of mere dead fact, but that the skills and knowledge which students learned be integrated fully into their lives as persons, citizens and human beings. Let's practice learning-by-doing.

An interactive meeting place

I have decided to document the learning process in this blog, successes and setbacks. Hopefully it will help the next person to avoid a few pitfalls. A would like the blog to be interactive and not a one-way document. I invite all of you,
newbies to professionals to ask questions, make comments and suggestions for subjects you are missing.

Let's get started

The first thing I did was to order a
PowerPC and MicroBlaze  development kit DO-ML403-EDK-ISE-USB-EC from Xilinx. The kit includes:
  • ML403 Development Platform including the Virtex-4 FX12 FPGA
  • Xilinx Embedded Development Kit including Platform Studio Embedded Tool Suite
  • Xilinx ISE WebPack FPGA Design Software
  • Development Kit Reference CD
  • Programming (JTAG) and serial cables.


I ordered the kit from
Silica
and two days later the guy from UPS knocked on my door and delivered a big package. Christmas comes early this year, bad the present wasn't from Santa Claus. I had to shell out 10K SEK.
In the kit there is also a 25 pages long document with the descriptive title "Getting Started with PowerPC and MicroBlaze Development Kit - Virtex-4 FX 12 Edition". The document reads: The best way to get started with the development kit is by inserting the Embedded Development Kit Reference CD located in box 1 of your kit. Let's do that, but wait. In the next sentence it says "The reference system included in this kit require the use of a computer installed with the following software:
  • Integrated Software Environment (ISE) 8.1i, including Service Pack 2
  • Xilinx Embedded Development Kit (EDK) 8.1i, including Service Pack 2
Register the software

To begin using the development kit resources, Xilinx Platform Studio (XPS) and Integrated Software Envionment (ISE) we must first obtain installation keys. To do this we find the Product ID stickers on the back of respective software package and navigate to the
URL indicated.After we registered both software packages installation keys will be sent to our email address. We are now ready to install the software. To get the latest software versions we will download the software from the Xilinx download page.

Installation

OK. Let's start by installing the required software. The installation is described in the "Quick Start Information" starting on page 10.

To install a Linux version of ISE from the Xilinx web page follow these steps:
  1. Open your web browser and goto the Xilinx download page.
  2. Look under Design Tools and find ISE WebPack. Click Download.
  3. If your a new to Xilinx you have to create an account. If you have an account you can just login.
  4. Answer the ISE WebPACK survey and click next.
  5. In the Xilinx Software Solutions Access Granted page, click Download ISE WebPACK.
  6. On the next page select Red Hat Enterprise 3 and 4 WS (32-bit) Webinstall (15MB).
  7. Start downloading the file WebPACK_82i_Webinstall.sh
  8. When the download has finished open a terminal and move the file to your home directory (or any other directory you prefer).
  9. Change the file permissions to make the script executable. <chmod 755 WebPACK_82i_Webinstall.sh>
  10. Make sure you are logged in as root. In Ubuntu Linux root login is disabled. Use the command <sudo -i> to become root. Important !!.
  11. Run the script ./WebPACK_82i_Webinstall.sh
  12. Accept the license agrements and specify the installation directory.
  13. The final download will start.
  14. When the installation has finished, the installation program has created an environment variable setup file (settings.csh and settings.sh) in the installation directory.
  15. Go to the installation directory and type <source settings.csh> for csh and tcsh shells and <source settings.sh> for bash and sh shells. This file should be included in your .cshrc or .bashrc file and run every time you start a new shell.
  16. Type ise & to start the program (install_dir/bin/lin/ise).

ISE WebPACK is a downloadable solution for FPGA and CPLD design, offering HDL synthesis and simulation, implementation, device fitting, and JTAG programming. ISE WebPACK 8.2i provides the tools and features along with the same design environment as ISE Foundation design tools, providing instant access to the ISE features and functionality at no cost.

The Embedded Development Kit (EDK) bundle is an integrated software solution for designing embedded processing systems. This pre-configured kit includes the Platform Studio tool suite as well as all the documentation and IP that we require for designing Xilinx Platform FPGAs with embedded PowerPC hard processor cores and/or MicroBlaze soft processor cores.

Question 1. Can you mix different versions of ISE and EDK. I have already installed ISE 8.2i. Can I use it together with EDK 8.1i.

Answer 1. No you can not mix different versions of ISE and EDK. I found out the hard way.

Question 2. I will start installing the Windows versions of all programs but I would prefer to run everything in a Linux environment. Is it possible to do that and which Linux distributions are supported. I have Ubuntu Linux installed.

Answer 2. Yes you can use Ubuntu Linux. I am using Ubuntu 7.04 right now and so far everything works like a dream.

The software installation is now finished. The service packs have been added. Now I am ready to for the board setup as described on pages 12-14.
Here comes the first setback. The document says "Connect a null modem serial cable between your PC and the ML403 board". How can you do that when your PC (laptop) doesn't have a serial connection. The solution is to find an USB to serial converter. After searching the Internet I decided to buy the
Keyspan USB Serial Adapter. They have software drivers for MAC OS X, Windows and Linux which was important to me. After installing the software driver a COM3 port appeared in the HyperTerminal window. After setting up the HyperTerminal following the instructions in the document I am ready to go. I turn on the main power switch,  no smoke and press the System ACE RST button. The following menu is displayed:
  1. Virtex-4 Slide Show
  2. Wind River VxWorks Demo
  3. MontaVista Linux Demo
  4. Web Server Demo - PPC405
  5. Web Server Demo - MicroBlaze
  6. DCM Phase Shift Demo - MicroBlaze
  7. Mentor ATI Nucleus WebServ Demo
I select 6 because that is the only demo that doesn't need an extra hardware setup. The demo starts and prints the result in the HyperTerminal window. It works. I have taken the first step on  my "FPGA design from scratch" road. I never told you that I am running this software in  Windows XP installed under Parallels Desktop on a MacBook.



Acknowledgement

It wouldn't make sense writing a tutorial like this and not using Xilinx's in-depth knowledge about their products found in their web pages, user guides and other documents. I would like to thank Xilinx for allowing me to use images and text from their documents and to link to their web pages. All images copied from Xilinx are marked "(Courtesy of Xilinx)" and text parts starts with "As it says in the Xilinx Documentation:"

Application Notes

Application Notes illustrate how to use a Xilinx product in a specialized way.

Documentation and Literature

Here is a link to the
documentation library.

E-Learning

Xilinx provides recorded
E-Learning for courses at our convenience. They are available at no charge.

Forums

There are several forums discussing FPGA design. The
Xilinx forum is one of them.

Links

Here are more
links to information about ASIC & FPGA design.

ML403 Evaluation Platform Demos and Reference Designs

Here is a
link to this page.

Newsgroups


comp.arch.fpga is the main newsgroup for FPGA discussions and comp.arch.embedded for embedded design.

Publications

Subscribe for FREE to the new Xcell Journal Digital. Here are links to old XCell magazines.

Search engines

There are a number of dedicated search engines, searching for FPGA information.
FPGASeek is one ChipHit is another.

Solution Guides

Looking for a solution. Maybe you
find it here.

Support, Answers Database

You may find an answer to your question in the
Xilinx support page.

TechXclusives

Xilinx TechXlusives are interesting articles about FPGA design.

Training

Xilinx provides targeted, high-quality education services designed by experts in programmable logic design, and delivered by Xilinx-qualified trainers. They offer instructor-led classes (both in person and online) and recorded e-learning for self-paced training. Some courses are completely free!

Tutorials


To find out more about using Xilinx development tools you can study one or more of the tutorials found in
Xilinx tutorial web page.

User Guides

User guides contain usage information about Xilinx products and features.

WebCase

To post a question to Xilinx you should use
WebCase.

Just one last thing

We are going to have fun.






This time you are not left alone.


Top  
Next

Posted at 06:40 pm by svenand
Comments (53)  

Next Page