I'd appreciate some advice on a design I'm making that uses an ATMEGA1284P microcontroller along with a Xilinx XC9572XL CPLD. What would be the easiest, cheapest way to program the two?
The default solution is to use a 2x3 ISP connector for the ATMEGA, and a 2x5 JTAG connector for the CPLD. I'd have to purchase a Xilinx JTAG programmer, because even though I already have an Altera JTAG USB Blaster clone, the Altera JTAG programmer apparently won't work with Xilinx parts.
A second option is to use a single 2x5 JTAG connector, connect the two chips in a JTAG chain, and use JTAG to program them both. But with what programmer? I don't want to have to purchase a Xilinx JTAG programmer and the Altera AVR JTAG ICE Programmer. Is there a generic JTAG programmer that would work with them both?
A third option is to use the ATMEGA to program the CPLD somehow, by connecting the CPLD's JTAG pins to GPIO pins on the ATMEGA. Then I'd only need a single 2x3 ISP connector for programming the ATMEGA, and could use the AVR ISP programmer I already have. But I don't relish trying to write some kind of JTAG player for the AVR, and a brief search to see if something like that already exists didn't turn up anything.
Anybody have a suggestion on the best way to go about this?

