Progamming a CPLD (Xilinx XC9572XL) using Linux (Ubuntu 12.4 LTS) and the Bus Pirate

To use the Bus Pirate as an XSVF-player, on has to load a special firmware onto it. The firmware is packaged in the official release and you will find instructions to flash it there.

Finding a binary for the PC side of things was a bit harder. Windows binaries were easy to come by, but using wine did not lead anywhere. After searching a bit I found a pre compiled binary for Linux. It is a 32 bit binary, but it worked on my 64 bit system without any problems.

Once the XSVF-player is loaded into the Bus Pirate, the CPLD needs to be connected according to this table:

CPLD Bus Pirate

Please note that the XSVF-player-firmware activates the Bus Pirate’s power pins, so you can power the CPLD from the Bus Pirate if you want to.

Now loading the design into the CPLD is as simple as:

stty /dev/bus_pirate 115200
./BPXSVFplayer -p /dev/bus_pirate -r -f ./default.xsvf

You will have to substitute the the proper device for the Bus Pirate of course. We have to set the baud rate manually, since it seems like the binary does not do it properly, despite it saying so.

Loading the design into the CPLD will take a while and you might have to power cycle the CPLD afterwards, but then it should behave just as you specified in your test project.

Congratulations! You can now program CPLDs with Linux and the Bus Pirate.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: