jtag

commandline jtag stuff
git clone http://frotz.net/git/jtag.git
Log | Files | Refs | README

usb-blaster-protocol.txt (2338B)


      1 http://sf.net/apps/mediawiki/urjtag/index.php?title=Cable_Altera_USB-Blaster
      2 ----------------------------------------------------------------------------
      3 
      4 Altera USB-Blaster
      5 ------------------
      6 
      7 General
      8 -------
      9         _________
     10        |         |
     11        | AT93C46 |
     12        |_________|
     13         __|__________    _________
     14        |             |  |         |
     15   USB__| FTDI 245BM  |__| EPM7064 |__JTAG (B_TDO,B_TDI,B_TMS,B_TCK)
     16        |_____________|  |_________|
     17         __|__________    _|___________
     18        |             |  |             |
     19        | 6 MHz XTAL  |  | 24 MHz Osc. |
     20        |_____________|  |_____________|
     21 
     22 
     23 Quoting from ixo.de (http://www.ixo.de/info/usb_jtag/)
     24 usb_jtag/device/c51/usbjtag.c comments:
     25 
     26 usb_jtag firmware now happens to behave just like the combination of 
     27 FT245BM and Altera-programmed EPM7064 CPLD in Altera's USB-Blaster. 
     28 The CPLD knows two major modes: Bit banging mode and Byte shift mode. 
     29 It starts in Bit banging mode. While bytes are received from the host 
     30 on EP2OUT, each byte B of them is processed as follows:
     31 
     32 Bit banging mode
     33 ----------------
     34 1. Remember bit 6 (0x40) in B as the "Read bit".
     35 2. If bit 7 (0x80) is set, switch to Byte shift mode for the coming X 
     36    bytes ( X := B & 0x3F ), and don't do anything else now.
     37 3. Otherwise, set the JTAG signals as follows:
     38    - TCK/DCLK high if bit 0 was set (0x01), otherwise low
     39    - TMS/nCONFIG high if bit 1 was set (0x02), otherwise low
     40    - nCE high if bit 2 was set (0x04), otherwise low
     41    - nCS high if bit 3 was set (0x08), otherwise low
     42    - TDI/ASDI/DATAO high if bit 4 was set (0x10), otherwise low
     43    - Output Enable/LED active if bit 5 was set (0x20), otherwise low 
     44 4. If "Read bit" (0x40) was set, record the state of TDO(CONF_DONE) and
     45    DATAOUT/(nSTATUS) pins and put is as a byte( (DATAOUT<<1)|TDO) in the
     46    output FIFO _to_ the host. 
     47 
     48 Byte shift mode
     49 ---------------
     50 1. Load shift register with byte from host
     51 2. Do 8 times (i.e. for each bit of the byte; implemented in shift.a51)
     52    - if nCS=1, set carry bit from TDO, else set carry bit from DATAOUT 
     53      (Active Serial mode)
     54    - Rotate shift register through carry bit
     55    - TDI := Carry bit
     56    - Raise TCK, then lower TCK. 
     57 3. If "Read bit" was set when switching into byte shift mode, record the 
     58    shift register content and put it into the FIFO to the host. 
     59 
     60