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

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

?? xutil_memtest.c

?? <基于fpga的嵌入式設計上的光盤的第四章第二個實驗
?? 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一区二区三区免费野_久草精品视频
91精品国产综合久久久久久漫画| 欧美日韩中字一区| 欧美电影免费观看完整版| 亚洲第一精品在线| 欧美日韩视频一区二区| 天堂资源在线中文精品| 欧美色区777第一页| 免费高清在线一区| 国产欧美日韩在线观看| 色综合天天视频在线观看| 亚洲超碰97人人做人人爱| 亚洲精品一线二线三线无人区| 国产精品免费久久| 99精品欧美一区二区三区小说| 欧美日韩一级大片网址| 日本aⅴ亚洲精品中文乱码| 久久综合999| 色视频欧美一区二区三区| 首页欧美精品中文字幕| 久久久久久9999| 91视频com| 精品一区二区三区欧美| 国产精品国产三级国产aⅴ入口| 国模少妇一区二区三区| 中文字幕一区二区三| 欧美老肥妇做.爰bbww| 国产精品538一区二区在线| 亚洲人妖av一区二区| 欧美日韩精品久久久| 国产成人综合亚洲91猫咪| 亚洲一区二区三区激情| 久久久久久亚洲综合| 欧美亚洲尤物久久| 国产精品正在播放| 亚洲成人一区二区| 国产精品久久久久精k8| 日韩欧美电影在线| 日本久久精品电影| 国产精品资源在线| 欧美aaa在线| 一区二区激情小说| 欧美经典一区二区| 欧美一区午夜精品| 在线观看av一区二区| 国产一区福利在线| 婷婷六月综合网| 1024成人网色www| 久久精品综合网| 日韩欧美一区二区视频| 欧美在线制服丝袜| 91性感美女视频| 国产成人av自拍| 久久er精品视频| 午夜精品免费在线| 亚洲一区在线视频观看| 国产精品理论在线观看| 久久精品夜夜夜夜久久| 欧美一级生活片| 欧美高清性hdvideosex| 色香蕉成人二区免费| 成人网页在线观看| 国产成人午夜电影网| 久久成人免费网| 六月丁香婷婷久久| 日韩综合小视频| 亚洲www啪成人一区二区麻豆| 日韩一级在线观看| 91麻豆精品国产| 欧美丰满美乳xxx高潮www| 欧美少妇bbb| 69堂国产成人免费视频| 欧美日韩高清一区二区三区| 在线一区二区三区四区五区 | 樱花草国产18久久久久| 久久先锋影音av鲁色资源网| 日韩美女主播在线视频一区二区三区| 国产很黄免费观看久久| 麻豆国产精品视频| 蜜桃视频免费观看一区| 天堂蜜桃91精品| 免费在线成人网| 久久99精品一区二区三区| 激情图片小说一区| 激情六月婷婷综合| 国产suv精品一区二区6| 国产99精品国产| av亚洲精华国产精华精华| 成人av电影在线| 色国产精品一区在线观看| 一本色道久久综合亚洲91| 色综合久久88色综合天天6 | 亚洲sss视频在线视频| 亚洲风情在线资源站| 男男成人高潮片免费网站| 激情综合五月天| 国产美女主播视频一区| 成av人片一区二区| 91久久国产综合久久| 欧美精品一二三四| 久久理论电影网| 亚洲青青青在线视频| 视频一区视频二区中文字幕| 日韩1区2区3区| 国产精品123区| 色综合网站在线| 日韩精品一区在线观看| 国产午夜精品久久久久久免费视 | 国产精品久久久久7777按摩 | 色婷婷狠狠综合| 欧美三级电影精品| 日韩三级电影网址| 国产精品不卡一区| 美女视频一区二区三区| 国产又黄又大久久| 一本一道久久a久久精品综合蜜臀| 国产毛片一区二区| 97久久人人超碰| 555www色欧美视频| 国产精品女同一区二区三区| 亚洲va国产va欧美va观看| 丁香六月综合激情| 日韩一区二区三区精品视频| 中文字幕在线免费不卡| 奇米影视7777精品一区二区| 91一区二区三区在线播放| 欧美mv和日韩mv国产网站| 一区二区激情小说| 成人福利视频网站| 久久伊人蜜桃av一区二区| 美女视频黄 久久| 国产成人在线电影| 欧美日韩1234| 亚洲欧洲韩国日本视频| 理论片日本一区| 在线免费观看日本一区| 国产偷v国产偷v亚洲高清| 日韩av网站免费在线| 欧美体内she精视频| 亚洲欧洲日韩女同| 高清国产一区二区| 精品国产凹凸成av人网站| 亚洲国产wwwccc36天堂| 欧美videos中文字幕| 亚洲在线视频免费观看| 成人精品高清在线| 欧美成人一级视频| 日本sm残虐另类| 欧美精品丝袜中出| 亚洲激情在线播放| 99久久99久久精品免费看蜜桃| 成人福利电影精品一区二区在线观看| 成人动漫一区二区| 欧美本精品男人aⅴ天堂| 91色婷婷久久久久合中文| 精品福利在线导航| 天天色 色综合| 欧美视频精品在线| 亚洲gay无套男同| 欧洲av在线精品| 亚洲国产综合91精品麻豆| 91丨国产丨九色丨pron| 日韩一区有码在线| 99国产精品一区| 亚洲人吸女人奶水| 欧美伊人精品成人久久综合97| 欧美成人精品二区三区99精品| 久久久午夜精品| 激情成人午夜视频| 久久一二三国产| 国产乱人伦偷精品视频不卡| 日韩精品在线一区| 国产乱码精品一区二区三| 久久夜色精品一区| 成人深夜在线观看| 亚洲欧洲精品一区二区三区| 99麻豆久久久国产精品免费优播| 欧美无乱码久久久免费午夜一区| 日韩精品一区在线| 激情五月婷婷综合网| 国产日韩欧美在线一区| 国产尤物一区二区在线| 国产情人综合久久777777| 成人黄色小视频| 亚洲精品中文字幕在线观看| 欧美日韩在线亚洲一区蜜芽| 日韩va欧美va亚洲va久久| 欧美成人激情免费网| 国产成人在线免费| 一区二区三区四区不卡在线| 欧美日韩视频专区在线播放| 蜜桃在线一区二区三区| 国产蜜臀97一区二区三区| 91久久国产综合久久| 美女视频一区在线观看| 久久久国际精品| 在线这里只有精品| 欧美亚洲一区二区在线观看| 午夜精品国产更新| 国产清纯在线一区二区www| 99久久婷婷国产|