KAV30 Programmer's Reference Information

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  1      KAV30 Overview

  1.1     KAV30 Hardware

  1.2     VAXELN Toolkit

  1.3     KAV30 Software
    1.3.1      Naming Conventions
    1.3.2      KAV30 System Services

  2      KAV30 Functionality

  2.1     VMEbus Master Functionality

  2.2     VMEbus Slave Functionality

  2.3     VSB Master Functionality

  2.4     VMEbus Arbiter Functionality

  2.5     VSB Arbiter Functionality

  2.6     VMEbus Deadlock

  2.7     VMEbus Utility Bus Signals

  2.8     DAL Bus Timeouts

  2.9     Parity Errors

  2.10    VMEbus Interrupt Handler Functionality
    2.10.1     Handling Vectored Interrupts
    2.10.2     Handling Autovectored Interrupts

  2.11    Handling Autovectored IRQ7 Interrupts as Vectored Interrupts

  2.12    VMEbus Interrupt Requester Functionality

  2.13    VSB Interrupt Handler Functionality

  2.14    KAV30 Interrupt Priority

  3      KAV30 Kernel

  3.1     Asynchronous System Trap Processing
    3.1.1      AST Delivery
    3.1.2      AST Data Structures

  3.2     Timers

  3.3     Calendar/clock

  3.4     FIFO Buffers

  3.5     Battery Backed-Up RAM

  3.6     Scatter-Gather Map
    3.6.1      Outgoing SGM
    3.6.2      Incoming SGM
    3.6.3      Byte Swapping During SGM Operations

  3.7     Communicating with Another KAV30

  3.8     KAV30 Error Logging Support

  4      KAV30 System Services

  KAV$BUS_BITCLR

  KAV$BUS_BITSET

  KAV$BUS_READ

  KAV$BUS_WRITE

  KAV$CHECK_BATTERY

  KAV$CLR_AST

  KAV$DEF_AST

  KAV$FIFO_READ

  KAV$FIFO_WRITE

  KAV$GATHER_KAV_ERRORLOG

  KAV$IN_MAP

  KAV$INT_VME

  KAV$LIFO_WRITE

  KAV$NOTIFY_FIFO

  KAV$OUT_MAP

  KAV$QUE_AST

  KAV$RTC

  KAV$RW_BBRAM

  KAV$SET_AST

  KAV$SET_CLOCK

  KAV$TIMERS

  KAV$UNMAP

  KAV$VME_SETUP

  5      Developing KAV30 Applications

  5.1     Design Guidelines
    5.1.1      Accessing the VMEbus and VSB Address Space
      5.1.1.1      Directly Accessing the VMEbus and VSB Address Space
      5.1.1.2      Using the KAV30 Services to Access the VMEbus and VSB Address Space
    5.1.2      Writing Asynchronous System Trap Routines

  5.2     Coding Guidelines
    5.2.1      VAX Ada
      5.2.1.1      Coding Asynchronous System Trap Routines in VAX Ada
    5.2.2      VAX C
    5.2.3      VAX FORTRAN
    5.2.4      VAXELN Pascal
      5.2.4.1      Coding AST Routines in VAXELN Pascal

  5.3     Compiling and Linking KAV30 Applications
    5.3.1      Accessing KAV30 Error Codes from a User Application

  5.4     Building KAV30 System Images
    5.4.1      Configuring the VMEbus and VSB

  5.5     Loading and Running KAV30 System Images

  5.6     Debugging KAV30 Applications

  5.7     Developing SCSI Class Drivers

  5.8     Building a SCSI Class Driver into an Application

  A   Initial KAV30 Configuration

  A.1     Hardware Configuration

  A.2     Software Settings

  B   Sample Programs-Interprocessor Communication

  B.1     FIFO Producer

  B.2     FIFO Consumer

  C   Sample Programs-MVME335 Device Driver

  C.1     Device Driver

  C.2     Interrupt Service Routine

  D   Sample Programs-VDAD Device Driver

  D.1     Device Driver

  D.2     Definitions File

  D.3     Test Program

  D.4     Build File

  D.5     Data File

  Glossary
    application program . . . DAL bus
    DMA . . . ISR
    LIFO . . . VSB

  FIGURES

  1-1        Host and Run-Time System Software

  2-1        Converting VMEbus Interrupt Vectors into VAX Interrupt Vectors

  2-2        Constructing an 8-bit VMEbus Interrupt Vector

  3-1        ASB Fields

  3-2        AST Queue

  3-3        Calendar/clock Address Map

  3-4        KAV30 as Producer and Consumer

  3-5        KAV30 as Neither Producer or Consumer

  3-6        Outgoing SGM Conversion to VMEbus or VSB A32 Addresses

  3-7        Outgoing SGM Conversion to VMEbus or VSB A24 Addresses

  3-8        Outgoing SGM Conversion to VMEbus or VSB A16 Addresses

  3-9        A32 Incoming VMEbus Address

  3-10       A24 Incoming VMEbus Address

  3-11       Incoming SGM Conversion of A32 VMEbus Addresses

  3-12       Incoming SGM Conversion of A24 VMEbus Addresses

  3-13       Little-Endian Storage Format

  3-14       Big-Endian Storage Format

  3-15       Mode 0 Byte Swapping

  3-16       Mode 2 Byte Swapping

  3-17       Mode 3 Byte Swapping

  3-18       Sample Master Error Log Entry

  3-19       Sample Slave Error Log Entry

  4-1        Programming the Real-Time Clock

  5-1        A Remote Debugging Configuration

  5-2        A Local Debugging Configuration

  5-3        Sample Add Device Description Menu

  TABLES

  1-1        KAV30 System Services

  2-1        Interrupt Source Codes

  2-2        System Control Block Layout

  2-3        SCB Vector Offsets for Autovectored ISRs

  2-4        VMEbus Address Lines A<3..1>

  2-5        KAV30 Interrupt Pins

  2-6        KAV30 Interrupt Priorities

  3-1        Internal Master Error Code

  3-2        Internal Slave Error Code

  5-1        Compiling and Linking Commands