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

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

?? xipif_v1_23_b.c

?? <基于fpga的嵌入式設計上的光盤的第四章第二個實驗
?? 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一区二区三区免费野_久草精品视频
高清不卡在线观看av| 亚洲成人资源在线| 国产亲近乱来精品视频| 国产色91在线| 国产精品免费久久| 国产精品久久久久三级| 亚洲欧洲一区二区三区| 亚洲天天做日日做天天谢日日欢 | 亚洲精品乱码久久久久久黑人| 中文字幕第一区综合| 中文字幕亚洲欧美在线不卡| 夜夜精品浪潮av一区二区三区| 亚洲国产日韩综合久久精品| 色国产综合视频| 日韩午夜在线影院| 亚洲人一二三区| 麻豆91精品视频| 在线观看日韩高清av| 国产区在线观看成人精品| 亚洲福利国产精品| 国产成人无遮挡在线视频| 欧美老肥妇做.爰bbww| 中文幕一区二区三区久久蜜桃| 五月婷婷综合网| 色婷婷亚洲婷婷| 国产精品视频一区二区三区不卡| 青青草97国产精品免费观看| 色婷婷综合激情| 亚洲视频图片小说| 不卡av在线免费观看| 精品国产精品网麻豆系列| 日韩有码一区二区三区| 91国产免费观看| 亚洲影视在线观看| 色94色欧美sute亚洲线路一久| 国产亚洲一区二区三区在线观看| 麻豆成人综合网| 26uuu精品一区二区在线观看| 免费高清在线一区| 4438成人网| 蜜臀av在线播放一区二区三区 | 国产肉丝袜一区二区| 国模少妇一区二区三区| 国产天堂亚洲国产碰碰| 韩国精品久久久| 久久婷婷成人综合色| 国产精品一区在线观看你懂的| 2020国产成人综合网| av不卡一区二区三区| 一区二区久久久| 日韩欧美一级特黄在线播放| 精品一区二区三区欧美| 久久精品欧美一区二区三区麻豆| 51精品国自产在线| 99久久久久免费精品国产| 亚洲一二三四区| 国产日韩欧美一区二区三区乱码| 91在线国产观看| 麻豆精品一区二区三区| 国产精品久久毛片av大全日韩| 欧美伊人久久久久久午夜久久久久| 久久精品国产亚洲aⅴ| 亚洲日本电影在线| 久久久久久电影| 欧美日韩午夜在线视频| 成人激情开心网| 狠狠狠色丁香婷婷综合激情 | 成人18视频在线播放| 图片区小说区国产精品视频| 中文字幕不卡的av| 国产精品久久久久久一区二区三区| 91麻豆精品国产| 欧美久久久久免费| 欧美性xxxxxxxx| 99国产精品久久久久久久久久久 | 欧美日韩国产中文| 日本大香伊一区二区三区| 成人综合婷婷国产精品久久免费| 奇米综合一区二区三区精品视频| 亚洲精品视频在线看| 亚洲女爱视频在线| 亚洲理论在线观看| 久久综合九色综合欧美98| 欧美亚洲一区二区在线| av成人免费在线观看| 国精产品一区一区三区mba桃花| 午夜精品久久久久久久久| 亚洲乱码日产精品bd| 亚洲天堂久久久久久久| 国产日韩精品一区| 色88888久久久久久影院按摩| 国产精品一二二区| 久草这里只有精品视频| 美女视频一区二区| 国产精品免费久久| 欧美精品一区二区三区高清aⅴ| 欧美片网站yy| 日韩欧美一级二级| 久久精品视频一区| 中文字幕乱码日本亚洲一区二区| 精品国产亚洲一区二区三区在线观看| 日韩色视频在线观看| 91精品国产一区二区人妖| 日韩亚洲欧美高清| 久久亚洲二区三区| 亚洲日本在线观看| 日韩国产精品大片| 老司机精品视频线观看86| 欧洲激情一区二区| 日韩一区二区三区四区五区六区| 日韩欧美久久一区| 国产精品午夜在线观看| 一区二区在线观看视频在线观看| 亚洲成年人网站在线观看| 精品亚洲免费视频| 91免费在线看| 欧美日韩精品系列| 久久精品视频一区| 一区二区三区四区不卡视频| 日本成人在线视频网站| 欧美精品一二三四| 美女视频第一区二区三区免费观看网站| 日韩精品在线看片z| 亚洲欧洲一区二区在线播放| 国产成人aaa| 中文字幕永久在线不卡| 在线观看国产91| 久久99精品国产麻豆不卡| 久久久天堂av| 国产一区二区三区国产| 欧美一区二区三区在线看| 亚洲综合av网| 91在线观看高清| 亚洲国产成人一区二区三区| 黄色精品一二区| 久久九九影视网| 国产xxx精品视频大全| 久久久久久**毛片大全| 精品一区二区在线免费观看| 精品久久久久久最新网址| 日韩av中文在线观看| 91精品国产91综合久久蜜臀| 亚洲成人av资源| 欧美精品一区二区三区一线天视频| 精品一区二区三区香蕉蜜桃 | 99精品在线观看视频| 亚洲免费伊人电影| 欧美亚洲免费在线一区| 亚洲综合无码一区二区| 欧美日韩精品系列| av不卡在线播放| 精品影院一区二区久久久| 亚洲日本青草视频在线怡红院| 精品视频免费在线| 国产精品资源站在线| 日本vs亚洲vs韩国一区三区二区 | 成人av电影免费在线播放| 免费高清不卡av| 国产午夜精品福利| 日韩一级片网站| 欧美精品第一页| 欧美日韩中文一区| 色婷婷久久久亚洲一区二区三区| 韩日欧美一区二区三区| 日本强好片久久久久久aaa| 亚洲人快播电影网| 日韩欧美高清dvd碟片| 91 com成人网| 欧美一区二区网站| 欧美成人bangbros| 91精品国产综合久久香蕉麻豆| 91美女视频网站| 欧美日精品一区视频| 欧美三区免费完整视频在线观看| 在线一区二区视频| 欧美三级午夜理伦三级中视频| 色综合色狠狠综合色| 欧美激情综合在线| 成人午夜视频在线观看| 色综合久久中文字幕综合网| 欧美人体做爰大胆视频| 精品免费国产二区三区| 一区二区三区美女| 国产成a人亚洲| 欧美卡1卡2卡| 日韩毛片精品高清免费| 亚洲成人一二三| 国产iv一区二区三区| 色婷婷狠狠综合| 国产免费久久精品| 一区二区三区四区不卡在线| 日本vs亚洲vs韩国一区三区二区| 久久97超碰国产精品超碰| 国产成人一区在线| 欧美日韩国产在线观看| 国产日韩三级在线| 午夜久久久影院| 91亚洲精品久久久蜜桃网站 | 国产欧美久久久精品影院| 天天亚洲美女在线视频|