OpenOCD and Altera USB blaster.

The USB blaster has a fixed TCK of 6Mb/sec I believe (but many places quote 3…). Although, that doesn’t mean to say it will transfer data at that rate. Just when it does transfer bytes using its ‘byte shift’ mode, that’ll be the speed at which is does it. I’m not sure the FTDI ‘set_baud’ would do anything for the USB blaster, it only affects FT245/232 based dongles when they are configured in ‘bit bang’ mode. The blaster is FT245 based, but used in its stock FIFO parallel buffer config, with a CPLD controlling the RD and WR lines and doing the donkey work. I could of course be wrong :smiley:

The other mode it operates in is ‘bit bang’ mode. In this mode, a byte sent from the host (along with a few other config bytes for the FT245 specifically) appears on the IO’s of the FT245 inside the blaster. The CPLD simply copies this to the output port. This allows direct changing of IO’s, but is slow for transfering bytes serially. (it would require 3 bytes per change in IO’s, two for TCK, one for data = 3 per bit = 24 per byte, so its actually around 30x slower). I have also done this just with an FT245 connected to a CPLD, and some host software, its about the same speed as a parallel dongle (and can be built for around $5).

I think your OpenOCD (perhaps everyones?) is just using ‘bitbang’ mode, and not very well at that. If your measurements are correct, and one TCK is 10ms, that would mean the host is changing that line (remember one byte - one change in IO state) twice every period, or every 5ms. It could well be that it sends a byte to the FT245 in the blaster, but then doesn’t send anything else… then times out, and sends the next. Meaning the driver times-out 2/3 times per BIT. Does anyone know the timeout on the blaster FTDI driver?

Again, I’m afraid I cannot confirm your findings, or making my own tests until I knock up a ‘prototype blaster’ (one with test pins, so I can poke around), and I can’t make that until I finish several other designs, as they are all going on the same PCB. Hopefully, this week though!

I’ll also dig out some code I wrote for VB2008, my first ‘PC software’, which used the blaster to configure CPLD’s using SVF’s, since I wasn’t happy with anything available It was stand alone, so perhaps not easily integrated into a test code, but it does at least show how to get the blaster going at high speeds, using byte-shift mode.