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

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

?? xutil_memtest.c

?? <基于fpga的嵌入式設計上的光盤的第四章第二個實驗
?? 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一免费| 在线观看视频一区| 日本美女一区二区三区| xfplay精品久久| 91蝌蚪国产九色| 久久精品久久综合| 一区二区三区欧美激情| 亚洲精品一区二区三区在线观看| 成人三级伦理片| 久久国产精品无码网站| 一区二区三区中文免费| 欧美成人精品高清在线播放| 成人国产精品免费观看| 亚洲精品一卡二卡| 日本一区二区三区免费乱视频| 欧美综合一区二区| 91亚洲男人天堂| 国产成人在线观看| 国产大陆精品国产| 久久99国产精品免费| 日一区二区三区| 亚洲成人精品影院| 亚洲3atv精品一区二区三区| 国产精品卡一卡二| 国产欧美一区二区精品婷婷 | 国产精品免费看片| 久久亚洲精华国产精华液| 日韩欧美中文字幕公布| 91精品国产综合久久婷婷香蕉| 欧美午夜免费电影| 欧美日韩国产美女| 欧美一级在线观看| 欧美xingq一区二区| 国产欧美日韩综合精品一区二区| 久久综合狠狠综合久久综合88| 337p粉嫩大胆噜噜噜噜噜91av| 日韩欧美国产综合| 国产精品国产三级国产有无不卡 | 国产性天天综合网| 中文一区一区三区高中清不卡| 国产欧美1区2区3区| 一区二区日韩av| 精品一区二区三区免费视频| 国产一区三区三区| 色香蕉久久蜜桃| 精品国产一区二区三区av性色| 中文字幕免费不卡在线| 天天综合日日夜夜精品| 在线视频综合导航| 欧美日韩亚洲不卡| 精品久久久久香蕉网| 亚洲自拍另类综合| 粉嫩蜜臀av国产精品网站| 这里只有精品电影| 亚洲品质自拍视频| av一区二区久久| 久久久不卡影院| 久久99久久久欧美国产| 欧美日韩国产片| 亚洲国产日韩精品| 欧美伊人精品成人久久综合97| 久久青草国产手机看片福利盒子| 亚洲一区二区三区四区五区黄 | 黑人巨大精品欧美黑白配亚洲| 91官网在线观看| 亚洲精品第1页| 91视频免费观看| 亚洲一区二区三区中文字幕| 99久久婷婷国产综合精品电影| 国产精品女主播av| 99久久久久久| 香蕉久久一区二区不卡无毒影院 | 欧美日韩日日夜夜| 图片区小说区区亚洲影院| 91精彩视频在线| 日本不卡的三区四区五区| 日韩欧美在线1卡| 国产精品影音先锋| 亚洲免费资源在线播放| 在线日韩国产精品| 蜜臀91精品一区二区三区| 精品久久久久久久久久久久久久久久久| 蜜臀久久99精品久久久久宅男| 欧美大片日本大片免费观看| 国产美女av一区二区三区| 国产精品你懂的在线欣赏| 在线免费观看成人短视频| 久久99九九99精品| 亚洲精品伦理在线| 国产日韩欧美综合一区| 欧美性色欧美a在线播放| 久久av资源网| 午夜精品成人在线| 亚洲女子a中天字幕| 日韩精品在线网站| 欧美一区二区三区四区视频| 风间由美一区二区av101| 日韩经典一区二区| 一区二区三区日韩在线观看| 国产欧美精品一区| 久久亚洲综合色一区二区三区| 91在线码无精品| 成人h动漫精品一区二区| 精品亚洲porn| 国产真实乱子伦精品视频| 日本成人在线不卡视频| 一区二区三区精品视频在线| 欧美激情在线免费观看| 精品久久久久久久久久久久久久久 | 国产一区二区不卡| 精东粉嫩av免费一区二区三区| 亚洲午夜三级在线| 青青草97国产精品免费观看无弹窗版| 亚洲欧美乱综合| 亚洲福利视频一区二区| 天堂va蜜桃一区二区三区| 亚洲6080在线| 国产酒店精品激情| 成人美女在线观看| 色噜噜狠狠一区二区三区果冻| 色香蕉久久蜜桃| 欧美一级国产精品| 国产欧美日韩激情| 一区二区三区在线视频观看| 成人性生交大合| 国产精品一区二区黑丝| 最近日韩中文字幕| 欧美岛国在线观看| 最新国产成人在线观看| 亚洲高清免费在线| 99久久伊人精品| 精品久久久久久久人人人人传媒| 欧美国产视频在线| 日本不卡高清视频| 97久久超碰精品国产| 91精品国产一区二区| 亚洲男女毛片无遮挡| 国产精品1024| 26uuu精品一区二区三区四区在线| 久久久精品国产99久久精品芒果| 亚洲一区电影777| bt欧美亚洲午夜电影天堂| 欧美精品一区二区高清在线观看 | 欧美一级视频精品观看| 亚洲欧美国产毛片在线| 国产精品影视网| 欧美本精品男人aⅴ天堂| 国产午夜一区二区三区| 中文字幕久久午夜不卡| 蜜桃av噜噜一区| 91看片淫黄大片一级在线观看| 激情伊人五月天久久综合| 在线中文字幕一区二区| 中文字幕一区二区在线播放| 国产成人综合在线播放| 久久精品亚洲国产奇米99| 精品一区二区三区在线观看国产| 欧美日韩在线播放三区四区| 亚洲一级不卡视频| 4438x成人网最大色成网站| 午夜欧美在线一二页| 4438x成人网最大色成网站| 日韩在线一区二区三区| 精品理论电影在线观看| 波多野结衣中文字幕一区二区三区 | 老司机精品视频导航| 久久精品水蜜桃av综合天堂| 国产成人av电影在线| 亚洲欧洲日本在线| 欧美电影免费观看高清完整版| 国产在线不卡一卡二卡三卡四卡| 国产精品大尺度| 日韩美女主播在线视频一区二区三区| 日本一不卡视频| 亚洲视频一区二区在线观看| 欧美一三区三区四区免费在线看 | 国产婷婷精品av在线| 欧美中文字幕一区| 粉嫩13p一区二区三区| 日韩中文字幕一区二区三区| 国产精品女主播av| 久久久一区二区三区| 欧美日韩夫妻久久| 在线观看免费成人| 91玉足脚交白嫩脚丫在线播放| 韩国精品主播一区二区在线观看 | 喷白浆一区二区| 亚洲午夜三级在线| 一区二区三区小说| 亚洲少妇30p| 亚洲色图视频免费播放| 国产精品无人区| 久久久激情视频| 久久精品欧美日韩精品| 51精品国自产在线| 日韩欧美高清在线| 精品国产乱码久久久久久牛牛 | 粉嫩av一区二区三区粉嫩| 九九久久精品视频|