亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产成人亚洲综合a∨猫咪| wwwwxxxxx欧美| 制服丝袜激情欧洲亚洲| 在线观看亚洲a| 91香蕉视频mp4| av成人动漫在线观看| 国产呦萝稀缺另类资源| 欧美日韩一区二区三区高清| 久久一区二区视频| 国产精品国产三级国产aⅴ入口 | 午夜免费久久看| 亚洲高清免费在线| 另类欧美日韩国产在线| 91尤物视频在线观看| 精品国产91洋老外米糕| 久久久久国产精品麻豆ai换脸 | 久久99久久99精品免视看婷婷| 亚洲综合成人网| 中文字幕亚洲在| 五月天激情综合| 高清beeg欧美| 久久免费电影网| 成人黄色综合网站| 亚洲成人在线网站| 欧美大片国产精品| www.爱久久.com| 日韩精品一级二级| 国产精品美女视频| 欧美丰满嫩嫩电影| 成人av第一页| 美女视频一区在线观看| 中文字幕一区二区三区视频| 91精品国产入口| 一区二区三区四区在线播放| 午夜影院久久久| 欧美私模裸体表演在线观看| 97久久久精品综合88久久| 精品国产第一区二区三区观看体验 | 极品美女销魂一区二区三区免费| 国产情人综合久久777777| 欧美色视频在线| 国产不卡视频在线观看| 午夜视黄欧洲亚洲| 中文字幕一区二区视频| 欧美精品一区二区三区久久久| 色综合久久久久综合体| 国产在线不卡视频| 亚洲aⅴ怡春院| 最新国产の精品合集bt伙计| 欧美精品一区二区三区蜜臀| 精品污污网站免费看| 成人app软件下载大全免费| 久久草av在线| 石原莉奈一区二区三区在线观看| 国产精品久久久久久久蜜臀| 精品粉嫩aⅴ一区二区三区四区| 在线免费观看日韩欧美| av欧美精品.com| 国产福利精品一区二区| 另类小说色综合网站| 亚洲成人自拍偷拍| 亚洲精品欧美二区三区中文字幕| 国产精品久久夜| 国产婷婷色一区二区三区在线| 日韩一区二区三区视频在线观看 | 一本色道综合亚洲| 成人午夜伦理影院| 精品国产一二三区| 国产在线播精品第三| 国内成人免费视频| 亚洲男同性视频| 日韩欧美不卡在线观看视频| 成人午夜激情片| 亚洲成av人影院| 国产日韩欧美电影| 制服丝袜亚洲网站| 91麻豆成人久久精品二区三区| 欧美人妇做爰xxxⅹ性高电影| 国产aⅴ综合色| 国产精品乱码一区二区三区软件| 久久一夜天堂av一区二区三区| 日韩欧美亚洲国产另类| 精品国产乱码久久久久久久| 日韩无一区二区| 91精品福利在线一区二区三区| 欧美日韩激情在线| 欧美一级淫片007| 亚洲精品在线三区| 欧美电影免费提供在线观看| 精品国产123| 国产欧美日韩三区| 亚洲日韩欧美一区二区在线| eeuss鲁片一区二区三区| 色视频欧美一区二区三区| 亚洲成av人片在线观看| 日本在线播放一区二区三区| 蜜臀av一区二区在线观看| 国产一区视频在线看| 成人黄色免费短视频| 欧美在线观看18| 日韩一区二区在线看| 国产欧美一二三区| 亚洲欧美日韩中文播放| 午夜影院久久久| 风间由美一区二区av101| 91玉足脚交白嫩脚丫在线播放| 欧美美女bb生活片| 久久久美女毛片 | 久久久777精品电影网影网| 亚洲国产精品激情在线观看| 亚洲综合激情小说| 久久99热99| 91麻豆自制传媒国产之光| 91精品国产入口| 中文字幕va一区二区三区| 亚洲成人动漫一区| 懂色av一区二区夜夜嗨| 欧美中文字幕一区二区三区| 欧美一二三区在线观看| 国产精品成人网| 日本不卡视频一二三区| 不卡电影一区二区三区| 日韩欧美国产高清| 国产精品的网站| 六月丁香婷婷久久| 色婷婷av一区二区三区大白胸| 欧美成人在线直播| 亚洲精品菠萝久久久久久久| 蜜乳av一区二区三区| 波多野结衣欧美| 日韩你懂的电影在线观看| 亚洲综合图片区| 从欧美一区二区三区| 欧美日产国产精品| 亚洲色大成网站www久久九九| 紧缚捆绑精品一区二区| 欧美揉bbbbb揉bbbbb| 日韩亚洲欧美在线观看| 国产精品丝袜黑色高跟| 日本韩国视频一区二区| 国产九色精品成人porny| 91成人看片片| 一区2区3区在线看| 成人成人成人在线视频| 日韩午夜激情免费电影| 亚洲成人黄色影院| 这里只有精品电影| 亚洲高清免费观看| 色婷婷久久久亚洲一区二区三区| 欧美精选一区二区| 不卡高清视频专区| 91麻豆免费看片| 亚洲国产精品二十页| 韩国午夜理伦三级不卡影院| 7777精品伊人久久久大香线蕉的 | 日韩欧美中文字幕一区| 亚洲自拍偷拍九九九| 99久久精品国产一区| 国产欧美日本一区视频| 久久99精品国产.久久久久| 欧美丰满美乳xxx高潮www| 亚洲成av人影院| 欧美三级在线看| 性做久久久久久免费观看| 欧美亚洲一区二区三区四区| 自拍偷在线精品自拍偷无码专区| 国产成人亚洲精品青草天美| 久久久久久免费| 国产黄色成人av| 国产午夜久久久久| 成人一区二区三区| 国产嫩草影院久久久久| 成人国产亚洲欧美成人综合网| 亚洲国产岛国毛片在线| 成人免费精品视频| 亚洲欧美日韩久久| 一本大道综合伊人精品热热| 亚洲一区二区精品视频| 欧美综合久久久| 日韩精品1区2区3区| 日韩欧美国产综合| 国产盗摄一区二区| 国产精品久久久久久福利一牛影视| 成人激情图片网| 亚洲欧美成aⅴ人在线观看 | 欧美裸体bbwbbwbbw| 捆绑变态av一区二区三区| 日韩精品一区二区三区老鸭窝| 国产在线观看免费一区| 最新国产成人在线观看| 欧美综合欧美视频| 日本不卡的三区四区五区| 久久网站最新地址| 白白色 亚洲乱淫| 亚洲一二三四在线| 精品第一国产综合精品aⅴ| 国产精品一区二区三区四区| 亚洲欧美日韩一区二区| 在线综合+亚洲+欧美中文字幕| 精品系列免费在线观看|