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

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

?? xutil_memtest.c

?? ucos2在macroblaze上的移植代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* $Id: xutil_memtest.c,v 1.7 2003/12/18 00:08:26 linnj 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* </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));                }                /*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩国产一区二区三区| 狠狠色丁香婷婷综合久久片| 免费视频最近日韩| 99免费精品在线| 337p亚洲精品色噜噜| 国产精品灌醉下药二区| 奇米影视一区二区三区小说| 成人av片在线观看| 精品国产三级电影在线观看| 夜夜揉揉日日人人青青一国产精品 | 欧美mv日韩mv亚洲| 亚洲一区二区三区在线播放| 成人美女在线观看| 精品999久久久| 亚洲一级在线观看| 一本色道久久加勒比精品| 久久久高清一区二区三区| 美女尤物国产一区| 欧美日韩二区三区| 亚洲成av人影院| 精品视频色一区| 亚洲图片一区二区| 欧美制服丝袜第一页| 夜夜夜精品看看| 欧美亚洲动漫制服丝袜| 亚洲一区免费观看| 欧美主播一区二区三区美女| 亚洲免费毛片网站| 99国产精品国产精品久久| 国产精品二三区| aaa欧美大片| 中文字幕在线观看不卡| 96av麻豆蜜桃一区二区| 亚洲欧洲日韩在线| 在线视频一区二区免费| 亚洲五码中文字幕| 欧美色视频在线观看| 午夜精品久久久久影视| 69久久夜色精品国产69蝌蚪网| 日韩va亚洲va欧美va久久| 欧美日韩国产一级二级| 麻豆视频观看网址久久| 精品av综合导航| 成人一区二区三区| 亚洲精品乱码久久久久久日本蜜臀| 91网址在线看| 午夜精品福利久久久| 欧美大胆一级视频| 国产成人一区在线| 久久91精品国产91久久小草| 国产欧美日韩综合精品一区二区| caoporn国产精品| 亚洲国产日韩在线一区模特| 91精品国产一区二区三区香蕉| 狠狠久久亚洲欧美| 国产精品不卡一区| 欧美喷水一区二区| 国产传媒日韩欧美成人| 亚洲激情在线播放| 精品三级av在线| 91美女视频网站| 蜜臀久久99精品久久久久久9| wwwwxxxxx欧美| 91丨九色丨尤物| 天堂资源在线中文精品| 26uuu亚洲综合色欧美 | 日本一区二区三区dvd视频在线| 成人高清视频在线| 日韩激情一二三区| 欧美国产禁国产网站cc| 欧美精品久久一区二区三区| 国产乱人伦偷精品视频不卡| 亚洲精品va在线观看| 欧美精品一区二区三区四区| 日本高清无吗v一区| 极品少妇xxxx精品少妇| 亚洲一二三四区| 久久久精品免费网站| 欧美日韩国产片| 99视频有精品| 国产裸体歌舞团一区二区| 亚洲综合男人的天堂| 中文字幕欧美日本乱码一线二线| 欧美蜜桃一区二区三区| 成人免费视频caoporn| 麻豆成人综合网| 亚洲va欧美va天堂v国产综合| 国产拍欧美日韩视频二区| 91精品国产欧美一区二区成人| 成人性色生活片| 国内成人免费视频| 天涯成人国产亚洲精品一区av| 日韩伦理免费电影| 26uuu精品一区二区| 在线综合视频播放| 欧美性xxxxxx少妇| 91亚洲精品乱码久久久久久蜜桃| 国产成人精品一区二区三区四区| 日本欧美加勒比视频| 亚洲国产色一区| 亚洲黄一区二区三区| 国产精品久久久久一区| 久久精品亚洲一区二区三区浴池| 日韩视频免费观看高清完整版在线观看 | 国产精品久久久久四虎| 久久精品夜色噜噜亚洲a∨| 精品1区2区在线观看| 精品久久久久久久久久久久久久久久久 | 日韩欧美亚洲国产另类| 欧美福利视频导航| 欧美日韩欧美一区二区| 欧美日韩精品一区二区天天拍小说| 色偷偷成人一区二区三区91| 91一区二区在线观看| 91视视频在线观看入口直接观看www | 2020国产精品自拍| 日韩精品资源二区在线| 欧美电影免费观看完整版| 欧美一级在线视频| 日韩午夜中文字幕| 日韩精品专区在线影院观看| 欧美一区二区视频网站| 日韩情涩欧美日韩视频| 日韩精品中文字幕一区| 日韩欧美国产一区二区三区| 精品粉嫩aⅴ一区二区三区四区| 精品国产a毛片| 国产日韩亚洲欧美综合| 中文字幕亚洲一区二区av在线 | 午夜精品123| 日产精品久久久久久久性色 | 亚洲成人免费在线观看| 亚洲第一av色| 久久66热re国产| 成人午夜碰碰视频| 在线观看不卡视频| 欧美精品久久天天躁| 欧美精品一区二区三区四区| 久久视频一区二区| 日韩伦理电影网| 天堂久久久久va久久久久| 免费观看日韩av| 成人av动漫网站| 91国偷自产一区二区使用方法| 欧美丰满少妇xxxbbb| 久久伊人中文字幕| 亚洲欧美日韩国产手机在线| 免费看欧美美女黄的网站| 国产 日韩 欧美大片| 欧美丝袜丝交足nylons图片| 日韩美一区二区三区| 国产精品你懂的在线欣赏| 亚洲成人av一区二区三区| 国产成人在线色| 欧美美女直播网站| 国产亚洲一区二区三区在线观看| 亚洲天堂精品视频| 久久99精品视频| 91老师国产黑色丝袜在线| 91麻豆精品国产91久久久久久久久| 久久久久久久久岛国免费| 一区二区免费看| 成人夜色视频网站在线观看| 欧美另类变人与禽xxxxx| 亚洲欧洲精品一区二区三区不卡| 青青草精品视频| 色爱区综合激月婷婷| 久久精品视频在线免费观看| 天堂资源在线中文精品| 92国产精品观看| 久久久久久久久岛国免费| 天天影视色香欲综合网老头| 91女人视频在线观看| 26uuu欧美| 日本va欧美va瓶| 欧美日韩久久不卡| 亚洲欧美色一区| 国产精品一级黄| 精品免费国产一区二区三区四区| 亚洲成人午夜影院| 欧洲精品视频在线观看| 中文字幕日韩一区| 国产福利不卡视频| 久久综合精品国产一区二区三区| 日韩av电影一区| 91精选在线观看| 亚洲成av人在线观看| 色www精品视频在线观看| 日韩一区在线看| gogogo免费视频观看亚洲一| 久久精品男人的天堂| 国产精品香蕉一区二区三区| 精品久久久久久最新网址| 麻豆视频观看网址久久| 日韩一区二区三区视频| 免费欧美在线视频| 欧美成人伊人久久综合网| 久久精品99国产国产精| 欧美成人福利视频| 精品一区二区三区免费毛片爱|