Programming the Altera FPGA: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (remove Category:XO, this isn't about XO models)
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
The B-Test boards have an Altera Cyclone II FPGA that is used to emulate the CaFe chip.
This page tells how to reprogram the Altera Cyclone II FPGA that is used to emulate the CaFe chip. This FPGA is only present in [[XO_B1|BTest-1 preproduction prototypes]] of the [[Hardware#XO_Laptop|XO Laptop]].

This document tells how to reprogram it.


== Assumptions/requirements ==
== Assumptions/requirements ==
Line 10: Line 8:
== Getting the Software ==
== Getting the Software ==


If you only need to program the FPGA, you only need Altera's "Quartus II Programmer" software from https://www.altera.com/support/software/download/programming/quartus2/dnl-quartus2_programmer.jsp
* If you only need to program the FPGA, you only need Altera's "Quartus II Programmer" software from https://www.altera.com/support/software/download/programming/quartus2/dnl-quartus2_programmer.jsp
Download the the installer and run it. Install the driver for the programming cable according to the instructions in
Download the the installer and run it. Install the driver for the programming cable according to the instructions in
http://www.altera.com/literature/ug/ug_bbii.pdf - Chapter 1, Software Setup section. No license needed!
http://www.altera.com/literature/ug/ug_bbii.pdf - Chapter 1, Software Setup section. No license needed!




If you like to get on the fun of designing and compiling an FPGA, you can get Altera's "Quartus II Web Edition" software from http://www.altera.com/products/software/products/quartus2web/sof-quarwebmain.htm.
* If you like to get on the fun of designing and compiling an FPGA, you can get Altera's "Quartus II Web Edition" software from http://www.altera.com/products/software/products/quartus2web/sof-quarwebmain.htm.
If you want to be able to compile for a design, in addition to downloading the Web Edition installer, you also have to get a license. There is a link on that page that gets you to the license dance. You have to fill out a contact form and complete a survey. When you get through the procedure, you'll get an email message with a license file attachment. Save that attachment to disk; you'll need it later. (Feel free to bitch and moan about this cumbersome process; everybody else has done so and you might as well get in on the fun.)
* If you want to be able to compile for a design, in addition to downloading the Web Edition installer, you also have to get a license. There is a link on that page that gets you to the license dance. You have to fill out a contact form and complete a survey. When you get through the procedure, you'll get an email message with a license file attachment. Save that attachment to disk; you'll need it later. (Feel free to bitch and moan about this cumbersome process; everybody else has done so and you might as well get in on the fun.)
Download the Web Edition installer and run it. Then run the installed program and tell it the location of your license file when it asks. Install the driver for the programming cable according to the instructions in http://www.altera.com/literature/ug/ug_bbii.pdf - Chapter 1, Software Setup section.
Download the Web Edition installer and run it. Then run the installed program and tell it the location of your license file when it asks. Install the driver for the programming cable according to the instructions in http://www.altera.com/literature/ug/ug_bbii.pdf - Chapter 1, Software Setup section.




If you have Quartus II Web Edition installed and want to program the device without having to install the license, you can launch the programmer simply by executing \<quartus_installed_directory>\bin\quartus_pgmw.exe
* If you have Quartus II Web Edition installed and want to program the device without having to install the license, you can launch the programmer simply by executing \<quartus_installed_directory>\bin\quartus_pgmw.exe


== Reworking the preB Board ==
== Reworking the preB Board ==
Line 89: Line 87:
check the MAC address at startup, and it will complain, but if you feed
check the MAC address at startup, and it will complain, but if you feed
it the same file again, it will work for the remainder of the session.
it the same file again, it will work for the remainder of the session.

[[Category:Hardware]]

Latest revision as of 01:37, 2 May 2009

This page tells how to reprogram the Altera Cyclone II FPGA that is used to emulate the CaFe chip. This FPGA is only present in BTest-1 preproduction prototypes of the XO Laptop.

Assumptions/requirements

  • You have Windows (Linux and Solaris versions of the programming software exist, but require an Altera subscription).
  • You have the parallel port version of the Altera programming cable (there is a USB version, but I have the parallel port version so that is what I can document).

Getting the Software

Download the the installer and run it. Install the driver for the programming cable according to the instructions in http://www.altera.com/literature/ug/ug_bbii.pdf - Chapter 1, Software Setup section. No license needed!


  • If you like to get on the fun of designing and compiling an FPGA, you can get Altera's "Quartus II Web Edition" software from http://www.altera.com/products/software/products/quartus2web/sof-quarwebmain.htm.
  • If you want to be able to compile for a design, in addition to downloading the Web Edition installer, you also have to get a license. There is a link on that page that gets you to the license dance. You have to fill out a contact form and complete a survey. When you get through the procedure, you'll get an email message with a license file attachment. Save that attachment to disk; you'll need it later. (Feel free to bitch and moan about this cumbersome process; everybody else has done so and you might as well get in on the fun.)

Download the Web Edition installer and run it. Then run the installed program and tell it the location of your license file when it asks. Install the driver for the programming cable according to the instructions in http://www.altera.com/literature/ug/ug_bbii.pdf - Chapter 1, Software Setup section.


  • If you have Quartus II Web Edition installed and want to program the device without having to install the license, you can launch the programmer simply by executing \<quartus_installed_directory>\bin\quartus_pgmw.exe

Reworking the preB Board

The preB test boards are missing a ground connection on the programming header. For reliable programming, you have to add a jumper wire to make that ground connection. The wire goes from pin 10 of CN34 (on the bottom of the board) to a nearby ground point, as shown Cafe FPGA Rework.jpg.

Connecting the Cable

The programming cable connects to CN34, the 2x5 header connector on the bottom of the B1-test board. Pin 1 is marked with a white dot on the board. That corresponds to the red stripe on the ribbon cable.

Programming

Note - a nicer writeup of the following can also be found in http://www.altera.com/literature/ug/ug_bbii.pdf , Chapter 1, Setting Up the ByteBlaster II Hardware in the Quartus II Software .

In the Quartus Web Software program, select Tools>Programmer.

Click Hardware Setup.

Click Add Hardware

Choose Hardware type: "ByteBlasterMV or ByteBlaster II"

Choose Port: LPT1

Click OK

Choose Currently selected hardware: ByteBlasterII [LPT1]

Click Close

Choose Mode: Active Serial Programming

Click Add File ... and choose the .pof file containing the bits you want to program into the device.

Some information should appear in the hitherto-blank area of the programming dialog.

Check the two Program/Configure boxes and the two Verify boxes. Your screen should look like CAFE Configure.JPG



Click Start. It should start the process, and, over time, the following messages should appear in the Messages frame at the bottom of the Quartus II window:

Info: Started Programmer operation at Fri Oct 13 08:20:46 2006
Info: Device 1 silicon ID is 0x14
Info: Erasing ASP configuration device(s)
Info: Programming device 1
Info: Performing verification of type standard on device 1
Info: Device 1 silicon ID is 0x14
Info: Successfully performed operation(s)
Info: Ended Programmer operation at Fri Oct 13 08:23:51 2006


Problem Reports/Suggestions

An intrepid user reported the following; take note as you see fit:

Still no license from Altera this morning. But I decided to give it one more try anyway... For whatever reason, it worked this time. I think the wiki page needs an addition about where the moon needs to be in the sky when the reprogramming is done; there's nothing else that was different as far as I can tell.

More seriously, though, just in case anybody else still needs to go through this: anybody's license file will work. The program seems to check the MAC address at startup, and it will complain, but if you feed it the same file again, it will work for the remainder of the session.