What are the different methods of asynchronous data transfer? Explain in detail.
What are the different methods of asynchronous data transfer? Explain in detail.
Quick answer
When two units such as the CPU and an I/O interface do not share a common clock, they exchange data by asynchronous transfer. The sender must show when the data is valid, and the receiver must show that it has accepted it. For this purpose, two methods are used: strobe control and handshaking.
Method 1: Strobe control
A single control line, called the strobe, times the transfer. It is driven by one of the two units.
Source-initiated strobe. The source puts the data on the bus. After a short delay, it activates the strobe. The destination latches the data on the strobe. Then the source disables the strobe and later removes the data. For example, the CPU writes to a port in this way.
Destination-initiated strobe. The destination activates the strobe to request data. The source puts the data on the bus in reply. The destination latches the data and removes the strobe. The source then removes the data. For example, the CPU reads from a port in this way.
The weak point is that there is no reply. In the source-initiated case, the source cannot know whether the destination took the data. In the destination-initiated case, the destination cannot know whether the source has put valid data.
Source-initiated Destination-initiated
Data =<valid>= Data ====<valid>=
Strobe __|‾‾|___ Strobe __|‾‾‾‾‾|___
(source -> dest) (dest -> source)
Method 2: Handshaking
Handshaking adds a second control line so that each unit acknowledges the action of the other. Both signals change in a fixed order, so there is no doubt.
Source-initiated handshaking. Lines are "data valid" (source to destination) and "data accepted" (destination to source). The source puts data on the bus and enables data valid. The destination accepts the data and enables data accepted. The source sees this, disables data valid and removes the data. The destination then disables data accepted.
Destination-initiated handshaking. Lines are "ready for data" (destination to source) and "data valid" (source to destination). The destination enables ready for data. The source puts the data and enables data valid. The destination latches the data and disables ready for data. The source then disables data valid.
Time-out
If one unit fails, the other waits forever. A time-out circuit is added, which sets an error flag when a reply does not arrive within a set time.
Comparison of the methods
| Point | Strobe | Handshaking |
|---|---|---|
| Lines used | One | Two |
| Reply from the other unit | None | Yes |
| Reliability | Lower | Higher |
| Complexity | Very simple | More complex |
| Suitable for | Units of known and similar speed | Units of any speed |
In short, strobe is simple but blind, while handshaking is a little more costly but safe for any pair of units. Most practical interfaces use handshaking.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.
Up nextWrite a program to evaluate arithmetic expression using stack organized computer with 0-ad