sunge 发表于 2009-2-1 13:35:43

谁用过urjtag? (请 bozai-章其波兄指点)【恢复】

支持好多种JTAG适配器,我想试试。



玩过urjtag的请出来冒个泡,谈谈感受,谢谢!



---

刚才我找到bozai-章其波的文章“做了个OOCDLink-s (USB ARM-JTAG + USB-> COM) 可用于OpenOCD, Urjtag”,里面谈到基于FT2232的JTAG,在urjtag下面比并口的wiggler还要慢。我有一台OpenJTAG,仿德国制的JtagKey,基于FT2232D。



我有几个问题请教章兄,虽然不是ARM的,但可能还是在这里问比较合适:



1. 不知道你是否用过最新的urjtag-0.9?用FT2232编程Flash的速度比较并口Wiggler如何?



2. urjtag或者OpenOCD支持NEC的VR41XX系列的MIPS芯片吗? 



3. 对于同样基于FT2232的JTAG,urjtag和OpenOCD的编程速度有什么差别?



谢谢!!此外,对于以上疑惑,我也正在试验。



本贴被 sunge 编辑过,最后修改时间:2009-02-01,18:53:39.

sunge 发表于 2009-2-2 20:16:56

谢谢juedi, zlei。似乎正如juedi所说。



我看了urjtag关于ft2232适配器的资料 http://urjtag.wiki.sourceforge.net/Cable+FT2232



摘要如下:

----------------------

General Restrictions



Theoretically, a USB based pod is able to stimulate the JTAG bus with a much higher frequency than bit-banging on the parallel port would allow. Even more when bit shifts and clock events are combined and compressed into higher level commands. In reality, this requires to consider some specific features of USB.

To put it simple, each transaction over USB is bound to a 1 ms raster. E.g. a bit-bang style operation looks like this:



command: set clock high 

command: set clock low 

command: read TDO 

result: current TDO 

Given that each of the steps occurs in this 1 ms raster, the whole sequence takes 4 ms. That's far more than for parallel port drivers and results in a ridiculous overall performance. Even if this sequence is combined into one command plus one result by the FT2232 protocol, it's still 2 ms just for reading one bit of TDO.





Performance Gain



The most important rule of thumb to increase the overall transaction performance with the FT2232 chip is:



Minimize the number of USB transactions 



The immediate consequence is to build command streams as long as possible. This should be achieved with the command queuing methods described above. A USB transaction is triggered only under certain conditions:



forced flush on the cable todo queue 

maximum number of result bytes for submitted commands is reached 

the ftdi-mpsse and ftd2xx-mpsse trigger a hidden transaction when their send buffer (4K) is full 



There is a significant difference between libftdi and libftd2xx. The latter one allows to schedule up to 64*64 bytes of result data while libftdi fails with more than 4*64. As a consequence, the FT2232 driver is forced to perform around 16x more USB transactions for long command streams with TDO capture when running with libftdi.

-------------------------



那么,如果如上所言,程序使用FTDI官方的FTD2XX库(不管是在windows下使用dll还是在Linux下使用so),速度就比使用第三方的库(libftdi)要快。不知道我的理解是否正确。

zlei 发表于 2009-2-2 15:50:49

补充一下,urjtag用的是SVN下来的最新版。

zlei 发表于 2009-2-2 15:49:54

我用urjtag 烧写256KB的u-boot到PPC405EP-266 需要40分钟,用wigglar,Flash是AM29LV160DB。 

juedi 发表于 2009-2-2 14:48:58

我刚好用FT2232编了一个程序,对些有些体会,回答你的第1个问题。

1. 用FT2232编程Flash的速度比较并口Wiggler是快是慢,就看你的程序怎么写了。

   USB发包最小时隙是125us,这就使得:要想达到更快的速度,必须把JTAG的命令缓冲起来,

然后一次发出。

   我针对S3C2410、S3C2440写了一个烧写程序,在S3C2440上测试,烧写NOR Flash速度是1KB/S;

烧NAND Flash速度是1.9KB/S,是并口的6倍



   而被使用Wiggler烧写一个200K的程序,烧NOR Flash需要20分钟,烧Nand Flash需要10分钟;

而同样的程序使用sjf24x0_ft2232.exe通过FT2232来烧写,烧NOR Flash需要3分钟,烧Nand Flash不到2分钟。



   更快的方法可以通过DCC达到,至于这是什么,我也在寻找资料中。

algebra 发表于 2011-7-17 09:25:31

urjtag mark

hijk1 发表于 2011-11-17 21:42:14

来学习
谢谢楼主分享
页: [1]
查看完整版本: 谁用过urjtag? (请 bozai-章其波兄指点)【恢复】