TI2725-C Embedded Software: FPGA lab

Documents

Instructions

Be careful!

Never hold the spinning wheel of the cruise control system fast. You are supposed to break it down slightly only. If you break the engine because of holding the wheel tight, you will not get a replacement. That means, for you and your entire group, this course is over.

Lab sessions

The lab sessions take place in room DW-PrZ 0.200 (Drebbelweg).

The practicum comprises 3 half-days spanning three weeks (1 half-day per week, with time slots available on Monday and Thursday morning, depending on which half-day you have been assigned to). The practicum is compulsory (incl. presence on 3 days), and it must be passed in order to pass the entire module TI2725-C. Because the practicum only comprises 3 half-days, it is essential that you prepare the work at home. Students who have not prepared their practicums sufficiently, or arrive at the labs too late will not be admitted, meaning that they will fail the lab sessions and, thus, the entire module. Attendance of the labs is compulsory for every half-day. Inevitably, absence leads to failure of the lab and, consequently, failure of the module.

The practicum is carried out in groups of 2 students per experimental setup. You will have to register by e-mail (as discussed during the lecture). If you do not have a partner for cooperation already, you can register as a single person. You will be assigned a group through the student assistant. The assignment of students to time slots may be changed depending on availability of lab resources.

In the practicum, you will develop a program for an embedded system that controls the speed of an electrical engine (simulation of a car's cruise control system). The assignment is described in the handbook of the practicum. As microcontroller, we will use the X32, an experimental 32-bit soft core processor, written in VHDL, and implemented on a Nexys 2 Spartan-3E FPGA board. The soft core comes equipped with peripheral devices such as UART for communication with the Linux development host (this is where you develop and compile the program), and devices that can control the engine. The X32 can be programmed in ANSI C.

Support

Copyright Information - NOTE: The following material is presented to provide easy access to existing websites or publically available documents. Copyright and all rights therein are retained by authors or by other copyright holders. All persons copying this information are expected to adhere to the terms and constraints invoked by each author's copyright.

X32 Soft Core - here

The X32 is an experimental 32 bit soft core developed at our Embedded Software Lab. It propagates the idea that (for many embedded applications) processor design need not be a 9-figure project and that it can be done by anyone who knows how to write a VHDL byte code interpreter. We simply took lcc (a well-known ANSI C compiler) and wrote an interpreter for its intermediate byte code. No specific instruction set architectures, no backends, just a student's thesis job. To turn it into a truly reconfigurable microcontroller we added some I/O devices to show some principles involved. And it works! As all the software is free, we have a complete free embedded solution that runs on any FPGA that carries more than some 250k gates (which is about any FPGA nowadays). You are free to use the software outside of the course as long as you give proper credit to the authors and our lab. Note, however, that this free software is provided AS IS without any warranty whatsoever. Visit the X32 web site for more detailed information.

Digilent XC3S400 FPGA Board - here

This is the FPGA board used for the lab. It is identical to the board in the Xilinx Starter Kit but features a 400K gate FPGA instead of 200K gate, which is needed to host our X32 soft core (actually a microcontroller version that comes with an array of devices). If you want to play with the (free!) ISE, download the WebPACK 8.Xi (available for Windows 2000, XP, and Red Hat Enterprise Linux 3, here).

The 400K board is completely identical to the 200K board which was originally offered by Xilinx, except for the FPGA itself, of course. The Xilinx kit had extensive documentation available, which is included on our site, since it also applies to our 400K FPGA board: The Spartan 3 Starter Kit, The Spartan 3 User Guide, ISE tutorials and FPGA database.

VHDL - here

To get a taste of VHDL here are a bunch of tutorials and text books (not the traditional Logic Design books that focus on logic design plus a bit VHDL, but the books that really do a good job on VHDL). If you really want to learn the trade buy one of the text books. Books on VHDL: "Circuit Design with VHDL" by Volnei Pedroni, "VHDL, programming by example" by Doug Perry, "VHDL for Logic Synthesis" by Andrew Rushton, "VHDL for programmable logic" by Keven Skahill, "A VHDL synthesis primer" by J. Bhasker, "Digital System Design with VHDL" by Mark Zwolinski, "VHDL Starter's Guide" by Sudhakar Yalamanchili, "VHDL Cook book" by Peter J. Ashenden.

Some tutorials: here, here, here and here.

RS232 Communication - here

The simple terminal program (simpleterm.c) was developed at our lab. If a USB2RS232 cable is used (e.g., Sweex). If the Linux driver isn't there, consult the Lab Installation Guide elsewhere on this page.

The Tera Term Pro terminal program (tterm23.zip) is for RS232 communication via Windows machines (source: hp.vector.co.jp/authors/VA002416/). The file sweex_driver.exe contains the Windows driver for Sweex USB2RS232 cable (source: sweex.com).