debug feature: jtagtcpip, improve performance
authorØyvind Harboe <oyvind.harboe@zylin.com>
Fri, 16 Jul 2010 08:57:28 +0000 (10:57 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Fri, 16 Jul 2010 10:18:59 +0000 (12:18 +0200)
waiting for ZY1000 fifo to idle is now queued as
an asynchronous command. This radically improves
performance when waitIdle() is interspersed with
writes as no readback is required over TCP/IP.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/jtag/zy1000/jtag_minidriver.h
src/jtag/zy1000/zy1000.c

index d556699ab09d754826ee38bbf0ac81eb7f3664ac..f3fe5a6a247bc141443900d062a3cb34cd036d50 100644 (file)
@@ -48,6 +48,7 @@ extern uint32_t zy1000_tcpin(uint32_t address);
 
 
 
+#if BUILD_ECOSBOARD
 // FIFO empty?
 static __inline__ void waitIdle(void)
 {
@@ -57,6 +58,9 @@ static __inline__ void waitIdle(void)
                ZY1000_PEEK(ZY1000_JTAG_BASE + 0x10, empty);
        } while ((empty & 0x100) == 0);
 }
+#else
+extern void waitIdle(void);
+#endif
 
 static __inline__ void waitQueue(void)
 {
index a1104ef4f31832bf7ae22b41d20080f57463eaf2..97c94f7c2a2a2d32e0a275683a0157f9b8820a15 100644 (file)
@@ -1107,6 +1107,7 @@ enum ZY1000_CMD
        ZY1000_CMD_POKE = 0x0,
        ZY1000_CMD_PEEK = 0x8,
        ZY1000_CMD_SLEEP = 0x1,
+       ZY1000_CMD_WAITIDLE = 2
 };
 
 
@@ -1167,6 +1168,22 @@ void zy1000_tcpout(uint32_t address, uint32_t data)
        }
 }
 
+/* By sending the wait to the server, we avoid a readback
+ * of status. Radically improves performance for this operation
+ * with long ping times.
+ */
+void waitIdle(void)
+{
+       tcpip_open();
+       if (!writeLong((ZY1000_CMD_WAITIDLE << 24)))
+       {
+               fprintf(stderr, "Could not write to zy1000 server\n");
+               exit(-1);
+       }
+}
+
+
+
 uint32_t zy1000_tcpin(uint32_t address)
 {
        tcpip_open();
@@ -1241,6 +1258,11 @@ static void tcpipserver(void)
                                jtag_sleep(data);
                                break;
                        }
+                       case ZY1000_CMD_WAITIDLE:
+                       {
+                               waitIdle();
+                               break;
+                       }
                        default:
                                return;
                }

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)