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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? xutil_memtest.c

?? ucos2在macroblaze上的移植代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
                 * 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 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 = (Xuint16) (~((Xuint32)(&Addr[i])));                Addr[i] = Val;            }            /*             * Check every word within the Words             * of tested memory             */            for (i = 0L; i < Words; i++)            {                 /* read memory location */                Word = Addr[i];                Val = (Xuint16) (~((Xuint32)(&Addr[i])));                if ((Word ^ Val) != 0x0000)                {                    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 = 0xDEAD;            }            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 8-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_MemoryTest8(Xuint8 *Addr,Xuint32 Words, Xuint8 Pattern,                          Xuint8 Subtest){    Xuint32 i;    Xuint32 j;    Xuint8 Val= XUT_MEMTEST_INIT_VALUE;    Xuint8 FirstVal= XUT_MEMTEST_INIT_VALUE;    Xuint8 Word;    XASSERT_NONVOID(Words != 0);    XASSERT_NONVOID(Subtest <= XUT_MAXTEST);    /*     * select the 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 < 8; 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 < 8; i++)                {                    /* write memory location */                    Addr[i] = Val;                    Val = (Xuint8) RotateLeft(Val, 8);                }                /*                 * Restore the reference 'Val' to the                 * initial value                 */                Val = 1 << j;                /* Read the values from each location that was written */                for (i = 0L; i < 8; i++)                {                    /* read memory location */                    Word = Addr[i];                    if (Word != Val)                    {                        return XST_MEMTEST_FAILED;                    }                    Val = (Xuint8) RotateLeft(Val, 8);                }            }            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 < 8; 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 < 8; i++)                {                    /* write memory location */                    Addr[i] = Val;                    Val = ~((Xuint8) RotateLeft(~Val, 8));                }                /*                 * Restore the reference 'Val' to the                 * initial value                 */                Val = ~(1 << j);                /* Read the values from each location that was written */                for (i = 0L; i < 8; i++)                {                    /* read memory location */                    Word = Addr[i];                    if (Word != Val)                    {                        return XST_MEMTEST_FAILED;                    }                    Val = ~((Xuint8) RotateLeft(~Val, 8));                }            }            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 = (Xuint8) (~((Xuint32)(&Addr[i])));                Addr[i] = Val;            }            /*             * Check every word within the Words             * of tested memory             */            for (i = 0L; i < Words; i++)            {                /* read memory location */                Word = Addr[i];                Val = (Xuint8) (~((Xuint32)(&Addr[i])));                if ((Word ^ Val) != 0x00)                {                    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 = 0xA5;            }            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;}/*****************************************************************************//**** Rotates the provided value to the left one bit position** @param    Input is value to be rotated to the left* @param    Width is the number of bits in the input data** @return** The resulting unsigned long value of the rotate left** @note** None.******************************************************************************/static Xuint32 RotateLeft(Xuint32 Input, Xuint8 Width){    Xuint32 Msb;    Xuint32 ReturnVal;    Xuint32 WidthMask;    Xuint32 MsbMask;    /*     * set up the WidthMask and the MsbMask     */    MsbMask = 1 << (Width-1);    WidthMask = (MsbMask << 1) - 1;    /*     * set the width of the Input to the correct width     */    Input = Input & WidthMask;    Msb = Input & MsbMask;    ReturnVal = Input << 1;    if (Msb != 0x00000000)    {        ReturnVal = ReturnVal | 0x00000001;    }    ReturnVal = ReturnVal & WidthMask;    return (ReturnVal);}#ifdef ROTATE_RIGHT/*****************************************************************************//**** Rotates the provided value to the right one bit position** @param    Input is value to be rotated to the right* @param    Width is the number of bits in the input data** @return** The resulting Xuint32 value of the rotate right** @note** None.******************************************************************************/static Xuint32 RotateRight(Xuint32 Input, Xuint8 Width){    Xuint32 Lsb;    Xuint32 ReturnVal;    Xuint32 WidthMask;    Xuint32 MsbMask;    /*     * set up the WidthMask and the MsbMask     */    MsbMask = 1 << (Width-1);    WidthMask = (MsbMask << 1) - 1;    /*     * set the width of the Input to the correct width     */    Input = Input & WidthMask;    ReturnVal = Input >> 1;    Lsb = Input & 0x00000001;    if (Lsb != 0x00000000)    {        ReturnVal = ReturnVal | MsbMask;    }    ReturnVal = ReturnVal & WidthMask;    return (ReturnVal);}#endif /* ROTATE_RIGHT */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产a精品视频| 欧美色爱综合网| 日本韩国一区二区三区| 日韩午夜三级在线| 专区另类欧美日韩| 国产精品88av| 91精品欧美久久久久久动漫 | 国产三级一区二区| 视频一区中文字幕| 色视频一区二区| 日本一区二区动态图| 精品在线免费视频| 91精品国产综合久久精品性色| 国产精品成人一区二区三区夜夜夜| 久久99深爱久久99精品| 欧美日韩精品综合在线| 亚洲情趣在线观看| 91网站在线观看视频| 国产精品麻豆一区二区| 国产精品66部| 久久久99久久| 国产精品亚洲一区二区三区妖精 | 日韩一区日韩二区| 成人在线一区二区三区| 久久久久久久精| 国产综合久久久久久鬼色| 精品卡一卡二卡三卡四在线| 青青草原综合久久大伊人精品优势| 欧美日韩一区二区三区四区| 亚洲在线观看免费| 欧美日韩亚洲不卡| 日韩国产欧美在线播放| 欧美一区二区三区日韩| 久久99国产精品尤物| 亚洲精品在线免费观看视频| 国产一区二区三区不卡在线观看| 久久综合视频网| 国产精品夜夜嗨| 综合欧美一区二区三区| 在线一区二区视频| 亚洲bt欧美bt精品| 欧美大胆一级视频| 国产精品一品二品| 亚洲色图19p| 欧美三级乱人伦电影| 丝袜诱惑制服诱惑色一区在线观看 | 免费久久精品视频| 精品国产免费久久| k8久久久一区二区三区| 亚洲一区二区三区四区不卡| 欧美区一区二区三区| 久久精品国产亚洲a| 国产欧美一区二区三区网站| 一本色道久久加勒比精品| 亚洲午夜羞羞片| 精品少妇一区二区三区| 成人三级伦理片| 亚洲成人免费在线观看| 精品久久久久99| 91视视频在线观看入口直接观看www| 亚洲最新视频在线观看| 日韩欧美一级片| av一本久道久久综合久久鬼色| 亚洲成人在线网站| 国产免费观看久久| 欧美日韩免费一区二区三区| 国产精品影视在线| 亚洲一区av在线| 久久久久久久久岛国免费| 欧美综合亚洲图片综合区| 精品写真视频在线观看| 一区二区三区精品在线| 久久伊人蜜桃av一区二区| 在线观看日韩毛片| 国产精品一卡二卡在线观看| 午夜欧美在线一二页| 国产日产欧产精品推荐色 | 午夜欧美在线一二页| 中文字幕成人在线观看| 91麻豆精品国产综合久久久久久 | 亚洲三级小视频| 欧美va在线播放| 欧美日韩中文一区| 99国产欧美另类久久久精品| 久久99精品久久久久久久久久久久 | 日本美女一区二区| 亚洲毛片av在线| 国产精品你懂的| 久久亚洲二区三区| 69久久99精品久久久久婷婷 | 国产91在线|亚洲| 蜜桃精品视频在线观看| 亚洲国产精品嫩草影院| 亚洲精品综合在线| 国产精品色眯眯| 久久久久亚洲蜜桃| 欧美xxxxxxxx| 日韩精品一区二区三区在线播放| 欧美私人免费视频| 欧洲一区二区三区在线| 91在线国产观看| 97超碰欧美中文字幕| 成人免费av资源| 成人国产在线观看| 成人午夜av影视| 成人午夜伦理影院| 97精品久久久午夜一区二区三区| 懂色av一区二区在线播放| 国产一区二区按摩在线观看| 久久99精品国产麻豆婷婷| 精彩视频一区二区| 国产制服丝袜一区| 国产精品69毛片高清亚洲| 国产精品1区2区3区在线观看| 狠狠色丁香婷婷综合久久片| 黄网站免费久久| 国产酒店精品激情| 成人免费福利片| 一本色道**综合亚洲精品蜜桃冫| 91无套直看片红桃| 欧美精品久久久久久久多人混战 | 欧美在线三级电影| 91黄色小视频| 欧美顶级少妇做爰| 精品女同一区二区| 国产午夜亚洲精品不卡| 国产精品美女视频| 一区二区三区四区高清精品免费观看 | 亚洲日本免费电影| 亚洲va在线va天堂| 九色|91porny| 成人深夜福利app| 欧美日韩精品一区二区三区| 91精品欧美福利在线观看| 亚洲精品一区二区三区在线观看| 久久久国际精品| 亚洲欧美经典视频| 日本不卡一区二区三区高清视频| 国产一区二区日韩精品| 9i看片成人免费高清| 欧美剧情片在线观看| 久久精品人人做| 一区二区三区四区视频精品免费 | 在线一区二区三区做爰视频网站| 欧美日韩免费电影| 国产视频一区二区三区在线观看| 亚洲柠檬福利资源导航| 麻豆精品视频在线观看视频| 不卡一区二区中文字幕| 欧美二区三区的天堂| 国产精品三级久久久久三级| 香蕉久久夜色精品国产使用方法 | 中文字幕在线不卡国产视频| 天堂成人国产精品一区| 成人黄动漫网站免费app| 欧美精品国产精品| 亚洲欧美一区二区在线观看| 日韩和欧美一区二区三区| 成人的网站免费观看| 日韩欧美高清一区| 亚洲综合在线视频| 成人免费看片app下载| 日韩一区二区三区视频在线观看| 亚洲免费av在线| 国产成人在线看| 日韩一区二区免费在线电影| 亚洲欧美韩国综合色| 国产精品66部| 日韩免费看网站| 午夜精品久久久久| 色综合久久综合中文综合网| 久久久久一区二区三区四区| 婷婷久久综合九色国产成人| 91在线码无精品| 国产精品欧美一区喷水| 精品中文字幕一区二区小辣椒| 欧美专区亚洲专区| 亚洲欧美日韩精品久久久久| 国内精品第一页| 欧美xxxxxxxxx| 久久精品国产久精国产| 欧美日韩国产综合一区二区三区 | 极品少妇一区二区| 日韩一二三四区| 五月天亚洲精品| 在线亚洲精品福利网址导航| 自拍偷拍亚洲欧美日韩| 成人高清视频在线| 中文字幕av一区二区三区免费看 | 中文字幕制服丝袜一区二区三区 | 国产盗摄一区二区| 久久久久久久电影| 黄网站免费久久| 久久影院午夜片一区| 国产在线不卡一区| 亚洲精品在线电影| 丰满少妇在线播放bd日韩电影| 国产亚洲欧美激情| 国产99久久久精品| 亚洲视频香蕉人妖|