`PeeteTL:
`
`rasae ADDISON-WESLEY
`
`a ’DISKINCLUDED 4
`
`OLYMPUS EX. 1006- 1/312
`
`HUAWEI EX. 1006 - 1/312
`
`OLYMPUS EX. 1006 - 1/312
`
`
`
`—— @ ———
`
`
`The
`
`SCSI Bus
`
`and
`
`IDE Interface
`
`
`
`
`
`
`
`OLYMPUS EX.1006 - 2/312
`
`HUAWEI EX. 1006 - 2/312
`
`OLYMPUS EX. 1006 - 2/312
`
`
`
`
`The
`
`SCSI Bus
`
`and
`
`IDE Interface
`
`
`
`Protocols, Applications and Programming
`
`
`
`
`
`
`
`Sd
`
`
`
`Friedhelm Schmidt
`
`
`Translated by
`
`
`
`J. Michael Schultz
`
`
`TransTech Translations
`
`
`
`
`
`
`
`A.
`vv
`
`ADDISON-WESLEY
`
`PUBLISHING
`
`COMPANY
`
`
`
`
`
`
`
`
`
`
`
`
`Wokingham, England * Reading, Massachusetts * Mento Park, California « New York
`
`
`
`
`
`
`
`
`Don Mills, Ontario * Amsterdam « Bonn
`Sydney ¢ Singapore
`
`
`
`
`
`
`
`
`
`
`Tokyo * Madrid * San Juan © Milan * Paris « Mexico City.* Seoul « Taipei
`
`OLYMPUS EX.1006- 3/312
`
`HUAWEI EX. 1006 - 3/312
`
`OLYMPUS EX. 1006 - 3/312
`
`
`
`
`
`TK 7EqS
`"afeS>
`MERCER
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`© 1995Addison-Wesley PublishersLtd.
`
`
`
`
`
`
`
`
`
`
`© 1995 Addison-Wesley Publishing CompanyInc.
`
`
`
`
`
`
`
`
`Translated from the German edition SCS-Bus und IDE-Schnittstelle
`
`
`
`
`
`published by Addison-Wesley (Deutschland) GmbH.
`
`
`
`
`
`
`
`
`
`
`
`
`
`All rights reserved. No part of this publication may be reproduced,stored in a retrieval
`
`
`
`
`
`
`
`
`
`
`
`
`system, or transmitted in any form or by any means, electronic, mechanical,
`
`
`
`
`
`
`
`
`
`
`photocopying, recording or otherwise, without prior written permission of the
`
`publisher.
`
`
`
`
`
`
`
`
`
`
`
`
`
`The programsin this book have been included for their instructional value. They have
`
`
`
`
`
`
`
`
`
`
`
`
`
`been tested with care but are not guaranteed for any particular purpose. The publisher
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`does not offer any warranties or representations nor doesit accept any liabilities with
`
`
`
`
`respect to the programs.
`
`
`
`
`
`
`
`
`
`
`
`Manyof the designations used by manufacturers andsellers to distinguish their
`
`
`
`
`
`
`
`
`
`
`
`products are claimed as trademarks. Addison-Wesley has made every attempt to
`
`
`
`
`
`
`
`
`
`supply trademark information about manufacturers and their products mentioned in
`
`
`this book.
`
`
`
`
`
`
`Cover designed by Designers & Partners, Oxford
`
`
`
`
`
`
`
`
`and printed by The Riverside Printing Co. (Reading) Ltd.
`
`
`
`
`
`
`Typeset by VAP Group, Kidlington, Oxon.
`
`
`
`
`
`
`
`
`
`
`
`
`Printed and boundin GreatBritain at T.J. Press (Padstow) Ltd, Padstow, Cornwall
`
`
`
`First printed 1995
`
`
`ISBN 0-201-42284-0
`
`
`
`
`
`
`British Library Cataloguing in Publication Data
`
`
`
`
`
`
`
`
`
`
`
`
`A catalogue record for this book is available from the British Library.
`
`
`
`
`
`Library of Congress Cataloging-in-Publication Data
`
`
`Schmidt. Friedhelm
`
`
`
`
`(SCSI-Bus und [DE-Schnittstelle. English)
`
`
`
`
`
`
`
`
`The SCSI bus and IDEinterface/Friedhelm Schmidt; translated by
`
`
`Michael Schultz.
`
`
`Pp. cm.
`
`Includes index.
`
`
`ISBN 0-201-42284-0
`
`
`__1, SCSI (Computer bus)
`
`
`TK7895-B87536 1995
`
`
`004. 6°2--dc20
`
`
`
`
`
`
`
`2. IDE (Standard)
`
`
`
`
`I. Title
`
`
`
`
`
`
`94-23813
`
`cIP
`
`
`
`AESOF ConCae
`FEB 1 9 1995
`cory
`
`ciP
`
`
`
`
`
`OLYMPUS EX.1006 - 4/312
`
`HUAWEI EX. 1006 - 4/312
`
`OLYMPUS EX. 1006 - 4/312
`
`
`
`Preface
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`The SCSI bus and IDE interface are without question the two most important
`
`
`
`
`
`
`
`
`
`
`
`
`
`interfaces for computer peripherals in use today. The IDE hard disk interface is
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`found almost exclusively in the world of IBM PC compatibles. The SCSI bus, on
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`the other hand, is designed not only for hard drives butalso for tape drives, CD-
`
`
`
`
`
`
`
`
`
`
`
`ROM,scanners, and printers. Almost all modern computers, from PCs to work-
`
`
`
`
`
`
`
`
`stations io mainframes, are equipped with a SCSI interface.
`
`
`
`
`
`
`
`
`
`
`
`
`Both SCSI and IDE are ANSI standards. However, aside from the actual
`
`
`
`
`
`
`
`
`
`
`ANSI documentation, there exists almost no additional reference material to
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`either specification. The purposeof this bookis to fill that void with a clear, con-
`
`
`
`
`
`
`
`
`
`
`cise description of both interfaces. The essential terminology is introduced,
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`while the commands and protocols are broken down in full. In the interest of
`
`
`
`
`
`
`
`
`
`
`
`
`economy the less important details and options have been omitted in certain
`
`
`
`
`
`
`
`
`
`
`
`
`cases. Often a specific section in the ANSI documentation will be cited for easy |
`
`
`
`
`
`
`
`
`
`
`
`
`
`cross-referencing. After reading this book you should be in the position to easily
`
`
`
`
`
`
`
`
`understand relevant technical documentation, including the ANSIspecifications
`
`themselves.
`
`
`
`
`
`
`
`
`
`
`
`First and foremost, a thorough introduction to the terminology is in
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`order. Especially with respect to SCSI, there is a deluge of terms and definitions —
`
`
`
`
`
`
`
`
`
`
`
`
`
`that are used nowhere else or are used differently than in other computer
`
`
`
`
`
`
`
`
`
`domains. These keywords, which include signal names and interface com-
`
`
`
`
`
`
`
`
`
`mands, are typeset in small capital letters, for examyple FORMAT UNIT.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`This book is intended for readers with a broad range of technical back-
`
`
`
`
`
`
`
`
`
`
`
`
`
`grounds and interests. Those working on the design of mass storage devices, for
`
`
`
`
`
`
`
`
`
`
`example, will find the protocol descriptions extremely useful. Readers writing soft-
`
`
`
`
`
`
`
`
`
`
`
`
`
`ware or device drivers may have other interests. They will find the hardware
`
`
`
`
`
`
`
`
`
`
`
`
`
`descriptions, such as that of the physical organization of a disk drive, very helpful.
`
`
`
`
`
`
`
`
`
`
`
`
`
`This book is not meantto replace the ANSI documentation. On the other
`
`
`
`
`
`
`
`
`
`
`
`
`hand, those specifications are not meant to explain the technology, rather to
`
`
`
`
`
`
`
`
`
`
`
`
`
`defineit. It is very difficult to find your way around in the original documenta-
`
`
`
`
`
`
`
`
`
`
`
`tion without an understanding of the subject matter. The book’s thorough, in-
`
`
`
`
`
`
`
`
`
`
`
`
`
`depth descriptions, along with index and glossary, make it the perfect tutor for
`
`
`
`
`
`
`
`
`
`
`
`
`
`IDE and SCSI, as well as a helpful guide to the ANSIliterature.
`
`
`Friedhelm Schmidt
`
`
`February 1993
`
`
`
`
`
`OLYMPUS EX.1006 - 5/312
`
`HUAWEI EX. 1006 - 5/312
`
`OLYMPUS EX. 1006 - 5/312
`
`
`
`Contents
`
`
`
`Preface
`
`
`
`
`PartI
`
`Introduction
`
`
`
`
`
`
`1 Computers and peripherals
`
`
`1.1 Massstorage
`
`
`
`1.2
`Peripheral interfaces
`
`
`
`
`
`
`
`
`
`
`2 Traditional peripheral interfaces
`The RS-232 serial interface
`2.1
`
`
`
`
`
`
`
`
`
`
`2.2
`The Centronics printer interface
`2.3 Hard disks and their interfaces
`
`
`
`
`
`
`
`
`2.4
`ST506
`2.5
`ESDI
`
`
`
`
`
`3 Computer buses
`
`
`
`Characteristics of buses
`3.1
`
`
`
`
`3.2
`Specialized buses
`
`
`
`
`
`
`
`Part II The IDE interface
`
`
`
`
`
`4 Background
`
`
`
`
`
`4.1
`The origin of IDE
`4.2 Overview
`
`
`
`
`4.3. Outlook
`4.4 Documentation
`
`
`
`
`5
`
`
`
`6
`
`
`
`
`
`
`
`The physical IDE interface
`
`
`
`Theelectrical interface
`5.1
`
`
`
`5.2
`Timing specifications
`
`
`
`
`
`IDE protocol
`
`
`
`
`
`
`
`6.1
`The register model of the IDE controller
`6.2 Command execution
`
`
`
`
`
`
`
`6.3
`Power-up or hardware reset
`
`
`
`
`
`
`
`v
`
`
`1
`
`
`
`3
`4
`5
`
`
`
`
`
`
`7
`7
`
`10
`
`13
`
`
`19
`23
`
`
`
`29
`
`30
`
`32
`
`35
`
`
`
`
`37
`
`37
`38
`
`
`40
`
`4]
`
`44
`
`
`44
`
`47
`
`
`50
`
`50
`55
`
`
`38
`
`OLYMPUS EX.1006 - 6/312
`
`HUAWEI EX. 1006 - 6/312
`
`OLYMPUS EX. 1006 - 6/312
`
`
`
`
`
`
`
`
`
`Part III
`
`
`
`9
`
`
`10
`
`
`I
`
`
`12
`
`
`Contenis
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`The model of an IDE disk drive
`
`
`
`7.1 Organization of the medium
`
`
`
`
`7.2 Defect management
`
`
`
`7.3
`The sector buffer
`7.4
`Power conditions
`
`
`
`
`
`
`
`IDE commands
`
`
`
`8.1 Mandatory commands
`8.2 Optional commands
`
`
`
`The SCSI bus
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Background
`
`
`9.1
`The evolution of SCSI
`
`
`92 Overview
`
`9.3 Outlook
`9.4 Documentation
`
`
`
`
`SCSI hardware
`
`
`
`10.1 SCSE configurations
`
`
`
`10,2 SCSI signals
`
`
`
`10.3 Cables and connectors
`
`
`
`10.4 Single-ended SCSI
`
`
`
`
`10.5 Differential SCSI
`
`
`
`
`
`
`10.6 SCSI bus phases
`
`
`
`10.7 Synchronoustransfers and Fast SCSI
`10.8 Wide SCSI
`
`
`
`
`
`
`SCSI busprotocol
`
`
`
`11.1 The message system
`
`
`
`I/O processes
`11.2
`
`
`
`
`11.3 SCSI pointers
`
`
`
`11.4 Disconnect-reconnect: freeing the bus
`
`
`
`11.5 Transfer options
`
`
`
`
`11.6 Tagged queues
`
`
`
`
`
`
`11.7 Termination of I/O processes
`
`
`
`
`11.8 Error handling in the message system
`11.9 Asynchronous eventnotification
`
`
`
`
`
`
`SCSI commands
`
`
`
`12.1 The SCSI target model
`
`
`
`
`
`42.2. Commanddescriptor blocks
`
`
`
`
`
`
`
`12.3 Commandsfor all SCSI devices
`12.4 Mode parameter pagesforall device classes
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`131
`
`
`
`
`155
`
`OLYMPUS EX.1006- 7/312
`
`HUAWEI EX. 1006 - 7/312
`
`OLYMPUS EX. 1006 - 7/312
`
`
`
`
`vili
`
`SCSI Bus and IDEinterface
`
`
`
`
`
`
`
`13. Direct access devices
`
`
`
`
`
`13.1 The model of a SCSI disk drive
`
`
`
`
`
`
`
`
`
`13.2. Hard disk commands-
`
`
`
`
`
`
`13.3 Mode parameter pages for disk drives
`
`
`
`
`
`14
`
`
`
`15
`
`
`
`16
`
`
`17
`
`
`
`
`Tape drives
`
`
`
`
`
`
`14.1 The model of a SCSI tape drive
`
`
`
`
`
`14.2. Commandsfor tape devices
`
`
`
`
`
`14.3 Mode parameters for tape devices
`
`
`
`
`
`Printers
`
`
`
`
`
`
`15.1 The model of a SCSI printer
`
`
`
`15.2 Printer commands
`
`
`
`
`15.3 Mode parameters for printers
`
`
`
`
`
`Scanners
`
`
`
`
`
`
`16.1 The model of a SCSI scanner
`16.2 Scanner commands
`
`
`
`
`
`
`
`16.3 Mode parameters for scanners
`
`
`
`
`
`Processor devices
`
`
`
`
`
`
`
`
`17.4. The model of a SCSI processor device
`
`
`
`
`
`17.2. Commandsfor processor devices
`
`
`
`
`
`
`18 Communications devices
`
`
`
`
`
`
`
`18.1 The model of a SCSI communications device
`
`
`
`
`
`
`18.2. Commands for SCSI communications devices
`
`
`
`
`
`
`18.3 Mode parameter pages for communications devices
`
`
`
`
`
`
`
`
`
`19 Optical storage and WORMdrives
`
`
`
`
`
`
`
`19.1 The SCSI modelof optical storage
`
`
`
`
`
`
`
`19.2. Commandsfor optical storage and WORM drives
`
`
`
`
`
`
`19.3 Mode parameters for optical storage
`
`
`
`
`
`20 CD-ROM
`
`20.1 The model of a SCSI CD-ROM drive
`
`
`
`
`
`
`
`
`
`20.2 Commands for CD-ROM
`
`
`
`
`
`20.3 Audio commands for CD-ROM
`
`
`
`
`
`20.4 Mode parameters for CD-ROMs
`
`
`
`
`
`
`21 Medium-changer devices
`
`
`
`
`
`
`
`21.1 The model of a SCSI medium-changer device
`
`
`
`
`21.2 Commands for medium-changers
`
`
`
`
`
`21.3 Mode parameter pages for medium-changers
`
`
`
`
`
`
`
`22 The SCSI monitor program
`
`
`
`
`158
`
`158
`
`165
`
`173
`
`
`180
`
`180
`
`184
`
`190
`
`193
`
`
`193
`
`194
`
`197
`
`200
`
`
`200
`202
`
`
`204
`
`206
`
`
`206
`
`207
`
`
`210
`
`210
`
`211
`
`213
`
`
`214
`
`214
`
`215
`
`220
`
`
`222
`
`222.
`
`224
`
`227
`
`229
`
`
`233
`
`233
`
`235
`
`237
`
`
`240
`
`OLYMPUS EX.1006 - 8/312
`
`HUAWEI EX. 1006 - 8/312
`
`OLYMPUS EX. 1006 - 8/312
`
`
`
`
`23
`
`
`24
`
`
`25
`
`
`
`
`«©6Software interfaces
`
`
`
`
`
`23.1 The concept of ASPI
`
`
`
`
`23.2 SCSI request blocks
`
`
`
`
`
`23.3 ASPIinitialization and function calls
`
`
`
`
`
`
`Test equipment
`
`
`
`24.1 SCSI analyzers
`
`
`
`24.2 SCSI emulators
`
`
`
`24.3 Examples from industry
`
`
`
`
`
`
`
`
`SCSI protocol chips
`
`
`
`25,1 The NCR 5385
`
`
`
`
`
`25.2 Target applications: EMULEX ESP200
`
`
`
`
`
`
`
`25.3 PC host adapters: FUTURE DOMAIN TMC-950
`
`
`
`Appendix A|
`
`
`
`
`SCSI commands (by opcode)
`
`
`
`
`Appendix B
`
`
`
`
`
`SCSI commands(alphabetically)
`
`
`
`
`Appendix C
`
`
`
`
`
`SCSI sense codes
`
`
`
`
`
`
`
`
`Appendix D The SCSI bulletin board
`
`
`
`
`Appendix E
`
`
`
`
`
`
`Source code for SCANSCSLPAS
`
`
`
`
`
`Glossary
`
`Index
`
`Contents
`
`
`
`
`ix
`
`
`247
`
`248
`
`248
`
`253
`
`
`257
`
`257
`
`258
`
`259
`
`
`262
`
`263
`
`264
`
`266
`
`
`269
`
`
`273
`
`
`276
`
`
`281
`
`
`283
`
`
`290
`
`295
`
`OLYMPUS EX.1006 - 9/312
`
`HUAWEI EX. 1006 - 9/312
`
`OLYMPUS EX. 1006 - 9/312
`
`
`
`HUAWEI EX. 1006 - 10/312
`
`OLYMPUS EX.1006 - 10/312
`
`HUAWEI EX. 1006 - 10/312
`
`OLYMPUS EX. 1006 - 10/312
`
`
`
`Part I
`
`Introduction
`
`
`
`
`
`
`
`1 Computers and peripherals
`
`
`
`2 Traditional peripheral interfaces
`
`
`
`3 Computer buses
`
`
`
`OLYMPUS EX. 1006 - 11/312
`
`HUAWEI EX. 1006 - 11/312
`
`OLYMPUS EX. 1006 - 11/312
`
`
`
`OLYMPUS EX. 1006 - 12/312
`
`HUAWEI EX. 1006 - 12/312
`
`OLYMPUS EX. 1006 - 12/312
`
`
`
`1 Computers and peripherals
`
`A computer can be broken down into a number of interdependent functional
`blocks. The most importantof these are the central processing unit (CPU), main
`memory,
`input/output (I/O) and mass storage. The CPU executes the
`instructions of a program, which, along with the necessary data, mustreside in
`main memory at execution time. Therefore, before a program can be run it must
`be loaded into main memory from mass storage. The data to be processed by the
`program comeseither from mass storage or from an input device such as the
`keyboard. The CPU accesses memory atleast once for each program step in order
`to read the corresponding machine instructions. In fact, several accesses are
`usually necessary to read and write data. For this reason the CPU and memory
`are very tightly coupled: access is uncomplicated and, aboveall, fast.
`
`[3
`
`Tape drive a
`convoller
`
`Figure 1.1 Computer system with peripheral devices.
`
`In contrast to memory, I/O devices and massstorage are located further
`from the CPU, hence the name‘peripherals’ (Figure 1.1). Access to such devices
`
`3
`
`OLYMPUS EX.1006 - 13/312
`
`OLYMPUS EX. 1006 - 13/312
`
`
`
`
`4
`
`
`
`
`
`SCS! Bus and IDE Interface
`
`
`
`
`
`
`
`
`
`
`
`
`
`is slower and more complicated. Communication with the peripherals is
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`accomplished using an interface such as SCSI or IDE. On the other end of the
`
`
`
`
`
`
`
`
`
`
`
`
`interface is a controller, which in turn communicates with the CPU and memory.
`
`
`
`
`
`1.1 Mass storage
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`A mass storage device is capable of storing data many times the size of main
`
`
`
`
`
`
`
`
`
`
`
`
`memory. In addition, information stored here is nonvolatile: when the device is
`
`
`
`
`
`
`turned off the data remains intact.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Hard disks Disk drivesor hard disks store information by writing it onto rotating disks. The
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`information is divided up into blocks of fixed length, each of which can be
`
`
`
`
`
`
`
`
`
`
`accessed relatively quickly, typically around 30 milliseconds (ms). For this
`
`
`
`
`
`
`
`
`
`
`
`
`
`reason. hard disks are also referred to as random access mass storage devices.
`
`
`
`
`
`
`
`
`
`
`
`
`Among the different types of mass storage devices are hard disks, exchangeable
`
`
`
`
`
`
`
`medium. drives, diskettes, optical disks and CD-ROM.
`
`
`Tape devices
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`In contrast to hard disks, tape devices (or tape drives) write data sequentially
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`onto magnetic tape. The length of time needed to access a specific block of
`
`
`
`
`
`
`
`
`
`
`information depends on which position is presently underneath the read/write
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`head.If it is necessary to rewind or fast forward the tape a very long distance, a
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`tape access can take as long as several minutes. Tape drives ave also known as
`
`
`
`
`
`
`
`
`
`
`sequential mass storage devices. Among these are the traditional reel-to-reel
`
`
`
`
`
`
`
`
`
`
`
`
`drives, cassette drives, drives that use video cassettes for recording and 4mm
`
`
`
`
`
`digital audio tape (DAT)drives.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`W/O devices Under the heading I/O devices are the monitor and keyboard used for
`
`
`
`
`
`
`
`
`
`
`
`communication between the user and the computer. Further examples of output
`
`
`
`
`
`
`
`
`
`
`
`devices are printers, plotters and even speakers used for outputting speech.
`
`
`
`
`
`
`
`
`
`
`
`
`Among the many input devices are mice, analog to digital converters, scanners
`
`
`
`
`
`
`and microphones used in speech recognition.
`
`
`
`
`
`
`
`
`
`
`Network connections also fall into this category. This is especially so
`
`
`
`
`
`
`
`
`
`
`
`
`today where massstorage is often replaced by a file server across a network.
`
`
`
`
`
`
`
`
`
`
`
`
`Computers with no mass storage of their own are called diskless workstations.
`
`
`
`
`
`Miscellaneous
`
`devices
`
`
`
`
`
`
`
`
`
`
`
`
`There are many more devices that exchange data with computers, although one
`
`
`
`
`
`
`
`
`
`
`
`
`hardly refers to a computer controlled lathe or a music synthesizer as a
`
`
`
`
`
`
`
`computer peripheral. Nevertheless,
`they function as peripherals and
`
`
`
`
`
`
`communicate with the computer using I/O.
`
`
`
`
`
`OLYMPUS EX. 1006 - 14/312
`
`HUAWEI EX. 1006 - 14/312
`
`OLYMPUS EX. 1006 - 14/312
`
`
`
`
`
`Computers and peripherals
`
`
`
`
`
`5
`
`
`
`
`
`1.2 Peripheral interfaces
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Peripheral devices are connected fo computer systems via interfaces. The
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`the
`abstract model of a peripheral interface is made up of many layers,
`
`
`
`
`
`
`
`
`
`
`
`
`
`boundaries of which are not alwaysclear, especially for older interfaces.It is also
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`true that some layers are omitted in certain interface definitions. In this book I
`
`
`
`
`
`
`
`
`
`
`
`adhere to a model with four layers for the SCSI interface, as was agreed upon by
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`the American National Standards Institute (ANSI) committee for the first time
`
`
`
`
`
`
`
`
`
`
`for SCSI-3. Thestrata of layers are designed bottom up. All low level layers are
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`mandatory for the implementation of an interface. An uppermost layer,
`
`
`
`
`
`
`
`however, can be omitted in some cases. A high level interface refers to the case
`
`
`
`
`
`
`
`
`
`
`
`
`whereall possible levels have been implemented.
`
`
`
`
`
`
`
`
`
`
`
`
`
`Among those things defined in the lowest level are cable and connector
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`types. Also defined are the signal voltages and the current requirements of the
`
`
`
`
`
`
`
`
`
`
`
`
`drivers. Finally, the timing and coordination of all of the signals of the bus are
`
`
`
`
`
`
`
`
`
`
`
`described here. This lowest level is referred to as the physical interface.
`
`
`
`
`
`
`
`
`
`
`
`Directly above the physical layer resides the protocol layer. The protocol
`
`
`
`
`
`
`
`
`
`
`
`
`of an interface contains, for example, information about the difference between
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`data bytes and command bytes and about the exchange of messages between
`
`
`
`
`
`
`
`devices. If corrupted data is to be corrected through the use of error correction,
`
`
`
`
`
`
`
`
`
`
`
`
`
`this is described in the interface protocol.
`
`
`
`
`
`
`
`
`
`
`
`
`On top of the protocol layer lies the peripheral device model. Here the
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`behavior of devices to be connected to the interface is described. These
`
`
`
`
`
`
`
`
`
`
`
`
`descriptions can be very detailed and precise. The SCSI bus is an example of.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`such a detailed model, where in addition to the characteristics of general
`
`purpose SCSI devices, those of hard disks, tape drives, printers and so on are
`
`
`
`
`
`
`
`
`
`
`
`
`
`defined.
`
`
`
`
`
`
`
`
`
`
`
`
`Finally, some interfaces go so far as to define which commands must be
`
`
`
`
`
`
`
`
`
`understood by the interface devices. The command set builds upon the device
`
`
`
`
`
`
`
`
`
`
`
`model and represents the fourth layer of the interface.
`
`
`
`
`
`
`
`
`
`
`
`The term ‘interface’ always refers to all implemented layers in their
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`entirety. There are distinct peripheralinterfaces defined using the same physical
`
`
`
`
`
`
`
`level but a unique protocollevel. It is also possible for a single interface to allow
`
`
`
`
`
`
`
`
`
`
`
`
`for different options in the physicallevel.
`
`
`
`
`
`
`
`
`
`
`
`
`The interface used for printers is a good example of a four-layer
`
`
`
`
`
`
`
`
`
`
`
`interface. Figure 1.2 makes the relationships among the layers clear. The two
`
`
`
`
`
`
`
`
`
`
`
`
`lower levels are covered by the Centronics interface. This parallel interface
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`contains the definition of the physical and protocol layers. The particular printer
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`model in Figure 1.2 is a page printer. This means that the printer constructs an
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`entire page in internal memory before printingit. In contrast to line printers, the
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`lines of a page can be sentin any order as long as a page boundary is not crossed.
`
`However, once a page is printed it is impossibleto retrieve it in order to make
`
`
`
`
`
`
`
`
`
`
`
`changes.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`The page description language PostScript is an excellent example of a
`
`
`
`
`
`
`
`
`
`
`
`
`
`large and complex commandset. It is built upon the page printer model and
`
`
`
`
`
`
`
`
`
`
`
`
`
`makes it possible to output text as well as various graphic elements. These
`elements can be positioned freely on the current page. Naturally, there are other
`
`OLYMPUS EX. 1006 - 15/312
`
`HUAWEI EX. 1006 - 15/312
`
`OLYMPUS EX. 1006 - 15/312
`
`
`
`
`
`6
`
`
`
`
`
`SCSI Bus and IDE interface
`
`
`
`
`
`Command set
`
`
`PostScript
`
`
`Device model
`
`
`
`
`Printer
`
`interface
`
`Protocol
`
`
`
`
`Physical
`
`
`
`
`
`
`votes Centronics...-.-.--
`
`
`
`
`
`
`Figure 1.2 Layers of a printerinterface.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`such page formatting languages written for the page printer model. This makes
`
`
`
`
`
`
`
`
`the division between device and language very intuitive.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`As you can see, this interface is complete in that it contains all four
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`interface layers. If you purchase a printer with such an interface, it makes no.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`difference which brand name you choose. Aslong asit is true to the interface
`
`
`
`
`
`
`
`
`
`
`
`
`specification it will work with any computer also equipped with the printer
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`interface. However, if you were to omit even only the uppermostlayer of the
`
`
`
`
`
`
`
`
`
`
`
`specification, then the interface description would be incomplete. It would still
`
`
`
`
`
`
`
`
`
`
`
`
`
`be possible to connect up. the printer, but whether it would function properly
`
`
`
`
`
`would be a matter of luck.
`
`
`
`
`
`
`
`
`
`
`
`The IDE interface and the SCSI bus are likewise complete interface
`
`
`
`
`
`
`
`
`
`
`
`
`definitions. Before getting. to these, however, I would like to introduce in
`
`
`
`
`
`
`
`
`
`
`
`
`Chapter 2 a few classic examples of peripheral interfaces. For the most part their
`
`
`
`
`
`
`
`
`
`
`
`
`
`definitions contain only the lowerlayers of the interface model. This chapter will
`
`
`
`
`
`
`
`
`
`
`
`
`help to underscore the difference between traditional interfaces on the one hand
`
`
`
`
`
`
`
`
`
`
`and the complete IDE and SCSI interfaces on the other.
`
`OLYMPUS EX. 1006 - 16/312
`
`HUAWEI EX. 1006 - 16/312
`
`OLYMPUS EX. 1006 - 16/312
`
`
`
`
`2 Traditional peripheral
`
`interfaces
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`This chapter will help to familiarize you with several classic peripheral inter-
`
`
`
`
`
`
`
`
`
`
`
`
`
`faces of the computer industry. As with the printer interface outlined in Chapter
`
`
`
`
`
`
`
`
`
`
`
`
`
`1, these will be described within the framework of the layered interface model.
`
`
`
`
`
`
`
`
`
`These descriptions are by no means comprehensive; complete specifications
`
`
`
`
`
`
`
`would turn this book into several volumes.
`
`
`
`
`
`
`
`
`
`
`
`
`
`I have two goals in mind in presenting these interfaces. First of all, the
`
`
`
`
`
`
`
`
`
`
`
`
`interfaces are very simple; they will allow you to become acquainted with inter-
`
`
`
`
`
`
`
`
`
`
`
`face characteristics that are valid for all interfaces, including computer buses.
`
`
`
`
`
`
`
`
`
`
`Secondly, to a certain degree these specifications are the forerunners of competi-
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`tion to the IDE and SCSI bus interfaces. A background in the moretraditional
`
`
`
`
`
`
`
`
`
`
`
`
`interfaces will make it much easier to evaluate and understand their modern
`descendants, the main topic of this book.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`2.1 The RS-232 serial interface
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`RS-232C is the most widely used serial interface. ‘Serial’ means that the data is
`
`
`
`
`
`
`
`
`
`
`
`
`transferred one bit at a time across a single connection. RS-232C is used mainly
`for the connection of computer terminals and printers. Nonetheless,it is also
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`appropriate for the exchange of data between computers, Machine tools and
`
`
`
`
`
`
`
`
`measurement instruments are frequently connected to computers using RS-
`
`
`
`
`
`
`
`
`
`
`
`232C. Understandably, it is not a device specific interface. RS-232C is the respon-
`
`
`
`
`
`
`
`sibility of the Electronic Industries Association (ETA).
`
`
`
`
`
`
`
`
`
`
`The specification for RS-232C contains the physical layer and hardware
`
`
`
`
`
`
`
`
`
`
`
`
`
`protocol. In addition, there are software protocols, of which only a few build on
`
`
`
`
`
`
`
`
`
`
`
`
`
`top of the RS-232 hardware protocol. This leads to an uncommonsituation with
`
`
`
`
`
`
`
`
`
`
`
`
`
`RS-232C andotherserial interfaces - not all applications use all of the signals.
`
`
`
`
`
`
`
`
`
`
`
`
`Frequently cables are used that conduct only a few of the defined signals,a sit-
`
`
`
`
`
`
`
`
`
`
`
`
`uation thatwould be unthinkable for IDE or SCSI. I concentrate here on a varia-
`
`
`
`
`
`
`
`
`
`
`
`tion of the interface using only three signals, which I call mini-RS-232,
`
`
`
`OLYMPUS EX. 1006 - 17/312
`
`HUAWEI EX. 1006 - 17/312
`
`OLYMPUS EX. 1006 - 17/312
`
`
`
`
`8
`
`
`
`
`
`SCS/ Bus and IDE Interface
`
`
`
`
`
`
`
`
`
`
`
`
`The physical Mini-R5-232 establishes a bidirectional point-to-point connection between
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`interface equipment. Each direction has its own data signal andasingle groundsignalis
`
`
`
`
`
`
`
`
`
`
`
`
`
`shared. The data signals are called TD (transmit data) and RD (receive data).
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Whentwodevices are coupled to each other, these signals are crossed suchthat
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`the TD of one device connects to the RD of the other (Figure 2.1).
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Start bit
`
`
`(always 0)
`
`
`
`
`8 Data bits
`
`
`
`Stop bit
`
`(always +)
`
`
`
`on
`
`Signal ground
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Receive data
`
`
`
`Receive data
`
`
`
`
`
`
`
`
`Figure 2.1. Physical interface: mini-RS-232.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`The connector chosen by the EIA standardis the 25-pin DB25, Other con-
`
`
`
`
`
`
`
`
`
`
`
`
`
`nectors, however, are frequently employed, such as the DB9 for the IBM AT or
`
`
`
`
`
`
`
`
`the RJ11 telephone connector used in various minicomputers.
`
`
`
`
`
`
`
`
`
`
`
`
`
`Onthe signallines, a logical 1 is represented by a voltage between +5 V
`
`
`
`
`
`
`
`
`
`
`
`
`
`and +15 V, and the receiver recognizes anything above +3 V as such. Likewise,
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`logical 0 is represented by a signal voltage between —-5 V and —15 V. Again, the
`
`
`
`
`
`
`
`
`
`receiver recognizes any signal below —3 V as such.
`
`
`
`
`
`
`
`
`
`Data transfer takes place serially, character by character. The characters
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`are further broken downintobits, which are sent acrossthe line one by one. On
`
`
`
`
`
`
`
`
`
`
`
`
`the other end, the receiver then assembles the bits back into characters. The
`
`
`
`
`
`
`
`
`
`
`
`
`
`numberof bits per character lies between five and eight; eightis precisely what
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`is needed to transfer one byte. The data bits are preceded bya start bit and fol-
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`lowed bya stop bit. In addition, a parity bit may be sentfor error detection. The
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`transfer rate: can range between 75 and 115 000 bits per second (baud), and a
`
`
`
`
`
`
`
`
`
`
`
`
`cable alone cannot compensate for different transfer rates; the devices must be
`
`
`
`
`
`
`
`
`
`
`
`
`
`set at the same speed otherwise no exchange of data can take place.
`
`
`
`
`
`
`
`
`
`
`
`
`Now comesa rather confusing point: this method of transfer over the
`
`
`
`
`
`
`
`
`
`
`
`
`
`serial interface is called asynchronous even thoughthe data is sent and received
`
`
`
`
`
`
`
`
`
`
`
`
`relative to a clock. Among otherserial interfaces the term ‘synchronous’is used
`
`
`
`
`
`
`
`
`
`
`
`
`whenevera clock is involved. For RS-232C, however, the transfer is referred to
`
`
`
`
`
`
`
`
`
`
`
`
`
`as asynchronous becausethe clocks are nottied to each other. The RS-232C spec-
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`ification includessignals that allow the sender and the receiver to use the same
`
`
`
`
`
`
`
`
`
`
`
`
`
`clock for data transfer. When these signals are employed the data transfer is
`\
`
`
`
`
`
`
`OLYMPUS EX. 1006 - 18/312
`
`HUAWEI EX. 1006 - 18/312
`
`OLYMPUS EX. 1006 - 18/312
`
`
`
`Traditional peripheralinterfaces
`
`9
`
`referred to as synchronous. True asynchronous transfer uses control signals to
`exchange data. This point, among others, will be madeclear in Section 2.2.
`As a rule of thumb, when thinking about data throughput you can con-
`sider a byte or character to be 10 bits (one stop, one start and eightdata bits).
`Whenthefastest transfer rate possible is employed, namely 115 000 bits per sec-
`ond, the maximum throughput is approximately 11.5 Kbytes per second.
`
`The protocol Mini-RS-232 has no protocol of its own. However, there is a protocolthat is often
`used with the interface, called the XON/XOFFprotocol (Figure 2.2). It works in
`the following way. When the receiving device is no longer able to take on data
`from the sender, it sends a special character, an XOFF byte,to indicate this, Later,
`whenit is ready to continue receiving data, it sends an XONbytetotell the
`sender to proceed. This protocolis in no wayerror proof — characters are some-
`times lost. In addition, the protocol cannot be used for bidirectional transfer of
`binary data. The reasonfor this restriction is simple: for text data only a subset
`of the possible bytes is sent over the interface, those corresponding to letters,
`numbers, and symbols. This leaves room for a numberof special characters, of
`which XON and XOFF are examples. When, on the other hand, binary data is
`transferred, the data is not restricted to certain characters; any binary pattern
`may occur. In this situation there is no room for the special characters and the
`XON/XOFFprotocol is unusable. For connecting monitors and printers, how-
`ever, the protocolis actually very practical,
`
`po
`
`ffisf[rstfal|
`
`melsit{tf|
`
`XON
`
`Printer
`
`XOFF
`
`Figure 2.2 XON/XOFFprotocol.
`
`An example of a higher level protocol for the transfer of binary data(file
`transfer) is Kermit. This public domain program can be used at no cost for non-
`commercial purposes. A number of computer manufacturers have also devel-
`oped their own internal protocols built on top of RS-232.
`
`Commands
`
`There are no commands special to the RS-232 interface. As RS-232 was devel-
`oped, commands were designed for specific devices apart from the interface.
`SCSI is amongthe first interfaces to define universal commandsets for whole
`device classes.
`.
`,
`Nevertheless, some commandsets have been designed for use with RS-
`232. Examples are page formatting languages for printers, such as PostScript.
`
`OLYMPUS EX.1006 - 19/312
`
`OLYMPUS EX. 1006 - 19/312
`
`
`
`
`10
`
`
`
`
`
`SCS! Bus and IDE Interface
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Summary As you can see, an interface that builds on top of RS-232 has many possible vari-
`
`
`
`
`
`
`
`
`
`
`
`ations. The complete description of.my printer-PC interface would be: RS-232 at
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`9600 baud, 1 stop bit, no parity, XON/XOFF protocol, PostScript. If I were to
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`change a parameterfor only the printer or only the PC, for example by not send-
`
`
`
`
`
`
`
`
`
`
`
`
`
`ing PostScript or starting to use a parity bit, nothing would print. Although
`
`
`
`
`
`
`
`
`
`
`
`
`mini-RS-232 appears to be simple (only three wires), there are almost an
`
`
`
`
`
`
`
`
`
`
`
`
`
`uncountable number of ways in which the connection can fail. What is missing
`
`
`
`
`
`
`
`
`
`
`
`
`
`is a protocol that allows the devices to agree upon the available options.
`
`
`
`
`
`
`
`
`
`
`
`
`Although RS-232 has given a good portion of frustration to just about everyone
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`who has worked withit, it nonetheless has the decided advantage that it exists
`
`
`
`
`
`
`
`
`on ever