Fujitsu Limited Fujitsu Microelectronics, Inc. Fujitsu Mikroelektronik GmbH Small Computer Systems Interface MB87030 Synchronous/Asynchronous Protocol Controller Users Manual Copyright © 1986 by Fujitsu Limited and Fujitsu Microelectronics, Inc. This Publication contains information considered proprietary by Fujitsu Limited, Tokyo, Japan and Fujitsu Microelectronics, Inc. No part of this document may be copied or reproduced in any form or by any means or transferred to any third party without the prior written consent of Fujitsu Limited. Circuit diagrams utilizing Fujitsu products are included as a means of illustrating typical applications; consequently complete information sufficient for construction purposes is not necessarily given. The information in this publication has been carefully checked and is believed to be entirely reliable. How- ever, no responsibility is assumed for any inaccuracies. The information conveyed in this publication does not convey any license under the patent rights of Fujitsu Limited. Fujitsu reserves the right to change specifications without notice. MB87030 Synchronous!Asychronous Protocol Controller User's Manual is published by the U.S. Techni- cal Publications Department, Fujitsu Microelectronics, 3320 Scott Blvd., Santa Clara, CA 95054-3197, (408) 727-1700 ext. 2414. Printed in the U.S.A. Edition 1. 0 (Phase 1) May, 1986 ii Fujitsu Limited Furukawa Sogo Bldg., 6-1 Marunouchi 2-Chome, Chiyoda-ku Tokyo 100, Japan Phone National (03) 216-3211 Phone International 81-3-216-3211 Telex: 2224361 Ff TOR J Fujitsu Microelectronics, Inc. 3320 Scott Blvd. Santa Clara, CA 95054-3197 Phone: (408) 727-1700 Telex: (910) 338-0190 Fujitsu Mikroelektronik GmbH Arabella Center 9, OG/A Lyoner Straf3e 44-48 D-6000 Frankfurt 71, P.R. Germany Phone 069/66 320 Telex 0411 963 iii iv PREFACE The Fujitsu MB87030 (SPC: SCSI Protocol Controller) is a CMOS LSI circuit developed to control the small computer system interface (SCSI). This manual explains the functions and use of the MB87030. It consists of the fo 11 owing chapters: CHAPTER 1 OUTLINE CHAPTER 2 INPUT/OUTPUT TERMINALS CHAPTER 3 FUNCTIONS CHAPTER 4 OPERATIONAL DESCRIPTION CHAPTER 5 EXAMPLES OF EXTERNAL CIRCUIT CONNECTIONS CHAPTER 6 AC CHARACTERISTICS To effectively apply this LSI circuit 1 s functions, you must be familiar with SCSI functions and interface control procedures. Note: Fujitsu reserves the right to change functions or characteristics to improve the design of the LSI circuit without prior notice. CONTENTS Page CHAPTER 1 OUTLINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 GENERAL DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 FEATURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1. 3 ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.3.1 Absolute Maximum Ratings . . . .. . .. . . . . . . . . . . . . .. . . . . . . . . . . . . . . . 1 1.3.2 Recommended Operating Conditions .......................... ... 2 1.3.3 DC Characteristics .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . 2 1.3.4 Input/output Capacitance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 2 1. 4 PHYSICAL DIMENSIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 CHAPTER 2 INPUT/OUTPUT TERMINALS ...•.................................• 4 2 .1 PIN ASSIGNMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 INPUT/OUTPUT SIGNALS . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . .. . .. . . . 4 CHAPTER 3 FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3 .1 FUNCTIONAL BLOCKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3. 2 INTERNAL REGISTER . . . .. • . . . . . • . . . . . . . . . . . . . . . . . . . . . . • . . . . . . . . . . . . . 11 3.2.1 Addressing • . . . . . . . . • . . • . . . . . . • . • . • . . • . . . . . . . . . . . . • . . • • . • . . . . . 11 3.2.2 Internal Register Assignments ..•....•....•...•..•..•.......... 11 3.3 MAJOR OPERATIONS . . .. . . . . . .. . . .. . . . . .. . . .. . .. . . . . .. . . . . . . .. . . . . . .. 14 3.3.1 MPU Interface Control Block ............................•....• 14 3.3.2 Bus Phase Control Block . . .. . .. . .. . . . . .. . . . .. .. . . .. . .. . . . . . . • . 14 3.3.3 Arbitration/Selection Sequence Control Block ...............•. 14 3.3.4 Transfer Sequence Control Block •............••..............• 14 3.3.5 Transfer Byte Counter Block .. .. .. . . . . .. . . .. . .. . . .. . .. . . . . . . .. 15 3.3.6 Data Buffer Register Block .....................•....•........ 15 CHAPTER 4 OPERATIONAL DESCRIPTION . . .. .. . . . .. .. . .. .. .. . .. . .. . . .. .. .. . . . 16 4 .1 BOID REGISTER . . . . • . . . . . . . • . . . . . • . . . . . . . . • . . . • . . . . • . . • . . . . . . . . . . . . 16 4. 2 SCTL REGISTER . . . . • . . . . . . • . . . . • . • • • . • . • • . • . . . . • . . . . . . . . . . • . • • . • . . . 16 4. 3 SCMD REG !STER . . . • . . . . . • . . . . . . . . . . . • . • . . • . . • . . . . . • • . . • . • . . . . . . . . . . 18 4.3.1 Register Functions . . • . . . . . . • • • . . . • . . • . . . . • . . . . . . . . . . . . • . . . . . . 18 4.3.2 Command Functions ...•.•....•.•. , . • . . . . • . . • . . . . . • . . . . • . • . . • . . . 21 4.3.3 Command Termination Rep'ort . . . . . . • . . . . . . . . . . . • . . . . • . . . . . . . . . . . 30 4.3.4 Command Issuance Timing . . . . . . . . .. . . . . . .. . . . . . . .. . . .. .. . . . . .. . 30 4.4 TMOD REGISTER .. . . . .. . . .. . .. . .. . . . . .. .. .. .. . . . . . . .. . . .. .. . . . . .. .. . 31 4.4.1 Register Functions . . . . . . .. . . .. . . .. . . .. . . . . .. .. . . • . .. . . . . .. • . . 31 4.4.2 Transfer Mode Setting Timing . . .. . . . . . . .. . . . . .. .. . .. . . . . . .. . . . 32 4. 5 PCTL REGISTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • . . . . . . . . . . . . . . . . . . • 33 4.6 DATA BUFFER REGISTER (DREG) . . . . .. . . . . . . . . . . .. . . . . . .. .. . . .. . . .. . .. 34 4. 7 TEMP REGISTER . . . . . . . . . . . . . . . . . . . • • . . . . . . • . • . . • . . . • . . • • . . . . . . . . . . . 35 4.8 TRANSFER BYTE COUNTER (TCH, TCM, TCL) ••....•.....•......•........ 36 4. 9 PSNS REGISTER . . . . . . . . . . . . • . . . • . . • • . • . . . . . . • . . . . . . • . . • • • . . . . . . . . • . 36 4 .10 SSTS REGISTER . . . . . . . . . . . . . . . . . . . . . . . . . . • . . . . . . • • . . . . . • • . . . . . . . . . 37 4.10.1 Register Functions .. .. .. . .. .. .. .. .. .. .. .. .. . . .. .. • .. .. .. .. .. 37 4.10.2 SPC Status . . . . . • . . . . . . . . . . . • . . • . . . . . . . . . . . . . . . . . • . . . . . . . . . . . 38 4 .11 INTS REGISTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.11.1 Register Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • . . . . . 39 4.11.2 Interrupt Processing .. .. .. .. .. .. .. .. .. . .. .. .. .. .. .. .. .. .. . . . 39 4 .12 SERR REGISTER . . . . . . . . . . • . . . . . . . . • . • . . . . . . . . . . . • . . . . . . • . . . . . . . . . . 47 4.12.1 Register Functions . .. . . .. . . .. .. . .. .. .. . .. .. . . .. .. .. .. . .. .. . . 47 4.12.2 Error Reset . . .. .. . . . . . . . .. . . . . .. . . . . . . . . . . . .. . . . . . .. .. . . . .. . 49 4 .13 MBC REGISTER . . . . . . . . . . . . . . . . . . . • . . • . . . . • . . . . . • • • . . . . . • . . . . . . . • . . 49 4.14 EXTERMA: BIFFER REGOSTER (EXBF) .. . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 50 4 .15 SDGC REGISTER . . . . . • . . . . . . . . • . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 4.16 INITIALIZATION . . .. . . . .. . . . .. .. . . . .. .. .. . .. .. . . . . .. . . .. . . . . . . . . . . 51 - i - CONTENTS {Cont'd) Page CHAPTER 5 EXAMPLES OF EXTERNAL CIRCUIT CONNECTIONS .•.•...........•••.• 53 5 .1 SCSI DRIVER/RECEIVER CIRCUITS .. .. . . .. . .. .. .. .. . .. .. . • .. .. .. .. .. .. 54 5.1.1 Single Ended Type • • . • • . • . • • . . • • • • • • • • . • • • • • • . . • • • • . • • • • • . • . • • 54 5.1.2 Differential Type ••.••...••.•...•..•..•••.• , • . • • . • . • • • • . • • • . • 57 5.2 EXTERNAL DATA BUFFER • • • • • . . . • . • • . • . . • . . • • • • • • • • • • • • • • • . • • • • • • • • • • 60 CHAPTER 6 AC CHARACTERISTICS . .. .. .. • .. . .. .. .. . • .. .. .. .. .. • .. .. .. .. .. .. 62 6 .1 MPU INTERFACE •.••.•.•••.••..·• • . . • . • . • . • • • . • • • • • • • . • • . . • • • • • . • • • • . 63 6.1.1 Clock Signal .. .. . .. .. .. .. .. .. .. .. . .. . .. .. .. .. .. .. .. . .. • .. .. .. 63 6.1.2 Reset Signal . • . • . . • . • . . . • . • . • • . . • . • • • . • . • • • . . . . • . . • • • • • • . • . • • 63 6.1.3 Write Cycle . . . . • • • • • • . • • • • . • • . . . . . • . . . . • . . . . . . . . • . • • . . . . • . . . . 63 6.1.4 Read Cycle • • • . • . • • • • . . . . . . . . • . • • . . • . • • • • . • • • • • • • • . • . • • • • • . . • . 65 6.1.5 Interrupt . • • . . • • • . • • • • • • • • • • • • . • • . • • • • • • • • . . . . . . . . . . • . • • • • • • • 67 6.2 OMA INTERFACE • . . . . . • • . • • • • • • . • . • . • . • • • • . • • . • • • • • • • • • • • • . • . • • • • . • • 67 6.2.1 Access Timing • . • • . . . . • . • • • . • . . • • • . • . • • . • . • • • • • • . • • • . • . . • • • . • • 67 6.2.2 Input Operation • • . • • . • • • • • • • . . . • • • • . • • • • . • • • . • . • . . • . • . • • . • . • • 68 6.2.3 Output Operation . . . . • . . . . . . • . . . . . . • . . . • . . . . . . • . . . . • . . . . • . . . . . 69 6.3 SCSI INTERFACE . • • . • • . . . • • • • • • • . • • • • • • • • . • • • • . • • • • • • • • • • . • . • • . • • • • 70 6. 3 .1 SELECTION Phase • • • • • . • . • . • . • • . . • • • • . • . • • • • • • • • • • • . • . • . . . . . • . • 70 6. 3. 2 RESELECTION Phase • . • . . • . . • . • . • . • • • • . • • • . . • • • • • . • . . • . • . • • • • • • • 78 6.3.3 Transfer Phase ••••••••...•.....•••••.•••..•••••••.•.•••••..•• 82 6.3.4 Attention Condition (INITIATOR) .. • . .. . • .. • • • • • • • • • • . • • • . . • . • • 97 6.3.5 BUS FREE . . . . . . . . . . . . . . . . . . . . . . . . . . • . . . . . . . . . . . . . . . . . • . . • . • • • • 98 6.3.6 Reset Condition ••.••.•••••.•.•.•.••.••••.••••••••.•.••••.•.•• 101 - ii - ILLUSTRATIONS AND TABLES ILLUSTRATIONS Page Fig. 1.4.1 Dimensions of package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Fig. 2.1.1 Pin assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Fig. 3.1.1 SPC functional block diagram ................................. 10 Fig. 4.3.1 Status transitions in Select command execution ............... 24 Fig. 4.3.2. ATN signal generation in data transfer ....................... 25 Fig. 4.3.3 ATN signal resetting in MESSAGE OUT phase .................... 25 Fig. 4.3.4 Manual transfer procedure (SPC serving as a TARGET) .......... 28 Fig. 4.3.5 Manual transfer procedure (SPC serving as an INITIATOR) ...... 29 Fig. 4.3.6 Command execution timing ..................................... 31 Fig. 4.4.1 Transfer period setting ...................................... 32 Fig. 4.6.1 DREG access procedure in program transfer mode ............... 34 Fig. 4.7.1 Data bus save in manual transfer input operation ............. 35 Fig. 4.11.1 Service required interrupt processing procedure (1) ......... 42 Fig. 4.11.2 Service required interrupt processing procedure (2) ......... 43 Fig. 4.11.3 Example of- control processing for SPC-detected error (1) 44 Fig. 4.11.4 Example of control processing for SPC-detected error (2) .... 45 Fig. 4.11.5 Example of control processing for SPC-detected error (3) .... 46 Fig. 4.12.1 Specified input cycle of REQ/ACK signal ..................... 48 Fig. 4.14.1 Access from MPU to external buffer memory ................... 50 Fig. 4.16.1 SPC initialization (at power-on) ............•............... 52 Fig. 5.1.1 Examples of external circuit connections ..................... 53 Fig. 5.1.2 Example of single ended type SCSI driver/receiver circuit .... 55 Fig. 5.1.3 Example of differential type SCSI driver/receiver circuit .... 58 Fig. 5.2.1 Transfer with external data buffer (input operation) ......... 60 Fig. 5.2.2 Transfer to external data buffer (output operation) ......•... 61 TABLES Page Table 2.1.1 Input/output signals ........................................ 6 Table 3.2.1 Internal register addressing ...................•.•.......... 11 Table 3.2.2 Internal register bit assignment ............................ 12 Table 4.3.1 Values recommended to be set in TCL registerfor use of Select command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Table 4.5.1 Transfer phase setting .. . .. .. .. .. . . .. .. .. .. . . .. .. .. .. .. . .. . . 33 Table 4.10.1 SPC operating status indications ........................... 38 Table 4.12.1 Data error indication bit patterns in transfer phase ....... 48 Table 5.1.1 Major components of single ended type SCSI driver/receiver circuit (example)... . . . . . . . . . . . . . . . . . . . . . . • . . . . . . . . . . . . . . . . . . 54 Table 5.1.2 Major components of differential type SCSI driver/receiver circuit (example)............................................ 57 - iii - CHAPTER 1 OUTLINE 1.1 GENERAL DESCRIPTION The MB87030 (SPC: SCSI Protocol Controller) is a CMOS LSI circuit designed to make control of the small computer system interface (SCSI) easier. The MB87030, which can control all the SCSI interface signals and handle almost all the interface control procedures, can be used as a peripheral LSI circuit for an 8- or 16-bit MPU to realize high-level SCSI control. This LSI circuit has an 8-byte FIFO data buffer register and a transfer byte counter that is 24 bits long. Its wide range of appli- cations allows not only asynchronous mode transfer but also synchronous mode transfer with an offset of 8 bytes at maximum. Furthermore, MB87030 can serve as either an INITIATOR or a TARGET device for the SCSI, and can therefore be used for either an I/O controller or a host adapter. (Note: In this manual, MB87030 is referred to as SPC) 1.2 FEATURES • Full support for SCSI control • Serves as either INITIATOR or TARGET device • Synchronous mode transfer with a programmable offset, up to eight bytes • Data transfer speed programmable at four rates (in synchronous mode transfer) • Data transfer up to 4 MBPS allowed • Eight-byte data buffer register incorporated • Transfer byte counter, 24 bits long, incorporated • Independent data transfer bus •Applicable to the single-ended alternative and the differential alternative for SCSI • Single +5 V supply • Low power dissipation • TTL-compatible inputs/outputs • PGA 88-pin ceramic package 1.3 ELECTRICAL CHARACTERISTICS 1.3.1 Absolute Maximum Ratings* Rating Symbol Min. Max. Unit Su...E.E_~ Vo 1t_~ Vol ta_g_e Voo 4.75 5.0 5.25 v In..E_ut Hi_g_h Volta_g_e Vrn 2.2 v In..E_ut Low Volt~e VIL 0.8 v O..E_erati'!.9_ Tem..E_erature TA 0 70 oc 1.3.3 DC Characteristics (Recommended Operating Conditions unless otherwise noted) Parameter Symbol Condition Min. Typ. Max. Unit * Power Supply Current Ioos Steady state 100 µA Power Dissipat-ion Po 300 mW Output High Voltage VoH IoH = -0.4mA 4.2 Voo v Output Low Voltage VoL loL = 3.2mA Vss 0.4 v Input High Voltage V1H 2.2 v Input Low Voltage VIL 0.8 v Input Leakage Current Iu vI=o - Voo -10 10 µA 3-state Input Leakage Current ILz vI=o - Voo -10 10 µA * 1fote: -VIH =YiDD • -vIL =YiSS 1.3.4 Capacitance (TA= 25 °C, Voo = Vr = 0 v, f = 1 MHz) Parameter Symbol Min. Typ. Max. Unit Il)_E_ut Pin Ca..E_acitance Cm 9 _E_F Ou~ut Pin Capacitance Cour 9 _E_F 1/0 Pin C~acitance C1/0 11 _p - 2- 1.4 PHYSICAL DIMENSIONS The MB87030 is packaged in an 88-pin ceramic package. Figure 1.4.1 shows the dimensions of the package. 88-LEAD CERAMIC (METAL SEAL) REPEATED QUAD IN·LINE PACKAGE (CASE No.: RIT·88C·A01) .015(0.38) .025!0.64) DIA L040(1.02)TYP DIA Ml==-+~ 10 .. 0 0 0 0 0 0 0 0 0 0 • 0 0 0 . . .. 0 0 0 0 0 0 0 .. INDEX AREA DJ I 1.185(30.10) 1.215(30.86) .035(0.89)1 I 1.100(27.94) REF .090(2.29) 0 • .. .... ...... . . .. 00 INDEX\o o 0 PIN 1 0 0000 o o 0 o 0 0 1.185(30.10) 1.215(30.86) I .060(1.52)1 .11012.79) .25016.35) .120(3.05) MAX .150(3.81) Dimensions in inches (millimeters) Figure 1.4.l Dimensions of Package - 3 - CHAPTER 2 INPUT/OUTPUT TERMINALS 2.1 PIN ASSIGNMENTS Figure 2.1.1 shows the arrangement of pins on this LSI. 2.2 INPUT/OUTPUT SIGNALS Table 2.1.1 lists the input/output signals and their functions. In this table, the plus and minus signs have the following meaning: +: Indicates an active-high signal. -: Indicates an active-low signal. - 4 - 0 0 0000000000 34 33 32 31 30 29 28 27 26 25 24 23 0 0 0000000000 35 72 71 7 0 6 9 68 6 7 66 65 64 63 22 0 0 @. 0 0 36 73 86 85 62 21 0 0 0 0 37 74 61 20 g8 9s (Top View) 0 0 60 19 0 0 ® ~ 76 87 f4 '$9 98 0 0. ® 0 0 40 77 88 83 18 17 0 0 41 78 Index pin '$1 96 SCSI D D THT ']!' transfer l SPC +- SCSI L L L L • (ID) indicates a bit ££Sition corresponding to the SCSI bus device ID, and (ID) indicates other bit position. • D denotes that a valid information is sent out. - 7 - Table 2.1.1 Input/output signals (Continued on next sheet) Signal Pola- I/O Pin Q'ty Function name rity SEU + I 56 9 Used for receiving SCSI control signals. The outputs of BSYI 61 the SCSI receiver circuit can be connected directly. REQI 58 Note: Waveform distortion or any other disturbance should ACKI 60 not occur in the REQI and ACKI signals which are MSGI 57 used as timing control signals for sequencing data C/DI 55 transfer. I/OI 54 ATNI 62 RSTI 59 SELO + 0 15 9 Used for outputting SCSI control signals. The following BSYO 20 signals become active only when SPC serves as a TARGET; REQO 17 otherwise, these signals are always low. ACKO 19 REQO, MSGO, C/DO, I/00 MSGO 16 The following signals become active only when SPC serves as C/00 14 an INITIATOR; otherwise, these signals are always low. I/00 13 ACKO, ATNO ATNO 21 RSTO 18 INIT + 0 11 2 Used for indicating the SPC operation state. These signals TARG 12 are also available as control signals for the SCSI driver/receiver circuit. 1!:!.!l ~ ~tatus L L -~is not connected with_ SCSI. 'LI -sl'C is execut 1 ng filEIICTIOff pnase, or is 'H' q_e_eratil'!.9_ as a TARGET. 'H' 'LI SPC is execut mg SE Lt:: CTI ON phase, or is o~erati~g as an INITIATOR. DREQ + 0 76 1 At a data transfer cycle in DMA mode, the DREQ signal is used to indicate a request for data transfer between SPC and the external buffer memory. In OMA mode, data is routed as shown below. • Output operation External buffer memory + HDB7 to HOBO, and HOBP pins + SPC internal data buffer register (8 bytes) + 50807 to 50800 and SOBOP pins + (SCSI) - 8 - Table 2.1.1 Input/output signals (Continued) -S-1gnaT lloTa- I/O Pin Q1ty Function name ri~ • Input operation (SCSI) + SOBI7 to SOBIO and SOBIP pins ' SPC internal data buffer register (8 bytes) ' HOB7 to HOBO and HOBP pins ' External buffer memory ' In an output operation, this signal becomes active to request data transfer from the external buffer memory when the SPC internal data buffer register has free space available. In an input operation, it becomes active to request data transfer to the external buffer memory when the SPC internal buffer reg_ister contains valid data. ORESP + I 41 1 Used as an response signal to the above data transfer request signal (OREQ) in OMA mode data transfer cycle. Pin ORESP must be supplied with a pulse signal at the end of each byte that is transferred. In an output operation, SPC uses the trailing edge of the ORESP signal for sampling data on HOB7 to HOBO and HOBP bus lines. In an input operation, SPC holds data to be transferred onto HOB7 to HOBO and HOBP bus lines until the trailing edge of the ORESP si_g_nal. HOB7 + I/O 9 9 Three-state, bidirectional data bus for transferring data HOB6 8 to/from the external buffer memory in OMA mode data HOBS 7 transfer cycle. HOB4 6 MSB: HOB7 HOB3 5 LSB: HOBO HOB2 4 Odd parity bit: HOBP HOBl 3 The data transmission direction depends on the HIN input HOBO 2 signal. HOBP 10 HIN HOBn Operation T(T Input mode Output 1H1 Outi:i_ut mode lnjl_Ut HIN + I 1 1 This signal indicates transmission direction along data bus lines HOB7 to HOBO and HOBP in OMA transfer mode. Transmission direction must be coordinated with the SPC internal operation to be executed. When the HIN signal is low, data bus lines HOB7 to HOBO and HOBP are put in the high impedance state (input mode). When the HIN signal is h'!_g_h, th~ are _E_Ut in the ou1:.P_ut mode. - 9 - CHAPTER 3 FUNCTIONS 3.1 FUNCTIONAL BLOCKS Figure 3.1.l shows the SPC functional block diagram. SPC mainly consists of the following functional blocks: (1) Internal register block (2) MPU interface control block (3) Bus phase control block (4) ~ Arbitration/selection sequence control block (5) Transfer sequence control block (6) Transfer byte counter block (7) Data buffer register block REQI REQO ACKI ACKO ATNI MSGI C/DI A NO MSGO C/DO I/OI I/00 RSTI RSTO SDBE0-7 ,P SDB00-7 ,P SDBI0-7 ,P SELO SELI BSYO BSYI INIT TRAG INTR A3-AO Address Dec Ode & MPU Interface Figure 3.1.1 SPC functional block diagram - 10 3.2 INTERNAL REGISTER SPC has internal registers consisting of 17 bytes that are accessible from an exter- nal circuit. These internal registers are used for controlling SPC internal opera- tion and indicating SPC processing status/result status. 3.2.1 Addressing A unique address is assigned to each internal register, and a particular register is identified by address bits A3 to AO. Table 3.2.1 shows internal register addressing. 3.2.2 Internal Register Assignments Table 3.2.2 shows the bit assignment to each internal register. When accessing an internal register (in read/write), remember the following: (1) The internal register block includes the read-only/write-only register and those having different meanings in read and write operations. (2) A write to the read-only register is ignored. (3) If the write-only register is read out, the data and parity bit are undefined. (4) At bit positions indicating 11 11 for a write in Table 3.2.2, either 1 of 0, or may be written. Table 3.2.1 Internal register addressing cs A3 A2 Al AO OP Register Name Abbr. 0 0 0 0 0 R Bus Device ID BOID w 0 0 0 0 1 cl: SPC Control SCTL 0 0 0 1 0 cl: _B. Command SCMD 0 0 0 1 1 w Transfer Mode TMOD 0 0 1 0 0 R Interru..E_t Sense INTS w Reset :Jnterru_pt 0 0 1 0 1 R Phase Sense PSNS ~ SPC Dia_piostic ~ontro.J.: SDGC 0 0 1 1 0 R SPC Status SSTS JI --- 0 0 1 1 1 R SP.f__Irror Status S!_RR w --- 0 1 0 0 0 R Phase Control PCTL w 0 1 0 0 1 :B: Modified ]l_te Counter __ffi3C w --- 0 1 0 1 0 R Data Register DREG w 0 1 0 1 1 R Temporary Register TEMP w 0 1 1 0 0 R Transfer Counter High TCH w 0 1 1 0 1 R Transfer Counter Middle TCM w 0 1 1 1 0 R Transfer Counter Low TCL w 0 1 1 1 1 R External Buffer EXBF w - 11 - Table 3.2.2 Internal register bit assignment (Continued on next sheet) No. 1fame OP 7 6 ---;- 4 3 2 1 0 -p- _lAbbr.1 T Bus R ysI Bus Jevice I_D Device ID #7 l #6 l #5 #4 #3 #2 l #1 l #0 'O' (BOID) w - SCSI _Bus Device ID - 104 102 IDl 2 >c R Reset Cont roll Diag ARB IT Parity Select Reselect J.NI p Control and Reset Mode Enable Enable Enable Enable Enable (SCTL) 7 Dis- able 3 Command ··~ Transfer Modifier p (SCMD) Command Code RST Inter- IT Out cept PRG 'O' Term. l Xfer Xfer Mode 4 Tran sf er lf -S-ync. Mode Xf er Max. Transfer Min. Transfer 'O' 'O' p (TMOD) IT Offset 4 l 2 l 1 2 Period 1 5 Phase R Bus Control Free Transfer Phase (PCTL) 7 Inter-i 'O' MSG C/D l/D p rupt Out Out Out Enabl~ 6 Phase R REQ ACK ATN SEL BSY lfSG C7D 170 p Sense (PSNS) y - - 7 lrata R Internal Data Register (8 Byte FIFO) Register p (DREG) l\iT Bit7J 6 5 4 3 2 1 0 J J 1 l l 1 lr TransTer Counter lf T T Tr!nsf er C~nter Hlgh (MSJ) T p High IW. - Bit23 l 22 21 l 20 19 18 l 17 16 1TCH_l l l l l p 9 Transfer 1f T I Counter Tlansfer 1counter -,Middle (l2nd Bytle) Mid. lw- BitlS l 14 13 l 12 11 10 l 9 8 1TCt11_ l l l l 10 Transfer R T T Trlsfer cdunter Ll (LSB;r T Counter p Low _{_TCL) IW1 Bit7 6 5 4 3 2 1 0 11 Interrupt R Sele- Rese- Dis- Com- S~r- Time SPC Reset Sense cted lected Con- mand vice Out Hard Condi- p (INTS) nected Com- Re- Error ti on _p_l ete _g_ui red w Reset Interrupt - p 12 SPC Status (SSTS) R Connected INIT 1SPC Xfer in TARG Busy Pro- J!_ress ~~~I TC=O DREG Srtus FULL EMPTY w - - - 12 - Table 3.2.2 Internal register bit assignment (Continued) No. Name (Abbr .J OP 7 6 I 5 4 3 2 1 0 p 13 SPC Error R Data lError 0 0 TC P- Phase Short Offset P Status SCSI SPC Error Error Period Error (SERR) W 14 Temporary R p Register Bit7 l 6 l 0 (TEMP) w p Bit7 l 6 l 0 E Txternal R Buffer p (EXBF) T Bit7 l 6 l 0 16 Modified R MJBC l Byte 10 1 Bit3 l 2 l 0 Counter W J_MBCl fT SPC R Diagnostiq Control hW-.-+-lf,,,...,-ia-g--rI~lJ~ia-g~..,-~~~~---,...-.D~i-ag~...-.D~i-ag-r~D~1~a-g~~D~i~a-g-+---1 J_SDGC) REQ ACK - BSY MSG C/D I/O - - 13 - 3.3 MAJOR OPERATIONS 3.3.1 MPU Interface Control Block The MPU interface control block selects a specified internal register and controls a read/write operation. Also, this block generates an interrupt and indicates its cause. (This is done to report the result status of SPC internal operation, and the detection of an error, if encountered.) 3.3.2 Bus Phase Control Block The bus phase control block generates a specified bus phase for SCSI and controls its sequence of executions. Also, this block supervises SCSI status, and responds to the bus phase being executed if necessary. 3.3.3 Arbitration/Selection Sequence Control Block This sequence control block executes the ARBITRATION phase with the SCSI-specified timing and obtains permission to use the SCSI bus. Then, it carries out the SELECTION/RESELECTION phase and checks the response from the selected/reselected device. Also, this block detects the SELECTION/RESELECTION phase on SCSI, and checks the bus device ID specified in the internal register against that specified on the SCSI data bus. Then, if this block finds that SPC has been selected by another SCSI bus device, it executes the response sequence for the SELECTION/RESELECTION phase. 3.3.4 Transfer Sequence Control Block This sequence control block controls the DATA IN/OUT, COMMAND, STATUS, and MESSAGE IN/OUT phases to be executed in SCSI. The following two modes are available for exe- cution of these transfer phases: (1) Manual transfer mode In manual transfer mode, the MPU interface is used for transferring data and sending/receiving/checking the REQ/ACK signals on SCSI. (2) Hardware transfer mode In hardware transfer mode, SPC controls the SCSI transfer sequence according to the transfer mode and transfer byte count specified in the internal registers, and reports the end result of transfer. Asynchronous and synchronous mode transfer operations can be executed. In the asynchronous mode transfer operation, the REQ and ACK signals are controlled by the interlock protocol. In the synchronous mode transfer operation, a maximum of eight-byte offset is available for the DATA IN/OUT phase. The hardware transfer mode is subdivided into two according to the data routing: (a) Program transfer mode Data is routed via MPU interface in the following data paths: SCSI+-+ Data buffer register+-+ Data bus lines 07 to DO and DP. (b) OMA mode Data is routed using DREQ and DRESP signals for OMA control in the following data paths: SCSI+-+ Data buffer register+-+ Data bus lines HDB7 to HOBO and HDBP. - 14 - 3.3.5 Transfer Byte Counter Block This counter indicates the transfer byte count used for hardware transfer mode operation in SPC. It consists of 24 bits. Except for execution of a special transfer operation (padding), the transfer byte counter' is decresed by one each time one byte of data is transferred on SCSI. The transfer byte counter is also used as a timer for supervising the waiting time for a response to be returned from the selected SCSI bus device during execution of the selection/reselection phase. On the MPU interface, the transfer byte counter is treated as three separate internal registers (TCH, TCM, TCL), each being one byte long. 3.3.6 Data Buffer Register Block The data buffer register block is used in execution of a hardware transfer mode operation in SPC. It has a capacity of eight bytes, and operates on the FIFO principle for each byte. In an input operation (from SCSI to SPC), data received from SCSI is loaded into the buffer register. In OMA mode, transfer request signal DREQ is generated to the external buffer memory. Also, in program transfer mode, data can be read out from this buffer register. In an output operation (from SPC to SCSI), data supplied from the MPU interface (program transfer mode) or external buffer memory (OMA mode) is loaded into the buffer register and then sent to SCSI. In this case, a maximum of eight bytes of data is prefetched into SPC. The MPU interface treats 8-byte data buffer register as if it was a one-byte internal register. In an input operation, the byte locations holding valid data are selected in succession for reading out. In an output operation, the empty byte locations are selected in succession for writing in. - 15 - CHAPTER 4 OPERATIONAL DESCRIPTION 4.1 BOID REGISTER OP 7 6 5 4 3 2 1 0 p R Bit Significant Bus Device D #7 #6 #5 #4 #3 #2 #1 #0 'O' w SCSI Bus Device ID !04 !02 IDl Write Operation (Bits 2 to 0): The BOID register specifies an SCSI bus device identifier (ID) with a three-bit binary number. This setting must be completed before resetting the SCTL register's bit 7 (Reset & Disable). Bits 2 to 0 are not affected by any resetting except power on reset. Read Operation: The BOID register indicates an SCSI physical device address (bus device ID) with each bit. An SCSI physical device address is decoded from the values at bits 2 to 0 specified in a write operation to the BOID register described above. One of the bits is 'one', the others are all 'zeros'. The SCSI bus usage priority is assigned in descending order from bit 7 to bit 0. Using a bus device ID indicated in this register, SPC executes the ARBITRATION phase. Also, if a SELECTION/RESELECTION phase condition occurs in SCSI, the value of the SCSI data bus is checked against the con- tents of this register to see whether the SPC has been selected/reselected or not. 4.2 SCTL REGISTER OP 7 6 5 4 3 2 1 0 p R Reset ControT -Uiag ARBTI -P-arity Select lreseTect INT ir t--- & Reset Mode Enable Enable Enable Enable Enable w Disable Bit 7: Reset & Disable Bit 7 indicates a reset instruction to the internal registers and control circuits in SPC. When this bit is 1, SPC is reset and logically disconnected from SCSI (put in the disable state). Execution of the hardware reset (~input= 'L') causes this bit to be 1. To enable the SCSI operation, bit 7 must be made zero to release the disable state. - 16 - Bit 6: Control Reset Bit 6 instructs resetting of the data transfer control circuit in SPC. That is, the data transfer control circuit is reset when this bit is 1. Even if the control reset is executed by this bit during the SPC operates with SCSI, the SPC keeps connected state with SCSI. The reset function of this bit should be used for resetting the data transfer control circuit while it is connected with SCSI. More specifically, it should be used when an error is indicated by bit 1 (SPC Hardware Error) of the INTS register during execution of the SCSI transfer phase or when a timeout occurs before completion of Transfer command execution (supervised by the MPU program). Bit 1 (SPC Hardware Error) of the INTS register and the SERR register are cleared by the reset function of this bit. Note: This reset function initializes the SPC transfer control circuit. So, when the SPC serves as an INTIATOR, the following consideration is required: - Since the REQ signal may be received during resetting, the first byte should be transferred in manual mode after resetting. Bit 5: Diagnostic Mode When bit 5 is 1, SPC enters a diagnostic mode and is disconnected from SCSI. A diagnostic mode allows pseudo-execution of the SCSI operation using the SDGC register (to be explained later). Bit 4: Arbitration Enable Bit 4 indicates whether the ARBITRATION phase is executable in SCSI or not. 1 ... ARBITRATION phase executable 0 ... ARBITRATION phase nonexecutable With this bit set to 1, the Select command causes SPC to execute the ARBITRATION phase. And, if the SPC win the arbitration, it executes the SELECTION/RESELECTION phase. With this bit set to 0, the Select command causes SPC to execute the SELECTION phase without the ARBITRATION phase. As long as bit 4 is 0, SPC returns no response to a reselection request from other SCSI bus device. That is, no response is made even if bit 1 (Reselect Enable) of this register is set to 1. Remember that bit 4 must be set correctly before clearing bit 7 (Reset & Disable) of the SCTL register. Note also that this bit should not be changed in other than a diagnostic mode after clearing bit 7 of the SCTL register. Bit 3: Parity Enable Bit 3 indicates whether the parity of data received from the SCSI data bus is to be checked or not. 1 ... Parity of the data received from the SCSI data bus is checked. 0 ... Parity of the data received from the SCSI data bus is not checked. Regardless of the value of this bit, the parity of the data to be sent to the SCSI data bus is ensured. Also, the parity of the data on the SPC internal data bus is always checked. While SPC is connected with SCSI, this bit should not be changed. A parity check is carried out in the following cases: (1) When checking an ID value placed on the data bus upon detection of the SELECTION/RESELECTION phase in SCSI: Detection of a parity error causes no response to the SELECTION/RESELECTION phase even if the SCSI bus device ID has been matched. - 17 - (2) When receiving data from SCSI in an input transfer sequence: If a parity error is detected in a data byte, the relevant parity bit value is corrected and the data byte with the corrected parity is sent to the MPU/DMA data bus. Bit 2: Select Enable 1 ... SPC responds as a TARGET device to the SELECTION phase in SCSI. 0 ... SPC does not respond to the SELECTION phase in SCSI. Note: If SPC has already detected the SELECTION phase during an attempt to set this bit to 0, SPC responds to the SELECTION phase as a TARGET device. In this case, the 0 setting is effective for the subsequent SELECTION phase (with no response). Bit 1: Reselect Enable 1 ... SPC responds as an INITIATOR to the RESELECTION phase in SCSI. 0 ... SPC does not respond to the RESELECTION phase in SCSI. Note: If SPC has already detected the RESELECTION phase during an attempt to set this bit to 0, SPC responds to the RESELECTION phase as an INITIATOR. In this case, the 0 setting is effective for the subsequent RESELECTION phase (with no response). Bit 0: Interrupt Enable Bit 0 serves as a mask for enabling/disabling an interrupt (INTR) output from the SPC. 1 ... Interrupt enabled 0 ... Interrupt disabled An interrupt due to a RESET condition detected in SCSI cannot be masked. Regardless of the value of this bit, an interrupt event is always indicated in the INTS register. This makes available poll-mode control in an interrupt disabled state. 4.3 SCMD REGISTER OP R 7 16 l Command Code 5 4 RSI 3 2 1 l 1 Inter- Tran~er Mo~l'ier 0 p p I Out cept PRG 'O' Term. w Xf er Xf er Mode 4.3.1 Register Functions The SCMD register is used for g1v1ng a command to SPC. Writing into this register causes SPC to initiate the command processing specified at bits 7 to 5. - 18 - Bit 7 to 5: Command Code Bit 7 6 5 Command 0 0 0 Bus Release 0 0 1 Select 0 1 0 Reset ATN 0 1 1 Set ATN 1 0 0 Tran sf er 1 0 1 Transfer Pause 1 1 0 Reset ACK/REQ 1 1 1 Set ACK/REQ Bit 4: RST Out If bit 7 (Reset & Disable) of the SCTL register is 0, setting 1 in bit 4 of this SCMD register sends the RST signal (RSTO pin) to SCSI. When bit 4 is set to 1, a command being executed or waiting for execution in SPC is cleared and all signals to SCSI other than RST are deactivated. To ensure for the SCSI timing requirements, MPU must maintain this bit at 1 for more than 25 microseconds. Note: If the RST signal (RSTI pin) is received from SCSI with this bit set to 0, the operation sequence is as follows: • A command being executed or waiting for execution in the SPC is cleared. • All signals to the SCSI are deactivated. • An interrupt condition (non-maskable) is generated. Whenever bit 7 (Reset & Disable) of the SCTL register is 0, the SPC always accepts the RST signal from the SCSI. Bit 3: Intercept Transfer Bit 3 specifies the special data transfer mode. It is valid only when SPC serves as an INITIATOR. This bit should be set to 1 together with the Set ATN, Set ACK/REQ, or Bus Release command (Bus Release command has no effect when SPC has been connected with SCSI as an INITIATOR). And, this bit should be reset together with the Reset ACK/REQ com- mand. (When two or more bytes are transferred using the Set ACK/REQ and Reset ACK/REQ commands, this bit must be reset on issuance of the Reset ACK/REQ command for the last byte.) With bit 3 of SCMD register set to 1, executing manual transfer (MPU- controlled transfer using the Set ACK/REQ and Reset ACK/REQ commands) does not change the contents of the eight-byte data buffer register in SPC. Therefore, if a TARGET changes bus phase to such as MESSAGE IN during execution of the DATA OUT phase, this intercept transfer mode makes it possible to optionally restart the DATA OUT phase at the end of the interrupting phase. The phase change during transfer execution is reported by a 'service required' interrupt. To execute this intercept transfer mode, bit 3 of SCMD register must be set to 1 prior to the resetting of an interrupt (an interrupt must be reset after bit 3 is set to 1). Even when not using the intercept transfer mode, bit 3 may be specified for resetting a 'service required' interrupt. In this case, bit 3 must be set/reset together with the Bus Release command. For more details, see the description of bit 3 (Service Required) of the INTS register. - 19 - Bits 2 to 0: Transfer Modifier Bits 2 to 0 are used as a field for specifying the execution mode of the information transfer phase. A value must be set in this field when the Transfer command is issued. If any of the following commands are issued during execution of the Transfer command, this field's value must not be changed: • Set ATN • Transfer Pause • Reset ACK/REQ Bit 2: Program Transfer 1 Data is transferred between the MPU and the data buffer register in SPC. 0 Data is transferred in the OMA mode in which the SPC signals a transfer request to the external buffer memory. Bit 1: Unused Bit 1 must always be set to 0. Bit 0: Termination Mode Bit 0 provides different functions depending on the SPC operation mode. When SPC serves as an INITIATOR, bit 0 specifies the following operations: 1 ... Even after the transfer byte counter reaches 0 during execution of the Transfer command, data transfer is continued if the REQ signal arrives from a TARGET in the same phase. if an output operation is in progress, all 0 bits (with a parity bit set to 1) are transmitted as data. During an input operation, the received data is ignored. But parity is checked if it is enabled (Parity Enable). The above data transfer is referred to as padding transfer, which is effective only when the DATA IN or DATA OUT phase is executed. Padding transfer is executed only within SPC, and a transfer request is not signalled to the external buffer memory even if the OMA transfer mode is specified. Padding transfer is maintained until a TARGET changes the bus phase. In the padding transfer mode, if the Transfer command is issued with the initial value of the transfer byte counter set to 0, execution of padding transfer is started with the first byte. To carry out an output operation in this case, the TEMP register must be set to X1 00 1 prior to issuance of the Transfer command. 0 .•• Transfer command execution terminates when the transfer byte counter reaches 0. The Transfer command must be reissued for receiving the next REQ signal from a TARGET. When SPC serves as a TARGET, bit 0 specifies the following operations: 1 ... If a parity error is detected in the received data during execution of the Transfer command for input, the current transfer sequence is immediately stopped to terminate Transfer command execution. 0 ... Even if a parity error is detected in the received data during execution of the Transfer command for input, the current transfer sequence is continued until the transfer byte counter reaches 0. - 20 - 4.3.2 Command Functions (1) Bus Release command When SPC acts as a TARGET role, the Bus Release command instructs a transition to the BUS FREE phase. During execution of the information transfer phase, the Transfer Pause command must be issued to halt the data transfer operation prior to this command. Otherwise, the SCSI bus sequence is not ensured. The Bus Release command may also be used to cancel the Select command waiting for the bus to become free. Note that the Bus Release command is ignored if SPC has already started the ARBITRATION or SELECTION phase. (2) Select command The select command requests the SELECTION/RESELECTION phase to be started. It shall be issued only when the SPC is not connected with SCSI. When the SPC receives this command, it carries out the following operation upon detection of the BUS FREE phase is SCSI. a. When bit 4 (Arbitration Enable) of the SCTL register is set to 1: After the BUS FREE phase has been detected, SPC executes the ARBITRATION phase to try to obtain bus usage permission. If the SPC has lost the arbitration, the Select command terminates its execution. If the SPC has won the arbitration, SPC executes the SELECTION or RESELECTION phase. The SELECTION phase is executed when bit 0 (I/O Out) of the PCTL register is set to 0, and the RESELECTION phase is executed when it is set to 1. b. When bit 4 (Arbitration Enable) of the SCTL register is set to 0: After the BUS FREE phase has been detected, SPC executes the SELECTION phase. Before this command is issued, the following settings must be made in either of the above cases: a. PCTL register Specify the phase to be executed at bit 0 (I/O Out). 0 ... SELECTION phase to be executed 1 ... RESELECTION phase to be executed Note that whenever bit 4 (Arbitration Enable) of the SCTL register is set to 0, the SELECTION phase is executed regardless a value of bit 0 (I/O Out) of the PCTL register. b. Set ATN command Issue the Set ATN command if it is required to assert an ATN signal at the SELECTION phase. c. TEMP register In the TEMP register, specify a value to be sent to the SCSI data bus during execution of the SELECTION/RESELECTION phase. d. TCH and TCM registers Specify a response (BSY signal) waiting supervisory time for execution of the SELECTION/RESELECTION phase. The supervisory time TsL should be calculated as follows: Assuming that the value of TCH and TCM is N (MSB: TCH, LSB: TCM); When N does not equal 0, TsL = (N x 256 + 15) x TcLF x 2. When N equals 0, TsL = infinite. Where, TcLF is a cycle time of the clock signal supplied to the CLK pin of SPC. - 21 - e. TCL register Specify a period of time (TWAIT) from the moment when both BSY and SEL signals become inactive on SCSI upon detection of the BUS FREE phase to the moment when SPC initiates the ARBITRATION/SELECTION phase. Parameters (X'OO') to (X'OF') can be specified in the TCL register. The average TWAIT value can be derived using the following equation: TwAIT = [(TCL + 6] x TcLF [(TCL) + 7] x TcLF Where, (TCL): A set value in the TCL register. TcLF: A cycle time of the clock signal supplied to the CLK pin of SPC. Table 4.3.1 lists the values recommended to be set in the TCL register. Table 4.3.1 Values recommended to be set in TCL register for use of Select command TCLF (ns) TCL TWAIT (average) (ns) 125 - 180 (04)16 1,250 - 1,980 140 - 200 (03)16 1,260 - 2,000 In ARBITRATION phase execution by the Select command, the bus device identifier (ID) which is sent to the SCSI data bus is the value specified in the BOID register. The following equation can be used to obtain the period of time (TARB) required from the moment when the arbitration is started (BSY signal assertion) to the moment when the bus usage priority is examined: TARB = 32 x TcLF Where, TcLF indicates a cycle time of the clock signal supplied to the CLK pin of SPC. After SELECTION/RESELECTION phase execution is started, a time-out interrupt occurs if no response is acknowledged within the supervisory time specified in the TCH and TCM registeres. When a time-out interrupt occurs, the SPC holds the current execution state of SELECTION/RESELECTION phase for SCSI. However, until the time-out interrupt condition is reset, SPC executes no operation to the response from the bus device being selected. Either of the following procedures can be used for a time-out interrupt: a. Restart of SELECTION/RESELECTION phase After specifying a new supervisory time in the TCH, TCM and TCL registers, reset the time-out interrupt condition. Then, SPC will restart the SELECTION/RESELECTION phase in progress. At this time, changing the TEMP register contents can alter the value being sent to the SCSI data bus. New supervisory time TsL' is expressed as follows: Assuming TCH, TCM and TCL value to be N' (MSB: TCH, LSB: TCL); TsL' = N' x TcLF x 2 (N' 0)* Where, TcLF indicates a cycle time of the clock signal supplied to CLK pin of the SPC. - 22 - b. Termination of SELECTION/RESELECTION phase When a time-out interrupt occurs, the values of TCH, TCM and TCL registers are 0. Resetting the time-out interrupt condition in this state causes SPC to deactivate all signals to SCSI and terminate the SELECTION/RESELECTION phase unless the BSY signal is returned. If the BSY signal is returned when the interrupt condition is being reset, then SPC executes a normal sequence to complete the Select command. To reset a time-out interrupt condition, set bit 2 of the INTS register to 1. If the Select command has been issued with initial setting of 0 for TCH and TCM registers, the time-out interrupt does not occur. However, the above time-out interrupt resetting procedure must be carried out to terminate the SELECTION/RESELECTION phase in progress. If SPC recognizes a response from the selected/reselected device during SELECTION/RESELECTION phase execution, SPC executes an interface sequence to serve as an INITIATOR (at SELECTION phase) or TARGET (at RESELECTION phase), then SPC is connected with SCSI as a relevant role. When the Select command is issued, the SPC status is indicated in the SSTS register. Figure 4.3.l shows the status transitions. - 23 - SSTS re ister *1 Bit7 6 5 Connected INIT TARG SPC Bus Unconnected 0 0 0 Select with SCSI I Waiting for 0 0 1 , _/-Bus release~ BUS FREE ase 1 command ..._ - - - _,,,,, *2 ARBITRATION 0 0 1 *3 No SELECTION . . . . . . J·-- . . . . . phase being 1 0 1 executed i' -Time-out - -~ - ' , \ interrupt / RESELECTION - - - - - ,,, phase being 0 1 1 executed 1 0 0 Command complete 0 1 0 interrupt Fig. 4.3.l Status transitions in Select command execution *l: Check the SPC status after the elapsed time (shown below) following issuance of the Select command: (1) If Arbitration Enable bit is set to 0 the minimum waiting time is 22 x (Clock cycle: TcLF) (2) If Arbitration Enable bit is set to 1 the minimum waiting time is (SS + Set value in TCL) x (Clock cycle: TcLF) *2: The Select command waiting for BUS FREE phase can be canceled using the Bus Release command. However, if the bus becomes free simultaneously with issuance of the Bus Release command, the Select command remains valid to execute the ARBITRATION and SELECTION/RESELECTION phases. The MPU program must make sure that the Select command has been canceled after more than four clock cycles passed since the Bus Release command (write to SCMD register) was issued. *3: If the SPC lost the arbitration, the Select command terminates automatically (a command complete interrupt does not occur). In this case, note that the TCL register contents are unpredictable. When issuing the Select command again, be sure to specify the relevant value (see (2)-e, TCL register in Section 4.3.2) again in the TCL register. - 24 - (3) Set ATN command The Set ATN command is valid only when the SPC will act as an INITIATOR role. If this command is issued prior to the Select command, the ATN signal is sent to SCSI at SELECTION phase execution. If the Set ATN command is issued while the SPC is connected with SCSI as an INITIATOR, the ATN signal is sent to SCSI immediately. When the parity checking for the SCSI data bus is enabled and SPC detects a parity error in the data received from SCSI (during execution of the input transfer operation in hardware transfer mode), the ATN signal is sent to SCSI regardless of the Set ATN command. (See Figure 4.3.2) The assertion of ATN signal is retained until the condition described on item (4) Reset ATN command in this section is satisfied. However, the ATN signaling condition held in SPC, by the Set ATN command issued prior to the Select command, is cleared, if: a. the Select command is canceled by the Bus Release command, or b. a selected/reselected interrupt occurs before execution of the SELECTION phase. Data bus ( Invalid parity > REQ ACK ATN Fig. 4.3.2 ATN signal generation in data transfer (4) Reset ATN command The Reset ATN command is used to reset the ATN signal being sent to SCSI. If SPC generates an ATN signal (due to a parity error in the received data) during execution of the hardware transfer mode operation, do not issue this command to reset the ATN signal until execution of the current Transfer command has completed. Also, to reset the ATN signal in manual transfer mode, execute the Reset ATN command before the ACK signal is sent to SCSI. In the following cases, SPC automatically resets the ATN signal without the Reset ATN command: a. On occurrence of a disconnected interrupt. b. On sending the last byte during execution of the MESSAGE OUT phase in hardware transfer mode. (See Figure 4.3.3.) Data bus REQ ACK ATN Fig. 4.3.3 ATN signal resetting in MESSAGE OUT phase - 25 - (5) Transfer command The transfer command executes the following information transfer phases in SCSI: • DATA IN/OUT phase • STATUS phase • COMMAND phase • MESSAGE IN/OUT phase The transfer operation initiated by this command is referred to as a hardware transfer operation, the sequence of which is controlled by SPC. Before issuing the Transfer command, be sure to set up the following: a. Transfer byte counters (TCH, TCM, TCL) Set the byte count of the data to be transferred. (MSB: TCH, LSB: TCL) b. Bits 2 to 0 of the PCTL register Set a pattern indicating the phase to be executed. c. TMOD register Set detailed transfer mode. When SPC serves as a TARGET, it executes the information transfer phase specified in the PCTL register and terminates the Transfer command when any of the following conditions is encountered: a. End of transferring data of the byte count specified in the transfer byte counter. b. Receipt of the Transfer Pause command. c. Detection of a parity error in the received data during an input operation with bit 0 (Termination Mode) of the SCMD register set to 1. (When the parity checking is enabled) When SPC serves as an INITIATOR, it starts the transfer operation as follows: a. If the REQ signal is received before the Transfer command is issued, SPC compares the phase requested by the SCSI with that specified in the PCTL register at receipt of this command. Then, if they match, SPC starts the transfer operation. b. If the REQ signal has not been received when the Transfer command is issued, SPC makes this command wait for execution. Then, if the phase specified in the PCTL register matches that requested by SCSI on receipt of the REQ signal, SPC starts the transfer operation. In the above phase comparison, if a phase mismatch occurs, the Transfer command is nullified, then SPC generates a service required interrupt. On occurrence of this interrupt, check the PSNS register for the phase requested by SCSI, and issue the Transfer command again or carry out manual transfer. When SPC serves as an INITIATOR, Transfer command execution terminates when any of the following conditions is encountered: a. In other than the padding transfer mode, Transfer command execution terminates when the transfer of data of the byte count specified in the transfer byte counter is completed, or when another information transfer phase is" requested by the TARGET. b. In the padding transfer mode, Transfer command execution terminates when another information transfer phase is requested by the TARGET. c. Transfer command execution terminates when disconnected interrupt occurs. - 26 - (6) Transfer Pause command The Transfer Pause command prematurely halts a hardware transfer operation initiated by the Transfer command when SPC serves as a TARGET. Note that the Transfer Pause command cannot be used when SPC serves as an INITIATOR. On receipt of this command, SPC performs the following: a. Stops sending a new REQ signal to SCSI, in an input operation. b. Stops sending a transfer request (DREQ) signal to the external buffer memory, in a OMA mode output operation. Note: For an output operation in program transfer mode, a write to the data buffer register is not allowed after this command has been issued. Then, the hardware transfer operation terminates when the internal data buffer register in SPC becomes empty. (7) Set ACK/REQ command The Set ACK/REQ command is used to set ACK or REQ signals for SCSI during execution of manual transfer. When SPC acts as an INITIATOR, this command causes the ACK signal to be sent. When SPC acts as a TARGET, it causes the REQ signal to be sent. In manual transfer mode, data is transferred via the TEMP register. In this case, the pattern (kind) of the information transfer phase to be executed must be preset at bits 2 to 0 of the PCTL register. During execution of manual transfer, the transfer byte counter remains unchanged. Figures 4.3.4 and 4.3.5 show the manual transfer procedures. (8) Reset ACK/REQ command The Reset ACK/REQ command is used to reset the ACK or REQ signals for SCSI. When SPC acts as an INITIATOR, this command resets the ACK signal. When SPC acts as a TARGET, it resets the REQ signal. Use this command in execution of manual transfer. See Figure 4.3.4 and 4.3.5 for the manual transfer procedures. Also, when SPC serves as an INITIATOR, the Reset ACK/REQ command must be issued to reset the ACK signal for the last byte in the MESSAGE IN phase of.the hardware transfer mode. In the MESSAGE IN phase, the end of the Transfer command is reported with the ACK signal for the last byte being asserted. The MPU program checks the validity of the received message first, then issues this command. In this case, the ATN signal, if necessary, may be sent out using the Set ATN command prior to this command. - 27 - Set PCTL No No Yes Fig. 4.3.4 Manual transfer procedure (SPC serving as a TARGET) - 28 - Set PCTL No Yes Set TEMP Set ACK/REQ REC~ Set ACK/REQ Yes ~ ACK +--~ Yes (SCSI -+ TEMP) Reset ACK/REC No No Yes Read PSNS Yes fer No Set PCTL Fig. 4.3.5 Manual transfer procedure (SPC serving as an INITIATOR) - 29 - 4.3.3 Command Termination Report (1) Immediate commands The followings are immediate type commands which terminate operations immediately after being issued. For these commands, SPC does not report termination. • Set ATN • Reset ATN • Set ACK/REQ • Reset ACK/REQ (2) Interrupt commands For the following commands, an interrupt occurs at the end of execution. The interrupt cause is indicated in the INTS register. • Select • Transfer (3) Non-interrupt commands The following commands terminate with different timings depending on the SPC operation being executed. Check the termination status according to the status information in the SSTS register. Termination status (SSTS register) Bit 7 0 0 4 !NIT TARG SPC Bu~ Xfer in Pr_g_. Transfer Pause 0 1 0 0 Bus Release *l 0 0 0 0 *1: If a selected/reselected interrupt condition is detected immediately after termination of the Bus Release command, an interrupt occurs and either the !NIT or TARG bit is set. 4.3.4 Command Issuance Timing Issuance of a command requires a write to the SCMD register. SPC synchronizes a write to the SCMD register with a clock supplied from the CIR' pin, and then starts executing the command specified at bits 7 to 5. Figure 4.3.6 shows the command execution timing. When issuing commands successively, leave an interval between them for more than the sync-loss period (four clock cycles) in SPC. - 30 - A3 - AO 1 0010 1 D7 - DO, DP --------- Synchronization (Command received) Start of command execution Fig. 4.3.6 Command execution timing 4.4 TMOD REGISTER OP R/W 7 6 5 I I 4 3 2 I Sync. MAX. Transfer Off setJ MIN. Transfer 1 '0 0 0 p p Xf er Period 4 l 2 l 1 2 l 1 4.4.1 Register Functions Bit 7: Synchronous Transfer 1 .. Indicates that the DATA IN/OUT phase is executed in synchronous transfer mode. The COMMAND, STATUS, and MESSAGE IN/OUT phases are executed in asynchronous transfer mode disregarding the setting at this bit. 0 .. Indicates that the DATA IN/OUT phase is executed in asynchronous transfer mode. Bits 6 to 4: Maximum Transfer Offset Bits 6 to 4 indicate a maximum value of the REQ/ACK offset to be used in synchronous transfer mode. Bit 6 Bit 5 Bit 4 Maximum offset value 0 0 0 8 0 - 1 0 - 1 1 - 1 1 - 7 - 31 - When SPC serves as a TARGET, it sends the REQ signal in advance within the specified maximum offset value. When SPC serves as an INITIATOR, it can receive the REQ signal and input data within the specified maximum offset value. If the maximum offset value is exceeded in reception of the REQ signal, an error condition is detected at bit 0 (Transfer Offset Error) of the SERR register. Bits 3 and 2: Transfer Period Bits 3 and 2 indicate a parameter for determining the minimum repeat cycle of the REQ and ACK signals in synchronous transfer mode. Specify a period between the trailing edge of the REQ (ACK) signal and the leading edge of the next REQ (ACK) signal in multiples of a clock signal cycle (TcLF) supplying at the CLK pin of SPC. Figure 4.4.l shows an example of transfer period setting. In synchronous transfer mode, the REQ (ACK) signa.l_Eulse width (Typical) equals a cycle of the clock signal (TcLF) supplied to the CLK pin. REQ (ACK) Setting examples; Maximum transfer speeds Bit 3 Bit 2 n TcLF = 125 ns TcLF = 136 ns TcLF = 166 ns 0 0 1 4.00 MBPS 3.68 MBPS 3.01 MBPS 0 1 2 2.67 2.45 2.01 1 0 3 2.00 1.84 1.51 1 1 4 1.60 1.47 1.21 Fig. 4.4.1 Transfer period setting 4.4.2 Transfer Mode Setting Timing The TMOD register value determines the way the DATA IN/OUT phase is executed. When SPC serves as a TARGET, specify the DATA IN/OUT phase (C/D, MSG= 00) in the PCTL register. And, before issuing the Transfer command, be sure to complete TMOD register setting. When SPC acts as an INITIATOR, be sure to specify a correct value before the target initiates the DATA IN/OUT phase. A TARGET's phase changing time and the period from it until transmission of the first REQ signal are unpredictable; therefore, set the transfer mode with the following timing: (1) After completion of SELECTION phase a. Before issuing the Transfer command for execution of the COMMAND phase, or b. Before resetting the ACK signal for the last byte in the MESSAGE IN phase (before issuing the Reset ACK command) if a SYNCHRONOUS DATA TRANSFER REQUEST message is transmitted at the end of the command phase. - 32 - (2) After reselected interrupt a. Before issuing the Reset ACK command in the MESSAGE IN phase (IDENTIFY). 4.5 PCTL REGISTER OP 7 lVW -Bus Free 6 I 5 I 0 4 I 3 2 MSG 1 g;o 0 1/0 p p Interrupt Out Out Out Enable Bit 7: Bus Free Interrupt Enable With bit 7 set to l, detection of the BUS FREE phase on the SCSI causes a discon- nected interrupt to occur. To prevent an undesired interrupt occurring, be sure to set bit 7 to 0 when: • Issuing the Select command, or • Resetting a 'disconnected' interrupt. Bit 2: MSG Out Bit 1: C/D Out Bit 0: I/O Out When SPC serves as a TARGET, specify the information transfer phase to be executed in SCSI. These bit values are sent to SCSI as MSG, C/D and I/O signals. When SPC acts as an INITIATOR, specify the pattern indicating the transfer phase to be executed. Before executing the transfer operation, the specified transfer phase pattern is compared with a bus phase actually requested by the TARGET. Then, if they match, the transfer operation is initiated. Table 4.5.1 shows how to set a transfer phase. Use bit 0 (I/O Out) to specify the phase to be executed with the Select command. See 4.3.2 (2) - Select command for details. Table 4.5.1 Transfer phase setting Bit 2 Bit 1 Bit 0 SCSI transfer phase MSG Out C/D Out I/O Out 0 0 0 Data Out 0 0 1 Data In 0 1 0 Command 0 1 1 Status 1 0 0 Unused 1 0 1 Unused 1 1 0 Message Out 1 1 1 Message IN - 33 - 4.6 DATA BUFFER REGISTER (DREG) OP 7 6 5 4 3 2 0 p RW Internal Data Register 8 Bytes Bit 7 6 5 4 3 2 0 p SPC 1 s internal data buffer register consists of eight bytes and operates on the FIFO principle. When executing the Transfer command in program transfer mode, MPU trans- fers data using this register. Figure 4.6.1 shows the DREG access procedure to be taken in program transfer mode. A write to/read from this register is performed on the FIFO principle. Therefore, never repeat accessing more than the number of times required. Issue Transfer command (in program transfer mode) No (SSTS)o No Yes SSTS=(45)16 or (85)16 or (INTS)4= 1 l 1 Fig. 4.6.1 DREG access procedure in program transfer mode - 34 - 4.7 TEMP REGISTER OP 7 6 0 p Bit 7 6 0 p Bit 7 6 0 p The TEMP register is used for controlling the SCSI data bus except when hardware transfer 1s executed. It consists of two bytes, each of which is dedicated exclusively to receiving/sending data. (1) Data receiving element (read only) a. When a SELECTION/RESELECTION phase is detected in SCSI, the contents on the SCSI data bus are saved in the TEMP register. If a selected/reselected interrupt occurs, a bus device can be identified by the TEMP register contents. b. For a manual transfer input operation, the contents on the SCSI data bus are saved in the timing sequence shown in Figure 4.7.1 (In SPC serving (In SPC serving as a TARGET) as an INITIATOR) Data Bus REQ ACK Sampling period TEMP --v--s :_-rr: - _ _J \ __ Fir. 4.7.1 Data bus save in manual transfer input operation (2) Data sending element (write only) 1) Before issuing the Select command, set the contents to be sent to the SCSI data bus in the SELECTION/RESELECTION phase. 2) For a manual transfer output operation, set the data to be sent out. - 35 - 4.8 TRANSFER BYTE COUNTER (TCH, TCM, TCL) OP 7 6 5 4 3 2 1 0 p R/W CH: rans fer Counter Bit 23 21 20 19 18 17 16 p RW Transfer Counter 2nd Byte Bit 15 13 12 11 10 9 8 p RW CL: Tran sf er Counter LSB Bit 7 6 5 4 3 2 1 0 p The transfer byte counter consists of three bytes and functions as a down counter. In execution of a hardware transfer operation, it is decreased by one each time one byte of data is transferred over SCSI. It indicates the remaining byte count of data to be transferred. In the Select command execution, this counter operates as a response waiting time supervisory timer and sequence control counter. See 4.3.2 (2) - Select command and (5) - Transfer command for transfer byte counter initialization. While the transfer byte counter is operating, do not carry out a read/write. 4.9 PSNS REGISTER OP 7 6 5 4 3 2 1 0 p R REQ ACK ATN SEL BSY MSG C/D I/O p When bit 5 (Diagnostic Mode) of the SCTL register is set to 0, the PSNS register indicates the control signal status on SCSI (input signals to SPC). - SPC input pins - Bit 7 REQ REQI 6 ACK ACK! 5 ATN ATNI 4 SEL SELI 3 BSY BSYI 2 MSG MSG! 1 C/D C/DI 0 I/O I/OI When bit 5 (diagnostic Mode) of the SCTL register is set to 1, the PSNS register indicates the status of control signals sent from SPC to SCSI. In the SCSI pseudo operation using the SDGC register, the PSNS register can be used to check the SCSI control signal status. A read from this register is allowed at any time regardless of the SPC condition. Bit 5 (ATN) of this register indicates the ATN signal status on SCSI: When SPC serves as a TARGET, receipt of the ATN signal is indicated in this register but does not have any effect on other operations. The MPU program examines the ATN signal status at the following times in sequence and responds to the ATTENTION con- dition from SCSI: - 36 - (1) When a selected interrupt occurs (2) When the RESELECTION phase has completed (3) When the Transfer command has been completed (4) During execution of the Transfer command When the ATN signal is detected, the Transfer Pause command can halt the transfer operation for transition to the MESSAGE OUT phase. (5) During execution of manual transfer 4.10 SSTS REGISTER OP R 7 l 1 6 45 Connected SPC Xfer in SCST 3 2 1 l 0 TC-0 -0-REG J Status p p INIT l TARG j Bu~ Pro_[ress Reset In FULL EMPTY 4.10.1 Register Functions The SSTS register indicates the SPC internal status, which can be read out at any time. Bit 7 and 6: Connected (INIT, TARG) These bits indicate the Connecting status between the SPC and SCSI. ][it 7 : .m,n Bit 6: TARG State 0 0 Not connect~ with SCSI. 1 0 . SPC serves as an INITIATOR: During execution of the SELECTION phase and after its completion. • After a reselected interru_e_t 0 1 . SPC serves as a TARGET: During execution of the RESELECTION phase· and at 1 1 . its completion. After a selected interr~t Undefined Bit 5: SPC Busy Bit 5 indicates that a command is being executed or is waiting to be executed. Bit 4: Transfer in Progress Bit 4 indicates that a hardware transfer operation is being executed or the SCSI is requesting information transfer phase. Bit 3: SCSI Reset In Bit 3 indicates the RST signal status on SCSI (input signal to the RSTI pin of SPC). Bit 2: TC = 0 (Transfer Counter Zero) Bit 2 indicates that the transfer byte counter (TCH, TCM, TCL) has reached 0. - 37 - Bits 1 and 0: DREG Status (Full, Empty) These bits indicate the status of the internal data buffer register. When executing a hardware transfer operation in program transfer mode, determine the data buffer register access timing by using these bit values. Bit 1: FULL Bit 0: EMPTY Data buffer reJ!_ister status 0 0 Holds 1 to 7 bytes of data. 0 1 !mpty. 1 0 Holds 8 bytes of data, leaving no free space. 1 1 Undefined 4.10.2 SPC Status SPC status is represented by combinations of status bits 7 to 4 of this register. Table 4.10.1 lists the combinations of these bits and SPC status. Table 4.10.1 SPC operating status indications SSTS register Bit 7: Bit 6: Bit 5: Bit 4: INIT TARG SPC Xfer in SPC operating status Busy Pr~ess 0 0 0 0 SPC is not connected with SCSI. SPC does not hold a command waiti"!..9_ to be execution. 0 0 1 0 SPC is not connected with SCSI. But SPC holds the Select command, which is waiting for BUS FREE phase. Or it is executing ARBITRATION .£.hase. 0 1 0 0 SPC serves as a TARGET. No operation is being executed in SCSI, or manual transfer is being_ executed. 0 1 1 0 SPC is executi"!..9_ RESELECTION ...E_hase on SCSI. 0 1 1 1 SPC serves as a TARGET. Hardware transfer operation (Transfer command) is being executed. 1 0 0 0 SPC serves as an INITIATOR. No operation is being executed in SCSI, or manual transfer is being_ executed. 1 0 0 1 SPC serves as an INITIATOR. Although SPC has received a REQ signal from SCSI, it is not ready to start transfer operation because no Transfer command has been issued or transfer phase does not match. 1 0 1 0 SPC is executing the SELECTION phase on SCSI. 1 0 1 1 SPC serves as an INITIATOR. Hardware transfer operation (Transfer command) is being executed. - 38 - 4.11 INTS REGISTER OP 7 6 5 4 3 2 1 0 p R Sele- Resele- Dis- Command Service Time SPC Reset p cted cted Connected Complete Required Out Hardware Condi- Error ti on w Reset Interrupt - 4.11.1 Register Functions The INTS register is used to indicate the cause of an interrupt and reset it. An interrupt issued by SPC (INTR pin) can be masked by bit 0 (INT Enable) of the SCTL register (except an interrupt whose cause is indicated at bit 0 [RESET condition]). To clear an interrupt, set 1 at the corresponding bit position in this register. Note that only the interrupt condition specified by 1 is reset. The bit positions having Os remain unchanged (corresponding interrupt conditions are maintained). In this register, two or more interrupts may be reset at the same time. 4.11.2 Interrupt Processing (1) Selected interrupt (Bit 7) Bit 7 indicates that SELECTION phase in SCSI has resulted in SPC being selected from another bus device (INITIATOR). When the SELECTION phase is detected, SPC checks the contents of the SCSI data bus. If the following conditions are satisfied, SPC executes a response sequence on SCSI, then generate a selected interrupt. a. The ID specified in the BOID register is selected. b. There or more bits not including the parity bit are not set to 1. c. When the parity checking is enabled, a parity bit value is correct. In the SELECTION phase, the TEMP register holds the value of SCSI data bus. SPC serves as a TARGET from when this interrupt occurs until when the Bus Release command is issued or the RESET condition is detected in SCSI. During this period, SPC asserts BSY signal to SCSI. Before issuing the Bus Release command, be sure to reset the cause of this interrupt. (2) Reselected interrupt (Bit 6) Bit 6 indicates that RESELECTION phase in SCSI has resulted in SPC being reselected from another bus device (TARGET). When the RESELECTION phase is detected, SPC checks the contents of the SCSI data bus. If the following conditions are satisfied, SPC executes a response sequence on SCSI, then generate a reselected interrupt. a. The ID specified in the BOID register is selected. b. Only two bits not including the parity bit are set to 1. c. When the parity checking is enabled, a parity bit value is correct. In the RESELECTION phase, the TEMP register holds the value of the SCSI data bus. SPC serves as an INITIATOR from when this interrupt occurs until when the disconnected interrupt occurs or the RESET condition is detected in SCSI. Before starting the transfer operation in SCSI, be sure to reset the cause of this interrupt. If the disconnected interrupt is indicated together with the reselected interrupt, reset both of these interrupts simultaneously. - 39 - (3) Disconnected interrupt (Bit 5) Bit 5 indicates that the BUS FREE phase has been detected in SCSI when bit 7 (Bus Free Interrupt Enable) the PCTL register is set to 1. Also, when SPC serves as on INITIATOR, bit 5 indicates transition to the BUS FREE phase in SCSI. After this interrupt condition has occurred, the next SELECTION/RESELECTION phase may be executed in SCSI. But, SPC does not respond to SCSI until this interrupt condition is reset. If the disconnected interrupt condition is detected during hardware transfer (Transfer command) execution with SPC serving as an INITIATOR, the SCSI operation stops but the SPC internal transfer sequence continues until one of the following events is encountered: a. The internal data buffer register becomes empty in an input operation. b. The data prefetch sequence to the internal data buffer register is completed in an output operation. When a disconnected interrupt occurs, check the SSTS register to confirm if the transfer operation has been completed. (4) Command complete interrupt (Bit 4) Bit 4 indicates that the Select command/Transfer command operation has been completed. a. Completion of Select command This interrupt indicates that SPC has acknowledged a response (BSY signal) from the selected bus device in SELECTION/RESELECTION phase execution. It indicates that the SELECTION/RESELECTION phase has completed in SCSI. SPC serves as an INITIATOR after the SELECTION phase has been executed, and it serves as a TARGET after the RESELECTION phase has been executed. b. Completion of Transfer command (when SPC serves as a TARGET) This interrupt indicates that the transferring data of the byte count specified in the transfer byte counter has been completed. Or, in an input operation with bit 0 (Termination Mode) of the SCMD register set to 1, this interrupt indicates the stop of transfer due to parity error is detected in the data received from SCSI. In either case, this interrupt occurs after checking that the ACK signal for the REQ signal of the last byte is inactive on SCSI at asynchronous mode transfer. Or, this interrupt occurs after checking that the number of ACK signals received matches the number of REQ signals transmitted at synchronous mode transfer. c. Completion of Transfer command (when SPC serves as an INITIATOR) When padding mode transfer is not specified, this interrupt indicates that the transferring data of the byte count specified in the transfer byte counter has been completed. When padding mode transfer is performed, this interrupt indicates that the current transfer operation has been terminated due to another transfer phase is requested in SCSI. In this case, the service required interrupt occurs at the same time. In the MESSAGE IN phase, this interrupt occurs while the ACK signal to the last byte is held active. Before resetting this interrupt, be sure to issue the Reset ACK/REQ command. (5) Service required interrupt (Bit 3) This interrupt occurs if the SPC serving as an INITIATOR is put in either of the following conditions. It indicates a request for MPU program intervention. - 40 - a. SPC has received the Transfer command, but cannot start the transfer operation because the transfer phase specified by bits 2 to 0 of the PCTL register does not match that requested in SCSI. b. SPC has stopped the current hardware transfer operation (Transfer command) because of a request for another transfer phase in SCSI. In this case, the transfer operation in SCSI stops immediately, but the SPC internal transfer sequence continues until one of the following events is encountered: - Input operation The internal data buffer register becomes empty. - Output operation The data prefetch sequence to the internal data buffer register is completed. Therefore, when this interrupt occurs, read out the SSTS register and check if the SPC internal transfer operation is completed. If the service required interrupt occurs during an output operation, the data prefetched in the SPC internal data buffer register may remain (not be sent to SCSI). For how to handle the remaining data (up to eight bytes), see the interrupt processing procedure described below. When the service required interrupt occurs, the MPU program examines a transfer phase request from SCSI and proceeds to execute the transfer operation using one of the following procedures. Figures 4.11.1 and 4.11.2 show examples of interrupt processing procedure. a. Hardware transfer The MPU program specifies the transfer phase pattern requested by SCSI as bit 2 to 0 of the PCTL register, and reissues the Transfer command. b. Manual transfer If this interrupt occurs during an output operation, the remaining data in the SPC internal data buffer register may have to be preserved. In this case, with bit 3 (Intercept Transfer) of the SCMD register set to 1, perform manual transfer and interrupt resetting. When the interrupted original transfer phase (output) is requested again after manual transfer by the above processing procedure, the suspended transfer operation can be restarted using the remaining data held in the data buffer register. - 41 - I In output operation I REQ ~ ) Service required ACK ~ ) i nterru t REQ~J(~ (Phase transmition) No Yes 1 Interce t Xfer 1 No Manual transfer N Bytes eset rnterrupt Reset interrupt without No specifying 1 Intercept Xfer 1 1 Reset fnt-en::!t I I by specifying I 1j n!_e.!:_c~t_ X1e.!:_ 1 ~ Manual transfer N bytes Transfer command N Bytes *2 Reset interrupt Transfer command without specifying 1 Intercept Xfer 1 No Transfer command SSTS=lOllxxxx REQ+-+ ACK+-+ *1. An interrupt needs not always be reset. The interrupt is reset automatically when the Transfer command starts hardware transfer. *2. If the interrupt is reset, the data prefetched in the internal data buffer register before a change of phase is detected is lost. Fig. 4.11.1 Service required interrupt processing procedure (1) - 42 - I In input operation I REQ~) ACK~) REQ~ ;( Service required interru t No Yes Reset interrupt No without *1 *1 specifying r Reset-interrupt 1 IReset interrupt 1 'Intercept Xfer' I by specifying I I without I I 'Intercept Xfer'1 I specifying I _' .!_n~e':::ept_X!_e~ Manual transfer Transfer command Transfer command N Bytes N Bytes N Bytes *1: An interrupt need not always be reset. The interrupt (service required) is reset automatically when the Transfer command starts hardware transfer. Fig. 4.11.2 Service required interrupt processing procedure (2) - 43 - (6) Time-out interrupt (Bit 2) This interrupt indicates that the selected bus device has not responded within the predetermined supervisory time after SPC initiates the SELECTION/RESELECTION phase. See 4.3.2 (2) - Select command for details of the supervisory time setting procedure and the interrupt processing procedure. (7) SPC hardware error interrupt (Bit 1) This interrupt indicates that SPC has detected one of the following error indications in the SERR register: - TC parity error - Phase error - Short transfer period - Transfer offset error See 4.12 - SERR register for details of these errors. When this interrupt occurs, SPC does not stop the operation being executed (for any error cause). Since the normal operational sequence and end report cannot always be guaranteed in this case, the MPU program must be used for SPC control and bus phase control of SSCI. Figures 4.11.3 to 4.11.5 show examples of error control processing. I In execution of ARBITRATION/SELECTION/RESELECTION phase I (Example 1) (Example 2) SPC ) Hard. Error Yes Reset Cond. Bus Free X'lO'~ SCMD '1' ~ MSG In SCTL.Bit 7 (Reset & Dis.) 'Identify' X'60' ~ SCMD /MPU ... ',No 'time-out?" ... ... Yes Status (ABORT message) Forced 'Check' termination '1' ~ SCTL.Bit 7 (Reset & Dis) (Bus Free) *1: Normal SPC time-out superv1s1on cannot always be guaranteed. Be sure to perform time supervision using the MPU program. Fig. 4.11.3 Example of control processing for SPC-detected error (1) - 44 - In execution of manual transfer I SPC Hard Error Off Yes Yes Yes No Status ABORT received message Status "Check" Error recovery processing Fig. 4.11.4 Example of control processing for SPC-detected error (2) - 45 - I In execution of hardware transfer I SPC Hard Error Control Reset '1'-+ SCTL.Bit 6 On Off No *1 Status 'Check' *1 ABORT message Control Reset '1 '-+ SCTL.Bit 6 *1: Execute by manual transfer. Error recovery processing Fig. 4.11.5 Example of control processing for SPC-detected error (3) - 46 - (8) Reset condition interrupt (Bit 0) This interrupt indicates that the RESET condition has been detected in SCSI. Note that this interrupt cannot be masked. The reset condition persists for an unpredictable period of time. After making sure that bit 3 (Reset In) of the SSTS register becomes to 0, MPU must reset this interrupt condition. The reset condition interrupt may occur regardless of whether SPC is connected with SCSI or not. When SPC is connected with SCSI, occurrence of this interrupt causes SPC to immediately deactivate a signal being sent to SCSI. Then SPC proceeds to the BUS FREE phase. When SPC is executing a command, occurrence of this interrupt causes SPC to terminate its operation and reset its internal state. However, the following internal registers hold the control information unchanged: - BOID register - SCMD register - PCTL regi·ster - SCTL register - TMOD register - Transfer byte counter Until this interrupt is reset, the SPC internal reset state is maintained even if the RESET condition is released in SCSI. Therefore, SPC does not respond even when a new bus phase (e.g. SELECTION) is executed in SCSI. 4.12 SERR REGISTER OP 7 1 6 5 4 3 2 1 0 p SCSI 1 SPC R Data Error 0 0 TC Phase Short Xfer p Parity Error Xf er Offset Error Period Error 4.12.1 Register Functions The SERR register provides details of an error detected in SPC. An SPC hardware error interrupt occurs if an error is indicated at any of bits 3 to 0. Bits 7 and 6: Data Error These bits indicate that a parity error has been detected in the transferred data during transfer phase execution in SCSI. Table 4.12.1 lists the data error indica- tion bit patterns and the relevant SPC operations. When changing the transfer phase in SCSI, these error indication bits must be reset. - 47 - Table 4.12.1 Data error indication bit patterns in transfer phase Bit 7 Bit 6 Data Error SPC operations SCSI SPC 0 0 No _J>_arit.Y_ error was detected in the transferred data. 0 1 During execution of an output operation in hardware transfer mode, a parity error was detected in the data to be sent to SCSI. The parity is checked regardless of the value of bit 3 (Parity Enable) of the SCTL register. The erroneous data (parity bit val uel is corrected and then sent to SCSI. 1 1 A parity error was detected in the data received from SCSI during an input operation. The parity is checked only when bit 3 (Parity Enable) of the SCTL register is set to 1. After an error is detected, the parity bit is corrected. If the SPC serving as an INITIATOR detects.this error during hardware transfer execution, it generates an ATN signal to SCSI. (See Figure 4.3.2) In this case, the MPU program must reset this error condition before the ATN signal is reset. If the SPC serving as a TARGET detects this error during hardware transfer execution, it follows the specification at bit O (Termination Mode) of the SCMD re_g_is ter. See 4.3 - SCMD re_g_ister for detailed. 1 0 Undefined Bit 3: TC Parity Error Bit 3 indicates that a parity error occurred while the transfer byte counter (TCH, TCM, TCL) was being decreased. Bit 2: Phase Error When SPC serves as an INITIATOR, the transfer phase has been changed in SCSI during hardware transfer mode operation (service required interrupt occurs). In this case, bit 2 indicates that: (1) The new phase is a synchronous transfer mode DATA IN phase. (2) The REQ signal has been r€ceived two or more times before the MPU program complete an interrupt processing and issue the Transfer command for the new phase. In this case, SPC cannot receive data and return the ACK signal normally. Bit 1: Short Transfer Period Bit 1 indicates that the REQ/ACK signal (input signal to REQI/ACKI pin) has a cycle exceeding the specified input range. (See Figure 4.12.1.) If this error occurs, the transfer sequence executed by SPC is not guaranteed. REQ or ACK signal (REQI or ACKI pin) A cycle of the clock signal supplied to SPC. Fig. 4.12.1 Specified input cycle of REQ/ACK signal - 48 - Bit 0: Transfer Offset Error Bit 0 indicates that one of the following errors has been detected during synchronous mode transfer. The offset value referred to below denotes the REQ ACK maximum offset value specified in the TMOD register. (1) When SPC serves as a TARGET: • The -number of ACK signals received exceeds that of REQ signals transmitted. • The number of REQ signals transmitted exceeds the offset value (SPC malfunction). (2) When SPC serves as an INITIATOR: • The number of REQ signals received exceeds the offset value. • The number of ACK signals transmitted exceeds that of REQ signals received (SPC malfunction). If this error occurs, the transfer sequence executed by SPC is not guaranteed. 4.12.2 Error Reset To reset an error indication in the SERR register, do one of the following: (1) Generate SCSI RESET condition (X'lO' -. SCMO) (2) Reset & disable (Bit 7 of SCTL register) (3) Control reset (Bit 6 of SCTL register) (4) Interrupt (SPC hardware error) reset (X'02' -+ INTS) Bits 7 and 6 (Data Error) of this register do not cause an interrupt, but can be reset by this means. 4.13 MBC REGISTER Is I ~, 7 6 4 I 'O' The MBC register controls the data count during transfer between the SPC internal data buffer register and the MPU (program transfer mode) or external buffer memory (OMA mode). When data is written into the TCL register, its four low-order bits are set as an initial value for MBC register. In an output operation, data is prefetched into the SPC internal data buffer register. Each time one byte is prefetched, the MBC register is decreased by one. Data prefetch stops when the transfer byte counter is decreased below 15 and the MBC register reaches 0. In an input operation, data received from SCSI is stored in the internal data buffer register. Each time data is sent to the MPU or external buffer memory, the MBC register is decreased. The difference between the transfer byte counter and the MBC register corresponds to the byte count of data remaining in the internal data buffer register. While SPC is executing a OMA mode transfer operation, this register must not be read out. - 49 - 4.14 EXTERNAL BUFFER REGISTER (EXBF) 2 2 !: !: I: I This register's address is reserved for access from the MPU data bus (D7 to DO, DP) to the·DMA data bus (HDB7 to HOBO, HDBP) (not exist as an internal register in SPC). As shown in Fig. 4.14.1, the MPU program can execute a write/read to/from the external buffer memory by using this virtual register. SPC }, r-----1\V' D7 - DO, DP MPU rv'~ -v A3 - AO trn, mm wr. m cs v -'- Access HIN 71 timing k. -.. control circuit I I l. A }, External HDB7 - 0, HDBP buffer -v '{ -v memory Fig. 4.14.1 Access from MPU to external buffer memory 4.15 SDGC REGISTER OP 7 6 5 4 3 2 1 0 p w Uiag -U-iag - - -U-1ag -U-1ag -U-1ag -U-1ag - REQ ACK BSY MSG C/D I/O The SDGC register is used to operate SPC in diagnostic mode (with bit 5 [Diag Mode] of the SCTL register set to 1). To simulate the SCSI operation, the SDGC register bits are used as having alternative SCSI control signal lines. In diagnostic mode, the SDGC register is used to check SPC internal operation. The diagnostic mode stops signaling to SCSI and nullifies input signals from SCSI except the data bus signals. The SPC internal operation can be performed in the ordinary manner. To check SPC internal operation, the MPU can manipulate the SDGC register 1 s bits to generate input signals from SCSI. - 50 - The following bus phases can be simulated: 1) BUS FREE 2) ARBITRATION (Always win) 3) SELECTION (For INITIATE operation) 4) RESELECTION (For TARGET operation) 5) Information transfer (Input data manipulation not allowed in an input operation) 4.16 INITIALIZATION SPC is in the reset state when the input to RST pin is low (hardware reset) or bit 7 (Reset & Disable) of the SCTL register is set to 1. SPC-SCSI operation is disabled until the SPC reset state is released. The MPU program shall release the reset state after initializin~ the SPC internal registers. The following SPC internal registers remain unchanged even in the SPC reset state: • BOID register • TMOD register • Transfer byte counter • SCMD register • PCTL register • TEMP register (for sending) At the moment power is turned on, the contents of these internal registers are unpredictable even though hardware reset (RST input = low) is executed. After RST input is released, the MPU program shall initialize SPC as shown in Figure 4.16.1. - 51 - (Power UP) m input r-.,_ ::-----.Jl (SPC state after RST onput is released) BOID = XX STIL = 80 1 Bus Device LD 1 SCMD = XX -+ BOID TMOD = JCX PCTL =XX PSNS = XX DREG =XX TCH = XX (Initialization of TCM = XX internal register) TCL = XX X1 00 ... SCMD INTS = 00 TMOD SSTS = OX PCTL SERR =00 TCH TEMP = XX TCM MBC = OX TCL SDGC = XX TEMP SORG (SCSI op er at ion mode setting) 1 1ooxxxxx 1 -+ SCTL (Release reset state) 1 0 1 -+ SCTL Bit 7 ( END Fig. 4.16.1 SPC initialization (at power-on) - 52 - CHAPTER 5 EXAMPLES OF EXTERNAL CIRCUIT CONNECTIONS Figure 5.1.1 shows the external circuit blocks that can be connected with this LSI circuit. The external circuit configuration depends on the application environment, purpose of use and performance required of this LSI. Examples of application of this LSI circuit are given below. J. 50817 - 0, p 5PC IL _:m_ A ~ c_ rn MPU I\ 50807 - 0, p I' (8085, ,i_ IL _A3 8086, I' I\ 5DBE7 - 0, p IL A2 8088) ~ Al ~ _All 5ELI ~ E 5ELO ~ ~ liil mm IL r- =a_5vI __., ,, C_ r- Ji.11 wm DV/RV B5YO ~ IL_ I" 07 - 0, p .J Rm_I __,,, ..- ., IL R;Q_O INTR __,,,.. I' ACKI __,,, ,, IL ACKO I' Mil __,,, / IL_ ..M.5GQ DRm_ __,, ,.. OMA I" DRE5P Control CZDI __,,, C/DO / ~ HIN ~ IL_ I" IZDI __,,, u.oo 1 / IL I' ATNI __,,, IL I' ATNO / IA HDB7 - 0, P -, Buffer .J Momery R5TI _ .... -;> IL_ ATNO I" IL TARG c: I" INIT ~ Voo ~ V55 Fig. 5.1.1 Examples of external circuit connections - 53 - 5.1 SCSI DRIVER/RECEIVER CIRCUITS 5.1.1 Single Ended Type Figure 5.1.2 shows a example of the connection of the SPC and the SCSI single ended type driver/receiver circuit. Table 5.1.1 lists the major components of this SCSI driver/receiver circuit. Table 5.1.1 Major components of single ended type SCSI driver/receiver circuit (example) Component Part No. Manufacturer Characteristics Q't~ -rrQ7ACK signal MB4I2 * Fujitsu ~TrT-state buffer circuit) 1 driver 2 circuits/DIP 14 REQ/~CK signal M-s413 * FuJ1tsu 4 c1rcuits-,~Il> 16 T receiver Resistor - 390S2 ±2% 1/4 w 1 Resistor - 200S2 ±2% 1/4 w 1 C~acitor - O.lµF/50 V Ceramic 1 Other signal MB463 * Fujitsu TOpen-collector buffer 4 driver circuit_l 4 circuits/DIP 14 Other signaT 74TSZ.W TuJ1tsu -rs-cllmitt trigger inverter) 7 receiver TI 8 circuits/DIP 20 Terminator - - 18 (Required only when the driver/receiver ~·s 220 S2 ele- ments is located at 330 S2 either end of SCSI) * Note The MB412 is compatible with the SN7519. The MB413 is compatible with the Am26LS32. The MB463 is compatible with the SN7438. - 54 - SDBI7 to 0 p SCSI SPC SDBI7 --- LS240 h_ mrJ i:::: K SBBIP <& ~ F LS240 h TIBP" r ,...--, SDB07 to 0, p Jr 1-- -5.DBQ1_ SDBOP - 463 463 I UBi 1-- LTN ...._____.. I 463 -...... DBP ~ 463.J" SELl BSYI UOI ATNI - -...... LS240 ~ F... RSTI F SELO Jl..SYO iZoo ANTO _B_S_lO - -...... 463 463 / POW READY~ Fig. 5.1.2 Example of single ended type SCSI driver/receiver circuit (continued on next sheet) - 55 - SCSI MB413 SPC RrQ +S RE I ACKI MSGI ACK C/DI 'H' Rl: 390S2±2% R2: 200S2±2% Cl: O.lµF ~ RE 0 REQO MB412 ACKO LTN MSGO 'H' C DO TARG !NIT ACKO MSGO CYDO POW READY *l *1: It is recommended to protect against noise generated at power on/off. Fig. 5.1.2 Example of single ended type SCSI driver/receiver circuit (continued) - 56 - 5.1.2 Differential Type Figure 5.1.3 shows a example of the connection of the SPC and the SCSI differential type driver/receiver circuit. Table 5.1.2 lists the major components of this SCSI driver/receiver. Table 5.1.2 Major components of differential type SCSI driver/receiver circuit (example) Component Part No. Manufacturer Characteristics Q'ty --0-river~receiver SN75176 TI ~Differential transceiver) 18 (Common to all lDV +lRV/Dip 8 s "!_g_na 1sl Terminator ~ +-s- 18 (Required only when - - < 330Q ele- the driver/receiver (Positive signal L...: men ts is located at either 150Q end of SCSI) ~ (Negative s i gna 1)"""'"--.? ~ 330Q r, - 57 - 50807 - O_,_ P SPC 50807 t-----+'O=E._. S080P V 50817 I /~ m------tf'., S08IP I I S08E7 r-..., U>----t ! 50817-0,P SD8E7 - O,P SEl.J.+_l SELI --e-- IHI -..---+--i~/~u--r-~~S~E~IT--~l~ 8SYI l.ZOI r ~ _Ailil 1----1 RSTI V RST(+) SELO RSTC_-J 8SYO r-..., u.oo r--- t-1 LTN I RSTO I ~.____ Fig. 5.1.3 Example of differential type SCSI driver/receiver circuit (continued on next sheet) - 58 - cs SPC j' RE_fil_+l REQI ACKI RE_Q_O ACKO ACK(+) (-) ,----, MSGI .--+- MSG{+J_ C/DI IHI _(_-J_ MSGO C/DO C/D(+) (-) '-------+--+-+--+----' .______ _--<~ INIT LTN TARG m--------------' rlT Fig. 5.1.3 Example of differential type SCSI driver/receiver circuit (continued) - 59 - 5.2 EXTERNAL DATA BUFFER To provide a buffer area for high-speed data transfer or a temporary storage for data to be transferred, the external data buffer memory can be connected to SPC as shown in Figure 5.1.1. In this case, a buffer control circuit is required to control the timing of data transfer between SPC and external buffer memory. To execute the transfer phase on SCSI, specify OMA transfer mode for SPC. SPC accesses the external buffer memory with the timing sequences shown in Figures 5.2.1 and 5.2.2. Data is transferred via the OMA data bus lines (HDB7 to HOBO, HDBP). The transfer direction must be specified externally using the HIN signal. When requesting access to the external buffer memory, SPC makes the DREQ signal active. In an input operation, the DREQ signal is sent out when the SPC internal data buffer register (8 bytes) holds data received from SCSI. In an output operation, the DREQ signal is sent out when data corresponding to the byte count specified in the transfer byte counter is not all prefetched, and when the internal data buffer register has free byte locations available. The external buffer control circuit must return the DRESP signal in response to the DREQ signal on completion of transferring each byte. DRESP is a pulse signal whose trailing edge is used to indicate the end of transfer. The DREQ signal is held active as long as the above conditions exist in SPC (this signal is not a transfer request signal for each byte). The access interface signals (DREQ, DRESP, HIN, HDB7 to HOBO, HDBP) to the external buffer memory are asynchronous with an SPC clock signal supplied to the CLK pin. (1) HIN signal puts the OMA data bus (HDB7 to 0, P) in an output mode. However, the value on the OMA data bus is unpredictable until data is loaded into the SPC internal data buffer register from SCSI. (2) After receiving data from SCSI, SPC issues the DREQ signal (transfer request) to the external buffer memory. At this time, valid data is placed on the OMA data bus. (3) Data on the OMA data bus is held until the trailing edge of the DRESP signal. (4) After the DRESP signal is received, valid data is unloaded from the SPC internal data buffer register. Then, the DREQ signal becomes inactive'to stop transfer with the external buffer memory until the next data becomes available. DREQ ______! \© \© @ ® DRE SP HIN ---0 --~ Uc.pre- Unpre- DATAl DATA2 dicrable. DATA3 dictable Fig. 5.2.1 Transfer with external data buffer (input operation) - 60 - (1) As long as the HIN signal is low, the OMA data bus (HOB7 to 0, P) is in an input mode. (2) A transfer request (OREQ) signal is issued when the SPC internal data buffer register has free byte locations available for prefetching data. (3) The external buffer control circuit puts data onto the OMA data bus and also sends the ORESP signal in response. On the trailing edge of the ORESP signal, SPC loads data from the OMA bus into the internal data buffer register. (4) When no free location is available in the SPC internal data buffer register, the OREQ signal becomes inactive. Then, transfer from the external buffer memory is stopped until the next data prefetch becomes available. DREQ I@ \© I@ \_@___ DRE SP HIN DATA1 DATA2 DATA3 DATA4 HDB7 to O,P CD Fig. 5.2.2 Transfer to external data buffer (output operation) - 61 - CHAPTER 6 AC CHARACTERISTICS In this chapter, the input/output signal timing is specified, under the following conditions: (1) Operating temperature TA =0 to 70 °C (2) Power supply voltage Voo = 4.75 to 5.25 v (3) Input/output condition The input/output condition in section 1.3 "Electrical Specifications" should be satisfied. (4) Timing measurement To be specified at the input/output pins of this LSI circuit. - 62 - 6.1 MPU INTERFACE 6.1.1 Clock Signal Symbol Parameter MIN TYP MAX Unit tcLF Clock Cycle 125 200 ns tcHCL Clock High 65 ns tcLCH Clock Pulse Width (Low) 40 ns 6.1.2 Reset Signal Symbol Parameter MIN TYP MAX Unit tRSTW Reset Pulse Width 50 ns -----~ttRSTW j----- 6.1.3 Write Cycle (1) Registers other than EXBF Symbol Parameter MIN TYP MAX Unit tAWS Address Setup 35 ns tAWH Address Hold 5 ns tcws CS Setup 20 ns tcwH CS Hold 5 ns tows Data Bus Setup 25 ns towH Data Bus Hold 20 ns twr WT pulse Width 50 ns - 63 - tAwH~ A3 - AO i:= tAWS cs tcws twr tcwH 07 - DO, DP (2) EXBF register Symbol Parameter MIN TYP MAX Unit tAWSE Address Setup 20 ns tAWHE Address Hold 5 ns tcwsE CS Setup 5 ns tcwHE CS Hold 5 ns twLHD _mDB7Lowto 0, DM1P Data Bus -+ 60 ns twHHD _ffi!GDB ~iiho -+O..J.. ~J:' Data Bus 10 ns to HD M"""PU Data Bus ~07 to 0, P) 10 50 ns OMA Data Bus · HDB7 to 0 Pl HIN A3 -AO---- twHHD twLHD 07 - DO, DP to HD t HDB7 - HOBO, HDBP - 64 - 6.1.4 Read Cycle (1) Registers other than EXBF Symbol Parameter MIN TYP MAX Unit tARS Address Setup 35 ns tARH Address Hold 5 ns tcRS CS Setup (RD) 5 ns tcRH CS Hold 5 ns tRD RD Pulse Width 50 ns tRLNZ lf!m Low -+ Data Output 10 45 ns tRHHZ 1fCi'G High -+ D7 to 0, P High Z 40 ns tRLD RD tow-+ Data Establish 85 ns tRHD RD High -+ Data hold 10 n.s tcRGS CS Setup (RDG) 5 ns A3 - AO tcRH D7 - DO, DP - 65 - (2) EXBF register Symbol Parameter MIN TYP MAX Unit tARSE Address Setup 35 ns tARHE Address Hold 5 ns tcRSE CS Setup 5 ns tcRHE CS Hold 5 ns tRLNZ RUG Low-+ Data Output 10 45 ns tRHHZ 1mG High -+ 07 to O,P High Z 40 ns tHDD OMA Data Bus (HDB7 to 0, P) 5 50 ns to MPU Data Bus (07 to 0, P) HIN A3-AO---t tARSE-1 ~tARHE f tc..R.S.E. ~tCRHE - HDB7 - HDBO, HDBP .J1 IE-tHoo- tRHHZ r tRLNZ. tHDD ~ I,-----.. 07 - DO, DP _/. - 66 - 6.1.5 Interrupt Symbol Parameter MIN TYP MAX Unit tcHIR CLK High -+ INTR High 5 45 ns tIRWL INTR -+ wr 5 ns twHIR WF High -+ INTR Low tcLF + 10 2tcLF + 50 ns (Interrupt Reset) twRCY Interrupt Reset Cycle time *1 4tcLF ns tcLF See 6.1.1 *1 When interrupt reset is continued. tcLF CLK !~ tcHIR ~ INTR twHJ: { trnwL \iiT \ twRCY \ j 6.2 OMA INTERFACE 6.2.1 Access Timing Symbol Parameter MIN TYP MAX Unit toRRP DREQ High -+ DRE SP High tcLF ns tRPDR DRESP High -+ DREQ Low 80 ns to LOH DREQ Low -+ DREQ High 5 ns tRPSW DRE SP Pulse Width 50 ns tRPCY DRE SP Cycle Time (1) 2tcLF ns tRLRH DRESP Cycle Time (2) 3tcLF ns tcLF See 6.1.1 - 67 - toLDH DREQ tRPDR toRRP - - - tRPCY - - - DRESP _ _ ___,, - - - - - - - - - tRLRH 6.2.2 Input Operation (SPC to External data buffer) Symbol Parameter MIN TYP MAX Unit tHINZ HIN High -+ HDBT to --U, -p· 10 40 ns .Data OutQ_ut toRDV DREQ High -+ Data Establish 85 ns tRPDV DRESP Low -+ Data Change 15 75 ns DREQ toRDV !""'"" DRE SP _f1 HIN .A tHINZ _l:RPDV HDB7 - HDBO, HDBP Unpredictable DATAl DATA2 - 68 - 6.2.3 Output Operation (External data buffer to SPC) Symbol Parameter MIN TYP MAX Unit tHIHZ HIN Low-+ HOB? to O,P High Z 35 ns tHOBS Data Bus Setup 20 ns tHOBH Data Bus Hold 20 ns toLRP DREQ Low -+ DRE SP *l 5tcLF ns tcLF See 6.1.1 DREQ DRE SP I\ HIN HOB? - 0, P *1 In the following cases, the DREQ signal becomes inactive asynchronously with the DRESP signal to stop refetching data during an output operation: - When the Transfer Pause command is issued in the SPC serving as a TARGET - When the Transfer Phase is changed in the SPC serving as an INITIATOR In these cases, the last DRESP signal response must not exceed toLRP· - 69 - 6.3 SCSI INTERFACE 6.3.1 SELECTION Phase (1) INITIATOR (With arbitration) Symbol Parameter MIN TYP MAX Unit tBFR Bus Free Time 4tcLF + 50 ns tBFBO BSYl Low ... BSYO High ~6+n) x ~7+n) x ns (Start of arbitration) tcLF + 5 tcLF + 65 tBHID BSYO High -+ ID Bit High 5 55 ns tARB BSYO High ... Prioritize 32tcLF - 40 ns Data Bus Valid ~High Priority 70 ns tAIDV Bit:.1_... Prioritize Data Bus VaTid -~Low lfriority 5 ns Bi1J:_... Prioritize tAwso Bus Usage Permission Granted 5 45 ns -+ SELO Hig_h tsorn SELO High ... Data Bus (ID) Send lltcLF - 30 ns tsmr SELO High-+ INIT High lltcLF - 50 ns tITAT INIT High -+ ATNO High 10 55 ns tIDBL Data Bus (ID) Send ... BSYO Low 2tcLF - 80 ns tBoBI BSYO Low -+ BSYI Low 5 tcLF ns tB1so BSYI High -+ SELO Low 2tcLF + 5 ns tBIDH BSYI High -+ Data Bus (ID) Hold 2tcLF + 5 ns tscrn SELO Low ~ INTR High 75 ns tsBCR SELI High ... BSYO, ID Bit Low 3tcLF + 115 ns tpBcR Prioritize -+ BSYO, ID Bit Low 125 ns tcLF See 6.1.1 n TCL register set value (See 4.3.2 (2) - Select command.) - 70 - BSYI tBOBI---1....j 1 v li;;.CR~ BSYO I SEU I I I I tBISO I tARB SELO I I I I t I tBIDH II SDBO(ID bit) SDBE(ID bit) ----~-r--- I SDBO(Except ID bit) ; SDBE(Except SDBI7' D,P t ID bit) ------l..---'----,x --- -I --==----,- I-- tAIDV ---i I/00 ~-~~ INIT -------- H tITAT ATNO INTR(Comman d Complete) - 71 - (2) INITIATOR (Without arbitration) Symbol Parameter MIN TYP MAX Unit tFRID Bus Free -+ Data Bus (ID) Send (6+n) x (7+n) x ns tcLF + 5 tcLF + 85 tIDso ID Send -+ SELO High lltcLF - 80 ns tIDIT ID Send -+ INIT High lltcLF - 80 ns tITAT INIT High -+ ATNO High 10 55 ns tB1so BSYI High -+ SELO Low 2tcLF + 5 ns tBIDH BSYI High -+ Data Bus (ID) Hold 2tcLF + 5 ns tscIR SELO Low -+ INTR High 75 ns tcLF See 6.1.1 n TCL register set value (See 4.3.2 (2) - Select command.) - 72 - ----, BSYI BSYO SELI tBISO ~ SELO ~tFRID ~~trnso ~ tsrnH l SDB07 - 0, p 11.Dl \J SDBE7 - 0, p 1/00 ~trnn - INIT !<-+ tnAT ATNO - - - h tscrn INTR (C ommand Complete) _/ - 73 - (3) TARGET (With arbitration) Symbol Parameter MIN TYP MAX Unit tFIBI SELI High -+ BSYI Low 5 ns trnBI Data Bus (ID) Valid-+ BSYI Low 5 ns tu BI I/DI Low -+ BSYI Low 5 ns tsLBO BSYTTow-+ ~Y0~1gh ns _(Res~onse timel 4tcLF + 5 5tcLF + 60 tBorn BSYO High -+ Data Bus (ID) Hold 15 ns tBosI BSYO High -+ SELI Low 5 ns tATSI ATNI High -+ SELI Low 5 ns tsLTG SEU Low -+ TARG High 3tcLF + 5 4tcLF + 60 ns tTGPH TARG High -+ Phase Signal Output 10 ns trnDE I/00 High -+ Data Bus Enable 3tcLF + 5 ns tsuR SEU Low -+ INTR High 3tcLF + 65 ns tcLF See 6.1.1 - 74 - BSYI \ I I-- tsrnr F tsLBO __,.. BSY0 1...,_tsosr ~ SEL I _;1 '""-tIDBI tsoro ~ SOB I7 - 0, p- f l_Dl ) ~T I/DI =f ..., tIIBI ATNI - {_- - ----- - -!"'" I'"""" tATSI tsLTG TARG re-- tTGPH MSGO C/DO I/DO _11 ~ trnoE 50807 - 0, p L SDBE7 - 0, p i..:..tsuR J "'"" ~ INTR (S elected) _[ - 75 - (4) TARGET (Without arbitration) Symbol Parameter MIN TYP MAX Unit trns1 Data Bus (ID) Valid-+ SELi High 5 ns tus1 l/OI Low -+ SELi High 5 ns tsLBO SELi High -+ -BSYo ~1gh ns 1Res_2..onse t imtl_ 2tcLF + 5 3tcLF + 65 tBoID BSYO High -+ Data Bus (ID) Hold 15 ns tsos1 BSYO High -+ SELi Low 5 ns tATSI ATNI High -+ SELi Low 5 ns tsLTG SELi Low -+ TARG High 3tcLF + 5 4tcLF + 60 ns tTGPH TARG High -+ Phase Signal Output 10 ns trnDE I/00 High -+ Data Bus Enable 3tcLF + 5 ns tsuR SELI Low -+ INTR High 3tcLF + 65 ns tcLF See 6.1.1 - 76 - BSYI k-tsLBO ---;.. BS YO i.... tBosr """" ..,,. SEL I k trnsr ~ tBorn p SOB I7 - 0, p~r. ]" lID_l I/O I =fi.:usd~ .I ATNI '1 "1-- ---- - - r tATSI tsLTG....,, TARG J IE-- tTGPH MSGO C/DO I/DO H trnoE SDB07 - 0, p _J SDBE7 - 0, p I.:. tsLIRJ INTR (S elected) 1 - 77 - 6.3.2 RESELECTION Phase (1) TARGET Symbol Parameter MIN TYP MAX Unit tBFR Bus Free Time 4tcLF + 50 ns tBFBO BYSI Tow -+ B~YO High T6+nJ x (7+n) x ns (Start of Arbitration) tcLF + 5 tcLF + 65 tBHID BSYO High -+ ID Bit High 5 55 ns tARB BSYO High -+ Prioritize 32tcLF - 40 ns Data Bus Val iaTHign Priority 70 ns tAIDT Bitj_-+ Prioritize Data Bus Val id ~low Priority 5 ns Bit) -+ Prioritize tAwso Bus Usage Permission Grant -+ 5 45 ns SELO High tsoID SELO High -+ Data Bus (ID) Send lltcLF - 30. ns tsoTG SELO High -+ TARG High lltCLF - 50 ns tTGPH TARG High -+ Phase Signal Send 35 ns tIQBL I/OD High -+ BSYO Low 2tcLF - 80 ns tIDBL Data Bus (ID) Send -+ BSYO Low 2tcLF - 80 ns tBoBI BSYO Low -+ BSYI Low 5 tcLF ns tB1so BSYI High -+ SELO Low 2tcLF + 5 ns tBIDH BSYI High -+ Data Bus (ID) Hold 2tcLF + 5 ns tscrn SELO Low -+ INTR High 75 ns tsBCR SEU High -+ BSYO, ID Bit Low 3tcLF + 115 ns tpBcR Prioritize -+ BSYO, ID Bit Low 12.5 ns tcLF See 6~1.1 n tCL register set value (See 4.3.2 (2) - Select command.) - 78 - tBFR BSYI tBFBO H tSBCR tBOBI BSYO \.... 1"-- SELI -------t---__JLr_--+-_Jn_Lit~PBrCR_-tlt_rn_B_L+-----l._____ I tARB II I I _..;......1..:......:lr~· ~ tRrm:i / I . I I~ kJ SELO I H tBF.ID IJ tSOID t10'1 SDBO(ID bit) _._)v . ___ , . . , ~+ I L...1 ! SDBE(ID b it) _J k- 1~ I I\ SDBO(Exce pt ID bit) - I\. I SDBE(Except ID bit)_ I I I xr___:._____l_ SDBI7 "' 0-~ p x== ltSOTG I I I - ------} TARG I tTGPH I I - MSGO 1 C/DO - - L}- I/00 tSCIR INTR(Command Comp 1ete) - 79 - (2) INITIATOR Symbol Parameter MIN TYP MAX Unit tsrnI SEU High -+ BSYI Low 5 ns trnBI Data Bus (ID) Valid-+ BSYI Low 5 ns tIIBI I/DI Low -+ BSYI Low 5 ns tsLBO BSYI Low -+ BSYU High 5tcLF + 60 ns 1 Re~onse t imel 4tcLF + 5 tBorn BSYO High -+ Data Bus (ID) Hold 15 ns tBosI BSYO High -+ SELi Low 5 ns tsrno SEU Low -+ BSYO Low 3tcLF + 15 ns 2tcLF + 5 tsrrn SELi Low -+ I/DI Hold ns 3tcLF + 20 tsuR SEU Low -+ INTR High ns 3tcLF + 65 tsur SEU Low -+ INIT High 4tcLF + 65 ns 3tcLF + 5 tnDE INIT High -+ Data Bus Enable 10 ns i_With l/OI at 1ow 1eve1_l tcLF See 6.1.1 - 80 - BSYI tSIBI tSLBO BSYO J1 II. tBOSI tSIBO ~ SELi ...t1 tBOID _,. ~ tIDBI r- SDBI7 - 0, p ~ ~ tIIBI tsnHJ I/DI l-------- IE-- tsur --+I INIT ~ tnoe 50807 - 0, p V" SDBE7 - 0, p jE-tSLIR INTR (Reselected) _ _ _ _ _ _ _ _ _ _ _ j_,- - - - - - - - - 81 - 6.3.3 Transfer Phase (1) Asynchronous transfer output (TARGET) Symbol Parameter MIN TYP MAX Unit tIQDE I/00 High -+ Data Bus Enable 3tcLF + 5 ns tDvRQ Data Bus Valid-+ REQO High 2tcLF - 80 ns tAKDV ACK! High -+ Data Bus Hold 15 ns tRHAH REQO High -+ ACKI High 20 ns tAHRL ACKI High -+ REQO Low 10 55 ns tRLAL REQO Low -+ ACKI Low 5 ns tALRH ACKL Low -+ REQO High 10 ns tAHRH ACKI High -+ REQO High 2tcLF + 5 ns tcLF See 6.1.1 REQO tRHAH tAHRL tRLAL tALRH , ACKI t>. tAHRH tDvRQ ~ ~ tAKDV SDB07 - 0, p MSGO C/DO I/00 !IODE SDBE7 - 0, p - 82 - (2) Asynchronous transfer input (TARGET) Symbol Parameter MIN TYP MAX Unit trnDD l/00 Low -+ Data Bus Disable 40 ns tDvAK Data Bus Valid-+ ACKI High 10 ns tRLDV REQO Low ... Data Bus Hold 25 ns tRHAH REQO High -+ ACKI High 20 ns tAHRL ACKI High -+ REQO Low 10 55 ns tRLAL REQO Low -+ ACKI Low 5 ns tALRH ACKI Low-+ REQO High 10 ns tAHRH ACKI High -+ REQO High ZtcLF + 5 ns tcLF See 6.1.1. tAHRH REQO .A .A tRHAH tAHRL tRLAL tALRH__,,, ACK! tovAK ~ IE-- tRLDV SDBI7 - 0, p MSGO C/00 I/00 SDB07 - 0, P SDBE7 - 0, P - 83 - (3) Asynchronous transfer output (INITIATOR) Symbol Parameter MIN TYP MAX Unit tIIDE I/DI Low -+ Data Bus Enable 20 ns tPHRQ Phase Specify -+ REQI High 100 ns tALPH ACKO Low -+ Phase Change 10 ns tRATL REQI High -+ ATNO Low 2tcLF + 5 ns *1 tATLA ATNO Low -+ ACKO High tcLF - 20 ns *l tDvAK Data Bus Valid-+ ACKO High 2tcLF - 80 ns tRLDV REQI Low -+ Data Bus Hold 20 ns tRHAH REQI High -+ ACKO High 15 ns tAHRL ACKO High -+ REQI Low 5 ns tRLAL REQI Low -+ ACKO Low 10 ns tALRH ACKO Low -+ REQI High 10 ns tRLNA REQI Low -+ ACKO High 2tcLF + 5 ns tcLF See 6.1.1 *l With these timings, the ATNO signal is reset only when the last byte is sent at the MESSAGE OUT phase. - 84 - ~ tRLNA ~ V" REQI tAHRL tRLAL tALRH ~ tPHRQ - ~ tRHAH ~ ACKO tr- tovAK ~ tRLDV ~ .':=:l tALPH SDB07 - 0, p .A\. .11\ tRATl tATLA ATNO *1 MSG! ~ ---1 ~ C/DI ---1 I/DI ~ v---- ~ trrnE SDBE7 - 0, p v - 85 - (4) Asynchronous transfer input (INITIATOR) Symbol Parameter MIN TYP MAX Unit tIIDD I/DI High -+ Data Bus Disable 70 ns tPHRQ Phase Specify -+ REQI High 100 ns tALPH ACKO Low -+ Phase Change 10 ns tDvRQ Data Bus Valid-+ REQI High 10 ns tAKDV ACKO High -+ Data Bus Hold 15 ns tRHAH REQI High -+ ACKO High 15 ns tAHRL ACKO High -+ REQI Low 5 ns tRLAL REQI Low -+ ACKO Low 10 ns tALRH ACKO Low -+ REQI High 10 ns tRLNA REQI Low -+ ACKO High tcLF + 5 ns tATAL ATNO High -+ ACKO Low tcLF - 20 ns *1 tcLF : See 6.1.1 *1 With this timing, the ATNO signal is sent only when the parity checking is enabled and a parity error is detected in the input data. - 86 - tRLNA REQI tPHRQ tPHAH tAHRL tRLAL tALRH r- ACKD tovRQ tAKDV SDBI7 - 0, p tATAL ~ ...:.. ATNO *1 tALPH MSGI 1l. C/DI I/OI - - ~ t1rno -----,_ SDB07 - 0, p -----,_ SDBE7 - 0, P - 87 - (5) Synchronous transfer output (TARGET) Symbol Parameter MIN TYP MAX Unit trnDE I/00 High -+ Data Bus Enable 3tcLF + 5 ns tcLF + 5 tDVRQ Data Bus Valid-+ REQO High or ns ntcLF - 40 tRQAP REQO Assertion Period tcLF - 10 ns tRNAP REQO Nonassertion Period ntcLF - 10 ns tRLDH REQO Low -+ Data Bus Hold 5 ns tRHAH REQO High -+ ACKI High 5 ns tAKFl ACKI cycle time (1) tcLF ns tAKF2 ACKI cycle time (2) 3tcLF ns tAKAP ACKI Assertion Period 50 ns tANAP ACKI Nonassertion Period 50 ns tcLF See 6.1.1 n TMOD register set value (See Fig. 4.4.1) - 88 - tRQAP tRNAP REQO tAKF2 tRHAH ACK! tAKAP tANAP tovRQ tRLDH SDB07 - o, p MSGO C/DO I/00 trnoE SDBE7 - O, p - 89 - (6) Synchronous transfer input (TARGET) Symbol Parameter MIN TYP MAX Unit trnoo I/00 Low -+ Data Bus Disable 40 ns tRQAP REQO Assertion Period tcLF - 10 ns tRNAP REQO Nonassertion Period ntcLF -10 ns tRHAH REQO High -+ ACKI High 5 ns tAKAP ACKI Assertion Period 50 ns tANAP ACKI Nonassertion Period 50 ns tAKFl ACKI Cycle time (1) tcLF ns tAKF2 ACKI Cycle time (2) 3tcLF ns tDvAK Data·Bus Valid-+ ACKI High 10 ns tAKDH ACKI High -+ Data Bus Hold 40 ns tcLF See 6.1.1 n TMOD register set value (See Fig. 4.4.1) - 90 - REQO t - ------ttRQAP tRN A_P_:t___\'-____,/ 1 ,..,_ tAKF2 ----"'1 tRHAH tAKFl ACKI '""t.:..ov.:..:.A_K~~ tAKDH 50817 - 0' p ==--__ _h1,___ _.A..__ _ _ _~ MSGO C/DO 1/00 trnoo 50807 - 0, p =i______________________ SOBE? - 0, P - 91 - (7) Synchronous transfer Output (INITIATOR) Symbol Parameter MIN TYP MAX Unit tIIDE I/DI Low-> Data Bus Enable 20 ns tPHRQ Phase Specify -> REQI High 100 ns tALPH ACKO Low -> Phase Change 10 ns tRQAP REQI Assertion Period 50 ns tRNAP REQI Nonassertion Period 50 ns tRQFl REQI Cycle time (1) tcLF ns tRQF2 REQI Cycle time (2) 3tcLF ns tRHAH REQI High ... ACKO High 3tcLF + 5 ns tAKAP ACKO Assertion Period tcLF - 10 ns tANAP ACKO Nonassertion Period ntcLF - 10 ns tcLF + 5 tDTAK Data Bus Valid ... ACKO High or ns ntcLF - 40 tALDH ACKO Low -> Data Bus Hold 5 ns tcLF See 6.1.1 n TMOD register set value (See Fig. 4.4.1) - 92 - tRQF2 ~tRQFl~ ~- tRQ_AP tRNAP ~ REQI IE- tPHRQ ---;. tRHAH tAKAP tANAP ACKO tovRQ tRQDH SDBl7 - o_,_ P 1 l ~ tRATH ~ ATNO *7 tALPH re- MSGI ~ v-- C/DI ~ v-- l/OI ---1 tuoo I\.__ SDB07 - 0, p SDBE7 - 0, p - 93 - (8) Synchronous transfer input (INITIATOR) Symbol Parameter MIN TYP MAX Unit trno I/DI High -+ Data Bus Disable 70 ns tpHRQ Phase Specify -+ REQI High 100 ns tALPH ACKO Low -+ Phase Change 10 ns tDvRQ Data Bus Valid-+ REQI High 10 ns tRQDH REQI High -+ Data Bus Hold 40 ns tRQAP REQI Assertion Period 50 ns tRNAP REQI Nonassertion Period 50 ns tRQFl REQI Cycle time (1) tcLF ns tRQF2 REQI Cycle time (2) 3tcLF ns tRHAH REQI High -+ ACKO High 3tcLF + 5 ns tAKAP ACKO Assertion Period tcLF - 10 ns tANAP ACKO Nonassertion Period ntcLF - 10 ns tRATH REQI High -+ ATNO High 3tcLF + 5 ns *l tcLF See 6.1.1 n TMOD register set value (See Fig. 4.4.1) *l ANTO signal is sent only when the parity checking is enabled and a parity error is detected in the input data. - 94 - tRQF2 ~ ~tRQFl- t13.Q_AP tRNAP REQI !-- tPHRQ ~ tRHAH tAKAP tANAP ~ ACKO tovRQ tRQDH x L .J SDBI7 - 0 p f ~ tRATH --1 ATNO *l tALPH IE-- MSG! ---; v--- v--- C/DI ---- I/OI --' IL__ f