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

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

?? xutil_memtest.c

?? 關于xilinx大學計劃培訓教程3的實例代碼
?? 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一区二区三区免费野_久草精品视频
日韩视频中午一区| 亚洲欧美日韩国产手机在线| 国产精品国产三级国产专播品爱网| 国产精品不卡在线| 狠狠色狠狠色合久久伊人| 欧美特级限制片免费在线观看| 久久久亚洲精华液精华液精华液| 亚洲超丰满肉感bbw| 99精品国产热久久91蜜凸| 久久综合久久久久88| 日韩有码一区二区三区| 在线看国产一区二区| 国产精品久久久久9999吃药| 国产精品一区二区在线播放| 91精品欧美一区二区三区综合在| 亚洲色图.com| 成人激情免费视频| 日本一区二区三区在线不卡| 国内精品久久久久影院薰衣草| 日韩一区二区三区精品视频| 亚洲bt欧美bt精品777| 91久久精品午夜一区二区| 视频在线观看一区二区三区| 在线观看一区日韩| 一区二区三区不卡在线观看| 99在线精品视频| 国产精品久久毛片a| 成人毛片视频在线观看| 欧美国产丝袜视频| 成人一区二区视频| 中文字幕一区三区| av男人天堂一区| 亚洲欧美日韩一区| 一本色道久久综合亚洲91| 亚洲人成伊人成综合网小说| 91在线观看高清| 亚洲乱码国产乱码精品精可以看| 91老师国产黑色丝袜在线| **性色生活片久久毛片| 色综合久久中文综合久久牛| 一区二区激情视频| 5858s免费视频成人| 免费一级欧美片在线观看| 欧美一级高清片| 国产馆精品极品| 亚洲欧洲日韩一区二区三区| 日本韩国一区二区三区| 午夜久久久影院| 日韩一区二区三| 国产河南妇女毛片精品久久久| 国产精品久久一卡二卡| 色婷婷亚洲综合| 人人爽香蕉精品| 日本一区二区在线不卡| 色一区在线观看| 奇米色一区二区三区四区| 国产亚洲女人久久久久毛片| 一本到一区二区三区| 全国精品久久少妇| 国产人妖乱国产精品人妖| 色婷婷亚洲精品| 麻豆精品久久久| 亚洲欧美偷拍三级| 日韩视频123| www.66久久| 色综合久久88色综合天天| 日韩精品亚洲一区| 国产日韩精品一区二区三区在线| 在线影院国内精品| 国产一区二区三区在线观看精品 | 国产精品久久午夜| 欧美日韩日日骚| 丁香婷婷综合网| 天天综合色天天综合| 久久精品一级爱片| 欧美日韩成人在线| av在线播放不卡| 国内成+人亚洲+欧美+综合在线| 综合亚洲深深色噜噜狠狠网站| 欧美一区二区播放| 在线免费视频一区二区| 国产成人精品在线看| 亚洲444eee在线观看| 日韩一区欧美一区| 亚洲精品一区二区三区福利| 欧美日韩一卡二卡三卡| 成人免费毛片a| 狠狠狠色丁香婷婷综合久久五月| 亚洲国产一区二区三区青草影视| 欧美国产精品劲爆| 欧美精品一区视频| 欧美美女bb生活片| 欧美午夜精品一区二区蜜桃 | 99精品国产99久久久久久白柏| 裸体歌舞表演一区二区| 亚洲国产三级在线| 亚洲精品成人少妇| 中文字幕在线观看不卡视频| 久久精品夜夜夜夜久久| 欧美成人bangbros| 91精品国产高清一区二区三区 | 欧美日韩精品高清| 欧美中文字幕一区| 在线观看免费成人| 91在线视频在线| 成人av一区二区三区| 国产1区2区3区精品美女| 麻豆精品视频在线| 精品中文字幕一区二区小辣椒| 婷婷成人综合网| 午夜精品视频在线观看| 亚洲永久免费av| 亚洲男人的天堂在线aⅴ视频| 中文字幕av一区二区三区免费看| 国产日韩欧美亚洲| 国产精品久久久久aaaa樱花| 国产精品国产三级国产普通话三级| 国产人成亚洲第一网站在线播放| 久久蜜桃av一区二区天堂| 精品sm在线观看| 国产亚洲欧美一级| 国产精品久久看| 亚洲免费观看高清| 婷婷综合五月天| 免费看欧美女人艹b| 黄色精品一二区| 成人黄色a**站在线观看| 99re热这里只有精品视频| 色综合视频一区二区三区高清| 26uuu另类欧美| 亚洲国产精品精华液2区45| 国产精品私人影院| 亚洲另类色综合网站| 午夜欧美一区二区三区在线播放| 视频一区在线视频| 国产精品一区二区三区99 | 国产一区二区影院| 99久久精品免费| 欧美日韩二区三区| 2020国产精品自拍| 亚洲素人一区二区| 日韩和欧美一区二区| 国产成人av电影免费在线观看| 91免费视频大全| 欧美日韩1234| 久久综合九色综合欧美就去吻| 国产精品伦理一区二区| 午夜a成v人精品| 国产精品乡下勾搭老头1| 91精品福利视频| www国产精品av| 亚洲影院理伦片| 国产综合色视频| 欧美天堂亚洲电影院在线播放| 精品88久久久久88久久久| 亚洲精品亚洲人成人网在线播放| 麻豆免费看一区二区三区| aaa欧美日韩| 精品国产一区二区三区四区四 | 色老汉av一区二区三区| 欧美xxxxx裸体时装秀| 亚洲视频小说图片| 久久精品噜噜噜成人av农村| 91精品国产综合久久久久久久久久 | 日韩精品一区二区三区三区免费| 国产精品激情偷乱一区二区∴| 午夜视频在线观看一区二区| 成人黄页在线观看| 日韩一级免费观看| 亚洲成人动漫一区| 99国产精品99久久久久久| 精品电影一区二区三区| 午夜视频在线观看一区| 91麻豆高清视频| 国产色爱av资源综合区| 美女免费视频一区二区| 欧美日韩精品一区二区| 亚洲六月丁香色婷婷综合久久| 国产麻豆9l精品三级站| 欧美岛国在线观看| 日本视频中文字幕一区二区三区| av成人免费在线| 国产免费观看久久| 国产一区美女在线| 精品久久久久久久久久久久久久久久久| 一区二区三区欧美日韩| 91免费视频大全| 日韩一区在线播放| 波波电影院一区二区三区| 久久久精品免费网站| 国产曰批免费观看久久久| 日韩欧美色综合网站| 蜜臀av性久久久久蜜臀aⅴ流畅 | 男女视频一区二区| 91精品国产综合久久久久久| 亚洲一区在线看| 欧美色视频在线| 午夜久久福利影院| 日韩一区二区三区免费看| 美女尤物国产一区|