Input jOutput Input / Output Devices and Control Units
Input/output operations involve the transfer of infor­
mation to or from main storage and an I/O device.
Input/output devices include such equipment as card
read punches, magnetic tape units, disk storage, drum
storage, typewriter-keyboard devices, printers, TELE­ PROCESSINC@ devices, and process control equipment.
Many I/O devices function with an external docu­
ment, such as a punched card or a reel of magnetic
tape. Some I/O devices handle only electrical signals,
such as those found in process-control networks. In
either case, I/O device operation is regulated by a
control unit. The control-unit function may be housed
with the I/O device, as is the case with a printer, or a
separate control unit may be used. In all cases, the
control-unit function provides the logical and buffer­ ing capabilities necessary to operate the associated I/O device. From the programming point of view,
most control-unit functions merge with I/O device
functions.
Each control unit functions only with the I/O de­
vice for which it is designed, but each control unit
has standard-signal connections with regard to the
channel to which it is attached. Input / Output Interface So that the CPU may control a wide variety of I/O devices, all control units are designed to respond to a
standard set of signals from the channel. This control­
unit-to-channel connection is called the I/O interface.
It enables the CPU to handle all I/O operations with
only four instructions. Channels Channels connect with the CPU and main storage and,
via the I/O interface, with control units. Each chan­
nel has facilities for:
Accepting I/O instructions from the CPU Addressing devices specified by I/O instructions
Fetching channel control information from main storage
Decoding control information
Testing information for validity
Executing control information
Providing control signals to the I/O interface
Accepting control-response signals from the I/O interface
Buffering data transfers Checking parity of bytes transferred Counting the number of bytes transferred
Accepting status information from I/O devices
Maintaining channel-status information
Sending requested status information to main storage
Sequencing interruption requests from I/O devices
Signaling interruptions to the CPU A channel may be an independent unit, complete
with necessary logical and storage capabilities, or it
may share CPU facilities and be physically integrated
with the CPU. In either case, channel functions are
identical.
The System/360 has two types of channels: multi­
plexor and selector. The channel facility necessary to
sustain an operation with an I/O device is called a
subchannel. The selector channel has one subchannel'
the multiplexor channel has multiple subchannels. '
Channels have two modes of operation: burst and
multiplex.
In the burst mode, all channel facilities are mono­
polized for the duration of data transfer to or from a
particular I/O device. The selector channel functions
only in the burst mode.
The multiplexor channel functions in both the burst
mode and in the multiplex mode. In the latter mode,
the multiplexor channel sustains simultaneous I/O op­
erations on several subchannels. Bytes of data are
interleaved together and then routed to or from the
selected I/O devices and to or from the desired loca­
tions in main storage. Input / Output Instructions The System/360 uses only four I/O instructions: START I/O TEST CHANNEL TEST I/O HALT I/O Input/output instructions can be executed only
while the CPU is in the supervisor state. Start I/O The START I/O initiates an I/O operation. The adoress part of the instruction specifies the channel and I/O device.
Test Channel
The TEST CHANNEL scts the condition code in the psw
to indicate the state of the channel addressed bv the instruction. The condition code then indicates nel available, interruption condition in channel, chan­
neJ working, or channel not operational.
Test I/O The TEST I/O causes a csw to be stored in location 64
of main storage, if the device addressed by TEST I/O has specified conditions for interruption. The csw
provides information on the status of the channel and I/O devices.
Halt I/O The HALT I/O terminates a channel operation.
System Structure 19
Input/Output Operation Initiation All I/O operations are initiated by START I/O. If the
channel facilities are free, START I/O is accepted and
the CPU continues its program. The channel independ­
ently selects the I/O device specified by the instruction.
Channel Address Word
Successful execution of START I/O causes the channel
to fetch a channel address word ( CAW) from the
main-storage location 72. The CAW specifies the byte
location in main storage where the channel program
begins.
Figure 18 shows the format for the CAW. Bits 0-3 specify the storage-protection key that will govern the I/O operation. Bits 4-7 must contain zeros. Bits 8-31
specify the location of the first channel command
word (Cc:W). 1 Key 1
0000
1
Command Address
o 34 7 8 31
Figure 18. Channel Address Word Format
Channel Command Word
The byte location specified by the CAW is the first of
eight bytes of information that the channel fetches
from main storage. These 64 bits of information are
called a channel command word (CCw). One or more ccw's make up the channel program
that directs channel operations. If more than one
ccw is to be used, each ccw points to the next ccw
to be fetched, except for the last ccw in the chain,
which identifies itself as the last in the chain. Figure
19 shows the format for ccw's. Six channel commands are provided:
Read
Write
Read Backward
Control
Sense
Transfer In Channel Input / OILJtput Commands Read
The read command causes a read operation from the
selected I/O device and defines the area in main
storage to be used. 20 I Command
Data Address
Code 0 7 8 L Flags Count
3637 3940 4748
Bits 0-7 specify the command code.
Bits 8-31 specify the location of a byte in main storage.
Bits 32-36 are flag bits. J 63
Bit 32 causes the address portion of the next CCW to be used a
Bit 33 causes the command code and data address in the next CCW to be used.
Bit 34 causes a possible incorrect length indication to be
suppressed.
Bit 35 suppresses the transfer of information to main storage.
Bit 36 causes an interruption as
Bits 37-39 must contain zeros.
Bits 40-47 are ignored
Bits 48-63 specify the number of bytes in the operation a
Figure 19. Channel Command Word Format
Write
The write command causes a write operation on the
selected I/O device and defines the data in main stor­
age to be written.
Read Backward
The read-backward command causes a read operation
in which the external document is moved in a back­
ward direction. Bytes read backward are placed in
descending main storage locations.
Control
The control command contains information used to
control the selected I/O device. This control informa­
tion is caned an order. Orders are peculiar to the par­
ticular I/O device in use; orders can specify such func­
tions as rewinding a tape unit, searching for a par­
ticular track in disk storage, or line skipping on a
printer. The relationship of I/O instructions, com­
mands, and orders is shown in Figure 20. CPU Channels Control Units
and
(Executes I/O Devices I/O (Execute f..--- Instructions) Commands) (Execute Orders) Figure 20. Relationship of 110 Instructions, Commands, and
Orders Sense The sense command specifies the beginning main
storage location to which status information is trans-
Previous Page Next Page