EmbeddedRelated.com
Blogs

Designing Embedded System with FPGA - 1

Pragnesh PatelOctober 28, 200711 comments

With the introduction of soft processors and related tools (like EDK from Xilinx), implementation of basic embedded system in FPGA is made easy. This requires very little or almost no knowledge of VHDL programming. Actually that’s how I started. If user is interested in taking full advantage of FPGA and its parallel processing power, then yes, detail understanding of soft processor, its peripheral bus and VHDL programming is required.

 

I will start with basic system with FPGA. Xilinx has embedded system development tool called EDK, which is very powerful and mature. Along with EDK, Xilinx provides, following IP (Intellectual property) cores, ready to use like drag, drop, configure and go.

 

-Soft processor Microblaze

-BRAM blocks and controller

-OPB (IBM’s Open Peripheral Bus with full description)

-Timers and GPIO port

-Lite version of UART and SPI bus

-8 hours limited Ethernet MAC core

-DDR RAM controller and flash memory controller

-Interrupt controller and DMA controller and many more.

 

Latest revision of EDK is kind of graphical tool where, user has to select IP cores from list and drop on design pad. EDK also has base system builder which enables user to generate whole design automatic. First design is based on SPARTAN 3E Starter kit which is valued by Xilinx some where around $149 including EDK.

 

Install the software and run it. The first screen shows up as shown here, click on “base system builder”.

Start screen

 

(For more reference look at Xilinx tutorial at,

http://www.xilinx.com/support/techsup/tutorials/EDK_91_MB_Tutorial.pdf. )

 

Then select your folder and project name on second screen and click ok. (For your reference sample entries for second screen is shown here)

BaseSystemBuilderWizard

 

 

You will hit next screen where you have choice between predefined board as well as creating custom design. Click on “I would like to create a new design” and go to following screen and select Xilinx -> SPARTAN 3E Starter kit -> revD (or what ever revision board you have).

(Xilinx has much starter kit to learn FPGA based embedded system and out of this the most economical solution is SPARTAN 3E starter kit. )

Select Board

 

Select next to reach processor selection screen where the only choice is Microblaze (as SPARTAN 3E does not have POWERPC core available), which is by default selected, so press next to design your custom settings for Microblaze processor. Parameters available for selection are speed, availability of RAM, cache enable/disable and floating point coprocessor support. Out of this we will select 50 MHz (default) speed and 32 KB RAM and leave other settings as default for first design. The screen with all required selection will look like as below,

COnfigure Microblaze

In next couple of screen we will select required peripherals out of available in base system builder. For first design we will select only buttons, LEDs and one RS232 port as peripherals. For RS232 only the OPB-UARTLite core is available free from Xilinx so we will select that. For RS232 port we will select 9600, 8, No parity and no interrupt. The UART lite core works with one start and one stop bits. Similarly we will not select interrupt for LEDs or buttons for first design. The selection screens looks like,

Configrue IO system

Configrue IO system

Then select “next” until you hit software setup screen, where by default STDIN and STDOUT are directed to RS232-DCE and memory test and peripheral test are selected. Keep those default settings as it is and click next.until you get “system created” screen. Select generate and you will reach the final “finish” screen as shown here. The screen has all information about newly generated system, read it carefully, it lists all important project files.

Finish

Click on “finish”, software will generate and display newly designed system on EDK platform. The newly designed system will look like, this has all hardware logic files for FPGA as well as all software *.c and *.h files for embedded application, which tests memory and peripheral and transmit messages on RS232 port. We will talk about compilation and execution of new system next time.

Newly Created System


[ - ]
Comment by JeremyNovember 15, 2007
I am a student and I have been using the Spartan 3E as well and I'm trying to get a grasp on all of its capabilities so I could develop a project and go from there with it. As far as this "design" you presented above what does it do or represent?
[ - ]
Comment by PatelbarodaNovember 18, 2007
This represents basic embedded system design with Xilinx FPGA and its embedded design tools. The Embedded design tools known as EDK allows user to create embedded system in FPGA without having any knowldege of VHDL or how FPGA works internally using LUTs and routing. The basic system has one UART, 32 bit processor, RAM, 8 bit LED port and 4 bit button port with interrupt generation. In part 3, I will be presenting software to transmit button number using polling as well as interrupt methods and light on or off LED from hyper terminal running on PC and connected to SPARTAN 3E Starter kit.
[ - ]
Comment by yogiApril 9, 2008
Mr. Pragnesh, I have read your article which you posted. its interesting. i am doing my project on xilinx EDK. I am working on the software part. i want some guidance i am connecting between PC and EDK kit through VC++, i have got lot many doubts, can i have your mail id.
[ - ]
Comment by PatelbarodaApril 14, 2008
You can post yr email id. will reply
[ - ]
Comment by racmanAugust 7, 2008
hi, I am 5th year EE student and we will have a problem in FPGA to implement our design and we don't know yet the FPGA. . . Our design is a queueing system with sound number output, the input is coming from the push button switch and then it will display using dot matrix as well as it say the number and of course it will connect to speaker to hear the sound. . . because of this problem we will use a FPGA to match it with the Pulse code modulation and pulse width modulation to display a sound readout. . . can you help me for this problem?. . .what FPGA and PWM that I can use to implement this design. . . thanks for the help!. . . ^_^
[ - ]
Comment by PatelbarodaAugust 17, 2008
racman Sure send me more details.
[ - ]
Comment by mesa177August 31, 2008
Dear Mr. Pragnesh, I'm a 3rd year EE student who has been trying to program the Pegasus board from Digilent (with a XILINIX Spartan 2 FPGA). I've been able to download a demo VHDL code onto the board and it has successfully compiled. Unfortunately, when I try to mimic the code to program the board according to my design, I'm not able to use the switches and leds at all. I had a speculation that the keyboard and VGA have to be added as components in all codes, but even with them I can't use the switches and leds. Can you helpmeout?
[ - ]
Comment by PatelbarodaSeptember 2, 2008
mesa177 post more details about yr project and what you want to do. I don't see any relation between switches, LEDs and VGA.
[ - ]
Comment by PatelbarodaJanuary 5, 2009
This design represents a tutorial to design basic embedded system with soft core processor in FPGA.
[ - ]
Comment by renupriyaApril 14, 2009
Thank you so much for your useful tutorials. I'm designing a FPGA based embedded design using Altera. Do you have experience with Altera and Quartus?If you have , can I seek your help?
[ - ]
Comment by sivanihonjinJanuary 31, 2010
very useful datas for me. Thank you

To post reply to a comment, click on the 'reply' button attached to each comment. To post a new comment (not a reply to a comment) check out the 'Write a Comment' tab at the top of the comments.

Please login (on the right) if you already have an account on this platform.

Otherwise, please use this form to register (free) an join one of the largest online community for Electrical/Embedded/DSP/FPGA/ML engineers: