Appendix D
Operation of the SCSI
© National Instruments Corp.
D-5
GPIB-SCSI-A User Manual
Communication on the SCSI
The command definitions in the SCSI specification assume a data structure
appearing at the interface as a contiguous set of logical blocks of a fixed or
explicitly defined data length. The SCSI device maps the physical
characteristics of itself to one of several logical structures defined by the
type of device. For example, a hard disk drive might be configured as
having its media separated into blocks of a specific size with 512 bytes per
block being common.
SCSI devices process the specific commands according to how their device
operates. Therefore, the Initiator does not need to keep track of how
information is stored on each individual Target, it must know only about the
commands the Target accepts. After the Initiator commands the Target, the
Target processes the command in the way required for its hardware. In this
way, SCSI devices can be attached to many different SCSI systems and the
different Initiators only need to know whether the device recognizes the
command, not how the device processes the command.
Upon command completion, the Target always returns a single status byte
to the Initiator during the Status phase. A status code, CHECK
CONDITION, indicates that something did not go as expected with the
command and that there is additional information available, possibly
indicating what went wrong with the previous command. To receive this
additional information, most devices implement a
request
sense
command to retrieve this additional information.
Commands are issued to SCSI Targets during the Command Phase in the
form of a Command Descriptor Block. This is usually a 6-, 10-, or 12-byte
block containing information about the command that the Target is to
execute, as well as any additional information the Target may need to
execute the requested command. The 6-, 10-, and 12-byte lengths are
currently those imposed by the SCSI specification, although the
specification allows vendors to create their own device types with their own
Command Descriptor Block format.
Each Target on the SCSI can support up to eight logical units. For example,
a disk controller card with three physical disks attached can be viewed as
one Target with three logical units. For the Initiator to direct to which
logical unit the command pertains, many of the Command Descriptor
Blocks contain a field to specify the logical unit.