I am trying to build my own JTAG programmer using the Zedboard but I am stuck with hardware issues.
For the Zedboard side, I am using the Pins XADC-GIO0, XADC-GIO1, XADC-GIO2 and XADC-GIO3 as TCK, TDI, TDO and TMS. I constrained these pins as LVCMOS25 as my target board's JTAG has a VREF of 2.5V. On my Zedboard, I used the jumper setting for the Vadj at 2.5V.
When programming the target board using the Zedboard, I simply connect the 4 JTAG pins using wires from the Zedboard to the target board and pull-up TDO using a resistor to the VREF of the target board. I do not have any buffer chips or series resistors termination or and decoupling capacitors to ground for the JTAG pins. I was thinking that TCK is 1MHz and not really that high-speed for signal integrity issues to set in?
When issuing the JTAG commands to the target board, I am however unable to read back the device ID correctly, somehow, the TDO output just isn't correct.
I checked the output from the Zedboard to the target board several times and I am certain that they are issuing the correct bits to the target board. I have also checked the setup and hold times of the TCK wrt TDI and there's nothing wrong there as well. The Zedboard and the target board are powered separately with their own power adaptors but I connected some of the ground pins on both boards together to have a common ground. (another noob mistake or is this normal?) The target board's FPGA is also a Xilinx FPGA.
If this is really a case of signal integrity issues, can anyone advise how I may solve this?
Thanks in advance.
Update 20171004 1: Ok so I stumbled upon the problem but I got no idea how to fix it. Apparently the problem seems to lie with TCK. It is the same setup but I removed the pullup resistor from TDO. Now when I issue a read Device ID and probe TCK (not TDO!) using an oscilloscope, the Zedboard FPGA reports the correct Device ID. When I remove the oscilloscope probe, the Device ID is wrong again. This isn't intermittent; placing and removing the oscilloscope probe on/from the TCK pin respectively causes the TDO to be correctly and wrongly read. Any ideas how I should solve this?
The Zedboard FPGA pins are LVCMOS25 with Drive at 16ma.
Update 20171004 2: Ok I added a pull-up resistor on TCK (no pull-up resistor on TDO) and the Device ID is read correctly everytime. Still haven't successfully configured the target FPGA but I guess at least the signal integrity part seems to be tamed a little for now.
Update 20171005: Ok I finally found the problem. Turns out my TMS pin was assigned to XADC-GIO3 (Pin J15) and this pin was the issue. Every other pin H15, R15 (respectively TCK, TDI) has a Vpp of 2.5V while J15 only has ~1point-something volts. I turned this into an input pin by swapping with TDO (K15) and everything turned out fine! No need for twisted pairs or termination or pull-up resistors on any signal - TMS, TCK, TDI or TDO. I was also finally able to program the target board with my Zedboard JTAG programmer.