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

📄 aic7880lib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/aic7880Lib.html - generated by refgen from aic7880Lib.c --> <title> aic7880Lib </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>aic7880Lib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>aic7880Lib</strong> - Adaptec 7880 SCSI Host Adapter Library File </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./aic7880Lib.html#aic7880CtrlCreate">aic7880CtrlCreate</a></i>(&nbsp;)</b>  -  create a control structure for the AIC 7880<br><b><i><a href="./aic7880Lib.html#aic7880ScbCompleted">aic7880ScbCompleted</a></i>(&nbsp;)</b>  -  successfully completed execution of a client thread<br><b><i><a href="./aic7880Lib.html#aic7880EnableFast20">aic7880EnableFast20</a></i>(&nbsp;)</b>  -  enable double speed SCSI data transfers<br><b><i><a href="./aic7880Lib.html#aic7880dFifoThresholdSet">aic7880dFifoThresholdSet</a></i>(&nbsp;)</b>  -  set the data FIFO threshold.<br><b><i><a href="./aic7880Lib.html#aic7880GetNumOfBuses">aic7880GetNumOfBuses</a></i>(&nbsp;)</b>  -  perform a PCI bus scan<br><b><i><a href="./aic7880Lib.html#aic7880ReadConfig">aic7880ReadConfig</a></i>(&nbsp;)</b>  -  read from PCI config space<br><b><i><a href="./aic7880Lib.html#aic7880WriteConfig">aic7880WriteConfig</a></i>(&nbsp;)</b>  -  read to PCI config space<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p><p>This is the I/O driver for the Adaptec AIC 7880 PCI Bus Master Single Chip SCSI Host Adapter. It is designed to work with scsi2Lib. This driver runs in conjunction with the HIM (Hardware Interface Module) supplied by Adaptec. The AIC 7880 SCSI Host Adapter driver supports the following features<p><ul><li>Fast, Double Speed 20 MHz data transfers.</li><li>16 bit Wide Synchronous Data transfers.</li><li>Tagged Command Queueing.</li><li>Data FIFO threshold selection.</li><li>Disconnect / Reconnect support.</li><li>Multiple Initiator support.</li><li>Multiple Controller support. </ul><p><p>In general, the SCSI system and this driver will automatically choose the best combination of these features to suit the target devices used. However, the default choices may be over-ridden by using the function "<b><i><a href="./scsi2Lib.html#scsiTargetOptionsSet">scsiTargetOptionsSet</a></i>(&nbsp;)</b>" (see <b><a href="./scsiLib.html#top">scsiLib</a></b>).<p></blockquote><h4>OPERATIONS OVERVIEW</h4><blockquote><p><p>The host processor initiates a SCSI I/O operation by programming a datastructure called SCB (SCSI Command Block). The SCB contains all therelevant information needed by the Host Adapter to carry out the requestedSCSI operation. SCSI SCB's are passed to the HIM by this module which arethen sent to the AIC-7880 for execution. The AIC-7880 Sequencer or PhaseEnginecomprises the on-chip intelligence that allows the AIC-7880 to execute SCBcommands. The Sequencer is programmable and uses its own microcode program which is downloaded to AIC-7880 by the host at initialization.<p>The following is an example of how an SCB is delivered to the AIC-7880<p><ul><li>Memory is allocated for the SCB structure and it is programmed with the necessary information required to execute a SCSI transaction.</li><li>The SCB is then sent to HIM.</li><li>The HIM pauses the Sequencer.</li><li>The Sequencer has internal registers that point to the area in system memory where the SCB resides.</li><li>The HIM unpauses the Sequencer.</li><li>The AIC-7880 Sequencer uses DMA to transfer the SCB into its internal memory.</li><li>The AIC-7880 executes the SCB.</li><li>Upon completion of the SCB command, the AIC-7880 Sequencer posts the pointer of the completed SCB into system memory.</li><li>The AIC-7880 generates an interupt.</li><li>The status of the completed SCB is then read by the host.</ul><p></blockquote><h4>SCB PROCESSING</h4><blockquote><p><p>The AIC-7880 Sequencer uses DMA to transfer the SCB into its internal memory.The Sequencer processes SCB's in the order they are received with new SCB's being started when older SCB operations are idle due to wait for selection or a SCSI bus disconnect. When operations for an Idle SCB reactivate, the sequencer scans the SCB array for the SCB corresponding to the Target/LUN reactivating. The Sequencer then restarts the SCB found until the next disconnect or SCB completion.<p></blockQuote><h4>MAXIMUM NUMBER OF TAGGED SCB's</h4><blockQuote><p>The number of tagged SCB's per SCSI target that is handled by the Sequencer,range from 1-32. The HIM supports only the External SCB Access mode. Thedefault number of tags handled by the Sequencer in this mode is 32. Changingthe field "Cf_MaxTagScbs" in the cfp_struct changes the maximum number of tagged SCB's.<p></blockQuote><h4>MAXIMUM NUMBER OF  SCB's</h4><blockQuote><p>The number of SCB's that can be queued to the Sequencer, range from 1-254.This value can be changed before calling the HIM routine "PH_GetConfig ()".Changing the field "Cf_NumberScbs" in "cfp_struct" changes the maximum numberof SCB's to be used. The default max number of SCB's is 254. <p></blockquote><h4>SYNCHRONOUS TRANSFER SUPPORT</h4><blockquote><p><p>If double speed SCSI mode is enabled, this driver supports transfer periodsof 50, 64 and 76 ns. In standard fast SCSI mode transfer periods of 100, 125,150, 175, 200, 225, 250 and 275 are supported. Synchronous transfer parametersfor a target can be set using the SCSI library function "scsiTargetOptionsSet".<p></blockquote><h4>DOUBLE SPEED SCSI MODE</h4><blockquote><p><p>To enable/disable double speed SCSI mode the routine "aic7880EnableFast20" needs to be invoked with the followingtwo parameters:<dl><dt>(1)<dd>A pointer to the appropriate SCSI Controller structure <p><dt>(2)<dd>A BOOLEAN value which enables or disable double speed SCSI mode. </dl><p>With double speed SCSI mode enabled the host adapter may be capable of transferring data at theoritcal transfer rates of 20 MB/s for an 8-bit device and 40 MB/s for a 16-bit device. Double Speed SCSI is disabledby default.<p></blockquote><h4>DATA FIFO THRESHOLD</h4><blockquote><p><p>To set the data FIFO threshold the routine "aic7880dFifoThresholdSet"needs to be invoked with the following two parameters:<dl><dt>(1)<dd>A pointer to the appropriate SCSI Controller structure<p><dt>(2)<dd>The data FIFO threhold value. </dl><p>For more information about the data FIFO threshold value refer the <b><i><a href="./aic7880Lib.html#aic7880dFifoThresholdSet">aic7880dFifoThresholdSet</a></i>(&nbsp;)</b> routine<p>In order to initialize the driver from the BSP the following needs tobe done in the BSP specific routine <b><i><a href="./sysLib.html#sysScsiInit">sysScsiInit</a></i>(&nbsp;)</b> in file <b>sysScsi.c</b>.<p><ul><li>Find the SCSI Host Adapter.</li><li>Create the SCSI Controller Structure.</li><li>Connect the interrupt to Interupt Service Routine (ISR).</li><li>Enable the SCSI interupt </ul><p><p>The following example shows the SCSI initialization sequence that needto be done in the BSP.<p><pre>STATUS sysScsiInit ()    {    int   busNo;          /* PCI bus number          */    int   devNo;          /* PCI device number       */    UWORD found = FALSE;  /* host adapter found      */    int   numHa = 0;      /* number of host adapters */    for (busNo=0; busNo &lt; MAX_NO_OF_PCI_BUSES &amp;&amp; !found; busNo++)        for (devNo = 0; devNo &lt; MAX_NO_OF_PCI_DEVICES; devNo++)        {        if ((found = sysScsiHostAdapterFind (busNo, devNo)) == HA_FOUND)            {            numHa++;            /* Create the SCSI controller */            if ((pSysScsiCtrl = (SCSI_CTRL *) aic7880CtrlCreate                 (busNo, devNo, SCSI_DEF_CTRL_BUS_ID)) == NULL)                {                logMsg ("Could not create SCSI controller\n",                         0, 0, 0, 0, 0, 0);                return (ERROR);                }            /* connect the SCSI controller's interrupt service routine */            if ((intConnect (INUM_TO_IVEC (SCSI_INT_VEC), aic7880Intr,                             (int) pSysScsiCtrl)) == ERROR)                return (ERROR);            /* enable SCSI interupts */            sysIntEnablePIC (SCSI_INT_LVL);            }

⌨️ 快捷键说明

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