CPLD Programming With PI - jedimatt42/tipi GitHub Wiki
Programming the CPLD with the Raspberry PI
It is possible to program the CPLD if updates are released via the Raspberry PI. You will however require 5 jumper cables with single female to female connectors.
Installing xc3sprog
NOTE |
---|
The following instructions are for Raspberry PI OS Buster. They do not work on Bullseye or Bookworm. It depends on libraries that are no longer available on newer Raspberry PI OS versions. |
An old Raspberry PI OS TIPI image based on Buster is available here: tipi-sdimage-buster-2.37.zip |
For newer versions such as bookworm, you will likely require a USB ftdi cable, and the official xc3sprog package installed |
There is a software package to program the .jed file from the Raspberry PI GPIO pins.
To install, on your Buster
based Raspberry PI, as user 'tipi'
cd /home/tipi
sudo apt install libftdi1
wget https://jedimatt42.com/downloads/xc3sprog_buster.zip
unzip xc3sprog_buster.zip
The xc3sprog
executable will be at /home/tipi/xc3sprog/build/xc3sprog
Wiring
The JTAG programming port on the TIPI board has the following pinout:
2 4 6 8 10
1 3 5 7 9
Connect the TIPI JTAG connector to the Raspberry PI as follows:
(Note: the RPi numbers are pin count numbers and not the BCM chip numbers)
JTAG pin | purpose | RPi GPIO |
---|---|---|
1 | TCK | 11 |
2 | GND | 9 |
3 | TDO | 13 |
5 | TMS | 7 |
9 | TDI | 15 |
Power
Plug your TIPI board back into the PEB, and turn it on. Let your computer boot, and become idle, like sitting at an MDOS prompt or the TI title screen.
The CPLD (Xilinx chip) must be provided power other than through the programming port. This can be in system from the PEB, or 4A depending on the card. On my workbench I typically provide 5v bench power to the ROM socket which then powers the board.
Download .jed file
wget https://www.jedimatt42.com/downloads/tipi_cpld.zip
unzip tipi_cpld.zip
You should have a file named tipi_top.jed
Program the CPLD
Test that the JTAG chain recognizes the CPLD
sudo /home/tipi/xc3sprog/build/xc3sprog -c sysfsgpio_creator
You should see:
[sudo] password for tipi:
XC3SPROG (c) 2004-2011 xc3sprog project $Rev: 774 $ OS: Linux
Free software: If you contribute nothing, expect nothing!
Feedback on success/failure/enhancement requests:
http://sourceforge.net/mail/?group_id=170565
Check Sourceforge for updates:
http://sourceforge.net/projects/xc3sprog/develop
JTAG loc.: 0 IDCODE: 0x59608093 Desc: XC95144XL Rev: E IR length: 8
Program the CPLD
sudo /home/tipi/xc3sprog/build/xc3sprog -v -c sysfsgpio_creator -p 0 tipi_top.jed:w
When it is complete you should see:
XC3SPROG (c) 2004-2011 xc3sprog project $Rev: 774 $ OS: Linux
Free software: If you contribute nothing, expect nothing!
Feedback on success/failure/enhancement requests:
http://sourceforge.net/mail/?group_id=170565
Check Sourceforge for updates:
http://sourceforge.net/projects/xc3sprog/develop
Using built-in device list
Using built-in cable list
JTAG chainpos: 0 Device IDCODE = 0x59608093 Desc: XC95144XL
Device is blank
Programming Sector 107.
Programming time 14004.0 ms
Verify Sector 107
Success! Verify time 1293.9 ms
Cleanup
You should be able to test now. Once you are satisfied, power down the PEB, remove the TIPI board, remove the JTAG wires, and then put things back the way you had before this process.