ICP2432-to-PCI Host Protocol Specification DC A

Similar documents
CPCI-SIP. Slave Dual IndustryPack Carrier for 3U CompactPCI systems REFERENCE MANUAL Version 2.0 June 1998

PCI-4SIP. Slave Quad IndustryPack Carrier for PCI systems REFERENCE MANUAL Version 1.2 September 2001

CPCI-SIP-2. Slave Dual IndustryPack Carrier for 3U CompactPCI systems REFERENCE MANUAL Version 4.1 February 2007

PMC-DA Channel 16 Bit D/A for PMC Systems REFERENCE MANUAL Version 1.0 June 2001

CPCI-IPC. Intelligent DSP Based Dual IndustryPack Carrier for CompactPCI systems REFERENCE MANUAL Version 2.

CPCI-AD32. Intelligent DSP Based 32 Channel Analog Input Card for 3U CompactPCI systems REFERENCE MANUAL Version 1.

CPCI-Dual_IPC. Intelligent IP CARRIER for CPCI systems with Two TMS 320C31 DSPs Up to Four IndustryPack Modules REFERENCE MANUAL

QIO/SQIO API Reference Guide DC E

PCI-HPDI32A-COS User Manual

TPMC Channel Motion Control. User Manual. The Embedded I/O Company. Version 1.0. Issue 1.3 March 2003 D

MOTENC Axis PCI Motion & I/O Control Board. Reference Manual Rev 1A, April Copyright 2004 VITAL Systems Inc

TPMC Channel Isolated Serial Interface RS422/RS485. Version 1.0. User Manual. Issue July 2009

TCP Channel Serial Interface RS232 / RS422 cpci Module. User Manual. The Embedded I/O Company. Version 1.0. Issue 1.

TPMC Channel Isolated Serial Interface RS232. Version 1.0. User Manual. Issue August 2017

TPMC /8 Digital Inputs (24V) 16/8 Digital Outputs (24V, 0.5A) Version 3.0. User Manual. Issue June 2014

MOTENC-Lite 4-Axis PCI Motion & I/O Control Board. Reference Manual Rev 1.1, June 20, Copyright 2005 VITAL Systems Inc

Simpact STREAMS ICP2432 Programmer s Guide for Windows NT DC B

ATC-AD8100K. 8 Channel 100 khz Simultaneous Burst A/D in 16 bits IndustryPack Module REFERENCE MANUAL Version 1.

cpci-dart Base-Board & Daughter-Board

TPMC816. Two Independent Channels Extended CAN Bus PMC Module. Version 2.2. User Manual. Issue August 2014

TPMC810. Isolated 2x CAN Bus. Version 1.1. User Manual. Issue June 2009

Register Map for the PCI-PDISO16

Architecture of 8085 microprocessor

Application Note 2871 Step-by-Step Configuration for Configuration Mode (DS31256)

The local bus can operate in two modes in DS31256:

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

MICROPROCESSOR TECHNOLOGY

OSEK/VDX. Communication. Version January 29, 2003

Contents. CHAPTER 1 General Information...1. CHAPTER 2 Installation...9. CHAPTER 3 Digital Input Programming...15

CPCI-HPDI32ALT High-speed 64 Bit Parallel Digital I/O PCI Board 100 to 400 Mbytes/s Cable I/O with PCI-DMA engine

S5920 ADD-ON. 32 Byte FIFO. Pass- Thru AMCC ADD-ON. 32 Byte FIFO PCI. Local Bus Interface Logic. Pass- Thru. Mux/ Demux Active R/W Logic Buffers

Programmers Viewpoint PCI-bus:

IP-AD Channel 500 khz Simultaneous IndustryPack Module REFERENCE MANUAL Version 1.4 June 2003

UNIT V. Computer Networks [10MCA32] 1

CPCI-AD8. Intelligent DSP Based 8 Channel Analog Input Card for 3U CompactPCI systems REFERENCE MANUAL Version 1.

spwr_base & spwr_chan

TPMC Digital Inputs/Outputs (Bit I/O) Version 2.0. User Manual. Issue February 2014

Spectrum Business Voice Features

ATM-DB Firmware Specification E. Hazen Updated January 4, 2007

Block Diagram. mast_sel. mast_inst. mast_data. mast_val mast_rdy. clk. slv_sel. slv_inst. slv_data. slv_val slv_rdy. rfifo_depth_log2.

DLL User's Guide for the AlphiDll

Freeway OS/Impact Programmer s Guide DC B

TPMC500. Optically Isolated 32 Channel 12 Bit ADC. Version 1.1. User Manual. Issue January 2014

Bit-Stream Protocol Programmer s Guide DC A

MAA3182SC, MAB3091SC INTELLIGENT DISK DRIVES OEM MANUAL

DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA (831) Fax (831) Est

MOS INTEGRATED CIRCUIT

CS162 Operating Systems and Systems Programming Lecture 17. Disk Management and File Systems

Freeway Transport Subsystem Interface Reference Guide DC D

MP Assignment IV. 1. A. Describe the 80386DX memory system and explain the purpose and operation of the bank selection signals.

PCI-4IPM Revision C. Second Generation Intelligent IP Carrier for PCI Systems Up to Four IndustryPack Modules Dual Ported SRAM, Bus Master DMA

EtherCAT Slave. Protocol API V Hilscher Gesellschaft für Systemautomation mbh

Military/Government Protocols Programmer Guide DC I

srio SERIAL BUFFER FLOW-CONTROL DEVICE

Communication Protocol Manual JOFRA CTC, ITC, MTC, ETC and Compact Copyright 2008 AMETEK Denmark A/S

Emulation 2. G. Lettieri. 15 Oct. 2014

CSE398: Network Systems Design

FMP Programmer s Guide DC H

Application Note Features A[31:28] GLUE LOGIC (PLD) A[2] [Gnd:Vcc] Figure 1. TMS320C6202 to PCI Subsystem

SCUBA-2 PCI Card DSP Code Overview

27 December 2016 Pramod Ghimire. Slide 1 of 16

PCI-1760U. Isolated Relay Actuator and Digital Input Card. User s Manual

Register Map for the PCI-DAS-TC

Virtual Memory (Real Memory POV)

ECE 571 Advanced Microprocessor-Based Design Lecture 3

srio Hot Swap Application Note - 552

Enabling Multi-peer Support with a Standard-Based PCI Express Multi-ported Switch

DEVICE DRIVERS AND TERRUPTS SERVICE MECHANISM Lesson-15: Writing Device Driving ISRs in a System

Architecture Specification

TIP550. Optically Isolated 8/4 Channel 12-bit D/A. Version 1.2. User Manual. Issue October 2009

IP-48DAC channel 16-bit Digital/Analog Converter With memory Industry Pack Module PROGRAMMING MANUAL Version 1.

Creating a USB to Serial Bridge Solution using Cypress Low and Full-speed M8 USB Devices

Voice Mail and Automated Attendant User s Guide

ICP6000(X)/ICP9000(X) Hardware Description and Theory of Operation DC E

DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA (831) Fax (831) Est

CS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14

Judge Review User Guide

DDCMP Programmer s Guide DC D

CPCI-16HSDI. 16-Bit, Six-Channel Sigma-Delta Analog Input Board. With 1.1 MSPS Sample Rate per Channel, and Two Independent Clocks.

Lixia Zhang M. I. T. Laboratory for Computer Science December 1985

PCI-CAMAC CC32 CAMAC Crate Controller with PCI Interface. User Manual. Plein & Baus GmbH. W i. Werk für. Industrie- e lektronik. N uklear- lektronik e

CS454/654 Midterm Exam Fall 2004

Version 1.4. FaxCore User Manual

Topics. TCP sliding window protocol TCP PUSH flag TCP slow start Bulk data throughput

USB Feature Specification: Shared Endpoints

Wide S[SI Host Adapters. for P[I and (ISA Systems

Module 11: I/O Systems

Lecture 5: Computer Organization Instruction Execution. Computer Organization Block Diagram. Components. General Purpose Registers.

Instantiation. Verification. Simulation. Synthesis

ICP2432 Hardware Description and Theory of Operation DC A

ECE 391 Exam 1 Review Session - Spring Brought to you by HKN

AMCP/5-WP/72 APPENDIX D (ENGLISH ONLY)

Maxim > Design Support > Technical Documents > Application Notes > T/E Carrier and Packetized > APP 3347

PCI 9x56/FPGA AN. Programming FPGA s through PLX PCI 9x56 Devices Application Note. General Description

TPMC310. Conduction Cooled PMC Isolated 2 x CAN Bus. Version 1.1. User Manual. Issue June 2014

DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA (831) Fax (831) Est.

TIP120. Motion Controller with Incremental Encoder Interface. Version 1.0. User Manual. Issue August 2014

440GX Application Note

VMISFT-9450 I/O Connectivity IOWorks Board Drivers

SEL-3355/SEL-3360 Main Board Controller Software Developer s Guide

Transcription:

ICP2432-to-PCI Host Protocol Specification DC 900-1509A Simpact, Inc. 9210 Sky Park Court San Diego, CA 92123 April 1997

Simpact, Inc. 9210 Sky Park Court San Diego, CA 92123 (619) 565-1865 ICP2432-to-PCI Host Protocol Specification 1997 Simpact, Inc. All rights reserved Printed in the United States of America (Blind Mpars for cross refs) ICP2432 Windows NT ICPTool This document can change without notice. Simpact, Inc. accepts no liability for any errors this document might contain.

Contents List of Figures 5 List of Tables 7 Preface 9 1 Message Format 11 2 ICP Reset 15 3 ICP Download 17 4 ICP Initialization 19 5 Application Read/Write Interface 21 5.1 Initiation of a Read or Write........................ 26 5.2 Interrupt Processing............................. 27 DC 900-1509A 3

ICP2432-to-PCI Host Protocol Specification 4 DC 900-1509A

List of Figures Figure 2 1: Resetting an ICP............................... 16 Figure 3 1: Downloading an ICP............................ 18 Figure 4 1: Initializing the ICP............................. 20 Figure 5 1: Read/Write Process............................. 22 Figure 5 2: Host Writing Data to ICP.......................... 23 Figure 5 3: Host Reading Data from ICP........................ 25 DC 900-1509A 5

ICP2432-to-PCI Host Protocol Specification 6 DC 900-1509A

List of Tables Table 1 1: Protocol Exchange Region (PXR) Registers................. 11 Table 1 2: OMB1 and IMB1 Definitions........................ 13 Table 1 3: Host Commands and Responses...................... 14 Table 1 4: ICP Commands and Responses....................... 14 DC 900-1509A 7

ICP2432-to-PCI Host Protocol Specification 8 DC 900-1509A

Preface Introduction Simpact s PCI bus Intelligent Communications Processor is the ICP2432. The Simpact ICP2432 hardware includes the Applied Micro Circuits Corporation (AMCC) 5933 PCI bus controller. The ICP2432 system software includes a driver in the Host I/O task (HIO), which runs in the OS/Impact environment. A host computer that wishes to communicate with the ICP2432 must have a device driver that meets this specification. These two drivers communicate with each other providing host applications with the capability of communicating with the ICP2432 (all further references to ICP mean the ICP2432). For the ICP to become operational for normal host application reads and writes, it must be reset, downloaded with processing tasks which normally include the Host I/O task and any application tasks, and have the downloaded programs initialized. Purpose of Document The purpose of this document is to specify the operations of a host driver in order to be operational with Simpact s ICP2432. The HIO task on the ICP is intended to be interfaced to many different computers running under a variety of operating systems. Therefore, any host driver that follows this specification can provide a seamless interface over the PCI bus to HIO on Simpact s ICP. DC 900-1509A 9

ICP2432-to-PCI Host Protocol Specification Organization of Document Chapter 1 describes the message format. Chapter 2 describes the ICP reset procedure. Chapter 3 describes the ICP download procedure. Chapter 4 describes the ICP initialization procedure. Chapter 5 describes the application read/write interface. Document Conventions The term ICP refers to the ICP2432. Document Revision History The revision history of the ICP2432-to-PCI Host Protocol Specification, Simpact document DC 900-1509A, is recorded below: Document Revision Release Date Description DC 900-1509A April 1997 Initial release 10 DC 900-1509A

Chapter 1 Message Format There is a region in I/O space where both the host and ICP can communicate called the PCI Operation Registers by AMCC. To be consistent with previous driver implementations for various Simpact ICPs, this exchange region is also called the Protocol Exchange Region (PXR). The registers shown in Table 1 1 define the PXR and are used to exchange data across the PCI bus. Table 1 1: Protocol Exchange Region (PXR) Registers Hex Address Offset Abbreviation Register Name 00 OMB1 Outgoing Mailbox Register 1 04 OMB2 Outgoing Mailbox Register 2 08 OMB3 Outgoing Mailbox Register 3 0C OMB4 Outgoing Mailbox Register 4 10 IMB1 Incoming Mailbox Register 1 14 IMB2 Incoming Mailbox Register 2 18 IMB3 Incoming Mailbox Register 3 1C IMB4 Incoming Mailbox Register 4 20 FIFO FIFO Register Port 24 MWAR Master Write Address Register 28 MWTC Master Write Transfer Count Register 2C MRAR Master Read Address Register 30 MRTC Master read Transfer Count Register 34 MBEF Mailbox Empty/Full Status Register 38 INTCSR Interrupt Control/Status Register 3C MCSR Bus Master Control/Status Register DC 900-1509A 11

ICP2432-to-PCI Host Protocol Specification References to the PXR are made using the above abbreviations. The offsets are relative to the base address of the PXR. Refer to the AMCC S5933 PCI Controller Data Book for specific details on the PCI Operation Registers. Communications between the host and the ICP take place through the Protocol Exchange Region (PXR). All data transfers are requested and queued to the appropriate host driver or ICP HIO driver. Data can be transferred in either direction over the PCI bus from memory on one processor to the other. The actual data transfer is accomplished by the HIO driver. That is, the HIO driver does the actual move of the data whether it is being stored into a host buffer or an ICP buffer. OMB1 of the PXR defines Host-to-ICP commands and responses, and IMB1 defines ICP-to-Host commands and responses. Both the host driver and the ICP driver can read any element of the PXR, but only the host driver can write to the outgoing mailboxes (OMB1 OMB4), and only the ICP driver can write to the incoming mailboxes (IMB1 IMB4). These mailboxes are always read and stored as 32 bit words. Processing bytes are extracted from the 32-bit words by bit shifting. Using this algorithm to process OMB1 and IMB1 bytes, both the host driver and the ICP driver do not need to be concerned with whether the host or the ICP is a Big-Endian or Little-Endian machine. OMB1 and IMB1 are defined as shown in Table 1 2. The IMB1 word is read by the host driver to determine what operations the ICP wants the host to perform (icp_cmd), or what previous host command is receiving a response (icp_resp). The OMB1 word is written by the host driver to command the ICP to perform some operation (hst_cmd), or to send a response to a previous ICP command (hst_resp). Both the OMB1 and IMB1 words contain the host and ICP node numbers. Note that it is possible for either the host driver or the ICP driver to send both an acknowledgment to a previous command (which does not require either a host or ICP node number) and send a new command (which does require node numbers) together in the same PXR mailbox word (OMB1 or IMB1). 12 DC 900-1509A

1: Message Format Table 1 2: OMB1 and IMB1 Definitions OMB1 IMB1 Bits Field Name Description 12 15 hst_inode Host s ICP node number 8 11 hst_hnode Host s host node number 4 7 hst_resp Host s ICP response 0 3 hst_cmd Host s ICP command 12 15 icp_inode ICP s ICP node number 8 11 icp_hnode ICP s host node number 4 7 icp_resp ICP s host response 0 3 icp_cmd ICP s host command The host and ICP use node numbers to identify the senders and receivers of messages during normal application reads and writes. These node numbers are not used during the ICP download process. The PCI bus interface causes an interrupt on the host whenever the ICP writes a word to IMB1, and causes an interrupt on the ICP whenever the host writes a word to OMB1. It is also possible for the PCI bus interface to cause an interrupt on the host whenever the ICP reads the OMB1 word, and to cause an interrupt on the ICP whenever the host reads the IMB1 word. There is one case where interrupts are enabled on the read of OMB1 or IMB1. See Section 5.1 on page 26 for a description of normal reads and writes. The commands and responses shown in Table 1 3 are written by the host in hst_cmd or hst_resp of OMB1. The commands and responses shown in Table 1 4 are written by the ICP in icp_cmd or icp_resp of IMB1. DC 900-1509A 13

ICP2432-to-PCI Host Protocol Specification Table 1 3: Host Commands and Responses Symbolic Hex Value HOSTx_NOP 00 Host NOP command Description HOSTx_ACK 04 Host acknowledge of ICP command received in hst_resp HOSTx_WR_BLK 04 Host command to write a block of data during download HOSTx_IPROC 08 Host command for the ICP to initialize HOSTx_NAK 10 Host negative acknowledgment of ICP command HOSTx_REJECT 10 Host rejection of ICP command HOSTx_DLRDY 10 Host request of ICP to be ready to receive a download block HOSTx_WR_PEND 20 Host request for the ICP to move data from the host HOSTx_RD_PEND 21 Host request for the ICP to move data to the host Table 1 4: ICP Commands and Responses Symbolic Hex Value Description ICPx_NOP 00 ICP NOP response in icp_resp ICPx_NORSP 00 ICP No Response in icp_resp ICPx_RDY 03 ICP command denoting that the ICP is initialized ICPx_ACK 04 ICP acknowledge of host command received in icp_resp ICPx_NAK 10 ICP negative acknowledgment of host command in icp_resp ICPx_WR_CMPL 20 ICP command denoting that data has been moved to the ICP as requested by the host s HOSTx_WR_PEND command ICPx_RD_CMPL 20 ICP command denoting that data has been moved to the host as requested by the host s HOSTx_RD_PEND command ICPx_DLREQ 80 ICP command denoting that it is ready to receive a download block host command 14 DC 900-1509A

Chapter 2 ICP Reset Before anything can be accomplished on an ICP, it must be reset. A reset is initiated by a host application issuing an IOCTL (or UNIX equivalent) RESET request to the host driver. The host driver proceeds as follows: Reset the physical ICP devices and processor by setting the Add-On Reset pin of the MCSR (store 0x01000000 in the MCSR). Clear the Add-On Reset, and set the Mailbox Flags Reset, the Add-On to PCI FIFO Status Reset, and the PCI to Add-On FIFO Reset (store 0x0e000000 in the MCSR). For ten, one-second intervals, wait for the ICP to initialize by checking the Incoming Mailbox 3 flags to be set (check bits 24 to 27 to all be set), and for IMB3 to be initialized (IMB3 to contain 0xacedaced). Again, clear the Add-On Reset, and set the Mailbox Flags Reset, the Add-On to PCI FIFO Status Reset, and the PCI to Add-On FIFO Reset (store 0x0e000000 in the MCSR). Set 32-Bit Endian Conversion, Target Abort, Master Abort, Read Transfer Complete, Write Transfer Complete, Incoming Mailbox Interrupt, Outgoing Mailbox Interrupt, and Enable Interrupts for Incoming Mailbox Becomes Full (store 0x023f1000 in INTCSR for a Little-Endian host processor and store 0x003f1000 for a Big-Endian host processor). The host driver issues a HOSTx_DLRDY command to the ICP and waits for an acknowledgment from the ICP. DC 900-1509A 15

ICP2432-to-PCI Host Protocol Specification On interrupt, the ICP sends an ICPx_ACK response to acknowledge receipt of the HOSTx_DLRDY command. On interrupt, the host driver completes the IOCTL request to the host application. Figure 2 1 illustrates the process of resetting an ICP. HOST ICP Host application issues a IOCTL reset request to the driver 0x01000000 > MCSR 0x0e000000 > MCSR Wait 10 seconds for MBEF < 0x*f****** IMB3 < 0xacedaced 0x0e000000 > MCSR 0x023f1000 > INTCSR HOSTx_DLRDY > (ICP interrupt) < (Host interrupt) ICPx_ACK Host driver completes the host application IOCTL reset request * Don t care hex Figure 2 1: Resetting an ICP Note There is nothing to preclude a host driver implementation from having the HOSTx_DLRDY ICPx_ACK sequence being invoked with a separate IOCTL call to the host driver. This option is left up to the driver implementer since it would be transparent to the ICP. 16 DC 900-1509A

Chapter 3 ICP Download The download of application tasks, including the HIO driver, is accomplished by storing blocks of executable images (data) on the ICP. The host driver initiates this process with the previous HOSTx_DLRDY ICPx_ACK sequence. Then, on request from the ICP to receive a data block and on request from a host download application to send a data block, blocks of data are downloaded to the ICP. For each block of data sent to the ICP, the host driver sends the ICP the host address of a block of data, the address where the block of data is to be stored on the ICP, and the length of the block of data. This process works as follows: The ICP sends an ICPx_DLREQ command to the host driver, to request the download of a block of data. A host task issues a special application write request. This special write request includes the standard buffer (data image) address and buffer length, but also includes a field which specifies where the data is to be stored on the ICP. If the ICP has not yet sent the host driver an ICPx_DLREQ command, the host driver waits for the command to be received from the ICP. If an ICPx_DLREQ has already been received from the ICP, or on receipt of such a request, the host driver stores the length of the block of data in OMB2, and the address of the block of data in OMB3, and the address of where the block of data is to be stored in OMB4. The host driver then sends a HOSTx_WR_BLK command to the ICP. On interrupt, the ICP sends an ICPx_ACK response to acknowledge receipt of the HOSTx_WR_BLK. DC 900-1509A 17

ICP2432-to-PCI Host Protocol Specification On interrupt, the host driver completes the special write request of the download application task. On completion of moving the block of data from the host to the ICP, the ICP sends an ICPx_DLREQ command to the host driver to request another download block. The above sequence continues until the host download application has downloaded all required task images to the ICP. Figure 3 1 illustrates the process of downloading data images from the host to the ICP. HOST ICP < ICPx_DLREQ (Host interrupt) Host saves status of download request Host application issues a special write request to the driver HOSTx_WR_BLK > (ICP interrupt) < ICPx_ACK (Host interrupt) Host driver completes the host application write request ICP moves the data image to the specified ICP address < ICPx_DLREQ (Host interrupt) Host driver saves status of download request Host application issues a special write request to the driver HOSTx_WR_BLK > (ICP interrupt). Repeat until host download application done Figure 3 1: Downloading an ICP 18 DC 900-1509A

Chapter 4 ICP Initialization After the host download application has completed downloading all task images, the ICP tasks are ready to begin processing. A host application initiates these processes by making an IOCTL INIT request to the host driver specifying the beginning execution address. The host driver proceeds as follows: The driver insures that it has received the last ICPx_DLREQ from the ICP. The host driver stores the beginning execution address in OMB4. The host driver then sends a HOSTx_IPROC command to the ICP. The ICP does not know that all images have been download until it receives a HOSTx_IPROC. On interrupt, the ICP starts processing at the beginning execution address. At some point in the initial ICP application task, it calls the HIO system initialization routine. This eventually causes the HIO driver to send an ICPx_RDY response to acknowledge receipt of the HOSTx_IPROC and to signify that the ICP is ready for normal data transfer operations. Figure 4 1 illustrates the process of initializing the ICP. DC 900-1509A 19

ICP2432-to-PCI Host Protocol Specification HOST < (Host interrupt) ICP ICPx_DLREQ (Note: This signifies receipt of the last block of the last download image.) Host driver saves status of download request Host application issues a IOCTL INIT request to the driver HOSTx_IPROC > (ICP interrupt) ICP does system initialization < ICPx_RDY (Host interrupt) Host driver completes the host application IOCTL request Figure 4 1: Initializing the ICP 20 DC 900-1509A

Chapter 5 Application Read/Write Interface ICP applications (i.e. protocol tasks) send write requests to the HIO driver on the ICP for data to be transferred to the host, and send read requests to the HIO driver when they are ready to receive data from the host. Likewise, host applications send write requests to the host driver, and send read requests to the host driver when they are ready to receive data from the ICP. The host and ICP use node numbers to identify the senders and recipients of messages. When an ICP task or a host task issues a write request, it must specify both an ICP and a host node number. For a read request, however, only the receiver node number is specified. That is, an ICP task specifies an ICP node number on a read request, while a host task specifies a host node number on a read request. When the host driver receives a write request from the ICP, it attempts to match the host node number with the host node number specified in a pending host read request. When the host driver receives a read request from the ICP, it attempts to match the ICP node number with the ICP node number specified in a pending host write request. Figure 5 1 illustrates this process. The host driver can have only one unacknowledged command outstanding at a time, but it can have any number of uncompleted reads pending (no ICPx_RD_CMPL received) or writes pending (no ICPx_WR_CMPL) per ICP node number. When the host driver receives an ICP completion of a pending request, the host driver matches the ICP completion to a matching host application request. DC 900-1509A 21

ICP2432-to-PCI Host Protocol Specification HOST ICP Host Read Host node number < > ICP Write ICP node number Host node number Host Write Host node number ICP node number ICP Read < > ICP node number Figure 5 1: Read/Write Process On either a HOSTx_WR_PEND or HOSTx_RD_PEND host command, the host driver needs to store the size of the data buffer in OMB2 and the address of the data buffer in OMB3. The data buffer address needs to be properly mapped to allow the PCI bus to address the buffer. The transfer of data from the host to the ICP proceeds as follows: An ICP task issues a read request to the HIO driver and supplies a buffer address. The HIO driver queues the read request if a previous ICP command is pending to the host. A host application task issues a write request to the host driver. The host driver queues the write request if a previous command is pending to the ICP. The host driver issues a HOSTx_WR_PEND command to the ICP. On interrupt, the HIO driver on the ICP sends an ICPx_ACK response to acknowledge receipt of the HOSTx_WR_PEND command and then moves the data in the host application write buffer to the queued HIO read request buffer. 22 DC 900-1509A

5: Application Read/Write Interface The HIO driver completes the read request of the ICP task. On completion of the data move, the HIO driver sends an ICPx_WR_CMPL command to the host. On interrupt, the host driver completes the write request of the host application task. The host driver sends a HOSTx_ACK response to acknowledge receipt of the ICPx_WR_CMPL command. Figure 5 2 illustrates the process of writing data from the host to the ICP. HOST ICP ICP application issues a read to the driver Host application issues a write request to the driver HOSTx_WR_PEND > (ICP interrupt) < ICPx_ACK (Host interrupt) ICP moves data to the ICP application read buffer < ICPx_WR_CMPL (Host interrupt) Host driver completes the host application write request HOSTx_ACK > (ICP interrupt) Figure 5 2: Host Writing Data to ICP DC 900-1509A 23

ICP2432-to-PCI Host Protocol Specification The transfer of data from the ICP to the host proceeds as follows: A host application task issues a read request to the host driver and supplies a buffer address. The host driver queues the read request if a previous host command is pending to the ICP. An ICP task issues a write request to the HIO driver. The HIO driver queues the write request if an ICP command is pending to the host. The host driver issues a HOSTx_RD_PEND command to the ICP. On interrupt, the HIO driver sends an ICPx_ACK response to acknowledge receipt of the HOSTx_RD_PEND command and saves the address of the host application read request buffer. The HIO driver moves the data from the ICP to the host application read buffer. On completion of the data move, the HIO driver sends an ICPx_RD_CMPL command to the host. On interrupt, the host driver sends a HOSTx_ACK response to acknowledge receipt of the ICPx_RD_CMPL command and completes the read request of the host application task. Figure 5 3 illustrates the process of the host reading data from the ICP 24 DC 900-1509A

5: Application Read/Write Interface HOST ICP ICP application issues a write to the driver Host application issues a read request to the driver HOSTx_RD_PEND > (ICP interrupt) < ICPx_ACK (Host interrupt) ICP moves data to the host application read buffer < ICPx_RD_CMPL (Host interrupt) Host driver completes the host application read request HOSTx_ACK > (ICP interrupt) Figure 5 3: Host Reading Data from ICP In order to speed up the interchange of data and to eliminate potential grid locks between the host and the ICP, both the host driver and the HIO driver need to adopt the following algorithms for initiation of a read or write, and interrupt processing. To simplify this algorithm, terms (variables) are defined as: The variable ack_pending implies that the host driver has received a command (ICPx_RD_CMPL or ICPx_WR_CMPL), but the host driver has not sent the ICP an acknowledgment. The variable command_sent implies that the host driver has sent a command (HOSTx_RD_PEND or HOSTx_WR_PEND), but the host driver has not received the ICP acknowledgment of the command. The variable out_mbx_interrupt implies that the host driver has enabled interrupts on Outgoing Mailbox Goes Empty. This enabled interrupt is cleared as soon as the HIO driver either stores a word into IMB1 or reads OMB1. DC 900-1509A 25

ICP2432-to-PCI Host Protocol Specification 5.1 Initiation of a Read or Write On receipt of an application read or write request, if the host driver is currently waiting for an acknowledgment to a previously sent read or a write command (command_sent is TRUE), queue the incoming read or write request to a queue for the requested ICP node, and exit while waiting for the acknowledgment. Otherwise (command_sent is FALSE), enable host interrupts associated with the HIO driver reading the host outgoing mailbox (OMB1) (see first Note below). If the HIO driver has not read OMB1, tested by looking at the low order 4 bits of MBEF, then exit. When the ICP reads OMB1, an interrupt is generated on the host which causes a re-invocation of the initiation of a read or write attempt. If the HIO driver has read the outgoing mailbox, then disable host interrupts associated with the HIO driver reading the host outgoing mailbox (see second Note below), and post the read or write command. Posting the command is done by converting the read or write buffer address into an address that can be reached by the PCI bus and storing the word in OMB3, storing the buffer size in OMB2, and creating a word (where each byte is placed into the word by bit shifting) as follows: hst_inode and hst_hnode (the two high order bytes) contain the ICP node number. hst_resp contains a HOSTx_NOP if there is no acknowledgment pending (ack_pending is FALSE) or contains HOSTx_ACK if there is an acknowledgment pending. Set ack_pending to FALSE. hst_cmd contains either a write pending command (HOSTx_WR_PEND) or a read pending command (HOSTx_RD_PEND). The word is then stored in OMB1, which causes an interrupt to occur on the ICP. 26 DC 900-1509A

5: Application Read/Write Interface Note Allowing interrupts on Outgoing Mailbox Goes Empty are enabled by storing 0x02001010 into the INTCSR register, and should be allowed by the host only if: The host driver has a command ready to be sent to the ICP. The host driver is not waiting for an acknowledgment to a previous command. Note To disable interrupts on Outgoing Mailbox Goes Empty, store 0x02011000 into the INTCSR register. 5.2 Interrupt Processing The host interrupt processing routine receives an interrupt either when the ICP stores a word in the host incoming mailbox, IMB1, or when the Outgoing Mailbox Goes Empty interrupt is enabled and the ICP has read the host outgoing mailbox, OMB1. Since multiple PCI devices can share the same interrupt vector, it may be necessary to determine which ICP has caused the interrupt for the current interrupt line. (Bits 16 or 17 of the INTCSR will be set). If the interrupt is due to an Outgoing Mailbox Interrupt (bit 16 of the INTCSR), then clear the interrupt (store AND of INTCSR and 0xff011f00), set the ICP command to HOSTx_NOP, and set the ICP response to ICPx_NORSP. In addition, if the interrupt is due to an Incoming Mailbox Interrupt (bit 17 of the INTCSR), then clear the interrupt (store AND of INTCSR and 0xff021f1f), and read IMB1. The interrupt routine reads IMB1 ONE TIME ONLY and creates: The ICP command word from the low order byte. DC 900-1509A 27

ICP2432-to-PCI Host Protocol Specification The ICP response from the low order byte after shifting the word right 8 bits. The host node number from the low order byte after shifting another 8 bits. The ICP node number from the low order byte after shifting another 8 bits. Regardless, the following process then occurs: If the ICP response is an ICPx_ACK, then the command_sent flag is set to FALSE. If the ICP response is anything else but an ICPx_NORSP, log an error and exit. If the ICP command is an ICPx_RD_CMPL or ICPx_WR_CMPL, then complete the read or write request to the host application that issued the read or write, and set ack_pending to TRUE. If the ICP command is anything else but an ICPx_NOP, log an error and exit. If the command_sent flag is FALSE at this point and there is at least one read or write request queued for the ICP, invoke the Initiation of a Read or Write process. 28 DC 900-1509A

ICP2432-to-PCI Host Protocol Specification DC 900-1509A Customer Report Form We are constantly improving our products. If you have suggestions or problems you would like to report regarding the hardware, software or documentation, please complete this form and mail it to Simpact at 9210 Sky Park Court, San Diego, CA 92123, or fax it to (619)560-2838. If you are reporting errors in the documentation, please enter the section and page number. Your Name: Company: Address: Phone Number: Product: Problem or Suggestion:

Simpact, Inc. Customer Service 9210 Sky Park Court San Diego, CA 92123