2021 22 2b

Computer Organization and Architecture2021-2210 marksSerial Communication

Explain destination-initiated transfer using handshaking method.

Explain destination-initiated transfer using handshaking method.

Quick answer

In asynchronous data transfer, the source and the destination units have independent clocks. They must therefore use control signals to agree on when data is valid and when it has been taken. Handshaking uses two control lines, one in each direction. In destination-initiated transfer, the destination starts the exchange by saying that it is ready to receive data.

Control lines

  • Ready for data: this line goes from the destination to the source. It tells the source that the destination is ready to take a word.
  • Data valid: this line goes from the source to the destination. It tells the destination that the data on the bus is valid.
        data bus (8 or 16 lines)
  +--------+ ===================> +-------------+
  | Source |   data valid  ------> | Destination |
  |  unit  | <------ ready for data|    unit     |
  +--------+                       +-------------+

Sequence of events

The destination first activates "ready for data". This shows that it wants a word and has room for it.

When the source sees ready for data, it places the data word on the data bus. After the data has settled, it activates "data valid".

The destination sees data valid and knows that the bus holds a good word. It latches the word into its register.

After latching the data, the destination removes "ready for data". This tells the source that the word has been taken.

The source sees ready for data go low. It removes the data from the bus and also disables "data valid".

The system is now back in the starting state. The destination can raise ready for data again to ask for the next word.

Timing diagram

 Ready for data  __|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|________
 Data valid      ______|‾‾‾‾‾‾‾‾‾‾|________
 Data bus        ______<==valid====>________
                  1     2    3     4    5

Here 1 is where the destination asks, 2 is where the source puts data and data valid, 3 is where the destination latches the data, 4 is where ready for data is removed, and 5 is where the source removes data valid and data.

Why this is reliable

Each signal change is a reply to the other unit's signal change. The source does not drop the data until the destination says it has taken it. The destination does not take the data until the source says it is valid. So no word is lost or read twice, whatever the speeds of the two units.

Compared with the source-initiated method

In source-initiated handshaking the source starts with data valid, and the destination answers with data accepted. In the destination-initiated method, the receiver controls the pace. The source cannot send before it is asked. This is useful when the receiver, such as a slow printer, is the one that knows when it can accept data.

Use

Parallel interfaces such as Centronics printer ports, and many bus protocols, use this style of handshake. A time-out circuit can be added to signal an error if the other unit never replies.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.

Up nextExplain 2-bit by 2-bit Array multiplier. Draw the flowchart for divide operation of two nu