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

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

?? xutil_memtest.c

?? edk9.1關于xilinx大學計劃培訓的實例程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* $Id: xutil_memtest.c,v 1.9 2005/01/04 18:12:29 moleres 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 Xilinx Inc.*       All rights reserved.*******************************************************************************//*****************************************************************************//**** @file xutil_memtest.c** Contains the memory test utility functions.** <pre>* MODIFICATION HISTORY:** Ver    Who    Date    Changes* ----- ---- -------- -----------------------------------------------* 1.00a ecm  11/01/01 First release* 1.00a xd   11/03/04 Improved support for doxygen.* </pre>******************************************************************************//***************************** Include Files ********************************/#include "xbasic_types.h"#include "xstatus.h"#include "xutil.h"/************************** Constant Definitions ****************************//************************** Function Prototypes *****************************/static Xuint32 RotateLeft(Xuint32 Input, Xuint8 Width);/* define ROTATE_RIGHT to give access to this functionality *//* #define ROTATE_RIGHT */#ifdef ROTATE_RIGHTstatic Xuint32 RotateRight(Xuint32 Input, Xuint8 Width);#endif /* ROTATE_RIGHT*//*****************************************************************************//**** Performs a destructive 32-bit wide memory test.** @param    Addr is a pointer to the region of memory to be tested.* @param    Words is the length of the block.* @param    Pattern is the constant used for the constant pattern test, if 0,*           0xDEADBEEF is used.* @param    Subtest is the test selected. See xutil.h for possible values.** @return** - XST_MEMTEST_FAILED is returned for a failure* - XST_SUCCESS is returned for a pass** @note** Used for spaces where the address range of the region is smaller than* the data width. If the memory range is greater than 2 ** width,* the patterns used in XUT_WALKONES and XUT_WALKZEROS will repeat on a* boundry of a power of two making it more difficult to detect addressing* errors. The XUT_INCREMENT and XUT_INVERSEADDR tests suffer the same* problem. Ideally, if large blocks of memory are to be tested, break* them up into smaller regions of memory to allow the test patterns used* not to repeat over the region tested.******************************************************************************/XStatus XUtil_MemoryTest32(Xuint32 *Addr,Xuint32 Words,Xuint32 Pattern,                           Xuint8 Subtest){    Xuint32 i;    Xuint32 j;    Xuint32 Val = XUT_MEMTEST_INIT_VALUE;    Xuint32 FirstVal = XUT_MEMTEST_INIT_VALUE;    Xuint32 Word;    XASSERT_NONVOID(Words != 0);    XASSERT_NONVOID(Subtest <= XUT_MAXTEST);    /*     * Select the proper Subtest     */    switch (Subtest)    {        case XUT_ALLMEMTESTS:        /* this case executes all of the Subtests */        /* fall through case statement */        case XUT_INCREMENT:        {            /*             * Fill the memory with incrementing             * values starting from 'FirstVal'             */            for (i = 0L; i < Words; i++)            {                Addr[i] = Val;                /* write memory location */                Val++;            }            /*             * Restore the reference 'Val' to the             * initial value             */            Val = FirstVal;            /*             * Check every word within the Words             * of tested memory and compare it             * with the incrementing reference             * Val             */            for (i = 0L; i < Words; i++)            {                Word = Addr[i];                if (Word != Val)                {                    return XST_MEMTEST_FAILED;                }                Val++;            }            if (Subtest != XUT_ALLMEMTESTS)            {                return XST_SUCCESS;            }        } /* end of case 1 */        /* fall through case statement */        case XUT_WALKONES:        {            /*             * set up to cycle through all possible initial             * test Patterns for walking ones test             */            for (j = 0L; j < 32; j++)            {                /*                 * Generate an initial value for walking ones test to test for bad                 * data bits                 */                Val = 1 << j;                /*                 * START walking ones test                 * Write a one to each data bit indifferent locations                 */                for (i = 0L; i < 32; i++)                {                    /* write memory location */                    Addr[i] = Val;                    Val = (Xuint32) RotateLeft(Val, 32);                }                /*                 * Restore the reference 'Val' to the                 * initial value                 */                Val = 1 << j;                /* Read the values from each location that was written */                for (i = 0L; i < 32; i++)                {                    /* read memory location */                    Word = Addr[i];                    if (Word != Val)                    {                        return XST_MEMTEST_FAILED;                    }                    Val = (Xuint32) RotateLeft(Val, 32);                }            }            if (Subtest != XUT_ALLMEMTESTS)            {                return XST_SUCCESS;            }        } /* end of case 2 */        /* fall through case statement */        case XUT_WALKZEROS:        {            /*             * set up to cycle through all possible             * initial test Patterns for walking zeros test             */            for (j = 0L; j < 32; j++)            {                /*                 * Generate an initial value for walking ones test to test for                 * bad data bits                 */                Val = ~(1 << j);                /*                 * START walking zeros test                 * Write a one to each data bit indifferent locations                 */                for (i = 0L; i < 32; i++)                {                    /* write memory location */                    Addr[i] = Val;                    Val = ~((Xuint32) RotateLeft(~Val, 32));                }                /*                 * Restore the reference 'Val' to the                 * initial value                 */                Val = ~(1 << j);                /* Read the values from each location that was written */                for (i = 0L; i < 32; i++)                {                    /* read memory location */                    Word = Addr[i];                    if (Word != Val)                    {                        return XST_MEMTEST_FAILED;                    }                    Val = ~((Xuint32) RotateLeft(~Val, 32));                }            }            if (Subtest != XUT_ALLMEMTESTS)            {                return XST_SUCCESS;            }        } /* end of case 3 */        /* fall through case statement */        case XUT_INVERSEADDR:        {            /* Fill the memory with inverse of address */            for (i = 0L; i < Words; i++)            {                /* write memory location */                Val = (Xuint32) (~((Xuint32)(&Addr[i])));                Addr[i] = Val;            }            /*             * Check every word within the Words             * of tested memory             */            for (i = 0L; i < Words; i++)            {                /* Read the location */                Word = Addr[i];                Val = (Xuint32) (~((Xuint32)(&Addr[i])));                if ((Word ^ Val) != 0x00000000)                {                    return XST_MEMTEST_FAILED;                }            }            if (Subtest != XUT_ALLMEMTESTS)            {                return XST_SUCCESS;            }        } /* end of case 4 */        /* fall through case statement */        case XUT_FIXEDPATTERN:        {            /*             * Generate an initial value for             * memory testing             */            if (Pattern == 0)            {                Val = 0xDEADBEEF;            }            else            {                Val = Pattern;            }            /*             * Fill the memory with fixed pattern             */            for (i = 0L; i < Words; i++)            {                /* write memory location */                Addr[i] = Val;            }            /*             * Check every word within the Words             * of tested memory and compare it             * with the fixed pattern             */            for (i = 0L; i < Words; i++)            {                /* read memory location */                Word = Addr[i];                if (Word != Val)                {                    return XST_MEMTEST_FAILED;                }            }            if (Subtest != XUT_ALLMEMTESTS)            {                return XST_SUCCESS;            }        } /* end of case 5 */        /* this break is for the prior fall through case statements */        break ;        default:        {            return XST_MEMTEST_FAILED;        }    }  /* end of switch */    /* Successfully passed memory test ! */    return XST_SUCCESS;}/*****************************************************************************//**** Performs a destructive 16-bit wide memory test.** @param    Addr is a pointer to the region of memory to be tested.* @param    Words is the length of the block.* @param    Pattern is the constant used for the constant pattern test, if 0,*           0xDEADBEEF is used.* @param    Subtest is the test selected. See xutil.h for possible values.** @return** - XST_MEMTEST_FAILED is returned for a failure* - XST_SUCCESS is returned for a pass** @note** Used for spaces where the address range of the region is smaller than* the data width. If the memory range is greater than 2 ** width,* the patterns used in XUT_WALKONES and XUT_WALKZEROS will repeat on a* boundry of a power of two making it more difficult to detect addressing* errors. The XUT_INCREMENT and XUT_INVERSEADDR tests suffer the same* problem. Ideally, if large blocks of memory are to be tested, break* them up into smaller regions of memory to allow the test patterns used* not to repeat over the region tested.******************************************************************************/XStatus XUtil_MemoryTest16(Xuint16 *Addr,Xuint32 Words, Xuint16 Pattern,                           Xuint8 Subtest){    Xuint32 i;    Xuint32 j;    Xuint16 Val= XUT_MEMTEST_INIT_VALUE;    Xuint16 FirstVal= XUT_MEMTEST_INIT_VALUE;    Xuint16 Word;    XASSERT_NONVOID(Words != 0);    XASSERT_NONVOID(Subtest <= XUT_MAXTEST);    /*     * selectthe proper Subtest(s)     */    switch (Subtest)    {        case XUT_ALLMEMTESTS:        /* this case executes all of the Subtests */        /* fall through case statement */        case XUT_INCREMENT:        {            /*             * Fill the memory with incrementing             * values starting from 'FirstVal'             */            for (i = 0L; i < Words; i++)            {                /* write memory location */                Addr[i] = Val;                Val++;            }            /*             * Restore the reference 'Val' to the             * initial value             */            Val = FirstVal;            /*             * Check every word within the Words             * of tested memory and compare it             * with the incrementing reference             * Val             */            for (i = 0L; i < Words; i++)            {                /* read memory location */                Word = Addr[i];                if (Word != Val)                {                    return XST_MEMTEST_FAILED;                }                Val++;            }            if (Subtest != XUT_ALLMEMTESTS)            {                return XST_SUCCESS;            }        } /* end of case 1 */        /* fall through case statement */        case XUT_WALKONES:        {            /*             * set up to cycle through all possible initial test             * Patterns for walking ones test             */            for (j = 0L; j < 16; j++)            {                /*                 * Generate an initial value for walking ones test to test for bad                 * data bits                 */                Val = 1 << j;                /*                 * START walking ones test                 * Write a one to each data bit indifferent locations                 */                for (i = 0L; i < 16; i++)                {                    /* write memory location */                    Addr[i] = Val;                    Val = (Xuint16) RotateLeft(Val, 16);                }                /*                 * Restore the reference 'Val' to the                 * initial value                 */                Val = 1 << j;                /* Read the values from each location that was written */                for (i = 0L; i < 16; i++)                {                    /* read memory location */                    Word = Addr[i];                    if (Word != Val)                    {                        return XST_MEMTEST_FAILED;                    }                    Val = (Xuint16) RotateLeft(Val, 16);                }            }            if (Subtest != XUT_ALLMEMTESTS)            {                return XST_SUCCESS;            }        } /* end of case 2 */        /* fall through case statement */        case XUT_WALKZEROS:        {            /*             * set up to cycle through all possible initial             * test Patterns for walking zeros test             */            for (j = 0L; j < 16; j++)            {                /*                 * Generate an initial value for walking ones                 * test to test for bad                 * data bits                 */                Val = ~(1 << j);                /*                 * START walking zeros test                 * Write a one to each data bit indifferent locations                 */                for (i = 0L; i < 16; i++)                {                    /* write memory location */                    Addr[i] = Val;                    Val = ~((Xuint16) RotateLeft(~Val, 16));                }                /*                 * Restore the reference 'Val' to the

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
悠悠色在线精品| 国产精品久久久久久福利一牛影视 | 中文无字幕一区二区三区| 精品一区二区影视| 久久久久高清精品| av不卡一区二区三区| 亚洲自拍偷拍图区| 7777精品久久久大香线蕉| 麻豆成人久久精品二区三区红 | 色成年激情久久综合| 亚洲午夜久久久| 日韩欧美国产一区二区三区| 韩国欧美一区二区| 日韩伦理av电影| 欧美高清视频不卡网| 国产精品一区二区久久不卡| 欧美激情资源网| 欧美三级在线看| 国产高清不卡一区二区| 亚洲日本va午夜在线电影| 欧美日韩一区二区三区不卡 | 亚洲网友自拍偷拍| 精品国产青草久久久久福利| 国产精品一区二区久久不卡| 亚洲自拍另类综合| 91精品国产91久久久久久最新毛片 | 久久亚洲影视婷婷| 91性感美女视频| 日韩国产在线一| 欧美国产精品一区二区三区| 91麻豆精东视频| 青青草成人在线观看| 欧美国产丝袜视频| 制服丝袜亚洲网站| 99久久伊人精品| 久久精品噜噜噜成人av农村| 国产精品女人毛片| 日韩欧美二区三区| 91国产丝袜在线播放| 国产一区二区影院| 日韩av午夜在线观看| 中文字幕一区不卡| 精品国产第一区二区三区观看体验 | 欧美成人女星排名| 欧美三级日韩三级| 成人精品国产福利| 精品一区二区三区影院在线午夜| 亚洲免费资源在线播放| 久久亚洲影视婷婷| 欧美一区二区三区在线| 东方aⅴ免费观看久久av| 青椒成人免费视频| 亚洲一区二区三区中文字幕在线| 日本一区二区三区视频视频| 欧美一区2区视频在线观看| 色视频一区二区| k8久久久一区二区三区| 国产精品99久久久久久久女警 | 盗摄精品av一区二区三区| 日韩中文字幕av电影| 亚洲最新在线观看| 亚洲天堂精品视频| 欧美极品xxx| 久久久激情视频| 337p日本欧洲亚洲大胆精品| 日韩一区二区三| 91精品国产色综合久久不卡电影| 欧美三级日韩三级| 欧美亚洲一区二区在线观看| 91免费国产视频网站| 成人免费不卡视频| 国产精品一区二区果冻传媒| 久久 天天综合| 天堂va蜜桃一区二区三区漫画版| 亚洲国产综合91精品麻豆 | 国产精品污网站| 久久女同性恋中文字幕| 欧美电影免费观看高清完整版在| 欧美一区二区三区性视频| 制服丝袜中文字幕亚洲| 91精品国产综合久久福利软件| 91麻豆精品国产91久久久使用方法 | aaa国产一区| 99在线精品观看| 色综合久久综合网欧美综合网| 91捆绑美女网站| 色美美综合视频| 欧洲视频一区二区| 欧美日韩视频一区二区| 欧美日韩成人一区二区| 国产一区二区三区蝌蚪| 五月激情综合色| 亚洲不卡在线观看| 天天射综合影视| 蜜桃视频一区二区三区在线观看| 老汉av免费一区二区三区| 精品一区二区免费视频| 国产尤物一区二区在线| 国产 日韩 欧美大片| 99精品视频在线播放观看| 日本福利一区二区| 欧美蜜桃一区二区三区| 日韩欧美激情四射| 国产三级精品视频| 一区二区三区毛片| 免费国产亚洲视频| 国产99久久久精品| 日本高清不卡在线观看| 91精品国产综合久久国产大片| 精品欧美乱码久久久久久1区2区| 国产欧美一区二区精品婷婷 | 日本不卡高清视频| 国产精选一区二区三区| 日本韩国欧美在线| 一本大道久久a久久综合| 色综合欧美在线视频区| 欧美一级欧美三级在线观看| 久久先锋影音av鲁色资源| 亚洲视频你懂的| 日韩国产欧美在线观看| 成人综合婷婷国产精品久久| 欧美影片第一页| 久久久九九九九| 亚洲成a人片在线观看中文| 国产一区 二区| 欧美体内she精视频| 欧美国产一区视频在线观看| 亚洲一区二区欧美日韩| 成人va在线观看| 欧美成人艳星乳罩| 亚洲高清不卡在线| 成人激情动漫在线观看| 欧美一区二区三区小说| 亚洲精品日韩一| 国产精品综合久久| 日韩一区二区免费在线观看| 亚洲毛片av在线| 丰满亚洲少妇av| 精品国产91洋老外米糕| 亚洲.国产.中文慕字在线| 不卡电影一区二区三区| 337p日本欧洲亚洲大胆色噜噜| 午夜精品福利久久久| 91老司机福利 在线| 中文成人综合网| 国产乱人伦精品一区二区在线观看| 欧美日韩高清一区二区三区| 日韩一区欧美一区| 丁香婷婷综合激情五月色| 久久综合久久综合久久| 免费在线观看视频一区| 欧美日韩久久久一区| 夜夜亚洲天天久久| 色偷偷一区二区三区| 国产精品久久久久久久久晋中 | 国产精品欧美久久久久一区二区| 久久超级碰视频| 欧美大片在线观看一区二区| 午夜日韩在线观看| 欧美三级电影在线看| 一区二区高清免费观看影视大全| 色综合色综合色综合色综合色综合 | 麻豆免费看一区二区三区| 欧美福利电影网| 免费成人性网站| 日韩精品一区二区三区视频播放| 亚洲bt欧美bt精品777| 欧美性一二三区| 亚洲一二三区在线观看| 在线影视一区二区三区| 亚洲国产一区二区在线播放| 欧美日韩视频一区二区| 婷婷综合五月天| 欧美一卡二卡三卡| 久久成人免费日本黄色| 久久午夜国产精品| 丁香天五香天堂综合| 国产欧美精品一区| 国产精品18久久久久久久久久久久| 国产亚洲综合在线| 国产·精品毛片| 国产精品免费久久久久| 一本大道av伊人久久综合| 亚洲乱码日产精品bd| 色94色欧美sute亚洲线路二 | 日韩丝袜情趣美女图片| 精品夜夜嗨av一区二区三区| 欧美一区二区美女| 狠狠色2019综合网| 国产精品卡一卡二卡三| 91首页免费视频| 一区二区三区四区中文字幕| 欧美精品v日韩精品v韩国精品v| 丝袜亚洲另类欧美| 日韩欧美成人激情| 不卡的电影网站| 一区二区三区欧美日| 51精品视频一区二区三区| 国产麻豆精品久久一二三| 亚洲欧美在线另类|