亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? xipif_v1_23_b.c

?? edk9.1關于xilinx大學計劃培訓的實例程序
?? C
字號:
/* $Id: xipif_v1_23_b.c,v 1.3 2004/11/15 20:31:35 xduan Exp $ *//********************************************************************************       XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"*       AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND*       SOLUTIONS FOR XILINX DEVICES.  BY PROVIDING THIS DESIGN, CODE,*       OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,*       APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION*       THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,*       AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE*       FOR YOUR IMPLEMENTATION.  XILINX EXPRESSLY DISCLAIMS ANY*       WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE*       IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR*       REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF*       INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS*       FOR A PARTICULAR PURPOSE.**       (c) Copyright 2002-2004 Xilinx Inc.*       All rights reserved.*******************************************************************************//*****************************************************************************//**** @file xipif_v1_23_b.c** This file contains the implementation of the XIpIf component. The* XIpIf component encapsulates the IPIF, which is the standard interface* that IP must adhere to when connecting to a bus.  The purpose of this* component is to encapsulate the IPIF processing such that maintainability* is increased.  This component does not provide a lot of abstraction from* from the details of the IPIF as it is considered a building block for* device drivers.  A device driver designer must be familiar with the* details of the IPIF hardware to use this component.** The IPIF hardware provides a building block for all hardware devices such* that each device does not need to reimplement these building blocks. The* IPIF contains other building blocks, such as FIFOs and DMA channels, which* are also common to many devices.  These blocks are implemented as separate* hardware blocks and instantiated within the IPIF.  The primary hardware of* the IPIF which is implemented by this software component is the interrupt* architecture.  Since there are many blocks of a device which may generate* interrupts, all the interrupt processing is contained in the common part* of the device, the IPIF.  This interrupt processing is for the device level* only and does not include any processing for the interrupt controller.** A device is a mechanism such as an Ethernet MAC.  The device is made* up of several parts which include an IPIF and the IP.  The IPIF contains most* of the device infrastructure which is common to all devices, such as* interrupt processing, DMA channels, and FIFOs.  The infrastructure may also* be referred to as IPIF internal blocks since they are part of the IPIF and* are separate blocks that can be selected based upon the needs of the device.* The IP of the device is the logic that is unique to the device and interfaces* to the IPIF of the device.** In general, there are two levels of registers within the IPIF.  The first* level, referred to as the device level, contains registers which are for the* entire device.  The second level, referred to as the IP level, contains* registers which are specific to the IP of the device.  The two levels of* registers are designed to be hierarchical such that the device level is* is a more general register set above the more specific registers of the IP.* The IP level of registers provides functionality which is typically common* across all devices and allows IP designers to focus on the unique aspects* of the IP.** The interrupt registers of the IPIF are parameterizable such that the only* the number of bits necessary for the device are implemented. The functions* of this component do not attempt to validate that the passed in arguments are* valid based upon the number of implemented bits.  This is necessary to* maintain the level of performance required for the common components.  Bits* of the registers are assigned starting at the least significant bit of the* registers.** <b>Critical Sections</b>** It is the responsibility of the device driver designer to use critical* sections as necessary when calling functions of the IPIF.  This component* does not use critical sections and it does access registers using* read-modify-write operations.  Calls to IPIF functions from a main thread* and from an interrupt context could produce unpredictable behavior such that* the caller must provide the appropriate critical sections.** <b>Mutual Exclusion</b>** The functions of the IPIF are not thread safe such that the caller of all* functions is responsible for ensuring mutual exclusion for an IPIF.  Mutual* exclusion across multiple IPIF components is not necessary.** <pre>* MODIFICATION HISTORY:** Ver   Who  Date     Changes* ----- ---- -------- -----------------------------------------------* 1.23b jhl  02/27/01 Repartioned to reduce size* 1.23b rpm  08/17/04 Doxygenated for inclusion in API documentation* 1.23b xd   10/27/04 Improve Doxygen format* </pre>*******************************************************************************//***************************** Include Files *********************************/#include "xipif_v1_23_b.h"#include "xio.h"/************************** Constant Definitions *****************************//* the following constant is used to generate bit masks for register testing * in the self test functions, it defines the starting bit mask that is to be * shifted from the LSB to MSB in creating a register test mask */#define XIIF_V123B_FIRST_BIT_MASK     1UL/* the following constant defines the maximum number of bits which may be * used in the registers at the device and IP levels, this is based upon the * number of bits available in the registers */#define XIIF_V123B_MAX_REG_BIT_COUNT 32/**************************** Type Definitions *******************************//***************** Macros (Inline Functions) Definitions *********************//************************** Variable Definitions *****************************//************************** Function Prototypes ******************************/static XStatus IpIntrSelfTest(Xuint32 RegBaseAddress,                              Xuint32 IpRegistersWidth);/*****************************************************************************//**** This function performs a self test on the specified IPIF component.  Many* of the registers in the IPIF are tested to ensure proper operation.  This* function is destructive because the IPIF is reset at the start of the test* and at the end of the test to ensure predictable results.  The IPIF reset* also resets the entire device that uses the IPIF.  This function exits with* all interrupts for the device disabled.** @param RegBaseAddress is the base address of the device's IPIF registers** @param IpRegistersWidth contains the number of bits in the IP interrupt*        registers of the device.  The hardware is parameterizable such that*        only the number of bits necessary to support a device are implemented.*        This value must be between 0 and 32 with 0 indicating there are no IP*        interrupt registers used.** @return** A value of XST_SUCCESS indicates the test was successful with no errors.* Any one of the following error values may also be returned.*                                       <br><br>*   - XST_IPIF_RESET_REGISTER_ERROR     The value of a register at reset was*                                       not valid*                                       <br><br>*   - XST_IPIF_IP_STATUS_ERROR          A write to the IP interrupt status*                                       register did not read back correctly*                                       <br><br>*   - XST_IPIF_IP_ACK_ERROR             One or more bits in the IP interrupt*                                       status register did not reset when acked*                                       <br><br>*   - XST_IPIF_IP_ENABLE_ERROR          The IP interrupt enable register*                                       did not read back correctly based upon*                                       what was written to it** @note** None.*******************************************************************************/XStatus XIpIfV123b_SelfTest(Xuint32 RegBaseAddress,                            Xuint8 IpRegistersWidth){    XStatus Status;    /* assert to verify arguments are valid */    XASSERT_NONVOID(IpRegistersWidth <= XIIF_V123B_MAX_REG_BIT_COUNT);    /* reset the IPIF such that it's in a known state before the test     * and interrupts are globally disabled     */    XIIF_V123B_RESET(RegBaseAddress);    /* perform the self test on the IP interrupt registers, if     * it is not successful exit with the status     */    Status = IpIntrSelfTest(RegBaseAddress, IpRegistersWidth);    if (Status != XST_SUCCESS)    {        return Status;    }    /* reset the IPIF such that it's in a known state before exiting test */    XIIF_V123B_RESET(RegBaseAddress);    /* reaching this point means there were no errors, return success */    return XST_SUCCESS;}/******************************************************************************* Perform a self test on the IP interrupt registers of the IPIF. This* function modifies registers of the IPIF such that they are not guaranteed* to be in the same state when it returns.  Any bits in the IP interrupt* status register which are set are assumed to be set by default after a reset* and are not tested in the test.** @param RegBaseAddress is the base address of the device's IPIF registers** @param IpRegistersWidth contains the number of bits in the IP interrupt*        registers of the device.  The hardware is parameterizable such that*        only the number of bits necessary to support a device are implemented.*        This value must be between 0 and 32 with 0 indicating there are no IP*        interrupt registers used.** @return** A status indicating XST_SUCCESS if the test was successful.  Otherwise, one* of the following values is returned.*   - XST_IPIF_RESET_REGISTER_ERROR     The value of a register at reset was*                                       not valid*                                       <br><br>*   - XST_IPIF_IP_STATUS_ERROR          A write to the IP interrupt status*                                       register did not read back correctly*                                       <br><br>*   - XST_IPIF_IP_ACK_ERROR             One or more bits in the IP status*                                       register did not reset when acked*                                       <br><br>*   - XST_IPIF_IP_ENABLE_ERROR          The IP interrupt enable register*                                       did not read back correctly based upon*                                       what was written to it* @note** None.*******************************************************************************/static XStatus IpIntrSelfTest(Xuint32 RegBaseAddress, Xuint32 IpRegistersWidth){    /* ensure that the IP interrupt enable register is  zero     * as it should be at reset, the interrupt status is dependent upon the     * IP such that it's reset value is not known     */    if (XIIF_V123B_READ_IIER(RegBaseAddress) != 0)    {        return XST_IPIF_RESET_REGISTER_ERROR;    }    /* if there are any used IP interrupts, then test all of the interrupt     * bits in all testable registers     */    if (IpRegistersWidth > 0)    {        Xuint32 BitCount;        Xuint32 IpInterruptMask = XIIF_V123B_FIRST_BIT_MASK;        Xuint32 Mask = XIIF_V123B_FIRST_BIT_MASK; /* bits assigned MSB to LSB */        Xuint32 InterruptStatus;        /* generate the register masks to be used for IP register tests, the         * number of bits supported by the hardware is parameterizable such         * that only that number of bits are implemented in the registers, the         * bits are allocated starting at the MSB of the registers         */        for (BitCount = 1;             BitCount < IpRegistersWidth;             BitCount++)        {            Mask = Mask << 1;            IpInterruptMask |= Mask;        }        /* get the current IP interrupt status register contents, any bits         * already set must default to 1 at reset in the device and these         * bits can't be tested in the following test, remove these bits from         * the mask that was generated for the test         */        InterruptStatus = XIIF_V123B_READ_IISR(RegBaseAddress);        IpInterruptMask &= ~InterruptStatus;        /* set the bits in the device status register and verify them by reading         * the register again, all bits of the register are latched         */        XIIF_V123B_WRITE_IISR(RegBaseAddress, IpInterruptMask);        InterruptStatus = XIIF_V123B_READ_IISR(RegBaseAddress);        if ((InterruptStatus & IpInterruptMask) != IpInterruptMask)        {            return XST_IPIF_IP_STATUS_ERROR;        }        /* test to ensure that the bits set in the IP interrupt status register         * can be cleared by acknowledging them in the IP interrupt status         * register then read it again and verify it was cleared         */        XIIF_V123B_WRITE_IISR(RegBaseAddress, IpInterruptMask);        InterruptStatus = XIIF_V123B_READ_IISR(RegBaseAddress);        if ((InterruptStatus & IpInterruptMask) != 0)        {            return XST_IPIF_IP_ACK_ERROR;        }        /* set the IP interrupt enable set register and then read the IP         * interrupt enable register and verify the interrupts were enabled         */        XIIF_V123B_WRITE_IIER(RegBaseAddress, IpInterruptMask);        if (XIIF_V123B_READ_IIER(RegBaseAddress) != IpInterruptMask)        {            return XST_IPIF_IP_ENABLE_ERROR;        }        /* clear the IP interrupt enable register and then read the         * IP interrupt enable register and verify the interrupts were disabled         */        XIIF_V123B_WRITE_IIER(RegBaseAddress, 0);        if (XIIF_V123B_READ_IIER(RegBaseAddress) != 0)        {            return XST_IPIF_IP_ENABLE_ERROR;        }    }    return XST_SUCCESS;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合欧美在线视频区| 精品国产3级a| 精品国产一区二区三区忘忧草| 国产欧美一区视频| 日韩av一二三| 99久久夜色精品国产网站| 欧美成人aa大片| 午夜视频在线观看一区| k8久久久一区二区三区| 精品粉嫩aⅴ一区二区三区四区| 亚洲国产欧美日韩另类综合 | 午夜影院在线观看欧美| 99riav久久精品riav| 精品国产伦理网| 男女男精品视频网| 欧美日韩亚洲丝袜制服| 亚洲卡通动漫在线| 91亚洲午夜精品久久久久久| 久久精品水蜜桃av综合天堂| 蜜桃视频一区二区三区| 欧美日本一区二区三区| 亚洲成人动漫在线免费观看| 欧美性感一区二区三区| 日韩理论片在线| 99久久精品情趣| 国产精品高潮久久久久无| 风间由美一区二区三区在线观看 | 18成人在线视频| 国产麻豆精品95视频| 亚洲国产美女搞黄色| 99国产精品一区| 国产精品久久久久久久久免费桃花 | 怡红院av一区二区三区| 93久久精品日日躁夜夜躁欧美| 中文字幕av资源一区| 国产精品一二三区在线| 欧美国产一区在线| 成人a免费在线看| 中文字幕一区二区三区在线不卡| 91在线你懂得| 亚洲中国最大av网站| 欧美性受xxxx黑人xyx性爽| 亚洲不卡av一区二区三区| 欧美精品日日鲁夜夜添| 久草这里只有精品视频| 久久久久久久精| 国产成人啪免费观看软件| 日韩美女视频一区| 欧美综合欧美视频| 毛片不卡一区二区| 久久精品综合网| 91麻豆国产香蕉久久精品| 亚洲一区二区中文在线| 欧美成人aa大片| 不卡欧美aaaaa| 亚洲电影第三页| 久久免费视频色| 91香蕉视频污| 日本欧美久久久久免费播放网| 久久免费国产精品| 91丨九色丨蝌蚪富婆spa| 日韩国产欧美视频| 国产精品午夜电影| 欧美三级视频在线播放| 国产一区视频导航| 亚洲激情五月婷婷| 日韩精品中文字幕在线一区| 91在线精品一区二区| 日韩av电影免费观看高清完整版| 国产午夜久久久久| 欧美日韩中文字幕一区| 国产精品99久久久久久久女警| 夜夜操天天操亚洲| xfplay精品久久| 欧美午夜片在线观看| 国产精品一区久久久久| 亚洲国产cao| 国产欧美精品在线观看| 7777女厕盗摄久久久| 白白色 亚洲乱淫| 麻豆成人免费电影| 亚洲精品国产无天堂网2021| 精品国产免费视频| 欧美精品黑人性xxxx| 99久久精品一区二区| 国内成+人亚洲+欧美+综合在线| 亚洲精选在线视频| 欧美国产日本视频| 日韩久久久久久| 欧美日韩激情一区二区| 91亚洲国产成人精品一区二区三| 蜜臀久久99精品久久久久宅男| 亚洲欧美日韩小说| 中文字幕电影一区| 久久久高清一区二区三区| 欧美美女bb生活片| 色诱视频网站一区| 成人av免费在线播放| 国产精品亚洲专一区二区三区| 亚洲777理论| 亚洲午夜影视影院在线观看| 中文字幕在线不卡| 国产欧美一区二区精品久导航 | 韩国一区二区在线观看| 五月天激情小说综合| 一区二区三区四区精品在线视频| 国产日产欧美一区| 国产日韩欧美a| 国产精品欧美一级免费| 国产欧美日韩在线看| 精品福利在线导航| 337p粉嫩大胆噜噜噜噜噜91av| 这里是久久伊人| 91精品视频网| 日韩一二三区视频| 欧美大度的电影原声| 欧美一级电影网站| 精品剧情在线观看| 欧美不卡激情三级在线观看| 91精品国产综合久久香蕉的特点| 制服丝袜日韩国产| 日韩一区二区电影| 26uuu国产日韩综合| 久久久久久一二三区| 国产清纯美女被跳蛋高潮一区二区久久w| 久久色中文字幕| 国产精品久久久久一区二区三区共 | 精品欧美一区二区久久 | 成人ar影院免费观看视频| 成人精品gif动图一区| 成人免费毛片嘿嘿连载视频| 99热精品国产| 欧美日韩专区在线| 日韩精品中文字幕在线一区| 久久久久久久久99精品| 中文字幕日韩精品一区| 亚洲午夜电影网| 久久国产三级精品| 波多野结衣中文一区| 欧美日韩一本到| 精品国产制服丝袜高跟| 国产精品久久久一本精品| 亚洲福利视频一区二区| 精品一区二区三区视频在线观看| 国产麻豆精品视频| 91久久精品网| 日韩精品最新网址| 亚洲男人的天堂一区二区| 男女男精品视频| av欧美精品.com| 日韩亚洲欧美一区二区三区| 日本一区二区三区国色天香| 亚洲一区二区影院| 国产精品77777竹菊影视小说| 欧美中文字幕一区二区三区| 日韩精品一区二| 一区二区欧美视频| 国产美女精品在线| 欧美日韩一卡二卡三卡 | 久久这里都是精品| 一区二区三区四区激情| 国产一区二区三区精品欧美日韩一区二区三区 | 久久这里都是精品| 亚洲高清中文字幕| 豆国产96在线|亚洲| 欧美男同性恋视频网站| 国产精品美女久久久久aⅴ| 亚洲一区在线免费观看| 高清不卡一区二区在线| 91精品在线观看入口| 亚洲美腿欧美偷拍| 国产伦精品一区二区三区视频青涩| 在线免费视频一区二区| 国产亚洲精品bt天堂精选| 免费观看91视频大全| 色悠久久久久综合欧美99| 久久久国产精品麻豆 | 一区二区三区四区乱视频| 国产激情一区二区三区桃花岛亚洲| 69久久99精品久久久久婷婷| 亚洲精品一二三区| 成人18视频日本| 日本一区二区免费在线| 极品销魂美女一区二区三区| 宅男噜噜噜66一区二区66| 一区二区三区日韩欧美| 播五月开心婷婷综合| 久久九九全国免费| 一本色道a无线码一区v| 国产精品美女久久久久av爽李琼| 国产激情91久久精品导航| 精品电影一区二区| 精品一区二区三区在线播放视频 | 972aa.com艺术欧美| 国产精品理伦片| 不卡一卡二卡三乱码免费网站| 亚洲国产精品av| av福利精品导航| 亚洲欧美精品午睡沙发| 97精品国产露脸对白|