cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
3,680 Views
Registered: ‎12-03-2017

Programming SPARTAN 6 From a Raspberry PI 3 GPIO

Jump to solution

Hi,

 

I would like to program my spartan-6 from a raspberry pi 3's gpio. I need to do this, since the software will be controlled from the raspberry pi and I have limited access to Windows (to compile the FPGA code)

 

This was done by someone:

 

https://www.youtube.com/watch?v=NyraRnZQhRo

 

But he lost the code and it appears that he did it for the spartan-5 device.

 

Following the doc (https://www.xilinx.com/support/documentation/user_guides/ug380.pdf - page 123, table 6-4) it appears that I need to hold TMS high for 5 clock cycles. A clock cycle is taking TCK low, then high, sleep for 1 second and then take it low again?

 

So, my questions are as follow:

 

1) Does anyone have any short cuts as to programming this chip from the Raspberry Pi

2) If not, is my understanding of the docs correct ? 1 second per TCK cycle seems *very* long

3) Has anyone got some code to at least get the chip id using the JTAG ?

4) TMS is used to put the chip into various modes, is this correct?

5) If yet to 4) how do you then program multiple chips ?

 

Thanks !

 

Pieter

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
4,028 Views
Registered: ‎01-10-2012

Hi pieter@insync.za.net

 

Apart for using the configuring via JTAG approach.

A simpler and straight forward approach  would be to use the Slave serial config mode (Refer UG380) and feed the data to S6 via Raspberry Pi GPIO's.

View solution in original post

0 Kudos
4 Replies
Highlighted
Advisor
Advisor
3,315 Views
Registered: ‎04-26-2015

(1) Only idea I have is that JTAG is very closely related to SPI. If the Pi has an SPI port available, you might see if that can be repurposed as a JTAG master.

 

(2) I think you've misunderstood. When it says "clock five 1s on TMS..." what it means is "hold TMS at 1 for five clock cycles". The clock cycles themselves can be as fast as the hardware can handle - potentially well over 10MHz.

 

(3) N/A

 

(4) Yes, essentially. All JTAG-connected devices have a small state machine embedded, and TMS is used to step through states.

 

(5) In the "shift" states, all the instruction or data registers (depending on which state the state machine is in) in the JTAG devices are essentially "lined up" along the TDI/TDO bus. If each register is eight bits long then if you shift hex value 0x12 in it'll occupy the register of the first chip. If you shift hex value 0x1234 then the first chip gets 0x12 and the second chip gets 0x34 (depending which order you send the bits). If you shift 0x123456789ABCDEF then you can load eight chips with instructions. In most cases, you'll load all of them with "bypass" (all 1s) except for the single chip you're interested in.

Highlighted
Xilinx Employee
Xilinx Employee
4,029 Views
Registered: ‎01-10-2012

Hi pieter@insync.za.net

 

Apart for using the configuring via JTAG approach.

A simpler and straight forward approach  would be to use the Slave serial config mode (Refer UG380) and feed the data to S6 via Raspberry Pi GPIO's.

View solution in original post

0 Kudos
Highlighted
3,290 Views
Registered: ‎12-03-2017

Thanks - make sense and not sure how I missed that. I will give it a go later and see how it works :)

0 Kudos
Highlighted
Contributor
Contributor
1,510 Views
Registered: ‎01-14-2008

Hi,

You can program it using the Jtag Pi board on Raspberry (https://www.hackster.io/Dzunior/fpga-remote-programmer-4d7b80).

It's visible as a Virtual Xilinx Cable so you can even program Spartan 6 from Vivado:)

Dominik

0 Kudos