Readme.txt for CPLD directory.
Created 29 May 2009 by Elektra


Programming the CPLD of the FXS board using JTAG
================================================

Required hardware
-----------------

In order to get started we need a JTAG programmer. A good way is to use a PC
with a parallel port and a buffered DIY JTAG adaptor.  The "Xilinx parallel
port cable III" is a popular design of a buffered JTAG cable.  The schematic
diagram is available from the Xilinx web site:
http://www.xilinx.com/itp/xilinx4/data/docs/pac/appendixb.html 

Building the programmer should cost less than 10 US-$.

I have soldered my JTAG cable on a breadboard according to a existing layout
that follows the Xilinx schematic.  You can also etch one of these designs
available on the web which makes the soldering and wiring easier, however
you have to go through the process of making a mask, UV exposing the
photoresist with the mask, developing the photoresist, etching and drilling.


Required software
-----------------

Frankly speaking, this was a bit of a pain. You can get the Xilinx ISE
Web-Pack online for free after registering yourself on the Xilinx web site. 
The recent release of the Xilinx suite is a massive download of more than 2
Gigabyte. It does, according to Xilinx, work with Linux and Windows.  The
current release does not include a driver to control a parallel port JTAG
cable from a recent Linux version.  There is a open-source cable driver
which supports older releases of ISE Web-Pack up to 10.1. However I have not
tested this.

I ended up using the Windows version of Web-Pack which consumed 8GB on my
hard drive. All you really need from the numerous tools is the Impact
application. Maybe it is possible to get this program individually.

Connect the JTAG adaptor to the FXS-board.

The pinout of the JTAG on the FXS board is as follows:


+-------------------------+
| Pin1=3V3*   |  Pin2=NC   |
|			  |
| Pin3=NC    |  Pin4=GND  |
|	 		  |
| Pin5=3V3   |  Pin6=TMS  |
|			  |
| Pin7=GND   |  Pin8=TCK  |
|			  |
| Pin9=GND   |  Pin10=NC  |
|			  |
| Pin11=GND  |  Pin12=TDI |
|			  |
| Pin13=GND  |  Pin14=TDO |
+-------------------------+

* = Use Pin5, there is a 10kOhm resistor between pin1 and the 3V3 VCC
connector

Plug the JTAG adaptor into the parallel port, start the PC and start the
program.  The CPLD should be displayed if the cable is working and connected
properly.  Load the fxsinterface.jed file.  Right click on the CPLD and
select "Program" from the menu.  After a few seconds you should see a
message telling you that the programming process was successful.
 

Have fun!
