
TX Ack Advance Details
USA-19H Tx Ack Advance Overview
Many Keyspan USB serial adapters support configurable "Transmit Acknowledgment Advance" (aka TX-
ACK threshold, aka TX-ACK(nowledgement) advance, etc.) in the Keyspan Manager. This feature al-
lows the user to adjust a device's transmit behavior to achieve the optimum compromise between
compatibility (exact emulation of built-in ports) and improved throughput. This document describes
the factors which a user should be aware of to guide their configuration of this feature.
The Problem
In the case of a standard, "built-in" serial port, the host CPU (the "brain" of the computer) can com-
municate directly with the serial hardware because the (serial) hardware is in the address space di-
rectly accessible to the CPU. When the serial port has transmitted all the data in its transmit FIFO
(the buffer that holds characters waiting to be sent), it interrupts the CPU, which then adds more
characters to the transmit FIFO with a minimal time delay.
By contrast, in a USB to serial adapter, information about the state of the serial port FIFO reaches
the CPU by means of USB messages. The USB subsystem in most computers delays the delivery of in-
bound (USB peripheral to USB host computer) USB messages by about 1 millisecond. The impact of
this delay on serial throughput depends on the baud rate. At 9600 baud, it takes about 1 millisecond
to transmit a character. If the serial adapter signals the host when it begins transmitting the last
character in its FIFO, the host learns about it at about the same time the character is actually fin-
ished being transmitted. Since outbound (USB host computer to USB peripheral) USB messages are not
subject to such a long delay, the host can supply new data before the serial port has been idle for too
long.
At higher baud rates, however, this 1-millisecond delay becomes more of a problem. For example, at
920 Kbps, 1 millisecond is enough time to send 92 characters. So, if you're sending 92 characters at a
time, you will only achieve 50% throughput, since half the time is spent with the adapter waiting for
the host to send more data.
The Work Around
Since there's no way to eliminate the USB delays, there's only one work around: the serial adapter has
to lie about when it's done transmitting. This way, the adapter still has some data to transmit while
it's waiting for more to arrive from the host. If the next data from the host arrives before the previ-
ous data is completely sent, the new data can be sent with no delay, and the device will achieve im-
proved transmit throughput.
Notes about the Work Around
In most situations, the serial adapter's lie is harmless or beneficial, even. However, in some circum-
stances, this lie gets us into trouble. There are several ways this can happen:
Flow control:
If the adapter is programmed to use flow control, the remote (receiving) end of the serial connection
can ask the adapter to suspend its data transmission (e.g. if it's not ready to receive more data).
Since this state can persist indefinitely, the "I'm done" indication, if it were sent early, could arrive at
the host a significant amount ahead of time. As a result, the application might use the "I'm done" sig-
nal as an indication that the remote end is ready, leading to various kinds of trouble.
Data flushing:
Sometimes, an application will issue a "transmit flush" command to the adapter get rid of extra data.
For example, let's say that an application sends "AAAA" to the adapter, and then, once it's received
the "I'm done" indication, sends "BBBB." Now, let's say that some time after sending "BBBB," the appli-
USA-19HS - User Manua
l
Page 23 of
30