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

📄 if_cpm.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/if_cpm.html - generated by refgen from if_cpm.c --> <title> if_cpm </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>if_cpm</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>if_cpm</strong> - Motorola CPM core network interface driver </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./if_cpm.html#cpmattach">cpmattach</a></i>(&nbsp;)</b>  -  publish the <b>cpm</b> network interface and initialize the driver<br><b><i><a href="./if_cpm.html#cpmStartOutput">cpmStartOutput</a></i>(&nbsp;)</b>  -  output packet to network interface device<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This module implements the driver for the Motorola CPM core Ethernet networkinterface used in the M68EN360 and PPC800-series communications controllers.<p>The driver is designed to support the Ethernet mode of an SCC residing on theCPM processor core.  It is generic in the sense that it does not carewhich SCC is being used, and it supports up to four individual units per board.<p>The driver must be given several target-specific parameters, and some externalsupport routines must be provided.  These parameters, and the mechanisms usedto communicate them to the driver, are detailed below.<p>This network interface driver does not include support for trailer protocolsor data chaining.  However, buffer loaning has been implemented in an effort toboost performance. This driver provides support for four individual device units.<p>This driver maintains cache coherency by allocating buffer space using the<b><i><a href="./cacheLib.html#cacheDmaMalloc">cacheDmaMalloc</a></i>(&nbsp;)</b> routine.  It is assumed that cache-safe memory is returned;this driver does not perform cache flushing and invalidating.<p></blockquote><h4>BOARD LAYOUT</h4><blockquote><p>This device is on-chip.  No jumpering diagram is necessary.<p></blockquote><h4>EXTERNAL INTERFACE</h4><blockquote><p>This driver presents the standard WRS network driver API: the deviceunit must be attached and initialized with the <b><i><a href="./if_cpm.html#cpmattach">cpmattach</a></i>(&nbsp;)</b> routine.<p>The only user-callable routine is <b><i><a href="./if_cpm.html#cpmattach">cpmattach</a></i>(&nbsp;)</b>, which publishes the <b>cpm</b>interface and initializes the driver structures.<p></blockquote><h4>TARGET-SPECIFIC PARAMETERS</h4><blockquote><p>These parameters are passed to the driver via <b><i><a href="./if_cpm.html#cpmattach">cpmattach</a></i>(&nbsp;)</b>.<p><dl><dt>address of SCC parameter RAM<dd>This parameter is the address of the parameter RAM used to control theSCC.  Through this address, and the address of the SCCregisters (see below), different network interface units are able to usedifferent SCCs without conflict.  This parameter points to the internalmemory of the chip where the SCC physically resides, which may not necessarilybe the master chip on the target board.<p><dt>address of SCC registers<dd>This parameter is the address of the registers used to control theSCC.  Through this address, and the address of the SCCparameter RAM (see above), different network interface units are able to usedifferent SCCs without conflict.  This parameter points to the internalmemory of the chip where the SCC physically resides, which may not necessarilybe the master chip on the target board.<p><dt>interrupt-vector offset<dd>This driver configures the SCC to generate hardware interruptsfor various events within the device.  The interrupt-vector offsetparameter is used to connect the driver's ISR to the interrupt througha call to <b><i><a href="./intArchLib.html#intConnect">intConnect</a></i>(&nbsp;)</b>.<p><dt>address of transmit and receive buffer descriptors<dd>These parameters indicate the base locations of the transmit and receivebuffer descriptor (BD) rings.  Each BD takes up 8 bytes ofdual-ported RAM, and it is the user's responsibility to ensure that allspecified BDs will fit within dual-ported RAM.  This includes any otherBDs the target board may be using, including other SCCs, SMCs, and theSPI device.  There is no default for these parameters; they must beprovided by the user.<p><dt>number of transmit and receive buffer descriptors<dd>The number of transmit and receive buffer descriptors (BDs) used isconfigurable by the user upon attaching the driver.  Each bufferdescriptor resides in 8 bytes of the chip's dual-ported RAM space,and each one points to a 1520-byte buffer in regular RAM.  There mustbe a minimum of two transmit and two receive BDs.  There is no maximumnumber of buffers, but there is a limit to how much the driver speed increasesas more buffers are added, and dual-ported RAM space is at a premium.If this parameter is "NULL", a default value of 32 BDs is used.<p><dt>base address of buffer pool<dd>This parameter is used to notify the driver that space for the transmitand receive buffers need not be allocated, but should be taken from acache-coherent private memory space provided by the user at the givenaddress.  The user should be aware that memory used for buffers must be4-byte aligned and non-cacheable.  All the buffersmust fit in the given memory space; no checking is performed.This includes all transmit and receive buffers (see above) and anadditional 16 receive loaner buffers.  If the number of receiveBDs is less than 16, that number of loaner buffers isused.  Each buffer is 1520 bytes.  If this parameter is "NONE," spacefor buffers is obtained by calling <b><i><a href="./cacheLib.html#cacheDmaMalloc">cacheDmaMalloc</a></i>(&nbsp;)</b> in <b><i><a href="./if_cpm.html#cpmattach">cpmattach</a></i>(&nbsp;)</b>. </dl><p></blockquote><h4>EXTERNAL SUPPORT REQUIREMENTS</h4><blockquote><p>This driver requires seven external support functions:<p><dl><dt>STATUS sysCpmEnetEnable (int unit)<dd>This routine is expected to perform any target-specific functions requiredto enable the Ethernet controller.  These functions typically includeenabling the Transmit Enable signal (TENA) and connecting the transmitand receive clocks to the SCC.The driver calls this routine, once per unit, from the <b><i>cpmInit</i>(&nbsp;)</b> routine.<p><dt>void sysCpmEnetDisable (int unit)<dd>This routine is expected to perform any target-specific functions requiredto disable the Ethernet controller.  This usually involves disabling theTransmit Enable (TENA) signal.The driver calls this routine from the <b><i>cpmReset</i>(&nbsp;)</b> routine each time a unitis disabled.<p><dt>STATUS sysCpmEnetCommand (int unit, UINT16 command)<dd>This routine is expected to issue a command to the Ethernet interfacecontroller.  The driver calls this routine to perform basic commands,such as restarting the transmitter and stopping reception.<p><dt>void sysCpmEnetIntEnable (int unit)<dd>This routine is expected to enable the interrupt for the Ethernet interfacespecified by <i>unit</i>.<p><dt>void sysCpmEnetIntDisable (int unit)<dd>This routine is expected to disable the interrupt for the Ethernet interfacespecified by <i>unit</i>.<p><dt>void sysCpmEnetIntClear (int unit)<dd>

⌨️ 快捷键说明

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