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

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

?? xutil_memtest.c

?? 關于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一区二区三区免费野_久草精品视频
91麻豆免费观看| 亚洲欧洲国产专区| 亚洲欧美日韩电影| 久久精品国产久精国产爱| 一本久久综合亚洲鲁鲁五月天| 日韩视频不卡中文| 亚洲欧美国产77777| 国产成人免费视频网站 | 国产成人免费视频精品含羞草妖精| 色婷婷国产精品| 欧美韩日一区二区三区| 麻豆精品一区二区av白丝在线| 色吊一区二区三区| 国产精品国产三级国产有无不卡 | 不卡一区二区在线| 久久久精品日韩欧美| 免费观看一级特黄欧美大片| 欧美在线一二三| 中文字幕日韩精品一区| 国产毛片精品一区| 精品剧情v国产在线观看在线| 亚洲gay无套男同| 在线观看一区日韩| 亚洲一线二线三线久久久| aaa亚洲精品一二三区| 日本一区二区免费在线| 国产一区二区在线影院| 日韩精品影音先锋| 久久精品久久99精品久久| 日韩午夜中文字幕| 久久国产视频网| 日韩精品一区二区三区四区| 久久精品国产精品青草| 日韩一区二区免费视频| 蜜桃久久精品一区二区| 日韩精品一区二区三区视频播放 | 日本不卡不码高清免费观看| 欧美日韩大陆一区二区| 丝袜美腿亚洲一区二区图片| 欧美日韩视频在线一区二区 | 国产精品福利一区二区| 成人激情免费网站| 国产精品福利一区| 欧美性色欧美a在线播放| 婷婷夜色潮精品综合在线| 欧美一区二区私人影院日本| 麻豆91精品91久久久的内涵| 精品国产乱码久久久久久闺蜜| 国产.欧美.日韩| 一区免费观看视频| 欧美三片在线视频观看 | 国产一区二区三区| 一色桃子久久精品亚洲| 欧美午夜免费电影| 美腿丝袜一区二区三区| 中文无字幕一区二区三区| 在线免费观看不卡av| 奇米综合一区二区三区精品视频| 久久日韩粉嫩一区二区三区| 91网站最新网址| 日本亚洲最大的色成网站www| 久久免费美女视频| 欧洲生活片亚洲生活在线观看| 五月激情综合色| 久久久青草青青国产亚洲免观| 97久久人人超碰| 美女免费视频一区| 国产精品视频看| 91精品欧美福利在线观看| 国产成人精品1024| 亚洲第一搞黄网站| 国产精品麻豆网站| 欧美高清视频不卡网| 国产精品一二三四| 午夜精品成人在线视频| 久久久久久99久久久精品网站| 色999日韩国产欧美一区二区| 韩国欧美一区二区| 亚洲一区二区三区在线看| 久久夜色精品国产欧美乱极品| 在线视频国内自拍亚洲视频| 国产二区国产一区在线观看| 天堂在线亚洲视频| 亚洲视频在线观看一区| 精品成人a区在线观看| 欧美日韩国产影片| 99天天综合性| 国产高清亚洲一区| 老司机午夜精品| 亚洲一区二区美女| 亚洲欧美视频在线观看| 国产女主播在线一区二区| 欧美一级淫片007| 欧美日韩国产另类一区| 91首页免费视频| 成人午夜视频免费看| 国产露脸91国语对白| 美女久久久精品| 日韩高清电影一区| 亚洲午夜久久久久久久久电影院| 中文文精品字幕一区二区| 久久久久久久电影| 26uuu欧美| 久久久久青草大香线综合精品| 欧美高清视频一二三区 | 日韩精品乱码免费| 一区二区三区精品在线| 亚洲欧美区自拍先锋| 国产精品成人网| 国产精品九色蝌蚪自拍| 中文字幕一区免费在线观看| 国产精品美女www爽爽爽| 国产欧美一区二区精品忘忧草| 26uuu国产在线精品一区二区| 日韩亚洲欧美在线| 日韩免费在线观看| 欧美精品一区二区三区视频| 欧美一级免费观看| 欧美一二三四区在线| 在线91免费看| 欧美大度的电影原声| 精品国产一区二区三区久久久蜜月 | 欧美www视频| 久久综合九色综合97婷婷| 精品欧美久久久| 国产性色一区二区| 国产精品第一页第二页第三页 | 久久久久九九视频| 国产精品日韩精品欧美在线| 中文字幕制服丝袜成人av| 亚洲欧美视频在线观看| 午夜精品久久久久久| 麻豆成人综合网| 成人av资源网站| 在线亚洲一区观看| 91精品国产综合久久香蕉的特点| 日韩精品一区二区在线观看| 国产欧美日韩三级| 亚洲激情六月丁香| 奇米亚洲午夜久久精品| 国产成人精品三级| 在线免费观看日韩欧美| 日韩精品一区二区三区视频在线观看 | 亚洲老司机在线| 日韩综合小视频| 国产盗摄一区二区三区| 欧美性猛片aaaaaaa做受| 精品国内片67194| 亚洲视频一区二区在线| 免费成人av在线| 99国内精品久久| 日韩视频免费观看高清完整版| 国产精品的网站| 麻豆中文一区二区| 91网上在线视频| 精品国内片67194| 亚洲一区二区综合| 国产精品一二二区| 欧美精品少妇一区二区三区| 亚洲精品一区在线观看| 亚洲综合视频在线| 国产精品一区二区久久精品爱涩| 欧美性大战久久| 国产精品全国免费观看高清| 日韩经典中文字幕一区| 91麻豆精东视频| 国产视频一区在线播放| 视频在线观看国产精品| 91在线精品秘密一区二区| 欧美大片一区二区三区| 亚洲成人手机在线| 91在线小视频| 国产精品丝袜一区| 另类小说欧美激情| 欧美精品在线视频| 亚洲美女视频在线| 成人av电影在线播放| 久久久精品免费观看| 欧美a一区二区| 欧美唯美清纯偷拍| 亚洲情趣在线观看| 处破女av一区二区| www久久精品| 久久精品久久99精品久久| 欧美巨大另类极品videosbest | 欧美极品另类videosde| 国产真实乱子伦精品视频| 欧美女孩性生活视频| 一区二区在线电影| 色欧美片视频在线观看| 国产精品毛片a∨一区二区三区| 国产精品一区二区在线播放| 日韩久久免费av| 久久国产乱子精品免费女| 日韩免费观看高清完整版| 久久成人久久爱| 精品久久久久久最新网址| 裸体一区二区三区| 精品国产123| 国产成人一级电影|