• Aucun résultat trouvé

Data Message Packets

Dans le document VIDEO TERMINAL (Page 122-125)

TU58 MESSAGE PACKETS

A.2 MESSAGE PACKETS

A.2.3 Data Message Packets

TU58 MESSAGE .PACKETS 113

Summary Status (Bytes 10 and 11) - These two bytes can be monitored for error conditions. When no errors occur, both bytes equal zero. Byte 10 is reserved for future expansion. Byte 11 has the following error bit assignments. 16-bit checksum used in detecting bit errors in the end command message packet.

The checksum is formed by summing successive byte pairs, taken as 16-bit words, using an end-around carry from bit 15 to bit 0. The 16-bit words are created using successive pairs of the end packet from byte 0 through byte 11, inclusive.

A.2.3 Data Message Packets

The data message packet is transmitted between the processor and tape drive controller in either direction depending on the type of instruction being executed (i.e., read or write). One data message packet transfers between 1 and 128 data bytes. For data transfers larger than 128 bytes. the transaction is broken up into multiple data packets and is sent 128 bytes at a time.

During a read instruction, the tape drive controller does not wait for a CONTINUE flag between message packets, as shown in Figure A-1. The processor is assumed to have enough buffer capacity to accept the entire transaction.

During a write command, the processor must receive the CONTINUE command from the tape drive controller before sending the next message packet, as shown in Figure A-2. This condition occurs because the tape drive controller has 128 bytes of buffer space, and it must finish all data processing before accepting an additional message packet.

The data message packet format is shown in Table A-5, and a description of each byte is provided in the following paragraphs.

Flag Byte (Byte 0) - Each packet begins with a flag byte that identifies the type of message packet to be transmitted. The flag byte is the same for all data message packets.

Octal Code 001

Message Packet Identifier

This flag informs the receiver that data, rather than a com-mand, is arriving. The receiver loads the incoming bytes into a buffer area in memory and should not wait for an instruction to execute.

114 TU58 MESSAGE PACKETS

TAPE POSITIONS AND WRITES DATA. TU58 ZERO-FILLS REMAIN·

ING 404 BYTES OF BLOCK. IF WRITE/

VERIFY, TAPE REWINDS AND READS BLOCKS JUST WRITTEN AND TESTS CHECKSUMS.

---41 SUCCESE~~AILURE I

MR-2998

Figure A-2 Write Command Packet Exchange

TU58 MESSAGE PACKETS 115

Table A-5 Data Packets

Byte No. Byte Name

0 Flag

Byte count= M

2 First data byte

3 Next data byte

Data

(data)

Bytes

(data)

Transferred

(data)

M (data)

M + 1 Last data byte M +2 Checksum L M + 3 Checksum H

Byte Count (Byte 1) - This is the number of data bytes (M) to be transferred by this data message. Between 1 and 128 data bytes may be transferred within one data message. For data transfers larger than 128 bytes, the transaction must be broken up into multiple data packets and sent 1 28 bytes at a time.

Data Bytes (Bytes 2 through M

+

1) - This is the data space for a single record on the tape; Up to 128 bytes may be written into this space for one data message.

Checksum (Bytes M+2 and M+3) - The last two bytes of the data message packet are a 16-bit checksum used in detecting bit errors in the reception of the data packet. The checksum is formed by summing successive byte pairs, taken as 16-bit words, using an end-around carry from bit 15 to bit 0. The 16-bit words are created using successive byte pairs of the data packet from byte 0 through M

+

1 (the end of the transmitted data) inclusive.

A.2.4 Single Byte Commands

The tape drive controller reacts to a set of three single-byte control commands as follows.

Octal Code Command Name Function

004 INIT Initialize tape and perform

self-test.

020 CONTINUE Ready to receive command or

continue data transmission.

023 XOFF Stop transmission and wait for

CONTINUE.

116 TU58 MESSAGE PACKETS

INIT - This control command is used in several instances.

1. When the TU58 is powered up, it performs an internal checkout and initialization procedure.

2. Upon completion of the power-up sequence, the TU58 returns INIT commands continuously to the host to indicate that the power-up se-quence has been completed.

3. The host acknowledges the TU58 by sending a BREAK and two NULL characters. When transfer is complete the host removes the BREAK then sends two INITs. The TU58 responds with CONTINUE, and it en-ters an idle state to wait for further instructions from the host.

4. If a communication breakdown occurs due to any problem, the host may restore order by sending a BREAK and two INIT commands. The TU58 reinitializes itself, returns a CONTINUE command, and waits for further instruction.

5. If the TU58 makes a protocol error or receives an invalid command, it reinitializes itself and sends 261 INIT commands to the host. The host does not interpret the INIT until it receives a complete message packet;

in this case, it is expecting a data message that contains 261 bytes and discovers the error when it expects an end packet and does not receive one.

CONTINUE - This control command is used by the TU58 to control the flow of data; thus, it averts buffer overflows and the possibility of data loss. This command is used as follows.

1. After a message is sent by the host to the TU58, the host must wait until the TU58 sends CONTINUE before any more messages can be sent. The TU58 enters an idle state and waits for further instruction.

2. If the host is unable to receive all of a message from the TU58. it may send XO FF to stop transmitting. The TU 58 stops and waits for the host to send CONTINUE before completing the data transfer.

XOFF - The tape drive controller supports the XOFF command. When the tape controller receives an XOFF command. it stops transmitting immediately and waits until the reception of the CONTINUE command before resuming data transmis-sion.

Dans le document VIDEO TERMINAL (Page 122-125)