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

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

?? xutil_memtest.c

?? 關于xilinx大學計劃配需教程實驗五源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
                 * 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一区二区三区免费野_久草精品视频
亚洲国产精品精华液2区45| 国产亚洲精品中文字幕| 91伊人久久大香线蕉| 成人中文字幕在线| 不卡av在线免费观看| yourporn久久国产精品| 99精品国产热久久91蜜凸| 91久久精品一区二区| 色婷婷亚洲精品| 在线观看亚洲精品| 91精品视频网| 欧美精品一区二区久久婷婷 | 亚洲精品高清在线观看| 亚洲男人的天堂在线aⅴ视频| 国产真实乱子伦精品视频| 久久草av在线| 国产自产高清不卡| av动漫一区二区| 欧日韩精品视频| 日韩精品中文字幕在线不卡尤物| 日韩欧美成人一区二区| 中文幕一区二区三区久久蜜桃| 亚洲免费高清视频在线| 亚洲一区二区视频在线观看| 麻豆精品视频在线| 国产成人精品亚洲日本在线桃色| 91丨porny丨最新| 欧美亚男人的天堂| 久久视频一区二区| 一区二区三区四区视频精品免费 | 欧美极品另类videosde| 中文字幕佐山爱一区二区免费| 午夜不卡在线视频| 风间由美一区二区av101| 91美女福利视频| 精品久久久久久久久久久久久久久| 欧美国产欧美综合| 日韩激情视频在线观看| 成人开心网精品视频| 欧美精品黑人性xxxx| 国产欧美日韩一区二区三区在线观看 | 欧洲精品一区二区| 久久综合狠狠综合| 亚洲成人精品影院| 成人av网址在线| 日韩亚洲欧美在线| 久久电影国产免费久久电影| av中文字幕一区| 欧美tickling网站挠脚心| 亚洲精品自拍动漫在线| 国产成人无遮挡在线视频| 欧美日韩国产另类一区| 亚洲欧洲日产国产综合网| 美国av一区二区| 欧美二区三区的天堂| 一区二区久久久久久| 成人福利电影精品一区二区在线观看 | 国产精品中文字幕日韩精品| 欧美一区二区观看视频| 亚洲香蕉伊在人在线观| 色婷婷综合五月| 一区二区中文视频| 成人午夜私人影院| 日本一区二区三区久久久久久久久不 | 欧美一区二区免费观在线| 亚洲尤物在线视频观看| 99精品欧美一区二区蜜桃免费| 精品成人一区二区| 国产精品一区在线观看乱码| 精品国产免费视频| 精品亚洲aⅴ乱码一区二区三区| 欧美怡红院视频| 亚洲一区免费观看| 欧美在线免费观看视频| 亚洲午夜免费福利视频| 欧美性一级生活| 亚洲电影中文字幕在线观看| 欧美亚洲禁片免费| 亚洲国产精品精华液网站| 欧美视频第二页| 国产高清精品网站| 国产精品成人在线观看| 91美女视频网站| 亚洲精品成人精品456| 91在线国内视频| 一区二区三区免费在线观看| 91福利视频在线| 日韩高清在线观看| 久久综合视频网| 成人免费观看视频| 亚洲九九爱视频| 欧美肥妇free| 国产成人综合精品三级| 综合久久久久久| 欧美久久免费观看| 国产精一区二区三区| 亚洲少妇屁股交4| 欧美伦理电影网| 国产一区二区久久| 亚洲精品免费播放| 欧美一级生活片| 不卡欧美aaaaa| 亚洲在线成人精品| 精品1区2区在线观看| 成人免费av在线| 五月天欧美精品| 久久一夜天堂av一区二区三区 | 日韩av电影一区| 国产欧美日韩麻豆91| 欧美这里有精品| 国内成人免费视频| 亚洲国产精品人人做人人爽| 日韩三级中文字幕| 91麻豆免费看| 国产最新精品免费| 亚洲国产成人va在线观看天堂| 日韩欧美第一区| 欧洲精品视频在线观看| 国产黄色精品视频| 美女免费视频一区二区| 亚洲视频在线观看三级| 日韩久久久精品| 在线视频综合导航| 成人污污视频在线观看| 日本三级韩国三级欧美三级| 中文字幕一区二区三区四区 | 亚洲欧洲国产日本综合| 欧美一区二区三区免费在线看 | 成人午夜伦理影院| 老司机免费视频一区二区三区| 亚洲一区欧美一区| 中文字幕在线一区免费| 久久久欧美精品sm网站| 正在播放亚洲一区| 99国产精品久| 成人自拍视频在线观看| 狠狠色综合播放一区二区| 日韩黄色片在线观看| 樱桃视频在线观看一区| 欧美国产97人人爽人人喊| xfplay精品久久| 日韩欧美国产一二三区| 91麻豆精品国产自产在线| 在线精品视频小说1| 91在线高清观看| 欧美一级午夜免费电影| 欧美亚洲综合色| 欧美色手机在线观看| 欧美自拍偷拍一区| 色国产精品一区在线观看| 91一区二区三区在线观看| 91视频你懂的| 91在线码无精品| 在线观看免费成人| 欧美三级资源在线| 欧美日韩高清在线| 91精品蜜臀在线一区尤物| 在线播放欧美女士性生活| 56国语精品自产拍在线观看| 91麻豆精品国产91| 制服丝袜成人动漫| 精品少妇一区二区三区日产乱码| 91精品欧美久久久久久动漫| 日韩一区二区三区三四区视频在线观看 | av一二三不卡影片| av一本久道久久综合久久鬼色| 91视频.com| 欧美日韩一区三区四区| 日韩一区二区三区免费看 | 91麻豆精品秘密| 欧美日韩国产天堂| 精品国产乱码久久久久久久久| 久久亚区不卡日本| 亚洲女同一区二区| 午夜精品一区二区三区免费视频| 日本欧美肥老太交大片| 国产精品一区二区你懂的| 97成人超碰视| 亚洲黄色av一区| 51精品国自产在线| 久久久久国产免费免费| 亚洲国产经典视频| 亚洲影视资源网| 久久99精品国产91久久来源| 成人午夜视频网站| 欧美日韩免费电影| 久久亚洲欧美国产精品乐播| 亚洲欧美一区二区三区极速播放| 五月婷婷久久丁香| 国产99久久久国产精品潘金网站| 91在线看国产| 久久影院视频免费| 亚州成人在线电影| 不卡的电影网站| 欧美不卡123| 一区二区三区不卡视频| 国产福利电影一区二区三区| 欧美群妇大交群中文字幕| 国产精品嫩草影院av蜜臀| 爽爽淫人综合网网站|