Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

SCSI Bus

The SCSI stands for Small Computer System Interface, defined by ANSI. Devices, such as disks are connected to a computer via a 50-wire cable, which can be up to 25 meters in length and can transfer data at rates up to 5 megabytes/s. A SCSI bus standard has been revised and its data transfer capability has increased rapidly with several options e.g. SCSI-2 and SCSI-3. A SCSI bus may have 8 data lines, called a narrow bus and transfers data one byte a time. A wide SCSI bus has 16 data lines and transfers 16 bits at a time. Electrical Signaling scheme: single-ended transmission (SE), where each signal uses one wire, with a common ground return for all signals. In differential signaling, a separate return wire for each.. Two voltage levels: 5V (TTL level), known as HVD and 3.3V, known as LVD.

The SCSI connector may have 50, 68 or 80 pins. The maximum transfer rate varies from 5 megabytes/s to 160 mega bytes/s. The recent version of the standard supports transfer rates upto 320 mb/s, and 640 mb/s is anticipated. To achieve top transfer rate, the bus length is limited to 1.6 meter for SE signaling and 12m for LVD signaling. The maximum capacity of the bus is 8 devices for a narrow bus and 16 devices for a wide bus. Devices connected to the SCSI bus are not part of the address space of the processor bus. The SCSI bus is connected to processor bus through a SCSI controller. This controller uses DMA to transfer data packets from the main memory to the device, or vice versa.

Operation of SCSI bus A controller connected to a SCSI bus is one of two types - an initiator or a target. An initiator has the ability to select a particular target and to send command specifying the operation to be performed. The controller on the processor side, such as the SCSI controller must be able to operate as an initiator. The disk controller operates as a target. The initiator establishes a logical connection with the intended target. It can be suspended and restored as needed to transfer commands and bursts of data. Data transfers on the SCSI bus are always controlled by the target controller.

SCSI Terms
Initiator: A SCSI device that requests an operation to be performed by another SCSI device.

Host Adapter: A Controller Board that translates host I/O requests into SCSI requests. Target: A SCSI device that performs an operation as requested by an initiator.

Logical Unit: A Physical or Virtual device addressable through a target. LUN: Logical Unit Number. An encoded three-bit identifier for the logical unit.

SCSI Terms
SCSI Device: A Host Adapter or Intelligent Peripheral which can be attached to a SCSI bus. SCSI Address:The hex representation (0-7 or 0-F) of the unique address assigned to a SCSI device. Connect: The function which occurs when an initiator selects a target to begin an operation. The function which occurs when a target releases control of the SCSI bus, allowing it to go Bus Free. The function which occurs when a targets selects an initiator to continue an operation after a disconnect.

Disconnect:

Reconnect:

SCSI Configuration Single Initiator, Single Target

LUN0

Initiator SCSI Bus

Target

LUN1

LUN2

SCSI Configuration Single Initiator, Multiple Targets

T Initiator 7

Target 0

SCSI Bus

Target 1

Target n T SCSI Bus Terminator

SCSI Configuration Multiple Initiators, Multiple Targets

T Initiator 7

Target 0

SCSI Bus

Target 1

Initiator 6 Target n T

SCSI Parallel Bus Types


Single-Ended 5V -SIG - Single Signal Level FALSE - 6m max. bus length - No Fast Timings TRUE - Uses Even bus pins only 0V Differential TRUE = -SIG < 1.5V - Dual Signal Level 5V - 25m max. bus length -SIG - Fast Timings - Uses all pins on bus TRUE FALSE LVDS (SCSI-3+) - 3VDC Diff Bus - 12m max. bus length +SIG 0V TRUE = +SIG > -SIG

Let us examine a complete disk read operation as an example. Assume that the processor wishes to read a block of data from a disk drive and that these data are stored two disk sectors that are not contiguous. The processor sends a command to the SCSI controller, which causes the following sequences of events:

The SCSI controller, acting as an initiator, contends for control of the bus When the initiator wins the arbitration process,it selects the target controller and hands over control of the bus to it The target starts an output operation (from initiator to target); in response to this, the initiator sends a command specifying the required read operation

The target, realizing that it first needs to perform a disk seek operation, sends a message to the initiator indicating that it will temporarily suspend the connection between them. Then it releases the bus

The target controller sends a command to the disk drive to move the read head to the first sector involved in the requested read operation. Then it reads the data stored in that sector and stores them in a data buffer. When it is ready to being transferring data to the initiator, the target requests control of the bus. After it wins arbitration, it reselects the initiator controller, thus restoring the suspended connection

The target transfers the contents of the data buffer to the initiator and then suspends the connection again. Data are transferred either 8 or 16 bits in parallel, depending on the width of the bus The target controller sends a command to the disk drive to perform another seek operation. Then, it transfers the contents of the second disk sector to the initiator, as before. At the end of this transfer, the logical connection between the two controllers is terminated

As the initiator controller receives the data, it stores them into the main memory using the DMA approach The SCSI controller sends an interrupt to the processor to inform it that the request operation has been completed

The SCSI Bus Signals


Category Data Name Function -DB(0) to -DB(7) Data line: Carry one byte of information during the information transfer phase and identity device during arbitration, selection and reselection phases -DB(P) Parity bit for the data bus -BSY -SEL -C/D Busy: Asserted when the bus is not free Selection: Asserted during selection and reselection Control/Data: Asserted during transfer control information (command, status or message) Message: indicates that the information being transferred is a message

Phase

Information type

-MSG

The SCSI Bus Signals


Category Handshake Name -REQ -ACK Function Request: Asserted by a target to request a data transfer cycle. Acknowledgement: Asserted by the initiator when it has completed a data transfer operation Input/Output: Asserted to indicate an input operation (relative to the initiator) Attention: Asserted by an initiator when it wishes to send a message to a target Reset: Causes all device controls to disconnect from the bus and assume their start-up state

Direction of transfer Other

-I/O -ATN -RST

Various Phases in SCSI bus operation The bus has no address lines. Instead, the data lines are used to identify the bus controllers. For a narrow bus, there are eight possible controllers, numbered 0 through 7. A controller places its own address or the address of another controller on the bus by activating the corresponding data line. Once a connection is established between two controllers, there is no need for addressing and the data lines are used to carry data. The main phases involved in the operation of the SCSI bus are arbitration, selection, information transfer and reselection.

Arbitration The bus is free when the -BSY signal is in the inactive (high voltage) state. Any controller can request the use of the bus while it is in this state. Since two or more controllers may generate such a request at the same time, an arbitration scheme must be implemented. A controller requests the bus by asserting the -BSY signal and by asserting its associated data line to identify itself. Each controller in the bus is assigned a fixed priority, with controller 7 having highest priority. When -BSY becomes active, all controllers that are requesting the bus examine the data lines and determine whether a higher priority device is requesting the bus at the same time. The controller using the highest numbered line realizes that it has won the arbitration.

Arbitration and Selection on the SCSI Bus. Device 6 Wins Arbitration and Selects Device5
Targets examine ID DB2 DB5 DB6

BSY SeL Free Arbitration Selection

Selection Having won arbitration, controller 6 continues to assert -BSY and -DB6 (its address). It indicates that it wishes to select controller 5 by asserting the -SEL and then the -DB5 line. The selected target controller responds by asserting -BSY. This informs the initiator that the connection it is requesting has been established, so that it may remove the address information from data lines. The selection process is now complete, and the target controller is asserting -BSY.

Information Transfer The information transferred between two controllers may consist of commands from the initiator to the target, status responses from the target to the initiator, or data being transferred to or from the I/O device. Handshake signaling is used to control information transfers. The target asserts -I/O during an input operation (target to initiator) and it asserts -C/D to indicate that information is a command or status response. At the end of the transfer, the target controller releases -BSY signal, thus freeing the bus for use by other devices.

Reselection When a logical connection is suspended and the target is ready to restore it, the target must first gain control of the bus. It starts an arbitration cycle, and after winning arbitration, it selects the initiator. The initiator is now asserting -BSY. The initiator waits for short period after being selected to make sure that target has asserted -BSY, and then releases the -BSY line. The connection between the two controllers has now been reestablished, with the target in control of the bus as required for data transfer to proceed.

SCSI Parallel Bus Protocol


Bus Phases and their Sequencing MSG, C/D, I/O collectively known as Bus Phase Initiator and Target Roles Initiator Begins an Operation Target controls operation via Bus Phase and REQ Initiator can disrupt sequence with ATN and RST

SCSI Parallel Bus Signals 50 Pin Bus (Narrow), 68 Pin Bus (Wide) DB(0-7,P1) I/T DB(8-15, P2) I/T REQuest T ACKnowledge I ATtentionN SELect BuSY ReSeT MeSsaGe Cmd/Data In/Out I I/T I/T I T T T 8 Bit Data Bus with Odd Parity 2nd 8 Bit Data Bus with Odd Parity (Wide Only) Asking for data byte to be sent/on bus Indicates data byte on bus/read byte Indicates pending message for target Indicates Selection/Reselection in progress Indicates SCSI Bus in use Resets all SCSI devices Indicates Message Byte Indicates Command/Msg or Data Indicates Data Direction

SCSI Bus Phases


BSY 0 1 1 1 1 1 1 1 1 1 1 SEL x 1 1 0 0 0 0 0 0 0 0 MSG C/D x x x x 0 0 0 0 1 1 1 1 x x 0 0 1 1 0 0 1 1 I/O x 0 1 0 1 0 1 0 1 0 1 Definition Bus Free (Idle) Selection Reselection Data Out Data In Command Status (Reserved) (Reserved) Message Out Message In I -> T I <- T I -> T I <- T

I -> T I <- T

Asynchronous Bus Conditions


Attention Condition - Initiator asserts ATN to indicate pending message for target - Next Bus Phase change will be to Message Out phase Reset Condition - Initiator asserts RESET for 25 usec - Devices currently on the SCSI bus will immediately release - All devices are reset - All outstanding commands are cleared

SCSI Bus Phase Sequencing


Bus Free Arbitration Reselection Msg In Data/Msg phases Msg In

Selection Msg Out Command Status

any phase RESET Bus Free

SCSI Parallel Bus Protocol


REQ/ACK Handshakes for Information Transfer In phases: REQ (Target) sends byte ACK (Initiator) indicates byte has been read Out phases: REQ (Target) asks for byte ACK (Initiator) sends byte Two Transfer Modes Asynchronous Synchronous

Information Transfer: Asynchronous Operations In: REQ ACK Data Out: REQ ACK Data Default Transfer Mode for all phases

Information Transfer: Synchronous Operations In: REQ ACK Data Out: REQ ACK Data Data Phases Only, MUST be negotiated (speed and offset)

You might also like