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

📄 ncr710lib.html

📁 vxworks相关论文
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/ncr710Lib.html - generated by refgen from ncr710Lib.c --> <title> ncr710Lib </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>ncr710Lib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>ncr710Lib</strong> - NCR 53C710 SCSI I/O Processor (SIOP) library (SCSI-1) </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./ncr710Lib.html#ncr710CtrlCreate">ncr710CtrlCreate</a></i>(&nbsp;)</b>  -  create a control structure for an NCR 53C710 SIOP<br><b><i><a href="./ncr710Lib.html#ncr710CtrlInit">ncr710CtrlInit</a></i>(&nbsp;)</b>  -  initialize a control structure for an NCR 53C710 SIOP<br><b><i><a href="./ncr710Lib.html#ncr710SetHwRegister">ncr710SetHwRegister</a></i>(&nbsp;)</b>  -  set hardware-dependent registers for the NCR 53C710 SIOP<br><b><i><a href="./ncr710Lib.html#ncr710Show">ncr710Show</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 scsi1Lib.  It also runs inconjunction with a script program for the NCR 53C710 chip.This 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="./ncr710Lib.html#ncr710CtrlCreate">ncr710CtrlCreate</a></i>(&nbsp;)</b>to create a controller structure, and <b><i><a href="./ncr710Lib.html#ncr710CtrlInit">ncr710CtrlInit</a></i>(&nbsp;)</b> to initialize it.The NCR 53C710 hardware registers need to be configured according tothe hardware implementation.  If the default configuration is not proper,the routine <b><i><a href="./ncr710Lib.html#ncr710SetHwRegister">ncr710SetHwRegister</a></i>(&nbsp;)</b> should be used to properly configurethe registers.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>ncr710.h</b>, <b>ncr710_1.h</b>, <b>ncr710Script.h</b>, <b>ncr710Script1.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ncr710Lib.html#top">ncr710Lib</a></b>, <b><a href="./scsiLib.html#top">scsiLib</a></b>, <b><a href="./scsi1Lib.html#top">scsi1Lib</a></b>, <b><a href="./cacheLib.html#top">cacheLib</a></b>,  <i>NCR 53C710 SCSI I/O Processor Programming Guide, </i><i>VxWorks Programmer's Guide: I/O System</i><hr><a name="ncr710CtrlCreate"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ncr710CtrlCreate</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ncr710CtrlCreate</i>(&nbsp;)</strong> - create a control structure for an NCR 53C710 SIOP</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>NCR_710_SCSI_CTRL *ncr710CtrlCreate    (    UINT8 * baseAdrs, /* base address of the SIOP */    UINT    freqValue /* 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 should be called once and only once for a specified SIOP.  Since it allocates memory for a structure needed by allroutines in <b><a href="./ncr710Lib.html#top">ncr710Lib</a></b>, it must be called before any other routines in thelibrary.  After calling this routine, <b><i><a href="./ncr710Lib.html#ncr710CtrlInit">ncr710CtrlInit</a></i>(&nbsp;)</b> should be calledat least once 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 register of the SIOP.<p><dt><i>freqValue</i><dd> the value at the SIOP SCSI clock input.  This is used to determine the clock period for the SCSI core of the chip and the synchronousdivider value for synchronous transfer.It is important to have the right timing on the SCSI bus.The <i>freqValue</i> parameter is defined as the SCSI clock input value, in nanoseconds, multiplied by 100.  Several <i>freqValue</i> constants are defined in <b>ncr710.h</b> as follows:<pre>    NCR710_1667MHZ  5998    /* 16.67Mhz chip */    NCR710_20MHZ    5000    /* 20Mhz chip    */    NCR710_25MHZ    4000    /* 25Mhz chip    */    NCR710_3750MHZ  2666    /* 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 insufficient or parameters are invalid.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ncr710Lib.html#top">ncr710Lib</a></b><hr><a name="ncr710CtrlInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ncr710CtrlInit</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ncr710CtrlInit</i>(&nbsp;)</strong> - initialize a control structure for an NCR 53C710 SIOP</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ncr710CtrlInit    (    NCR_710_SCSI_CTRL * pSiop,         /* ptr to SIOP struct */    int                 scsiCtrlBusId, /* SCSI bus ID of this SIOP */    int                 scsiPriority   /* priority of task when doing SCSI */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes an SIOP structure, after the structure is createdwith <b><i><a href="./ncr710Lib.html#ncr710CtrlCreate">ncr710CtrlCreate</a></i>(&nbsp;)</b>.  This structure must be initialized before theSIOP can be used.  It may be called more than once;  however,it should be called only while there is no activity on the SCSI interface.<p>Before returning, this routine pulses RST (reset) on the SCSI bus, thusresetting all attached devices.<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="./ncr710Lib.html#ncr710CtrlCreate">ncr710CtrlCreate</a></i>(&nbsp;)</b>.<p><dt><i>scsiCtrlBusId</i><dd>the SCSI bus ID of the SIOP, in the range 0 - 7.  The ID is somewhat arbitrary; the value 7, or highest priority, is conventional.<p><dt><i>scsiPriority</i><dd> the priority to which a task is set when performing a SCSI transaction.Valid priorities are 0 to 255.  Alternatively, the value -1 specifies that the priority should not be altered during SCSI transactions. <p></dl></blockquote><h4>RETURNS</h4><blockquote><p><p>&nbsp;OK,&nbsp;or&nbsp;ERROR&nbsp;if&nbsp;parameters&nbsp;are&nbsp;out&nbsp;of&nbsp;range.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ncr710Lib.html#top">ncr710Lib</a></b><hr><a name="ncr710SetHwRegister"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ncr710SetHwRegister</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ncr710SetHwRegister</i>(&nbsp;)</strong> - set hardware-dependent registers for the NCR 53C710 SIOP</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ncr710SetHwRegister    (    SIOP *           pSiop,  /* pointer to SIOP info */    NCR710_HW_REGS * pHwRegs /* pointer to 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 board support package. <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="./ncr710Lib.html#ncr710CtrlCreate">ncr710CtrlCreate</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 logical values 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>ncr710CtlrCreate</i>(&nbsp;)</b> and <b><i>ncr710CrtlInit</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 description of the register bits,see 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 NCR 53C710 chip registers, it cannotbe used when there is any SCSI bus activity.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if an input parameter is NULL.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ncr710Lib.html#top">ncr710Lib</a></b>, <b><i>ncr710CtlrCreate</i>(&nbsp;)</b>,  <i>NCR 53C710 SCSI I/O Processor Programming Guide </i><hr><a name="ncr710Show"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ncr710Show</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ncr710Show</i>(&nbsp;)</strong> - display the values of all readable NCR 53C710 SIOP registers</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ncr710Show    (    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 manner.  It is useful primarily for debugging.  The input parameter is the pointer to the SIOP information structure returned by the <b><i><a href="./ncr710Lib.html#ncr710CtrlCreate">ncr710CtrlCreate</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 this routine is used during the execution of a SCSI command, the result could be unpredictable.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><p><pre>    -&gt; ncr710Show    NCR710 Registers     ----------------     0xfff47000: Sien    = 0xa5 Sdid    = 0x00 Scntl1  = 0x00 Scntl0  = 0x04    0xfff47004: Socl    = 0x00 Sodl    = 0x00 Sxfer   = 0x80 Scid    = 0x80    0xfff47008: Sbcl    = 0x00 Sbdl    = 0x00 Sidl    = 0x00 Sfbr    = 0x00    0xfff4700c: Sstat2  = 0x00 Sstat1  = 0x00 Sstat0  = 0x00 Dstat   = 0x80    0xfff47010: Dsa     = 0x00000000    0xfff47014: Ctest3  = ???? Ctest2  = 0x21 Ctest1  = 0xf0 Ctest0  = 0x00    0xfff47018: Ctest7  = 0x32 Ctest6  = ???? Ctest5  = 0x00 Ctest4  = 0x00    0xfff4701c: Temp    = 0x00000000    0xfff47020: Lcrc    = 0x00 Ctest8  = 0x00 Istat   = 0x00 Dfifo   = 0x00    0xfff47024: Dcmd/Ddc= 0x50000000    0xfff47028: Dnad    = 0x00066144    0xfff4702c: Dsp     = 0x00066144    0xfff47030: Dsps    = 0x00066174    0xfff47037: Scratch3= 0x00 Scratch2= 0x00 Scratch1= 0x00 Scratch0= 0x0a    0xfff47038: Dcntl   = 0x21 Dwt     = 0x00 Dien    = 0x37 Dmode   = 0x01    0xfff4703c: Adder   = 0x000cc2b8</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>, <b><i><a href="./ncr710Lib.html#ncr710CtrlCreate">ncr710CtrlCreate</a></i>(&nbsp;)</b></body></html>

⌨️ 快捷键说明

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