|
Contents:
Smart UART Overview For Upgraded SatisFAXtion Classic And SatisFAXtion Modem/350
This information explains the performance and reliability improvements of the Smart UART feature of the Upgraded SatisFAXtion Classic and SatisFAXtion Modem/350 over the conventional UART (Universal Asynchronous Receiver Transmitter). The benefits are very apparent in multitasking environments such as Windows. What Is Data Overrun Anyway?
Before getting too deep into how the Smart UART works, let's review some of the problems encountered using a high speed modem on a PC serial port. Many of today's high speed modems implement error control protocols such as V.42 and MNP that transparently remove all data errors caused by impairments on the telephone line. The PC serial port the modem is connected to only sees the corrected error-free data.
A communication application (e.g., PROCOMM, etc.) typically uses a routine called by serial port hardware interrupts to collect received data in a buffer. The buffer holds the data while the systems is busy doing other things which take a long time -- for example writing received data to disk. As this buffer gets close to filling, the application sends a flow control signal that tells the PC's modem to stop sending data to the PC serial port. The PC's modem then tells the remote modem (using special V.42 or MNP messages) to stop sending data for a while. As the buffer gets close to empty, the application sends another flow control signal to the PC's modem to tell it to send more data. The PC's modem then tells the remote modem to resume sending. So, flow control prevents the communication application's character buffer from spilling over and losing data because the application knows how much data is in the buffer at all times.
But with 386, i486, and Pentium PCs running virtualized, preemptive multitasking environments like Windows, the PC's processor can be distracted for extended periods of time with no prior warning to the communication application. If the modem is not being held off with flow control and the PC's processor gets distracted for more than 1 character time (or up to 16 characters for a 16550A FIFO UART), data gets lost at the PC's serial port UART. Although flow control does a good job of preventing the communication application's buffer from overflowing and losing data, it cannot provide the same service for the UART's tiny buffer. If characters are lost like this during a file transfer (Zmodem, etc.), that damaged block must be sent again as if bad data was coming out of a modem that had no error control. If it happens while scrolling your Email, the lost characters will be missing from the text your are reading (e.g., $1000 may appear as $100).
Confused? Consider this silly analogy. Let's say that you have a 10 gallon bucket of water that you want to fill to wash the car, but someone stole your garden hose, and the faucet is located right over an extremely fragile plant with shallow roots. Cleverly, you run into the house and get 2 coffee cups. As one cup is filling from the faucet, you are emptying the other into the bucket that is a foot or two away. All you have to do to prevent spilling water is to get that freshly emptied cup underneath the filling cup before it spills over -- no sweat! At about the 2 gallon mark, a bee lands on your nose, and you're suddenly not so concerned about how quickly you get that empty cup back under the faucet. Eventually, the bee decides you're a pretty raunchy smelling flower, and buzzes off. You then look over to just in time to see your shallow rooted plant floating down the drain!!
So then, think of the receiving modem as the faucet, the PC's UART as the two cups, and you are the PC's processor -- get it? What The Smart UART Does For You
The Upgraded SatisFAXtion Classic and SatisFAXtion Modem/350 have a large gate array device which, in addition to other functions, provides special circuitry that appears to the PC processor as a standard 16450 UART. In reality, it's just a facade that looks just like a serial port. Instead of shifting the character bits serially in from and out to a modem on the far end of an RS-232 cable, the characters stay intact as bytes. These characters are transferred directly between the PC processor and the SatisFAXtion board's 80C186-16 processor through the silicon. The special circuitry inside the device gives the 80C186-16 complete visibility and control of the UART facade internal workings. The 80C186-16 knows what the PC processor is doing on the other side of this facade, and more importantly, has direct control over what the PC processor sees.
Since the SatisFAXtion board's 80C186-16 knows whether or not the PC processor has taken the last character that it deposited into the UART, it will NEVER try to put another character in until the previous one is read -- no data is spilled. Think of it as a really smart faucet that shuts off the water if you don't replace the cup in time. This is true no matter how fast the data is being moved or how busy the PC processor is. The on-board 80C186-16 will wait indefinitely until the PC processor has taken the last character before trying to give it a new one.
This protection against data loss enables you to set your communication application baud rate (DTE rate) as high as you like with no fear of losing data. UARTs With FIFOs (16550A, Etc.)
So you may also ask, what do the FIFO (First In First Out) buffers in a 16550A do for you? The 16550A receiver FIFO is a buffer which can hold up to 16 characters before losing any data. The 16550A has a programmable receiver trigger which can be configured to request service as soon as a single character arrives, allowing the host PC's processor to be distracted for up to 16 more character times without overrunning the FIFO and losing data. This can work very well for systems that occasionally have very long latency problems, but are otherwise not heavily affected by the overhead caused by having to service the UART once per each character.
The receiver trigger has 3 other settings which configure the 16550A not to request service from the PC processor until it has collected up to 4, 8 or 14 characters, resulting in much less overhead per request (and less latency protection). This reduction in overhead can be used either to give more of the PC processor back to other applications that are running, or can also be used to handle a higher data rate. Note that if more than 4 character times have elapsed since the last character arrival, the 16550A will generate a request to prevent data from being trapped in a partially full FIFO.
Getting back to our analogy, it's the same as having bigger cups. Since the cups are larger, you are not constantly busy swapping cups for a given flow rate. You can use this extra time between cup swaps to chat with your neighbor, or if you are ambitious you could open the faucet more to get the bucket filled faster. Just make sure you don't get distracted too long as the water level in the cup approaches your chosen full mark.
Ideally, the 16550A receiver trigger should be set to the largest number of characters that won't cause any characters to be lost at that baud rate because of PC processor latency. On slower SX machines that take longer to task switch, a low trigger point may be required. The lower trigger point causes more frequent requests (overhead) of the PC processor as well, so a lower DTE rate setting may be the only alternative if the PC processor can't keep up with the flow rate.
Interestingly enough, in Windows 3.1, Microsoft chose to set the 16550A receiver trigger at the highest possible setting of 14 characters, favoring low overhead for PCs fast enough to always respond to requests within 3 character times. Although this provides 3 character times of latency protection whereas before in 16450 mode there was only one, slower 80386SX equipped systems may lose characters at a rate where a receiver trigger setting of 8 may have provided adequate latency protection and efficiency to operate error free.
You may be wondering which is better for running under Windows -- a 16550A that reduces burden, or the Upgraded SatisFAXtion Classic and SatisFAXtion Modem/350 Smart UART interface? The answer is really both! At a given baud rate, the 16550A when set to a 14 character receiver trigger will generate less overhead for the PC Processor. On the other hand, no matter what nasty transient things you may do in Windows that affect latency, the Smart UART is never going to drop a character on you. Smart UART Glossary
COM Port A logical device name used with DOS that references a serial port in the IBM compatible PC. COM device names (COM1, COM2, etc.) are normally assigned in sequence by the order in which they are discovered by the PC's ROM BIOS when the machine is booted. These names are often incorrectly used to indicate the physical I/O address at which a serial port if configured. See also Serial Port.
8250, 16450 These are UART devices developed by National Semiconductor Inc., which are commonly used in IBM PC compatible computers. Both UARTs have the ability to buffer only one character for both receive and transmit. The Upgraded SatisFAXtion Classic and SatisFAXtion Modem/350 emulate the 16450 UART. See also definition of UART below.
16550A This is a UART device developed by National Semiconductor Inc. that contains two 16 byte FIFOs, one for receive and one for transmit. The receive FIFO reduces the likelihood of losing received characters caused the hosting microprocessor's inability to remove the prior character in time, and also reduces the hosting microprocessor's overhead by collecting more than one character before interrupting it. The transmit FIFO reduces the overhead caused by interrupting the processor each time a character is sent. It was originally developed for the IBM PS/2 line of personal computers, but has recently been growing rapidly into ISA and EISA bus applications as well since the appearance of high speed modems and laptop serial file transfer packages.
FIFO First In, First Out. This is a memory or storage area that preserves the order of data, queuing the data up until the recipient is able to remove it.
Latency The delay from when a piece of data or service is requested until the time it is actually delivered or removed.
Serial Port The combination of a UART and an external connector (usually DB-9 or DB-25) which is used to operate devices such as modems, serial printers, and mice.
UART Universal Asynchronous Receiver/Transmitter. The purpose of this device is to break down entire characters into a single bit serialized stream that is sampled by the remote end at known intervals and re-assembled into characters. By using only a single wire in each direction to carry the information, substantial savings are realized in cabling and connector costs.
This applies to:
|