⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ncr710lib2.html

📁 vxworks相关论文
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/ncr710Lib2.html - generated by refgen from ncr710Lib2.c --> <title> ncr710Lib2 </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual :  Libraries</i></a></p></blockquote><h1>ncr710Lib2</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>ncr710Lib2</strong> - NCR 53C710 SCSI I/O Processor (SIOP) library (SCSI-2) </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./ncr710Lib2.html#ncr710CtrlCreateScsi2">ncr710CtrlCreateScsi2</a></i>(&nbsp;)</b>  -  create a control structure for the NCR 53C710 SIOP<br><b><i><a href="./ncr710Lib2.html#ncr710CtrlInitScsi2">ncr710CtrlInitScsi2</a></i>(&nbsp;)</b>  -  initialize a control structure for the NCR 53C710 SIOP<br><b><i><a href="./ncr710Lib2.html#ncr710SetHwRegisterScsi2">ncr710SetHwRegisterScsi2</a></i>(&nbsp;)</b>  -  set hardware-dependent registers for the NCR 53C710<br><b><i><a href="./ncr710Lib2.html#ncr710ShowScsi2">ncr710ShowScsi2</a></i>(&nbsp;)</b>  -  display the values of all readable NCR 53C710 SIOP registers<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This is the I/O driver for the NCR 53C710 SCSI I/O Processor (SIOP).It is designed to work with scsi2Lib.  This driver runs inconjunction with a script program for the NCR 53C710 chip.The script uses the NCR 53C710 DMA function for data transfers.This driver supports cache functions through cacheLib.<p></blockquote><h4>USER-CALLABLE ROUTINES</h4><blockquote><p>Most of the routines in this driver are accessible only through the I/Osystem.  Three routines, however, must be called directly.  <b><i><a href="./ncr710Lib2.html#ncr710CtrlCreateScsi2">ncr710CtrlCreateScsi2</a></i>(&nbsp;)</b> creates a controller structure and<b><i><a href="./ncr710Lib2.html#ncr710CtrlInitScsi2">ncr710CtrlInitScsi2</a></i>(&nbsp;)</b> initializes it.The NCR 53C710 hardware registers need to be configured according tothe hardware implementation.  If the default configuration is not correct,the routine <b><i><a href="./ncr710Lib2.html#ncr710SetHwRegisterScsi2">ncr710SetHwRegisterScsi2</a></i>(&nbsp;)</b> must be used to properly configurethe registers.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>ncr710.h</b>, <b>ncr710_2.h</b>, <b>ncr710Script.h</b>, <b>ncr710Script2.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ncr710Lib.html#top">ncr710Lib</a></b>2</b>, <b><a href="./scsiLib.html#top">scsiLib</a></b>, <b><a href="./scsi2Lib.html#top">scsi2Lib</a></b>, <b><a href="./cacheLib.html#top">cacheLib</a></b>,  <i>VxWorks Programmer's Guide: I/O System</i><hr><a name="ncr710CtrlCreateScsi2"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ncr710CtrlCreateScsi2</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ncr710CtrlCreateScsi2</i>(&nbsp;)</strong> - create a control structure for the NCR 53C710 SIOP</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>NCR_710_SCSI_CTRL *ncr710CtrlCreateScsi2    (    UINT8 * baseAdrs, /* base address of the SIOP */    UINT    clkPeriod /* clock controller period (nsec* 100) */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine creates an SIOP data structure and must be called beforeusing an SIOP chip. It must be called exactly once for a specified SIOP controller.Since it allocates memory for a structure needed by all routines in <b><a href="./ncr710Lib.html#top">ncr710Lib</a></b>, it must be called before any other routines in the library.After calling this routine, <b><i><a href="./ncr710Lib2.html#ncr710CtrlInitScsi2">ncr710CtrlInitScsi2</a></i>(&nbsp;)</b> must be called at leastonce before any SCSI transactions are initiated using the SIOP.<p>A detailed description of the input parameters follows:<dl><dt><i>baseAdrs</i><dd>the address at which the CPU accesses the lowest (SCNTL0/SIEN)register of the SIOP.<p><dt><i>clkPeriod</i><dd> the period of the SIOP SCSI clock input, in nanoseconds, multipliedby 100.  This is used to determine the clock period for theSCSI core of the chip and affects the timing of both asynchronousand synchronous transfers.Several commonly used values are defined in <b>ncr710.h</b> as follows:<pre>      NCR710_1667MHZ  6000    /* 16.67Mhz chip */      NCR710_20MHZ    5000    /* 20Mhz chip    */      NCR710_25MHZ    4000    /* 25Mhz chip    */      NCR710_3750MHZ  2667    /* 37.50Mhz chip */      NCR710_40MHZ    2500    /* 40Mhz chip    */      NCR710_50MHZ    2000    /* 50Mhz chip    */      NCR710_66MHZ    1515    /* 66Mhz chip    */      NCR710_6666MHZ  1500    /* 66.66Mhz chip */</pre></dl></blockquote><h4>RETURNS</h4><blockquote><p><p>&nbsp;A&nbsp;pointer&nbsp;to&nbsp;the&nbsp;<b>NCR_710_SCSI_CTRL</b>&nbsp;structure,&nbsp;or&nbsp;NULL&nbsp;if&nbsp;memory&nbsp;is unavailable or there are invalid parameters.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ncr710Lib.html#top">ncr710Lib</a></b>2</b><hr><a name="ncr710CtrlInitScsi2"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ncr710CtrlInitScsi2</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ncr710CtrlInitScsi2</i>(&nbsp;)</strong> - initialize a control structure for the NCR 53C710 SIOP</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ncr710CtrlInitScsi2    (    NCR_710_SCSI_CTRL * pSiop,         /* ptr to SIOP struct */    int                 scsiCtrlBusId, /* SCSI bus ID of this SIOP */    int                 scsiPriority   /* task priority when doing SCSI I/O */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes an SIOP structure after the structure is createdwith <b><i><a href="./ncr710Lib2.html#ncr710CtrlCreateScsi2">ncr710CtrlCreateScsi2</a></i>(&nbsp;)</b>.  This structure must be initialized before theSIOP can be used.  It may be called more than once if needed;  however,it must only be called while there is no activity on the SCSI interface.<p>A detailed description of the input parameters follows:<dl><dt><i>pSiop</i><dd>a pointer to the <b>NCR_710_SCSI_CTRL</b> structure created with<b><i><a href="./ncr710Lib2.html#ncr710CtrlCreateScsi2">ncr710CtrlCreateScsi2</a></i>(&nbsp;)</b>.<p><dt><i>scsiCtrlBusId</i><dd>the SCSI bus ID of the SIOP.  Its value is somewhat arbitrary:  seven (7),or highest priority, is conventional.  The value must be in the range 0 - 7.<p><dt><i>scsiPriority</i><dd> this parameter is ignored.  All SCSI I/O is now done in the context ofthe SCSI manager task; if necessary, the priority of the manager task may bechanged using <b><i><a href="./taskLib.html#taskPrioritySet">taskPrioritySet</a></i>(&nbsp;)</b> or by setting the value of the globalvariable <b>ncr710ScsiTaskPriority</b> before calling <b><i><a href="./ncr710Lib2.html#ncr710CtrlCreateScsi2">ncr710CtrlCreateScsi2</a></i>(&nbsp;)</b>. </dl><p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the parameters are out of range.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ncr710Lib.html#top">ncr710Lib</a></b>2</b>, <b><i><a href="./ncr710Lib2.html#ncr710CtrlCreateScsi2">ncr710CtrlCreateScsi2</a></i>(&nbsp;)</b><hr><a name="ncr710SetHwRegisterScsi2"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ncr710SetHwRegisterScsi2</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ncr710SetHwRegisterScsi2</i>(&nbsp;)</strong> - set hardware-dependent registers for the NCR 53C710</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ncr710SetHwRegisterScsi2    (    SIOP *           pSiop,  /* pointer to SIOP info */    NCR710_HW_REGS * pHwRegs /* pointer to a NCR710_HW_REGS info */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets up the registers used in the hardwareimplementation of the chip.  Typically, this routine is called by the <b><i><a href="./sysLib.html#sysScsiInit">sysScsiInit</a></i>(&nbsp;)</b> routine from the BSP.  <p>The input parameters are as follows:<dl><dt><i>pSiop</i><dd>a pointer to the <b>NCR_710_SCSI_CTRL</b> structure created with<b><i><a href="./ncr710Lib2.html#ncr710CtrlCreateScsi2">ncr710CtrlCreateScsi2</a></i>(&nbsp;)</b>.<p><dt><i>pHwRegs</i><dd> a pointer to a <b>NCR710_HW_REGS</b> structure that is filled with the logicalvalues 0 or 1 for each bit of each register described below.<p>This routine includes only the bit registers that can be used to modify the behavior of the chip. The default configuration used during <b><i>ncr710CtlrCreateScsi2</i>(&nbsp;)</b> and <b><i>ncr710CrtlInitScsi2</i>(&nbsp;)</b> is {0,0,0,0,1,0,0,0,0,0,0,0,0,1,0}.<p><pre>   typedef struct       {       int ctest4Bit7;   /* Host bus multiplex mode */       int ctest7Bit7;   /* Disable/enable burst cache capability */       int ctest7Bit6;   /* Snoop control bit1 */       int ctest7Bit5;   /* Snoop control bit0 */       int ctest7Bit1;   /* invert tt1 pin (sync bus host mode only)*/       int ctest7Bit0;   /* enable differential scsi bus capability*/       int ctest8Bit0;   /* Set snoop pins mode */       int dmodeBit7;    /* Burst Length transfer bit 1 */       int dmodeBit6;    /* Burst Length transfer bit 0 */       int dmodeBit5;    /* Function code bit FC2 */       int dmodeBit4;    /* Function code bit FC1 */       int dmodeBit3;    /* Program data bit (FC0) */       int dmodeBit1;    /* user  programmable transfer type */       int dcntlBit5;    /* Enable Ack pin */       int dcntlBit1;    /* Enable fast arbitration on host port */       } NCR710_HW_REGS;</pre>For a more detailed explanation of the register bits, refer to the<i>NCR 53C710 SCSI I/O Processor Programming Guide. </i><p></dl></blockquote><h4>NOTE</h4><blockquote><p><p>* Because this routine writes to the chip registers you cannot use itif there is any SCSI bus activity.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if any input parameter is NULL.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ncr710Lib.html#top">ncr710Lib</a></b>2</b>, <b><i><a href="./ncr710Lib2.html#ncr710CtrlCreateScsi2">ncr710CtrlCreateScsi2</a></i>(&nbsp;)</b>,  <i>NCR 53C710 SCSI I/O Processor Programming Guide </i><hr><a name="ncr710ShowScsi2"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ncr710ShowScsi2</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ncr710ShowScsi2</i>(&nbsp;)</strong> - display the values of all readable NCR 53C710 SIOP registers</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ncr710ShowScsi2    (    SCSI_CTRL * pScsiCtrl /* ptr to SCSI controller info */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays the state of the NCR 53C710 SIOP registers in a user-friendly way.  It is primarily used for debugging. The input parameter is the pointer to the SIOP informationstructure returned by the <b><i><a href="./ncr710Lib2.html#ncr710CtrlCreateScsi2">ncr710CtrlCreateScsi2</a></i>(&nbsp;)</b> call.<p></blockquote><h4>NOTE</h4><blockquote><p>The only readable register during a script execution is the Istat register. If you use this routine during the execution of a SCSI command, the result could be unpredictable.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><p><pre>-&gt; ncr710ShowNCR710 Registers ---------------- 0xfff47000: Sien    = 0xa5 Sdid    = 0x00 Scntl1  = 0x00 Scntl0  = 0x040xfff47004: Socl    = 0x00 Sodl    = 0x00 Sxfer   = 0x80 Scid    = 0x800xfff47008: Sbcl    = 0x00 Sbdl    = 0x00 Sidl    = 0x00 Sfbr    = 0x000xfff4700c: Sstat2  = 0x00 Sstat1  = 0x00 Sstat0  = 0x00 Dstat   = 0x800xfff47010: Dsa     = 0x000000000xfff47014: Ctest3  = ???? Ctest2  = 0x21 Ctest1  = 0xf0 Ctest0  = 0x000xfff47018: Ctest7  = 0x32 Ctest6  = ???? Ctest5  = 0x00 Ctest4  = 0x000xfff4701c: Temp    = 0x000000000xfff47020: Lcrc    = 0x00 Ctest8  = 0x00 Istat   = 0x00 Dfifo   = 0x000xfff47024: Dcmd/Ddc= 0x500000000xfff47028: Dnad    = 0x000661440xfff4702c: Dsp     = 0x000661440xfff47030: Dsps    = 0x000661740xfff47037: Scratch3= 0x00 Scratch2= 0x00 Scratch1= 0x00 Scratch0= 0x0a0xfff47038: Dcntl   = 0x21 Dwt     = 0x00 Dien    = 0x37 Dmode   = 0x010xfff4703c: Adder   = 0x000cc2b8value = 0 = 0x0</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if <i>pScsiCtrl</i> and <i>pSysScsiCtrl</i> are both NULL.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ncr710Lib.html#top">ncr710Lib</a></b>2</b>, <b><i><a href="./ncr710Lib2.html#ncr710CtrlCreateScsi2">ncr710CtrlCreateScsi2</a></i>(&nbsp;)</b></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -