Protocol Software Toolkit Programmer Guide DC 900-1338I Protogate, Inc.
Cross References: (keep this hidden) AWS aws Asynchronous Wire Service Protogate, Inc. 12225 World Trade Drive, Suite R San Diego, CA 92128 (858) 451-0865 Protocol Software Toolkit Programmer Guide © 2001 Protogate, Inc. All rights reserved Printed in the United States of America This document can change without notice. Protogate, Inc. accepts no liability for any errors this document might contain. Freeway is a registered trademark of Simpact, Inc.
Contents List of Figures 9 List of Tables 11 Preface 13 1 21 Introduction 1.1 Product Overview . . . . . . . . . . . . . . . . . . . 1.1.1 Freeway Server . . . . . . . . . . . . . . . . . . 1.1.2 Embedded ICP . . . . . . . . . . . . . . . . . . 1.2 Freeway Client-Server Environment . . . . . . . . . 1.2.1 Establishing Freeway Server Internet Addresses 1.3 Embedded ICP Environment . . . . . . . . . . . . . 1.4 Client Operations . . . . . . . . . . . . . . . . . . . 1.4.
Protocol Software Toolkit Programmer Guide 2.4.1 Processor Privilege States . . . . . . . . . . . . . . . . . . 2.4.2 Stack Pointers . . . . . . . . . . . . . . . . . . . . . . . . 2.4.3 Exception Vector Table . . . . . . . . . . . . . . . . . . . 2.4.4 Interrupt Priority Levels . . . . . . . . . . . . . . . . . . 2.5 ICP2424 and ICP2432 Hardware Device Programming . . . . 2.5.1 Programming the 68340/68349 . . . . . . . . . . . . . . 2.5.2 Programming the Integrated Universal Serial Controllers 2.5.
Contents 4.3.2.2 4.3.2.3 5 Number of Configured Priorities . . . . . . . . . . . . . . . . . . . . 78 Tick and Time Slice Lengths . . . . . . . . . . . . . . . . . . . . . . . 80 Debugging 5.1 5.2 5.3 5.4 6 PEEKER Debugging Tool . PTBUG Debugging Tool. . SingleStep Debugging Tool System Panic Codes . . . . 81 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Protocol Software Toolkit Programmer Guide 7.2.4.3 Completion Status . . . . . . . . . . . 7.3 Reserved System Resources: XIO Interface . . . . 7.4 Executive Input/Output . . . . . . . . . . . . . . 7.4.1 Initialize Executive Input/Output (s_initxio) 7.4.2 Node Declaration (s_nodec) . . . . . . . . . 7.4.3 XIO Read/Write (s_xio) . . . . . . . . . . . 7.5 Diagnostics . . . . . . . . . . . . . . . . . . . . . 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents 9.3.2 9.3.3 Internal Test Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Internal Ping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 A Application Notes 189 B Data Rate Time Constants for SCC/IUSC Programming 191 C Error Codes 195 C.1 DLI Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 C.2 ICP Global Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 C.
Protocol Software Toolkit Programmer Guide 8 DC 900-1338I
List of Figures Figure 1–1: Freeway Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Figure 1–2: Embedded ICP Configuration. . . . . . . . . . . . . . . . . . . . . . . . . 23 Figure 1–3: A Typical Freeway Server Environment . . . . . . . . . . . . . . . . . . . . 25 Figure 1–4: ICP PROM and Toolkit Software Components — Freeway Server . . . . . 29 Figure 1–5: ICP PROM and Toolkit Software Components — Embedded ICP . . . . . 30 Figure 2–1: Assembly Language Shell . . . . . . . . .
Protocol Software Toolkit Programmer Guide Figure 6–8: ICP Write Request (Receive Data) Processing . . . . . . . . . . . . . . . . 102 Figure 6–9: Sample Link-to-Board Queue . . . . . . . . . . . . . . . . . . . . . . . . 108 Figure 7–1: Sample Singly-linked Queue with Three Elements . . . . . . . . . . . . . 119 Figure 7–2: Sample Doubly-linked Queue with Three Elements . . . . . . . . . . . . 120 Figure 7–3: Node Declaration Queue Element . . . . . . . . . . . . . . . . . . . . . .
List of Tables Table 2–1: Vectors Reserved for System Software . . . . . . . . . . . . . . . . . . . . . 40 Table 2–2: ICP Interrupt Priority Assignments . . . . . . . . . . . . . . . . . . . . . . 42 Table 2–3: LED Control Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Table 2–4: SP502 or SP504 Electrical Interface Values . . . . . . . . . . . . . . . . . . 44 Table 2–5: Setup for MFP Initialization . . . . . . . . . . . . . . . . . . . . . . . . . .
Protocol Software Toolkit Programmer Guide Table B–4: IUSC Time Constants for 16X Clock Rate for ICP2424 and ICP2432 . . . 193 Table C–1: ICP Error Status Codes used by the ICP . . . . . . . . . . . . . . . . . . .
Preface Purpose of Document This document describes the protocol software toolkit for the Freeway server and embedded intelligent communications processor (ICP) environments, and discusses the issues involved in developing software that executes in either of these environments. It also provides information on client application programs and the host/ICP interface. Note The Protocol Toolkit is designed to be used either with a Freeway server or an embedded ICP using DLITE.
Protocol Software Toolkit Programmer Guide • • a client computer that runs the following: • TCP/IP (for a Freeway server) • Freeway data link interface (DLI) or embedded DLITE interface An ICP2424, ICP2432, or ICP6000 installed in the Freeway server’s backplane or embedded in your client computer system • A console cable and an ASCII terminal or terminal emulator (running at 9600 b/s) for access to the ICP console port • A programmer’s module for the ICP2432 or ICP6000 • A set of software deve
Preface Chapter 7 gives an overview of the interface between the ICP’s host processor and an ICP. It also describes the interface between the ICP’s driver, XIO, and OS/Impact application tasks. Chapter 8 gives an overview of DLI concepts relating to client applications. Chapter 9 describes the messages exchanged between the client and the ICP. Techpubs: Don’t delete the “Other Helpful Documents” (separate table at end of References). Also set “space below” on first table = 0 pt.
Protocol Software Toolkit Programmer Guide • • • Freeway 8800 Hardware Installation Guide DC-900-1553 Freeway ICP6000R/ICP6000X Hardware Description DC-900-1020 ICP6000(X)/ICP9000(X) Hardware Description and Theory of Operation DC-900-0408 • • • • ICP2424 Hardware Description and Theory of Operation DC-900-1328 ICP2432 Hardware Description and Theory of Operation DC-900-1501 ICP2432 Electrical Interfaces (Addendum to DC-900-1501) DC-900-1566 ICP2432 Hardware Installation Guide DC-900-1502 F
Preface • • OS/Impact Programmer Guide DC-900-1030 Protocol Software Toolkit Programmer Guide DC-900-1338 Protocol Support • • • • • • • • • • • • • • • ADCCP NRM Programmer Guide DC-900-1317 Asynchronous Wire Service (AWS) Programmer Guide DC-900-1324 AUTODIN Programmer Guide DC-908-1558 Bit-Stream Protocol Programmer Guide DC-900-1574 BSC Programmer Guide DC-900-1340 BSCDEMO User Guide DC-900-1349 BSCTRAN Programmer Guide DC-900-1406 DDCMP Programmer Guide DC-900-1343 FMP Programme
Protocol Software Toolkit Programmer Guide • Z16C32 IUSC Integrated Universal Serial Controller Technical Zilog, DC8292-01 Manual Other Documents (Development Tools and Environment) Vendor • • • CrossCodeC for the 68000 Microprocessor Family Wind River M68000 Family Resident Structured Assembler Reference Manual Motorola • SingleStep Debugger for the 68000 Microprocessor Family PTBUG Debug and Utility Program, Model PT-VME800-10393, PTI, 811A017910 Reference Manual for VME 340 Wind River Docume
Preface Revision Release Date DC 900-1338A November 4, 1994 Description Original release DC 900-1338B November 22, 1994 Update file names for Release 2.
Protocol Software Toolkit Programmer Guide We are always interested in suggestions for improving our products. You can use the report form in the back of this manual to send us your recommendations.
Chapter 1 Introduction 1.1 Product Overview Most recent modification date: 6/1/99 Ginni: Added 1200/1300 to FW list Protogate provides a variety of wide-area network (WAN) connectivity solutions for real-time financial, defense, telecommunications, and process-control applications. Protogate’s Freeway server offers flexibility and ease of programming using a variety of LAN-based server hardware platforms.
Protocol Software Toolkit Programmer Guide tiple data links and a variety of network services to LAN-based clients. Figure 1–1 shows the Freeway configuration. To maintain high data throughput, Freeway uses a multi-processor architecture to support the LAN and WAN services. The LAN interface is managed by a single-board computer, called the server processor.
1: Introduction 1.1.2 Embedded ICP The embedded ICP connects your client computer directly to the WAN (for example, using Protogate’s ICP2432 PCIbus board). The embedded ICP provides client applications with the same WAN connectivity as the Freeway server, using the same data link interface (via the DLITE embedded interface). The ICP runs the communication protocol software using Protogate’s real-time operating system. Figure 1–2 shows the embedded ICP configuration.
Protocol Software Toolkit Programmer Guide Summary of product features: • Provision of WAN connectivity either through a LAN-based Freeway server or directly using an embedded ICP • Elimination of difficult LAN and WAN programming and systems integration by providing a powerful and consistent data link interface • Variety of off-the-shelf communication protocols available from Protogate which are independent of the client operating system and hardware platform • Support for multiple WAN communicati
1: Introduction 1.2 Freeway Client-Server Environment The Freeway server acts as a gateway that connects a client on a local-area network to a wide-area network. Through Freeway, a client application can exchange data with a remote data link application. Your client application must interact with the Freeway server and its resident ICPs before exchanging data with the remote data link application.
Protocol Software Toolkit Programmer Guide 1.2.1 Establishing Freeway Server Internet Addresses The Freeway server must be addressable in order for a client application to communicate with it. In the Figure 1–3 example, the TCP/IP Freeway server name is freeway2, and its unique Internet address is 192.52.107.100. The client machine where the client application resides is client1, and its unique Internet address is 192.52.107.99.
1: Introduction 1.4.2 Opening a Session After the DLI and TSI configurations are properly defined, your client application uses the dlOpen function to establish a DLI session with an ICP link. As part of the session establishment process, the DLI establishes a TSI connection with the Freeway MsgMux through the TCP/IP BSD-style socket interface for the Freeway server, or directly to the ICP driver for the embedded ICP environment. 1.4.
Protocol Software Toolkit Programmer Guide 1.5 Protocol Toolkit Overview The protocol software toolkit helps you develop serial protocol applications for execution on Protogate’s intelligent communications processors. Many of the software modules required to build a complete system are provided with the toolkit or reside in the ICP’s PROM, including download facilities, operating system, and the PTBUG (ICP6000) or Peeker (ICP2424 and ICP2432) debugging tool.
1: Introduction Server Processor ICP PROM Boot Loader Application SPS Test Program Program Interface Serverresident Applications Server/ICP Driver XIO Low-level Debugger Utility Task Power-up/ Reset Diagnostics Protocol Task Transmit Pre-processor VxWorks Receive Post-processor Device-specific Procedures Start Transmit Initialization Start Receive Device-specific ISRs Receive ...
Protocol Software Toolkit Programmer Guide Host Processor ICP PROM SPS Test Program Application Program Interface Boot Loader Low-level Debugger Power-up/ Reset Diagnostics Host OS XIO ICP Driver Utility Task Protocol Task Transmit Pre-processor Receive Post-processor Device-specific Procedures Start Transmit Initialization Start Receive Device-specific ISRs Receive 3416 SDS Debug Monitor Transmit Specific Conditions ...
1: Introduction 1.5.1 Toolkit Software Components The toolkit loopback test program (spsalp.c) is provided in source form and, when compiled, executes in the client application program’s system environment. For the test procedures, see the “Protocol Toolkit Test Procedure” section in the Freeway Loopback Test Procedures document or the appropriate embedded ICP user guide.
Protocol Software Toolkit Programmer Guide 32 DC 900-1338I
Chapter 2 Software Development for the ICP This chapter describes the issues involved in developing software for the Protogate ICPs, including software-development tools, the client application program interfaces, and the hardware devices. The application program interface between the client and ICP protocol tasks are described in the Freeway Transport Subsystem Interface Reference Guide and Freeway Data Link Interface Reference Guide.
Protocol Software Toolkit Programmer Guide • A module containing the source-level debug monitor for the ICP2424 (icp2424c.mem), ICP2432 (icp2432c.mem), or ICP6000 (icp6000c.mem), used only with the Software Development Systems’ SingleStep debugger In general, the toolkit programmer develops or modifies one or more application modules or tasks that run with Protogate’s system-services module. Application tasks can run concurrently.
2: Software Development for the ICP During the design and development of your application, you can use this information to build a complete system composed of compatible and cooperating modules. In addition, your application code must provide a system configuration that is adequate for the combined needs of all the modules in the system, and it must include the required task initialization structures. 2.
Protocol Software Toolkit Programmer Guide 68000 assembler, a linker, and a downloader. The SDS assembler allows you to define up to 250 relocatable regions, identified by region names. These regions are mapped into the target memory structure by the linker using a linker specification file. This file allows you to map various regions to particular addresses and position them in ROM or RAM as needed.
2: Software Development for the ICP For programs written in assembly language, the freeway/icpcode/proto_kit/src directory includes the files sysequ.asm, with OS/Impact system call macros, and oscif.asm, with assembly language definitions of OS/Impact data structures. These files are in a format compatible with the CrossCodeC assembler, but can also be modified for use by other assemblers. 2.
Protocol Software Toolkit Programmer Guide In user state, the USP is the current stack pointer. In supervisor state, the ISP (usually called the system stack pointer, or SSP) is current. The current stack pointer is swapped automatically by the processor into general register A7 when the privilege level changes, so that register A7 is always used as the stack pointer, regardless of the processor’s state.
2: Software Development for the ICP Note The stack spaces are defined in the linker specification file freeway/icpcode/proto_kit/icpnnnn1/sps_nnnn.spc. 2.4.3 Exception Vector Table On the 68xxx, interrupts and traps are processed through an exception vector table. The 68xxx vector base register points to the exception vector table, which contains 256 longword (four-byte) vectors.
Protocol Software Toolkit Programmer Guide Table 2–1: Vectors Reserved for System Software Vector Number (Decimal) Vector Offset (Hexadecimal) 25 64 Auto vector level 1 26 68 Auto vector level 2 27 6C Auto vector level 3 28 70 Auto vector level 4 32 80 TRAP # 0 33 84 TRAP # 1 34 88 TRAP # 2 35 8C TRAP # 3 36 90 TRAP # 4 37 94 TRAP # 5 47 BC TRAP # 15 Function When programming interrupt service routines in a high-level language, it is usually necessary to provide an assem
2: Software Development for the ICP SECTION XREF XDEF * * _isr_shell movem.l jsr * movem.l s_iret 9 _Cisr _isr_shell d0/d1/a0/a1,-(sp) _Cisr (sp)+,d0/d1/a0/a1 external reference to C isr external definition for C code which stores this address in the exception vector table save registers not saved by C call C routine for interrupt processing restore registers return from isr (system call) Figure 2–1: Assembly Language Shell 2.4.
Protocol Software Toolkit Programmer Guide Table 2–2: ICP Interrupt Priority Assignments Device(s) Level ICP2424 Integrated Universal Serial Controllers (IUSC) 6 68340 periodic timer interrupt 5 ISAbus 5 ICP2432 Integrated Universal Serial Controllers (IUSC) 6 68349 periodic timer interrupt 5 PCIbus 5 ICP6000 Direct memory access controller 6 Serial communications controllers 5 Multi-function peripheral timer 5 VMEbus slave interface device 2 2.
2: Software Development for the ICP In addition to the Motorola 6834x, the ICP2424 and ICP2432’s programmable devices include: • two, four, or eight Z16C32 integrated universal serial controllers (IUSCs) with integral DMA for the ICP2432 or four IUSCs for the ICP2424 • Sipex’s SP502 (ICP2424) or SP504 (ICP2432) multi-mode serial transceivers • a test mode register • an LED register Note The 8-port ICP2432 only supports EIA-232. 2.5.
Protocol Software Toolkit Programmer Guide Timer 1 of the two 8-bit timers is used by the ICP to support DRAM/Refresh. Timer 2 is not used. OS/Impact uses the periodic interrupt timer, which uses vector 0x40. 2.5.2 Programming the Integrated Universal Serial Controllers The Z16C32 IUSCs are used to control the ICP’s serial ports. Each IUSC controls transmit and receive operations for one port. The IUSC also includes a DMA facility.
2: Software Development for the ICP 2.5.4 Programming the Test Mode Register All modem control signals except Test Mode are handled directly by the IUSC associated with the port. The Test Mode input status for all supported ports is through the Test Mode register located at 0x1808000 for the ICP2424 or 0x1810000 for the ICP2432. When a bit is set to one, the Test Mode signal is asserted on the serial line. See Figure 2–2 for the ICP2424 or Figure 2–3 for the ICP2432.
Protocol Software Toolkit Programmer Guide • a MC68901 multi-function peripheral (MFP) with four timers, interrupt control logic, and a single-channel universal synchronous/asynchronous receiver/transmitter (USART) which is used to support the ICP’s console • four or eight two-channel Z8530 serial communications controllers (SCCs) • a 32-channel DMA transfer controller Refer to the MC68901 Multi-function Peripheral (Motorola) and the Serial Communications Controller User’s Manual (Zilog).
2: Software Development for the ICP the console port. Timer channels B and C are dedicated to hardware functions. Do not change the configuration of the timer channels. The MFP contains 24 byte-wide registers beginning at the MFP base address (0x20000000). The MFP’s eight channels of external interrupt control are used to provide SCC interrupts. The MFP must be initialized appropriately before using SCC interrupts.Table 2–5 shows the recommended setup.
Protocol Software Toolkit Programmer Guide Table 2–6: Vector Numbers for SCC Interrupts Channels Vector (Hexadecimal) 0 and 1 40 2 and 3 41 4 and 5 42 6 and 7 43 8 and 9 46 10 and 11 47 12 and 13 4E 14 and 15 4F 2.6.2 Programming the Serial Communications Controllers Four or eight Z8530 or Z85230 serial communications controllers (SCCs) are used to control the ICP6000’s eight or sixteen ports.
2: Software Development for the ICP 8 and read register 8 (the transmit and receive data buffers) are accessed directly through the channel’s data register. All other registers except Read and Write registers (RRO and WRO) are accessed through the channel’s control register in two steps: a write to select the actual register number, followed by a read or write to transfer the data. RRO and WRO are accessible with a single transfer.
Protocol Software Toolkit Programmer Guide Vector numbers 224–255 (0xE0–0xFF) are dedicated to DMA controller channels 0–31, respectively. Refer to the Freeway ICP6000R/ICP6000X Hardware Description for DMA programming instructions. The sample protocol software package includes examples of DMA programming for transmit and receive operations.
Chapter 3 Memory Organization This chapter describes the memory maps for the ICP2424, ICP2432, and ICP6000. 3.1 ICP2424 The 128-kilobyte EPROM on the ICP2424 is located at address 0x0000. The EPROM contains the diagnostics, Peeker debugging tool, and boot loader. One megabyte of dynamic random access memory (DRAM) starts at 0x00800000. This DRAM is only accessible to the MC68340 and is used for program and private data space that does not need to be accessed by any of the devices in the Z-bus space.
Protocol Software Toolkit Programmer Guide The ICP2424 Hardware Description and Theory of Operation provides a complete memory map. Table 3–2 summarizes the hardware device and register addresses. Table 3–1: ICP2424 Memory Address Registers Base Address Physical Device ID Address (Hexadecimal) 0 00080000 1 00090000 2 000A0000 1 000B0000 a 000C0000 5a 000D0000 6a 000E0000 72 000F0000 3 4 1 Physical device IDs 4, 5, 6, and 3 are preferred for logical ICPs 0, 1, 2, and 3, respectively.
3: Memory Organization 3.2 ICP2432 The 128-kilobyte EPROM on the ICP2432 is located at address 0x0000. The EPROM contains the diagnostics, Peeker debugging tool, and boot loader. Two or eight megabytes of dynamic random access memory (DRAM) start at 0x00800000. Memory addresses 0x00800000 to 0x00801200 are reserved. The system services module (containing the operating systems and XIO) is loaded beginning at address 0x00801200. As described in Section 4.3.
Protocol Software Toolkit Programmer Guide 3.3 ICP6000 The 64-kilobyte PROM on the ICP6000 is located at address 0x0000. The PROM contains the diagnostics, PTBUG debugging tool, and boot loader. Socket U19 on the ICP is available for a user-added PROM of up to 256 kilobytes. If installed, this PROM is addressed beginning at 0x20000. One, four, or eight megabytes of dynamic random access memory (DRAM) starts at 0x40000000. Addresses 0x40000000 to 0x40001200 are reserved for PTBUG’s data area.
3: Memory Organization Table 3–4: ICP6000 Device and Register Addresses Base Address (Hexadecimal) Device or Register DMA command register 10000000 General control register 0 10000001 General control register 1 10000002 General status register 0 10000003 Multi-function peripheral base address 20000000 VMEbus slave interface base address 30000000 Base of DMA memory address registers 400FFF00 (for 1 MB DRAM system) 403FFF00 (for 4 MB DRAM system) 407FFF00 (for 8 MB DRAM system) Base of DMA ter
Protocol Software Toolkit Programmer Guide Table 3–5: ICP6000 VME Slave Address Registers Base Address Physical Device ID 0 F0001 12 F200 2b F400 3b F600 b F800 4 1 Address (Hexadecimal) 5 FA00 6 FC00 7 FE00 VME short address space. 2 Physical device IDs 1, 2, 3, and 4 are preferred for logical ICPs 0, 1, 2, and 3, respectively.
Chapter 4 ICP Download, Configuration, and Initialization Section 4.1 of this chapter describes additional download considerations not covered in the Freeway User Guide or the embedded ICP user guide so you can download the toolkit protocol software with or without the Software Development Systems (SDS) debug monitor. Section 4.2 describes configuration and initialization issues. Section 4.3 describes the relationship between the system configuration and OS/Impact’s memory requirements and performance.
Protocol Software Toolkit Programmer Guide The Freeway server boot configuration file, used to control the download procedure, is covered in detail in the Freeway User Guide. The boot configuration file is located in the freeway/boot directory (for example, bootcfg.vme for a Freeway 2000/4000/8800). The download script file parameter (download_script) in the boot configuration file specifies the modules to be downloaded to the ICP and the memory location for each module.
4: ICP Download, Configuration, and Initialization 4.1.1.1 Downloading Without the Debug Monitor Under normal operations you download the toolkit software without the debug monitor. The following files are required: spsload This is the download script file. You must specify this file name for the download_script parameter in your boot configuration file. The file is in the freeway/boot directory. xio_2424.mem, xio_2432.mem, or xio_6000.
Protocol Software Toolkit Programmer Guide Note Do not remove the comment indicator (#) from the “LOAD buffer.size” statement if the buffer size is to be the default (Section 4.1.3 on page 64). #----------------------------------------------------------------------------# # # spsload - Protocol load file to be used to load the SPS toolkit protocol # onto an ICP. # # Protocol load files are referenced from the server boot configuration file # # load files contain LOAD and INIT commands.
4: ICP Download, Configuration, and Initialization # # SNMP support notes for SPS toolkit protocol software product SP-000-6013: # # When using Freeway server SP-000-6055 Rev M (or later revision) # LOAD the appropriate snmp .mem file show in the samples below. # # When using Freeway server SP-000-6055 Rev L (or prior revision) # DO NOT load the appropriate snmp .mem file show in the samples below.
Protocol Software Toolkit Programmer Guide # the example below is for icp6000 normal operation # #LOAD xio_6000.mem 40001200 #LOAD snmp6000.mem 40010000 #LOAD sps_fw_6000.mem 40018000 #LOAD buffer.size 400d0000 #INIT 40018000 # # the example below is for icp6000 debug operation # (SNMP support is not recommended for debug operation) # #LOAD xio_6000.mem 40001200 #LOAD icp6000c.mem 40012000 #LOAD sps_fw_6000.mem 40018000 #LOAD buffer.
4: ICP Download, Configuration, and Initialization 4.1.1.2 Downloading With the Debug Monitor During application development you must download the toolkit software with the debug monitor. The SDS tools are not compatible with VMS platforms, but UNIX, DOS and Windows versions are available. If you are a VMS user, you can develop and debug your software with these tools using a PC running under DOS or Windows and a utility to transport files from the PC to the VMS system.
Protocol Software Toolkit Programmer Guide When the SDS debug monitor is downloaded along with other executable image files, the placement and order of execution of the downloaded code is different. The download addresses of the modules can differ, and the debug module will be first to execute. Note that the monitor must use RAM from 0x812000 to 0x818000 on the ICP2424 or ICP2432, and from 0x40012000 to 0x40018000 on the ICP6000. 4.1.
4: ICP Download, Configuration, and Initialization 3. Run the make_size utility program, specifying the desired buffer size when prompted. 4. Copy the new buffer.size file to the freeway/boot directory for subsequent downloads. However, since in most cases the maximum buffer size is not changed, it is suggested that the #define variable DEFAULT_FNAME be changed if the default size of 1024 is not acceptable. 4.
Protocol Software Toolkit Programmer Guide Figure 4–2 shows a sample memory layout that specifies the download and start-up locations in the ICP2424’s RAM for the system-services module and sample protocol application. ICP2424 RAM 0x800000 Load systemservices module (xio_2424.mem ) Reserved 0x801200 System-services Module Reserved 0x812000 Load userapplication module (sps_fw_2424.
4: ICP Download, Configuration, and Initialization Figure 4–3 shows a similar ICP2424 configuration consisting of the system-services module, SDS debug monitor, and sample protocol application. ICP2424 RAM 0x800000 Load systemservices module (xio_2424.mem ) Reserved 0x801200 System-services Module Load debug monitor module (icp2424c.mem) Load userapplication module (sps_fw_2424.
Protocol Software Toolkit Programmer Guide Figure 4–4 shows a sample memory layout that specifies the download and start-up locations in the ICP2432’s RAM for the system-services module and sample protocol application. ICP2432 RAM 0x800000 Load systemservices module (xio_2432.mem) Reserved 0x801200 System-services Module Reserved Load userapplication module (sps_fw_2432.
4: ICP Download, Configuration, and Initialization Figure 4–5 shows a similar ICP2432 configuration consisting of the system-services module, SDS debug monitor, and sample protocol application. ICP2432 RAM 0x800000 Load systemservices module (xio_2432.mem) Reserved 0x801200 System-services Module Load debug monitor module (icp2432c.mem) Load userapplication module (sps_fw_2432.
Protocol Software Toolkit Programmer Guide Figure 4–6 shows a sample memory layout that specifies the download and start-up locations in the ICP6000’s RAM for the system-services module and sample protocol application. ICP6000 RAM 0x40000000 Load systemservices module (xio_6000.mem) Reserved for PTBUG 0x40001200 System-services Module Reserved 0x40012000 Load userapplication module (sps_fw_6000.
4: ICP Download, Configuration, and Initialization Figure 4–7 shows a similar ICP6000 configuration consisting of the system-services module, SDS debug monitor, and sample protocol application. ICP6000 RAM 0x40000000 Load systemservices module (xio_6000.mem) Reserved for PTBUG 0x40001200 System-services Module Load debug monitor module (icp6000c.mem) Start of initialization 0x40012000 SDS Debug Monitor Load userapplication module (sps_fw_6000.
Protocol Software Toolkit Programmer Guide 4.2.1 Configuration Table The format of the configuration table is defined in the OS/Impact Programmer Guide and consists of a list of configurable parameters and a list of task initialization structures. OS/Impact creates its data structures based on the values of the parameters, then creates a task for each task initialization structure. Section 4.3 discusses the selection of appropriate configuration parameters.
4: ICP Download, Configuration, and Initialization * * Configuration Table * SECTION 14 XDEF spscon spscon DC.W 8 DC.W 8 DC.W 164 DC.W 10 DC.W 8 DC.W 0 DC.W 100 DC.W 8 DC.L 0 number of tasks number of priorities number of queues number of alarms number of partitions number of resources tick length ticks for time slice no user clock isr * Task Initialization Structure for the sample protocol task DC.W SPSTSK_ID task ID DC.W 2 task priority DC.L _spstsk entry point address DC.
Protocol Software Toolkit Programmer Guide 4.2.3 Task Initialization Routine You must supply a task initialization routine in one of the downloaded modules to be used at the start-up of the ICP. The task initialization routine is executed at the completion of the download sequence and must perform the following functions: 1. Load the configuration table address into register A0. 2.
4: ICP Download, Configuration, and Initialization 3. Allocate space for the timer task’s stack and create the task. 4. Use the task initialization structures included in the configuration table to create one or more application tasks. 5. Transfer control to the kernel’s dispatcher to begin normal run-time operations. The timer task is the highest priority in the system and is dispatched first.
Protocol Software Toolkit Programmer Guide Table 4–1: System Data Requirements Stack Bytes Required Supervisor stack 1024 Timer task’s stack 512 Task control blocks Number of tasks x 24 Queue control blocks Number of queues x 20 Partition control blocks Number of partitions x 28 Resource control blocks Number of resources x 16 Alarm control blocks Number of alarms x 28 Task alarm control blocks Number of tasks x 28 Dispatch queues ((Number of priorities + 1) x 8) + 4 Table 4–2: Sample C
4: ICP Download, Configuration, and Initialization Continuing this example, assume that the xio_6000.xrf file shows 0x400045BE as the system services module ending address. When the module is downloaded, the exception vector table, fixed data, and code occupy 0x33BE bytes at memory locations 0x40001200 (starting load address) through 0x400045BE.
Protocol Software Toolkit Programmer Guide 4.3.2.1 Number of Configured Task Control Structures The cf_ntask field of the configuration table defines the number of task control blocks to be allocated in the system. Task control blocks are allocated sequentially, forming an array of structures. The task ID is used as an index into the array to locate a particular task control block.
4: ICP Download, Configuration, and Initialization For example, suppose that a particular system consists of the following tasks: Task ID Priority 1 0 (timer task) 2 1 (reserved) 3 2 4 2 5 3 The operation of that system is no different than the operation of a system with the same tasks at the following priorities: Task ID Priority 1 0 (timer task) 2 50 (reserved) 3 75 4 75 5 200 The priority of task 5 is no lower in the second system than in the first.
Protocol Software Toolkit Programmer Guide 4.3.2.3 Tick and Time Slice Lengths Ticks measure the duration of alarms and the system’s time slice period. The cf_ltick field of the configuration table specifies the length of a tick (1 to 222 milliseconds).
Chapter 5 Debugging The debugging facilities available depend on whether Software Development Systems’ or some other cross development environment is being used. This chapter describes the debugging facilities provided. 5.1 PEEKER Debugging Tool PEEKER is a low-level peek and poke routine stored in the ICP2424 or ICP2432 PROM. To use PEEKER, attach a 9600 b/s terminal directly to the ICP’s console port with the console cable (and programmer’s module for the ICP2432) provided.
Protocol Software Toolkit Programmer Guide • • the access width (preceded by a semicolon): • b for byte • w for word • l for a longword an equal sign PEEKER then displays the address and contents of the given address in the form specified. The data may be modified by entering the new hexadecimal value followed by “^”, “=”, a space, or a return as listed below.
5: Debugging delete Return PEEKER to its initial state equal sign Close current location, open current location (in address space), and display contents l Open by longword linefeed Control-J Close current location, open next location (in address space), and display contents space Close current location, open next location (in address space), and display contents n (next) Close current location, open next location (in address space), and display contents p Close current location, open previous
Protocol Software Toolkit Programmer Guide 5.2 PTBUG Debugging Tool The PTBUG debugging tool is available on the ICP6000. The PTBUG Debug and Utility Program Reference Manual (PTI) (for the ICP6000) describes how to use the PTBUG debugging tool included in PROM on every ICP. To use PTBUG, attach a 9600 b/s terminal directly to the ICP’s console port with the console cable provided.
5: Debugging Modules built with SDS development tools can be downloaded to the ICP along with the SDS RAM-based debug monitor. This monitor runs on the ICP and communicates with SingleStep through the 68901 MFP’s USART for the ICP6000 or the 6834x serial port A for the ICP2424 and ICP2432. You must connect the USART by a cable from the ICP’s console port to a serial port on the SingleStep client machine. SingleStep instructs the monitor to set breakpoints, dump memory, view registers, and so on.
Protocol Software Toolkit Programmer Guide Press C to exit this mode. Type one of the following commands, depending on which ICP you are using. SingleStep displays a few messages, followed by “Reset complete.” SingleStep> debug -p /dev/ttya=9600 -N sps24.lo SingleStep> debug -p /dev/ttya=9600 -N sps32.lo SingleStep> debug -p /dev/ttya=9600 -N sps60.lo If you are working on a PC, type one of the following commands, depending on which ICP you are using: SingleStep> debug -p com1=9600 -N sps24.
5: Debugging XIO pushes its panic code onto the stack and calls hio_panic, which executes an illegal instruction. The illegal instruction will then trap to PTBUG or the debug monitor. User applications can handle error conditions in the same manner to their own assembly language panic routine.
Protocol Software Toolkit Programmer Guide 88 DC 900-1338I
Chapter 6 ICP Software Note From the ICP’s perspective, the “host processor” can be either the server processor of the Freeway in which the ICP resides, or the processor of the client computer in which the ICP is embedded. In this chapter, the term “ICP’s host” reflects this perspective. 6.1 ICP-resident Modules The ICP-resident sample protocol software (SPS) is downloaded in addition to the system services module. The sps_fw_2424.mem, sps_fw_2432.mem, or sps_fw_6000.
Protocol Software Toolkit Programmer Guide configuration table, described in Section 4.2 on page 65, are located in the spsasm.asm file located in the freeway/icpcode/proto_kit/src directory. OS/Impact’s osinit routine initializes the operating system variables and data structures, then creates the timer task and the tasks specified in the configuration table. These are the protocol task (spstsk) and the utility task (spshio). Section 4.2.4 describes the osinit procedure in more detail.
6: ICP Software 800000 CPU Private Memory Reserved 801200 OS/Impact xio_2432.mem Debug Monitor (optional) Task Init Routine icp2432c.mem 812000 818000 Protocol Task, Utility Task, and Interrupt Service Routines init stack spstsk stack sps_fw_2432.
Protocol Software Toolkit Programmer Guide 40000000 Reserved for PTBUG 40001200 OS/Impact xio_6000.mem Debug Monitor (optional) Task Init Routine icp6000c.mem 40018000 40030000 Protocol Task, Utility Task, and Interrupt Service Routines Temporary Buffer Partition init stack 40012000 sps_fw_6000.
6: ICP Software Server Processor ICP PROM Boot Loader Application SPS Test Program Program Interface Serverresident Applications Server/ICP Driver XIO Low-level Debugger Utility Task Power-up/ Reset Diagnostics Protocol Task Transmit Pre-processor VxWorks Receive Post-processor Device-specific Procedures Start Transmit Initialization Start Receive Device-specific ISRs Receive ...
Protocol Software Toolkit Programmer Guide Host Processor ICP PROM SPS Test Program Application Program Interface Boot Loader Low-level Debugger Power-up/ Reset Diagnostics Host OS XIO ICP Driver Utility Task Protocol Task Transmit Pre-processor Receive Post-processor Device-specific Procedures Start Transmit Initialization Start Receive Device-specific ISRs Receive 3416 SDS Debug Monitor Transmit Specific Conditions ...
6: ICP Software 6.1.2 Protocol Task This section explains the buffer management method for writing to or reading from the ICP’s host. The eXecutive Input/Output (XIO) interface is a collection of function calls that are executed in the context of the user’s application tasks. XIO uses queues that are declared by the utility task. XIO consists of simple function calls. Section 7.4 on page 135 gives details of XIO.
Protocol Software Toolkit Programmer Guide level. Completed received data messages are sent to the link’s board-to-server queue to await processing by the utility task. When all links have been processed, the protocol task suspends. It continues when a message is posted to any of its queues or when an interrupt service routine notifies it that a transmit or receive operation has completed. The interface between the protocol task and its interrupt service routines is described in Section 6.2.
6: ICP Software the value of the buffer.size file which is downloaded with the application. (See the /freeway/boot/spsload file.) During initialization, the utility task creates the header buffer partition and posts node declaration queue requests to XIO to establish nodes to be used by the ICP for reading from, and writing to, the ICP’s host. As requested by the utility task, XIO creates read and/or write request queues for each node.
Protocol Software Toolkit Programmer Guide Header Buffer System Buffer Header Data Buffer System Buffer Header Host Request Header ICP_HDR PROT_HDR Portion transmitted or received on serial link Portion transferred to or from ICP Data 2523 Figure 6–6: Sample Protocol Software Message Format 98 DC 900-1338I
6: ICP Software 6.1.3.1 Read Request Processing The utility task, spshio, issues read requests to XIO to obtain messages from the ICP’s host, which could be either data or control messages. A message from the ICP’s host contains one of the command codes described in Chapter 9. The DLI_PROT_SEND_NORM_DATA command code is used as an example in this section to describe the steps involved in processing read requests. Figure 6–7 illustrates these steps. 1.
Protocol Software Toolkit Programmer Guide Utility Task 2 1 Data From Server 6c 3 node 1 node 1 node 2 Input Header Queues 4 node 2 6a node 1 node 2 Input Data Queues ••• Header Buffer Read Request Queues 5 Header buffer partition H ••• Data Buffer Data buffer partition D XIO 3242 link 0 Transmit data 6b link 1 • • • link 15 Read Request Queue Element Server-to-Board Queues Protocol Task Figure 6–7: ICP Read Request (Transmit Data) Processing 100 DC 900-1338I
6: ICP Software b. The protocol task removes data buffers from the server-to-board queue, processes the requests, then releases the buffers to partition D or uses them to send acknowledgments back to the application program. c. The utility task obtains additional data buffers from partition D and links them to header buffers that were returned to its header input queue. It then issues new read request to XIO for node 1 or 2 (depending on the node from which the header buffers were returned).
Protocol Software Toolkit Programmer Guide 3 Utility Task Data to server 2 4 5 ••• node 3 node 4 • • • node 18 Header buffer partition H Write Request Queues ••• Data buffer partition D Header Buffer 6 XIO 1 Receive data 3243 link 0 Data Buffer link 1 • • • link 15 ICP-to-Server Queues Write Request Queue Element Protocol Task Figure 6–8: ICP Write Request (Receive Data) Processing 102 DC 900-1338I
6: ICP Software 4. XIO posts a write to the Write Request Queue associated with the node identified in the host request header. 5. When the ICP’s host sends a read request to its driver with a matching node number, XIO transfers the message from the data buffer to the ICP’s host memory and the ICP write request issued in step 3 is complete. 6. As instructed by the disposition flags, XIO releases the header and data buffers to their respective partitions. 6.
Protocol Software Toolkit Programmer Guide 11/14/97: Eric says he will change the spsstructs.h file to say BOARDinstead of _ICP- in the comments. I changed it now to match the text. 6.2.1 Link Control Tables The protocol and utility tasks and the interrupt service routines communicate and coordinate their operations for each link by means of a global link control table. One link control table is allocated for each link.
6: ICP Software bit32 bit32 bit32 bit32 #endif bit8 bit8 bit8 bit8 *lct_dma_rda; *lct_dma_rtc; *lct_dma_xda; *lct_dma_xtc; /* pointer to dma rcv address icp6000 */ /* pointer to dma rcv count icp6000 */ /* pointer to xmit address icp6000 */ /* pointer to dma xmit count icp6000 */ lct_prot; lct_syncs; lct_bits; lct_crc; /* protocol type */ /* number of leading sync chars (BSC) */ /* 0 = 8 bits, 1 = 7 bits (asynch) */ /* CRC on/off (1=on) */ bit8 bit8 bit8 lct_parity; lct_start; lct_stop; /* Parity, s
Protocol Software Toolkit Programmer Guide DATA_BUFFER *lct_frbuf; /* Receive frame buffer */ DATA_BUFFER *lct_rprebuf; /* Receive's previous frame buffer void (*lct_rcvstr)(); void (*lct_xmton)(); void (*lct_devoff)(); int (*lct_postr)(); void (*lct_prepx)(); /* Start receive routine address /* Start transmit routine address /* Device off routine address */ */ */ */ /* Post process rcv buffer routine addr */ /* Pre-process xmt buffer routine addr */ #if defined(ICP2424) || defined(ICP2432) int (*lct_
6: ICP Software 6.2.2 SPS/ISR Interface for Transmit Messages When the protocol task receives a transmit data block message on a link’s server-toboard queue, it moves the message to the link’s board-to-link queue to await transmission. The board-to-link queue is processed in the chkloq subroutine according to the mode of communication.
Protocol Software Toolkit Programmer Guide the protocol task removes the buffer from the link-to-board queue, calls the appropriate postprocessor to process the data before passing it to the application program, posts it to the board-to-server queue, and resumes the utility task which passes the message to the host. Whenever the protocol task removes a buffer from the head of the link-to-board queue, it restocks the queue.
6: ICP Software 6.3 Interrupt Service At the interrupt level, the SPS provides specific examples of SCC and IUSC programming for asynchronous (ASYNC), byte synchronous (BSC), and bit synchronous (HDLC/SDLC) modes of operation. At the same time, examples are provided for: • operation with and without the use of DMA • C and assembly language programming • CRC calculation in hardware (by the SCC or IUSC) or in software Table 6–1 summarizes these features for each mode of operation.
Protocol Software Toolkit Programmer Guide no longer transfers characters to the SCC or IUSC), a transmit underrun is generated. The SCC or IUSC transmits the two-byte CRC followed by a closing flag to terminate the frame. To receive, the DMA transfer count is set to the maximum block size and will not normally reach terminal count. The SCC or IUSC automatically calculates CRC during the received frame and generates an end-of-frame (special receive condition) interrupt when the closing flag is detected.
6: ICP Software SCC External/Status (ICP6000 only) This interrupt is generated under any of the following conditions: Loss of DCD An error count is incremented and the receiver is restarted using the current receive buffer. Abort An error count is incremented and the receiver is restarted using the current receive buffer. Transmit Underrun If the DMA has reached terminal count, transmit underrun can cause an external/status interrupt.
Protocol Software Toolkit Programmer Guide transferring the received character from the SCC or IUSC receiver to the receive data buffer, the interrupt service routine processes the character according to the current state: State 0 Search for start character. If the start character is found, move to state 1; otherwise, take no action and ignore the current character (it will be overwritten by the next character). State 1 Receive frame. Check for stop character.
6: ICP Software is set to the number of bytes in the block, including the header and the two-byte CRC, if enabled. The CRC is calculated and appended to the data at the task level. For receive, the SCC or IUSC is initially set up to generate interrupts on every character received. Each character is compared to the configured start character. After the start character has been found, the remainder of the BSC header can be received.
Protocol Software Toolkit Programmer Guide 114 DC 900-1338I
Chapter 7 Host/ICP Interface Note From the ICP’s perspective, the “host processor” can be either the server processor of the Freeway in which the ICP resides, or the processor of the client computer in which the ICP is embedded. In this chapter, the terms “ICP host processor,” “ICP’s host,” and “host/ICP interface” reflect this perspective. This chapter describes the interface between the ICP’s host processor and an ICP. This interface will be referred to as the “host/ICP interface.
Protocol Software Toolkit Programmer Guide to the ICP in order to gain service. Another register is used for ICP-to-host commands, but another device’s registers must be set up to generate the interrupt to the host. ICP2424s use a region of shared memory to support the PXR. The ICP2424 PXR is the first 16 bytes of the shared memory. These are consecutive bytes addressable as bytes, words, or longwords as long as the proper boundaries are observed.
7: Host/ICP Interface The ICP posts read requests to node 1 (the main node) and node 2 (the priority node); all information coming to the ICP from the host processor arrives through these two nodes. These nodes do have write queues, and in rare cases (such as rejecting an erroneous attach request) are used to pass information to the ICP’s host, but for the most part they are a one-way path for messages coming from the host; these messages are then demultiplexed to the various links.
Protocol Software Toolkit Programmer Guide 7.2 Queue Elements In general, a queue element consists of one or more linked buffers, and a queue can contain one or more linked queue elements. Every buffer of a queue element contains a standard system buffer header, as defined in the OS/Impact Programmer Guide. A field in each buffer’s header is used as a link to the next buffer of the queue element. Two fields in the header are valid only in the first buffer of a queue element.
7: Host/ICP Interface queue head queue tail AAAAAA AAAAAA AAAAA AAAAAA AAAAA AAAAA AAAAA AAAAAA AAAAA AAAAAA AAAAA AAAAAA AAAAAAAAAAA AAAAAAAAAAA AAAAA AAAAAA AA AAAAAAAA A A AAAAAA A A AAAAAA AAAAAA A A A A AAAAAAAAAAAA AAAAAA AAAAAA AAAAAA AAAAA AAAAA AAAAAA AAAAA AAAAAA AAAAA AAAAA AAAAA AAAAAA AAAAAA AAAAA AAAAA AAAAAA AAAAA AAAAAA AA AA AAAAAAAAAAA AAAAAA A A AAAAA AAAAA AAAAAA A A AAAAAA A A AAAAAA A A AAAAAA AAAAAA AAAAA AA AAAAAA AAAAA AAAAA AA AAAAAA AAAAA AA AAAAAA AAAAAA A A AA AAAAAA A A AA n
Protocol Software Toolkit Programmer Guide queue head queue tail next element next element next element prev element prev element prev element next buffer next buffer 0 data data data 0 0 0 0 0 next buffer data data AAAAAAAAAAAAAAAAA AAAA AAAAA AAAAAA AAAA AAAAAA AAAA AAAAA AAAAAA AAAA AAAAAA AAAAAA AAAAA AAAAAA AAAA AAAAAA A A A A AAAAAA A A AAAAA A A AAAAAA A A AAAAAA AAAAAA A A A A A A AAAAA AAAA AAAAA AAAAAA AAAAAA AAAA AAAAAA AAAAA AAAAAA AAAA AAAAA AAAAAA AAAA A A A A AAAAA AAAA
7: Host/ICP Interface 7.2.1 System Buffer Header As mentioned previously, every buffer of every queue element must begin with a system buffer header.
Protocol Software Toolkit Programmer Guide Next Buffer This field contains the address of the next buffer of the queue element. In general, this field must be zero in the last buffer. In the data buffer of a host request queue element, XIO uses this field for a special purpose, as described in Section 7.2.4.1 on page 131. Partition ID This field contains the partition ID if the buffer was obtained from a partition.
7: Host/ICP Interface ment (the disposition flag is then ignored in all other buffers of the queue element). POST_BUF, FREE_BUF, TOKEN_BUF, and REL_BUF are valid in all buffers and apply only to an individual buffer.
Protocol Software Toolkit Programmer Guide are used by your ICP-resident software to send information in the form of data and command acknowledgments to the host processor. Each node declaration queue element must contain a unique ICP node number and unique queue IDs which will be used for the read and write queues for that node. After this operation is complete, the utility task can begin posting host request queue elements, described in Section 7.2.4, to these queues.
7: Host/ICP Interface struct NODEC_TYPE { struct SBH_TYPE sbh; unsigned short rqid; unsigned short wqid; unsigned char node; unsigned char status; }; /* system buffer header */ /* host read request queue ID */ /* host write request queue ID */ /* ICP node number */ /* completion status */ AA AA Legend sb_nxte Fields that require initialization AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAA AAAAAAA AAAA sb_pree sb_thse System Buffer Header sb_nxtb = 0 sb_pid sb_dlen sb_disp s
Protocol Software Toolkit Programmer Guide 7.2.3.1 System Buffer Header Initialization In the system buffer header, the sb_thse field must be set to the starting address of the buffer. (This field is set by the system if the buffer was obtained from a partition.) The sb_nxtb field must be set to zero.
7: Host/ICP Interface token associated with the resource. If this is the case, the task can make a resource request and obtain the token when it is released by XIO on completion. 7.2.3.
Protocol Software Toolkit Programmer Guide Header Buffer AAA AAA Legend sb_nxte Fields that require initialization (in all or some cases) sb_pree System Buffer Header AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA sb_thse Data Buffer sb_nxtb sb_nxte sb_pid sb_pree sb_dlen sb_disp sb_dmod funct subfunc snode inode line Server Request Header circuit dlen status s_node i_node s_dlen AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA AAAAAAA sb_thse
7: Host/ICP Interface The header buffer has the following structure: struct SREQ_HDR_TYPE { struct SBH_TYPE sbh; struct sreq_type req; }; The two structures that make it up are as follows: struct SBH_TYPE { struct SBH_TYPE struct SBH_TYPE struct SBH_TYPE struct SBH_TYPE unsigned short unsigned short unsigned short unsigned short }; struct sreq_type { unsigned char unsigned char unsigned char unsigned char unsigned short unsigned short unsigned short unsigned short unsigned char *sb_nxte; *sb_pree; *sb_th
Protocol Software Toolkit Programmer Guide The data buffer has the following structure: struct data_buffer { struct SBH_TYPE sbh; /* (defined in oscif.
7: Host/ICP Interface struct prot_hdr /* Protocol message header */ { bit16 command; /* function code */ bit16 modifier; /* function modifier */ bit16 link; /* physical port number */ bit16 circuit; /* data link circuit identifier */ bit16 session; /* session identifier */ bit16 sequence; /* message sequence number */ bit16 reserved1; /* reserved */ bit16 reserved2; /* reserved */ }; typedef struct prot_hdr PROT_HDR; struct xmt_hdr { bit32 flags; /* local transmit/receive flags */ bit8 filler; bit8 syncs[8
Protocol Software Toolkit Programmer Guide In the header buffer, the disposition flag must be set to one of the values defined for the field in Section 7.2.1 on page 121. If it is set to POST_QE, FREE_QE, or TOKEN_QE, the disposition flag in the data buffer is ignored. If the disposition flag in the header buffer is set to POST_BUF, FREE_BUF, TOKEN_BUF, or REL_BUF, the disposition flag in the data buffer must also be set to one of those four values, although not necessarily the same one.
7: Host/ICP Interface disposition flag in the header buffer to FREE_BUF and the disposition flag in the data buffer to REL_BUF. Then, when the request is complete, the header buffer is marked free by XIO, indicating to the task that it is available for re-use. The data buffer is released to its partition by XIO, and requires no further processing. If the disposition flag in either buffer is set to POST_QE or POST_BUF, the corresponding disposition modifier must contain a valid queue ID.
Protocol Software Toolkit Programmer Guide Protogate implementations, provisions exist for read request queues for these nodes; however, they are not used in the Freeway implementation. In addition, for any node, a host request queue element posted to either the read or write queue must contain a matching ICP node number in the inode field of the host request header. The snode field should be set as defined for the particular application. (This field is passed to the host, but is not interpreted by XIO.
7: Host/ICP Interface 0 = Good completion 1 = The queue to which the host request queue element was posted is defined for a node number other than the one specified in the inode field of the host request header 3 = The host request queue element was posted to a host read request queue but contains a write function code, or was posted to a host write request queue but contains a read function code in the snode field.
Protocol Software Toolkit Programmer Guide The s_initxio function is called once to initialize the internal data structures and devices that allow XIO to communicate with the host’s ICP driver. After initialization, the user application can call s_nodec to declare a node. After nodes are declared, the user application issues read and write request using s_xio. 7.4.1 Initialize Executive Input/Output (s_initxio) The Initialize XIO function sets up interrupt vectors and internal data structures.
7: Host/ICP Interface Input: A0.L = address of NODEC_TYPE structure Output: none Access: task or ISR 7.4.3 XIO Read/Write (s_xio) Issue a read or write request. Depending on the value of the funct field of the host request header (Figure 7–4 on page 128), the s_xio function issues a read or write request. C Interface: s_xio ( p_hdr ) SREQ_HDR_TYPE *p_hdr; p_hdr : pointer to host request header Assembly Interface: TRAP #4 Input: A0.
Protocol Software Toolkit Programmer Guide OS/Impact initializes the second unused entry in the GST to zero. If OS/Impact encounters a fatal error during its operation, it stores a panic code at this location and executes an illegal instruction, which causes a trap to the debugger. The panic codes, described below, are each composed of an identifier in the high-order word and a modifier in the low-order word.
7: Host/ICP Interface Identifier 0x700 Modifier Disposition flag value Description A buffer contains an illegal disposition flag value. Identifier 0x800 Modifier Error code returned from s_accpt Description An accept message system call on the pending request queue returned an invalid queue ID or queue empty error. (The queue should not be empty, because s_accpt is not called unless the queue head pointer is non-zero.
Protocol Software Toolkit Programmer Guide 140 DC 900-1338I
Chapter 8 Client Applications — DLI Overview Note In this document, the term “Freeway” can mean either a Freeway server or an embedded ICP. For the embedded ICP, also refer to the user guide for your ICP and operating system (for example, the ICP2432 User Guide for Windows NT).
Protocol Software Toolkit Programmer Guide • The Freeway Data Link Interface Reference Guide shows a generic code example which can guide your application program development. The loopback test program (spsalp.c) distributed with the product software is another example. • Chapter 9 provides detailed command and response header formats. • The various mnemonic codes mentioned throughout this document are defined in the include files provided with this product, which are described in Table 8–1.
8: Client Applications — DLI Overview • transport subsystem interface (TSI) connection configuration • protocol-specific ICP link configuration The Freeway server boot configuration file is normally created during the installation procedures described in the Freeway User Guide. DLI session and TSI connection configurations are defined by specifying parameters in DLI and TSI ASCII configuration files and then running two preprocessor programs, dlicfg and tsicfg, to create binary configuration files.
Protocol Software Toolkit Programmer Guide Figure 8–1 shows a portion of a typical DLI configuration file, such as spsaldcfg. The BoardNo parameter specifies the target ICP. If BoardNo is not specified, the default is zero. The PortNo parameter may or may not be provided. The PortNo parameter is required if the application requests a DLI session status and expects to see the correct value for iPortNo.
8: Client Applications — DLI Overview //-----------------------------------------------------------------// // "main" section. If not defined defaults are used. If present // // the main section must be the very first section of the DLI // // configuration file. // //-----------------------------------------------------------------// main { AsyncIO = "yes"; // Non-blocking I/O // TSICfgName = "spsaltcfg.
Protocol Software Toolkit Programmer Guide main { asyncIO = “yes”; tsiCfgName = ".
8: Client Applications — DLI Overview 8.1.1.2 DLI and TSI Configuration Process This section summarizes the process for configuring DLI sessions and TSI connections. DLI and TSI text configuration files are used as input to the dlicfg and tsicfg preprocessor programs to produce binary configuration files which are used by the dlInit and dlOpen functions. For embedded ICPs, only a DLI configuration file is used (not a TSI configuration file).
Protocol Software Toolkit Programmer Guide 3. If you have a UNIX or Windows NT system, skip this step. If you have a VMS system, run the makefc.com command file from the [FREEWAY.CLIENT.TEST.SPS] directory to create the foreign commands used for dlicfg and tsicfg. @MAKEFC where is your TCP/IP package: MULTINET (for a Multinet system) TCPWARE (for TCPware system) UCX (for a UCX system) VMS example: @MAKEFC UCX 4.
8: Client Applications — DLI Overview VMS example: dlicfg spsaldcfg NT example: freeway\client\op-sys\bin\dlicfg spsaldcfg Note You must rerun dlicfg or tsicfg whenever you modify the text configuration file so that the DLI or TSI functions can apply the changes. On all but VMS systems, if a binary file already exists with the same name in the directory, the existing file is renamed by appending the .BAK extension.
Protocol Software Toolkit Programmer Guide 8. If you have a Windows NT system, move the binary configuration files that you created in Step 4 and Step 5 into the appropriate freeway\client\op-sys\bin directory Techpubs — keep the opsys up-todate with DC900-1333 where op-sys indicates the operating system: axp_nt or int_nt (for a Freeway server); axp_nt_emb or int_nt_emb (for an embedded ICP). NT example: copy spsaldcfg.bin \freeway\client\axp_nt\bin copy spsaltcfg.
8: Client Applications — DLI Overview 8.1.2 Blocking versus Non-blocking I/O Note Earlier Simpact releases used the term “synchronous” for blocking I/O and “asynchronous” for non-blocking I/O. Some parameter names reflect the previous terminology. Non-blocking I/O applications are useful when doing I/O to multiple channels with a single process where it is not possible to “block” (sleep) on any one channel waiting for I/O completion.
Protocol Software Toolkit Programmer Guide 8.1.3 Buffer Management Currently the interrelated Freeway, DLI, TSI, and ICP buffers default to a size of 1024 bytes. Caution If you need to change a buffer size for your application, refer to the Freeway Data Link Interface Reference Guide for explanations of the complexities that you must consider.
8: Client Applications — DLI Overview 8.2 Example Call Sequences Table 8–3 shows the sequence of DLI function calls to send and receive data using blocking I/O. Table 8–4 is the non-blocking I/O example. The remainder of this chapter and the Freeway Data Link Interface Reference Guide give further information about each function call. Refer back to Section 8.1.2 on page 151 for more information on blocking and non-blocking I/O.
Protocol Software Toolkit Programmer Guide Table 8–4: DLI Call Sequence for Non-blocking I/O 1. Call dlInit to initialize the DLI operating environment. The first parameter is your DLI binary configuration file name. 2. Call dlOpen for each required session (link) to get a session ID. 3. Call dlPoll to confirm the success of each session ID obtained in Step 2. 4. Call dlBufAlloc for all required input and output buffers. 5. Call dlRead to queue the initial read request. 6.
8: Client Applications — DLI Overview 8.3 Overview of DLI Functions After the protocol software is downloaded to the ICP, the client and ICP can communicate by exchanging messages. These messages configure and activate each ICP link and transfer data. The client application issues reads and writes to transfer messages to and from the ICP. This section summarizes the DLI functions used in writing a client application.
Protocol Software Toolkit Programmer Guide Table 8–5: DLI Functions: Syntax and Parameters (Listed in Typical Call Order) DLI Function int dlInit int dlOpena int dlPoll int dlpErrString char *dlBufAlloc int dlRead Parameter(s) (char *cfgFile, char *pUsrCb, int (*fUsrIOCH)(char *pUsrCb)); (char *cSessionName, int (*fUsrIOCH) (char *pUsrCB, int iSessionID)); (int iSessionID, int iPollType, char **ppBuf, int *piBufLen, char *pStat, DLI_OPT_ARGS **ppOptArgs); (int dlErrNo); Parameter Usage DLI binary conf
Chapter 9 Client Applications — Commands and Responses This chapter presents the data structures required for the client application to exchange messages with the ICP, followed by the details of the individual commands and responses. 9.1 Client and ICP Interface Data Structures The data link interface (DLI) provides a session-level interface between a client application and the sample protocol software resident on an ICP.
Protocol Software Toolkit Programmer Guide typedef struct { unsigned short usFWPacketType; /* Client’s packet type */ unsigned short usFWCommand; /* Client’s cmd sent or rcvd */ unsigned short usFWStatus; /* Client’s status of I/O ops */ unsigned short usICPClientID; /* old su_id */ unsigned short usICPServerID; /* old sp_id */ unsigned short usICPCommand; /* ICP’s command.
9: Client Applications — Commands and Responses struct api_msg { ICP_HDR icp_hdr; PROT_HDR prot_hdr; bit8 *data; }; Figure 9–2: “C” Definition of api_msg Data Structure typedef struct { bit16 su_id; bit16 sp_id; bit16 count; bit16 command; bit16 status; bit16 params[3]; } ICP_HDR; /* ICP message header */ /* service user (client) ID */ /* service provider (server) ID */ /* size of data following this header */ /* function code */ /* function status */ /* ICP-specific parameters */ typedef struct { bit1
Protocol Software Toolkit Programmer Guide Table 9–1: Comparison of DLI_OPT_ARGS and ICP_HDR/PROT_HDR Fields DLI_OPT_ARGS in DLI Client Program ICP_HDR and PROT_HDR in ICP SPS Program DLI_OPT_ARGS.usFWPacketType unused client’s packet type DLI_OPT_ARGS.usFWCommand unused client’s command sent or received DLI_OPT_ARGS.usFWStatus unused client’s status of I/O operations DLI_OPT_ARGS.usICPClientID icp.su_id old su_id DLI_OPT_ARGS.usICPServerID icp.sp_id old sp_id count filled in by DLI icp.
9: Client Applications — Commands and Responses 9.2 Client and ICP Communication The following sections discuss the DLI functions and DLI_OPT_ARGS data structure as used by client applications in communicating with ICP software. In addition, this communication is discussed from the ICP perspective with details regarding the content of the ICP_HDR and PROT_HDR data structures.
Protocol Software Toolkit Programmer Guide 9.2.1 Sequence of Client Events to Communicate to the ICP To exchange data with a wide-area network, a client must follow these steps: 1. Initiate a session with the Freeway server or the embedded product’s driver (dlOpen, Section 9.2.2 on page 163) 2. Initiate a session with the ICP link (Attach command, Section 9.2.3 on page 164) 3. Configure the link (Section 9.2.7.1 on page 175) 4. Activate the link (Bind command, Section 9.2.5 on page 169) 5.
9: Client Applications — Commands and Responses 9.2.2 Initiating a Session with the ICP (dlOpen) A session identifier is used by DLI to manage information exchanged between the client application and the ICP. The session identifier is requested by the client, then defined and returned by the DLI. This is accomplished when the application calls dlOpen. The ICP software is not involved in these two steps.
Protocol Software Toolkit Programmer Guide 9.2.3 Initiating a Session with an ICP Link (Attach) When the DLI configuration file parameter protocol is set to raw (protocol="raw"), a call to the dlOpen function establishes a data path to the ICP for a given link. This path is referenced by the return value of dlOpen and is called the session identifier. A call to dlPoll can be used to verify the success of the dlOpen function. If the status of the new session is DLI_STATUS_READY, the open was successful.
9: Client Applications — Commands and Responses From the ICP’s perspective, the attach command establishes a session between the client application and one of the ICP links. A successful attach command gives the ICP and the client application IDs that are unique to the current session with which they can relay information. The protocol session identifier is used by the ICP to manage information exchanged between the client application and a specific link.
Protocol Software Toolkit Programmer Guide protocol header. Any subsequent transactions involving this session number will be transmitted from the ICP via the corresponding node number. There is a correspondence between node numbers and session numbers. (Chapter 7 provides more information on node numbers and the host/ICP interface). All the commands in Section 9.2.1 on page 162, from the attach command on, must have this session number in the session field of the protocol header.
9: Client Applications — Commands and Responses 9.2.4 Terminating a Session with an ICP Link (Detach) When the DLI configuration file parameter protocol is set to raw (protocol="raw"), a call to the dlClose function terminates a data path to the ICP for a given link. However, before the session is terminated, it is important to allow the ICP to release the space allocated by it for session management.
Protocol Software Toolkit Programmer Guide ICP_HDR count = size of protocol header (16 bytes) command = DLI_ICP_CMD_DETACH status = high bits indicate byte ordering PROT_HDR session = session ID The ICP receives a message consisting of an ICP header with DLI_ICP_CMD_DETACH in the command field and a protocol header with the session number in the session field. The ICP responds to this command by making that session’s ID available for future sessions.
9: Client Applications — Commands and Responses 9.2.5 Activating an ICP Link (Bind) After dlOpen has been called and an attach message written to the ICP, the link can be configured (Section 9.2.7.1 on page 175). After the link is configured, it is necessary to request the ICP to start the link’s receiver and transmitter. Starting (enabling) the link is accomplished by sending a bind message to the ICP.
Protocol Software Toolkit Programmer Guide ICP_HDR count = size of protocol header (16 bytes) command = DLI_ICP_CMD_BIND status = high bits indicate byte ordering PROT_HDR session = session ID The constant value DLI_ICP_CMD_BIND is in the command field of the ICP header and a session number is in the session field of the protocol header. The ICP starts that link’s receiver, sets the link control table link active flag, and returns an acknowledgment to the client.
9: Client Applications — Commands and Responses 9.2.5.1 X21bis Line Status Reports (Optional) X21bis line status reports are an optional ICP notification of changes in the connection status of the physical circuits on the link. To enable X21bis line status reports, use the DLI_ICP_CMD_BIND command message specifying DLI_PROT_SEND_BIND (instead of 0) in the usProtXparms[0] field of the DLI_OPT_ARGS.
Protocol Software Toolkit Programmer Guide 9.2.6 Deactivating an ICP Link (Unbind) Stopping (disabling) the link is accomplished by sending an unbind message to the ICP. This is accomplished by issuing a call to dlWrite with the optional argument structure set as shown in Figure 9–10. DLI_OPT_ARGS.usFWPacketType FW_DATA DLI_OPT_ARGS.usFWCommand FW_ICP_WRITE DLI_OPT_ARGS.usFWStatus n/a DLI_OPT_ARGS.usICPClientID n/a DLI_OPT_ARGS.usICPServerID n/a DLI_OPT_ARGS.usICPCommand DLI_ICP_CMD_UNBIND DLI_OPT_ARGS.
9: Client Applications — Commands and Responses ICP_HDR count = size of protocol header (16 bytes) command = DLI_ICP_CMD_UNBIND status = high bits indicate byte ordering PROT_HDR session = session ID The constant DLI_ICP_CMD_UNBIND is in the command field of the ICP header and a session number is in the session field of the protocol header. The ICP stops devices for that link, clears the link control table link active flag, and returns an acknowledgment to the client.
Protocol Software Toolkit Programmer Guide 9.2.7 Writing to an ICP Link After the application has issued a bind command to the ICP, it can send messages to the ICP for transmission to the wide-area network. When the ICP receives a message from the client for transmission, it prepares it as required and sends it on the specified link. When the last character is transmitted, the ICP sends a message to the application.
9: Client Applications — Commands and Responses 9.2.7.1 Configuring the ICP Link After the client has issued an attach command to the ICP, but before it issues a bind command, it can send ICP link configuration values to the ICP. If no configuration message is received by the ICP, the default link configuration is used. When the ICP receives a configuration message, it validates it and updates the current link configuration.
Protocol Software Toolkit Programmer Guide The data area in the write is an instance of the CONF_TYPE structure.
9: Client Applications — Commands and Responses unsigned char parity; /* (async only) 0 = none, 1 = odd, 2 = even */ unsigned char char_len; /* (async only) 7 = 7 bits, 8 = 8 bits */ unsigned char stop_bits; /* (async only) 1 = 1 stop bit, 2 = 2 stop bits */ unsigned char crc; /* (async and bsc only) 0 = no CRC, 1 = CRC */ unsigned char syncs; /* (bsc only) number of leading sync characters 1 to 8 */ unsigned char start_char; /* (async and bsc only) block start character */ unsigned char stop_char; /* (asy
Protocol Software Toolkit Programmer Guide ICP_HDR count = size of protocol header (16 bytes) plus data area command = DLI_ICP_CMD_WRITE status = high bits indicate byte ordering PROT_HDR command = DLI_PROT_CFG_LINK session = session ID DATA AREA = configuration data structure The ICP returns these headers to the client as an acknowledgment that the link configuration was completed.
9: Client Applications — Commands and Responses 9.2.7.2 Requesting Link Statistics From the ICP The get statistics command requests a configuration report for a particular link. The ICP maintains a set of statistics for each link that keeps track of events occurring on each ICP physical port. To request the statistics on an ICP link, the client sends a message with the optional arguments structure shown in Figure 9–15. There is no data area for a link statistics request. DLI_OPT_ARGS.
Protocol Software Toolkit Programmer Guide PROT_HDR command = DLI_PROT_GET_STATISTICS_REPORT session = session ID At the ICP, the fields of the ICP and protocol headers that the ICP sends to the client application contain the following values: ICP_HDR count = size of protocol header (16 bytes) plus size of data command = DLI_ICP_CMD_READ status = 0 (success) or an error code PROT_HDR command = DLI_PROT_GET_STATISTICS_REPORT modifier = 0 (success) or an error code session = session ID DATA AREA = statistic
9: Client Applications — Commands and Responses DLI_OPT_ARGS.usFWPacketType n/a DLI_OPT_ARGS.usFWCommand n/a DLI_OPT_ARGS.usFWStatus n/a DLI_OPT_ARGS.usICPClientID n/a DLI_OPT_ARGS.usICPServerID n/a DLI_OPT_ARGS.usICPCommand DLI_ICP_CMD_READ DLI_OPT_ARGS.iICPStatus DLI_ICP_ERR_NO_ERR DLI_OPT_ARGS.usICPParms [0] n/a DLI_OPT_ARGS.usICPParms [1] n/a DLI_OPT_ARGS.usICPParms [2] n/a DLI_OPT_ARGS.usProtCommand DLI_PROT_GET_STATISTICS_REPORT DLI_OPT_ARGS.iProtModifier n/a DLI_OPT_ARGS.
Protocol Software Toolkit Programmer Guide 9.2.7.3 Writing Data to an ICP Link The write command provides data to the ICP for transmission on the specified link. The client establishes a DLI_OPT_ARGS structure requesting the write, then sends the structure along with a buffer containing the data to the ICP by calling the DLI dlWrite function. To transmit data on an ICP link, the client sends a message with the optional arguments structure shown in Figure 9–18.
9: Client Applications — Commands and Responses At the ICP, the fields of the ICP and protocol headers that the ICP receives contain the following values: ICP_HDR count = size of protocol header (16 bytes) plus size of data command = DLI_ICP_CMD_WRITE status = high bits indicate byte ordering PROT_HDR command = DLI_PROT_SEND_NORM_DATA session = session ID DATA AREA = data to be transmitted The ICP protocol task prepares the data for transmission.
Protocol Software Toolkit Programmer Guide DLI_OPT_ARGS.usFWPacketType n/a DLI_OPT_ARGS.usFWCommand n/a DLI_OPT_ARGS.usFWStatus n/a DLI_OPT_ARGS.usICPClientID n/a DLI_OPT_ARGS.usICPServerID n/a DLI_OPT_ARGS.usICPCommand DLI_ICP_CMD_READ DLI_OPT_ARGS.iICPStatus 0 if successful, else an error code DLI_OPT_ARGS.usICPParms [0] n/a DLI_OPT_ARGS.usICPParms [1] n/a DLI_OPT_ARGS.usICPParms [2] n/a DLI_OPT_ARGS.usProtCommand DLI_PROT_RESP_LOCAL_ACK DLI_OPT_ARGS.
9: Client Applications — Commands and Responses 9.2.8 Reading from the ICP Link The ICP sends the following types of messages to the client: • Command acknowledgments (discussed in earlier sections) • Responses to information requests (such as link statistics, Section 9.2.7.2 on page 179) • Data read from the wide area network (discussed below) The client calls the DLI dlRead function to access these messages.
Protocol Software Toolkit Programmer Guide from the link in the area that follows the protocol header. The data area contains the data read. The stop character and CRC characters are not provided. DLI_OPT_ARGS.usFWPacketType n/a DLI_OPT_ARGS.usFWCommand n/a DLI_OPT_ARGS.usFWStatus n/a DLI_OPT_ARGS.usICPClientID n/a DLI_OPT_ARGS.usICPServerID n/a DLI_OPT_ARGS.usICPCommand DLI_ICP_CMD_READ DLI_OPT_ARGS.iICPStatus n/a DLI_OPT_ARGS.usICPParms [0] n/a DLI_OPT_ARGS.usICPParms [1] n/a DLI_OPT_ARGS.
9: Client Applications — Commands and Responses 9.3 Additional Command Types Supported by the SPS In addition to the API function calls described in the preceding sections, the SPS supports a few commands that are used by layers that lie between the SPS and API layers. These commands are described in the following sections. 9.3.1 Internal Termination Message The dlTerm function call is used by a client application when it loses its connection to an ICP.
Protocol Software Toolkit Programmer Guide 9.3.2 Internal Test Message The test command is a diagnostic tool used by the client application. Data is written to the SPS in the data area following a protocol header. The utility task immediately returns this data to the client application.
Appendix A Application Notes This appendix clarifies some points made in the technical manuals and describes some peculiarities of the devices and the ICP6000 hardware. • When the Force Hardware Reset command (bits 6 and 7 of SCC write register 9) is issued to either channel of the SCC, both channels are reset. • When programming in a high-level language, be sure that your compiler’s optimizer handles the special requirements of device-level programming correctly.
Protocol Software Toolkit Programmer Guide The code required to correctly process SCC interrupts can be found in the sample protocol software file spsasm.asm.
Appendix B Data Rate Time Constants for SCC/IUSC Programming This appendix provides some commonly used baud rate time constants for SCC/IUSC programming on the ICP. Table B–1 shows SCC time constants for 1X mode for the ICP6000, normally used for all synchronous communication modes. To select 1X mode, set bits 7 and 6 in SCC write register 4 to 00 (binary). Table B–2 shows SCC time constants for 16X mode for the ICP6000, normally used for asynchronous mode.
Protocol Software Toolkit Programmer Guide Table B–1: SCC Time Constants for 1X Clock Rate for ICP6000 Baud Rate (kbits/sec) Time Constant (hexadecimal) MSB LSB 0.3 2F FE 0.6 17 FE 1.2 0B FE 2.4 05 FE 4.8 02 FE 9.6 01 7E 19.2 00 BE 38.4 00 5E 57.6 00 3E Table B–2: SCC Time Constants for 16X Clock Rate for ICP6000 Baud Rate (kbits/sec) 192 Time Constant (hexadecimal) MSB LSB 0.3 02 FE 0.6 01 7E 1.2 00 BE 2.4 00 5E 4.8 00 2E 9.6 00 16 19.2 00 0A 38.
B: Data Rate Time Constants for SCC/IUSC Programming Table B–3: IUSC Time Constants for 1X Clock Rate for ICP2424 and ICP2432 Baud Rate (kbits/sec) Time Constant (hexadecimal) 0.3 2FFF 0.6 17FF 1.2 0BFF 2.4 05FF 4.8 02FF 9.6 017F 19.2 00BF 38.4 005F 57.6 003F Table B–4: IUSC Time Constants for 16X Clock Rate for ICP2424 and ICP2432 Baud Rate (kbits/sec) DC 900-1338I Time Constant (hexadecimal) 0.3 02FF 0.6 017F 1.2 00BF 2.4 005F 4.8 002F 9.6 0017 19.2 000B 38.
Protocol Software Toolkit Programmer Guide 194 DC 900-1338I
Appendix C Error Codes There are several methods used by the DLI and ICP software to report errors, as described in the following sections: C.1 DLI Error Codes The error code can be returned directly by the DLI function call in the global variable dlerrno. Typical errors are those described in the Freeway Data Link Interface Reference Guide. C.2 ICP Global Error Codes Table C–1 lists the ICP-related errors that can be returned in the global variable iICPStatus.
Protocol Software Toolkit Programmer Guide Table C–1: ICP Error Status Codes used by the ICP Code 0 Mnemonic Meaning DLI_ICP_ERR_NO_ERR A data block has been successfully transmitted or received on the line or a command has been successfully executed. –101 DLI_ICP_ERR_BAD_NODE An invalid node number was passed to the ICP from the DLI. –102 DLI_ICP_ERR_BAD_LINK The link number from the client program is not a legal value.
Index Numerics 68020 programming environment 37 A Abort interrupt 111 Acknowledgment local ack 175, 183 Acknowledgment response 184 Activate ICP link 169 Addresses device ICP2424 52 ICP2432 53 ICP6000 55 register ICP2424 52 ICP2432 53 ICP6000 55 Addressing Internet 26 Allocation of control structures 77 api_msg data structure 159 Application interface 33 Application notes 189 Assembler 35 SDS 35 Assembly macro library 31 Assembly-language shell 41 asydev.
Protocol Software Toolkit Programmer Guide cf_lslice 77, 80 cf_ltick 77, 80 cf_nprior 77, 78 cf_ntask 78 cfgLink DLI parameter 153 chkhio subroutine 95 chkliq subroutine 95, 107 chkloq subroutine 95 Client and ICP communication 161 Client applications 141 Client interface data structures 157 Client operations 26 Client-server environment 25 establishing Internet address 26 Commands attach 164 bind 169 configure link 175 detach 167 foreign 148 ping 188 receive data 185 request statistics 179 send data 182 te
Index statistics report 181 task initialization 73 Data structures, size 75 DCD loss of 111 Deactivate ICP link 172 Debug monitor 31 Debugger Peeker 81 PTBUG 84 SingleStep 28, 35, 84 Detach command 167 Detach response 168 Development tools 35 Device base addresses ICP2424 52 ICP2432 53 ICP6000 55 Device programming ICP2424 42 ICP2432 42 ICP6000 45 Diagnostics 137 Direct memory access 25 Direct memory access controller 49 Dispostion flag field 122 Dispostion modifier field 123 dlBufAlloc (see also Functions
Protocol Software Toolkit Programmer Guide Ethernet 24 Example call sequence 153 DLI configuration file 146 Exception vector table 39 Exception vector table memory 75 Executable programs 31 F Features product 24 File transfer program 58 Files asydev.c 107 binary configuration 148 bscdev.c 107 configuration file names 147 dlicperr.h 142, 195 dliicp.h 142 dliprot.h 142 example DLI configuration 146 executable 31 freeway.h 142 icp2424c.mem 63 icp2432c.mem 63 icp6000c.mem 63 makefc.com 148 move.com 149 oscif.
Index FREE_QE 122 POST_BUF 122 POST_QE 122 REL_BUF 122 TOKEN_BUF 122 TOKEN_QE 122 disposition modifier 123 next buffer 122 next element 121 partition ID 122 previous element 121 this element 121 Header files 31 Header, system buffer 118, 121 History of revisions 18 Host/ICP interface 115 I ICP activate link 169 buffer size, set at download 64 configuration 57 deactivate link 172 download 57 initialization 57 initiate session 164 reading 185 reading normal data 185 terminate session 167 writing data 182 wri
Protocol Software Toolkit Programmer Guide SCC transmit buffer empty 110 special receive condition 113 transmit buffer empty 112 transmit underrun 111 I/O blocking vs non-blocking 151 I/O utility 31 ISA memory address registers base address ICP2424 52 ISP, see Interrupt stack pointer ISR, see Interrupt service routine ISR/SPS interface for receive 107 ISR/SPS interface for transmit 107 IUSC 44 data rate time constants 191 end of buffer interrupt 110, 113 RDMA complete interrupt 110 receive character availab
Index structure 155, 157 Organization of memory 51 oscif.h include file 36 osdefs.
Protocol Software Toolkit Programmer Guide Reports statistics 181 statistics data structure 181 Request completion 117 Responses attach 166 bind 170 configure link 178 detach 168 receive data 186 send data acknowledgment 184 statistics report 181 unbind 173 Revision history 18 rlogin 24 S Sample configuration table 72, 73 Sample I/O utility 31 Sample protocol software 31 block diagram embedded ICP 94 Freeway server 93 message format 98 modules 89 Sample task initialization routine 74 sb_disp 126 sb_dmod 126
Index sysequ.
Protocol Software Toolkit Programmer Guide Vector table 39 Vectors reserved for system software 40 VME slave address registers base address ICP6000 56 VMEbus slave interface 46 VMS configuration process 148 VxWorks 22 W WAN interface processor 22 Windows NT configuration process 148 Write request processing 101, 102 Writing data to ICP 182 Writing link configuration to the ICP 175 Writing request for link statistics from ICP 179 Writing to ICP link 174 X–Z X21bis line status reports 171 XIO interface system
Protocol Software Toolkit Programmer Guide DC 900-1338I 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 Protogate, Inc., P.O. Box 503313, San Diego, CA 92150-3313, or fax it to (877) 473-0190. If you are reporting errors in the documentation, please enter the section and page number.
Protogate, Inc. Customer Service P.O.