On 02/04/2010 04:44 AM, Arnim Laeuger wrote:
This patch tries to optimize TMS clocks by compacting multiple clocks
into one FT2232 command. This gives us 6% flash program time reduction.
And it gives us more performance improvement for gdbproxy when loading
program via our gnICE and gnICE+ cables. I think this will help other
JTAG cables based on FT2232(H).
Haven't had a chance to look at the code yet. What is the mechanism
behind compacting clocks? With the current code, URJ_TAP_CABLE_CLOCK
would stuff (compact?) n requested clocks into a sequence of FT2232
commands, each one clocking 7 times. In which spot did you find further
optimization potential?
I don't see code in current svn to "stuff n requested clocks into a
sequence of FT2232 commands, each one clocking 7 times." Or I might have
missed something.
The attached patch dumps ft2232 commands. With this patch applied, you
can see the ft2232 commands which will be sent out.
Let me use a concrete example to explain what the optimization does.
Without this optimization, you can see the following command sequence:
0x4b 0x01 0x7f 0x4b 0x00 0x00 0x4b 0x00 0x00
With this optimization, it will be optimized to one command:
0x4b 0x03 0x03
Another more interesting example is it will optimize
0x4b 0x00 0x7f 0x4b 0x00 0x7f 0x4b 0x00 0x00 0x4b 0x01 0x7f
0x4b 0x00 0x00 0x4b 0x00 0x00
into
0x4b 0x06 0x1b
This patch gives us amazing performance improvement when loading program
into memory via gdbproxy. I don't have exact number for improvement now
for current UrJTAG. The old number was about 50% increase on throughput
IIRC.
But there is one problem I don't know the resolution. What is
post_signals in ft2232.c for? How should I set it for
URJ_TAP_CABLE_CLOCK_COMPACT?
post_signals was added in this change:
Revision 1419 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 19 12:06:06 2009 UTC (12 months, 2 weeks ago) by kawk
[2187351] Direct JTAG signal access, get/set_trst extension integrated
from getset_pod branch
My understanding is that post_signals acts as a "notepad" to track the
status of the pod signals for the queued actions. This allows to predict
the status of pod signals without having the need to read them from the
FT2232.
Thanks for explanation. So I think what I need to do is to set
post_signals to what the signals should be after
URJ_TAP_CABLE_CLOCK_COMPACT is done. Right?
Jie
diff --git a/src/tap/cable/cmd_xfer.c b/src/tap/cable/cmd_xfer.c
index ec795e3..5c2a1e3 100644
--- a/src/tap/cable/cmd_xfer.c
+++ b/src/tap/cable/cmd_xfer.c
@@ -118,6 +118,7 @@ urj_tap_cable_cx_cmd_space (urj_tap_cable_cx_cmd_root_t *cmd_root,
int
urj_tap_cable_cx_cmd_push (urj_tap_cable_cx_cmd_root_t *cmd_root, uint8_t d)
{
+ static int n = 0;
urj_tap_cable_cx_cmd_t *cmd = cmd_root->last;
if (!cmd)
@@ -128,6 +129,13 @@ urj_tap_cable_cx_cmd_push (urj_tap_cable_cx_cmd_root_t *cmd_root, uint8_t d)
cmd->buf[cmd->buf_pos++] = d;
+ printf ("0x%02x", d);
+ n++;
+ if (n % 16 == 0)
+ printf ("\n");
+ else
+ printf (" ");
+
return 1;
}
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development