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

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

?? data_mcasp1.c

?? 適用于TMS320C6713
?? C
字號:
/*
 * Copyright (C) 2003 Texas Instruments Incorporated
 * All Rights Reserved
 */
/*
 *---------data_mcasp1.c---------
 * Contains helper functions used to set up data in memory and 
 * test for correct McASP transfers
 */ 
 
#include "mcasp1.h"


/************************************************************************\
 name:      FillMem( Uint32 start_location, Uint32 length,
                      Uint32 fill_value, Uint8 fill_type )  

 purpose:   Fills a memory location with a pattern as requested. 
            Beginning at 'start_location', 'length' words (32-bit) are filled,
            starting with 'fill_value'.  After the initial value, the
            other memory locations are filled with either a constant
            value, incrementing values, or decrementing values.

 inputs:    Uint32 start_location : Memory location to start filling.
            Uint32 length : Number of bytes to fill.
            Uint32 fill_value : 32-bit value to start filling with.
            Uint8 fill_type : Type of fill: 
                              FILL_CONST, FILL_INC, FILL_DEC

 returns:   Uint32 flag : PASS for a success
                          ERROR_FILL for a failure
\************************************************************************/
Uint32 FillMem( Uint32 start_location, Uint32 length, Uint32 fill_value, Uint8 fill_type )
{
  Uint32         *loc;
  unsigned int   i;
  
  loc = (Uint32*) start_location;
  
  for (i = 0 ; i < length ; i++) {

      if (fill_type == FILL_CONST) {
          *loc = fill_value;
          if (*loc != fill_value)    /* Check that value was written correctly */
              return ERROR_FILL;
      }
      else if (fill_type == FILL_INC) {
          *loc = (Uint32)(fill_value+i);
          if ( *loc != (Uint32)(fill_value+i) )  /* Check that value was written correctly */
              return ERROR_FILL;
      }
      else if (fill_type == FILL_DEC) {
          *loc = (Uint32)(fill_value-i);
          if ( *loc != (Uint32)(fill_value-i) )  /* Check that value was written correctly */
              return ERROR_FILL;
      }
      else {                   /* Error if non-valid fill type */
          return ERROR_FILL;
      }
    
      loc++;
  }

  return PASS;
}


/************************************************************************\
 name:      ClearMem( Uint32 start_location, Uint32 length )  

 purpose:   Clears a memory location.  Beginning at 'start_location',
            'length' 32-bit words are set to zero.

 inputs:    Uint32 start_location : Memory location to start filling.
            Uint32 length : Number of 32-bit words to fill.

 returns:   Uint32 flag : PASS for a success
                          ERROR_FILL for a failure
\************************************************************************/
Uint32 ClearMem( Uint32 start_location, Uint32 length )
{
  return FillMem(start_location, length, 0x00000000, FILL_CONST);
}



/************************************************************************\
 name:      SetupSrcLocations(Uint32 desired_src_addr, Uint32 length,
                              Uint32 serializer )

 purpose:   Sets up src mem for a transfer. It fills the source space with an 
            alternating pattern between a set of incremented value
            and a set of zeros. The size of the "set" is equal to the 
            number of serializer pins. The incremented value is also processed.
            The following example assumes 8 serializer pins, in which case
            the src setup:
            
            0xF0001000, 0xF0002000, 0xF0003000, 0xF0004000
            0xF0005000, 0xF0006000, 0xF0007000, 0xF0008000            
            0x00000000, 0x00000000, 0x00000000, 0x00000000
            0x00000000, 0x00000000, 0x00000000, 0x00000000
            0xF0009000, 0xF000A000, 0xF000B000, 0xF000C000
            0xF000D000, 0xF000E000, 0xF000F000, 0xF0010000            
            0x00000000, 0x00000000, 0x00000000, 0x00000000
            0x00000000, 0x00000000, 0x00000000, 0x00000000
            ...etc.
 
            Note that this is setting up TWICE the amount of data
            needed for transfers (i.e. if the transmitter only 
            needs to transfer "length" number of words, this function
            sets up "length"*2 number of words.
            The DMA will be setup with a frame index to SKIP the zeros.
            In other words, the DMA only transfers the incremented
            values.

            The purpose of this setup is for testing inactive transmit
            slots for this particular testcase. The transmitter only
            transmits only every other active slots, while the receiver
            receives on ALL slots. Setting up data this way will allow
            the destination data to mimic the source setup and therefore
            data comparison will be easier.
            
            Note that EDMA frame index is to go from pointing to 0xF0001000
            to 0xF0009000. It has to "jump across" the zeros.
            This is calculated as:
            2 * NUM_XMT_SERIALIZER * word-size
            
            where word-size = 4 bytes
            
                        

 inputs:    
            Uint32 desired_src_addr : Memory to be used for test.
                                      Will be filled with a pattern.
            Uint32 length           : Number of 32-bit words to transmit            
            Uint32 serializer       : Number of transmit serializers

 returns:   n/a
\************************************************************************/
void SetupSrcLocations(Uint32 desired_src_addr, Uint32 length, Uint32 serializer)
{
  Uint32         *loc;
  unsigned int   i;
  unsigned int   j;
  unsigned int   inc = 0;
  Uint32         fill_value = 0xFFFF0001;


  /*-------------------------------------------------*/
  /* Fill source space                               */
  /*-------------------------------------------------*/  
  loc = (Uint32*) desired_src_addr;

  for (i = 0 ; i < length ; i = i + serializer) {
  
       /* Setup j incremental data, where j=number of xmt serializers */
       for (j = 0 ; j < serializer ; j++) {
            *loc = (fill_value + inc);
            ProcessMem((Uint32)loc, 1, SHIFT_LEFT, 12); /* process data at location */
            loc++;
            inc++;
       } /* end for j */

       /* Setup j 32-bit zero, where j = number of xmt serializers */  
       for (j = 0 ; j < serializer ; j++) {
            *loc = 0x00000000;
            loc++;  
       }
  }
  

}



/************************************************************************\
 name:      ProcessMem( Uint32 start_location, Uint32 length,
                      Uint8 shift_type, Uint8 shift_amount )  

 purpose:   Process data in memory.
            Beginning at 'start_location', 'length' words (32-bit) are processed.
            Every 32-bit word is shift left or right (determined by 
            "shift_type") for "shift_amount" bits.

 inputs:    Uint32 start_location : Memory location to start filling.
            Uint32 length : Number of bytes to fill.
            Uint8 shift_type : SHIFT_NONE: no shifting
                               SHIFT_LEFT: shift left by shift_amount bits
                                           pad rightmost bits with zero
                               SHIFT_RIGHT_SIGNED: shift right and sign
                                           extend to the leftmost bits
                               SHIFT_RIGHT_ZERO: shift right and pad leftmost
                                           bits with zero
            Uint8 shift_amount : Number of bits to shift

 returns:   Uint32 flag : PASS for a success
                          ERROR_FILL for a failure
\************************************************************************/
Uint32 ProcessMem( Uint32 start_location, Uint32 length, Uint8 shift_type, Uint8 shift_amount )
{
  Uint32         *loc;
  Uint32         value;
  Int32          valueSigned;
  unsigned int   i;
  
  loc = (Uint32*) start_location;
  
  for (i = 0 ; i < length ; i++) {

      if (shift_type == SHIFT_LEFT) {
           value = *loc; 
           value = value << shift_amount;
           *loc = value;
          if (*loc != value)    /* Check that value was written correctly */
              return ERROR_FILL;
      }
      else if (shift_type == SHIFT_RIGHT_SIGNED) {
           valueSigned = *loc; 
           valueSigned = valueSigned >> shift_amount;
           *loc = valueSigned;
          if (*loc != valueSigned)    /* Check that value was written correctly */
              return ERROR_FILL;
      }
      else if (shift_type == SHIFT_RIGHT_ZERO) {
           value = *loc; 
           value = value >> shift_amount;
           *loc = value;
          if (*loc != value)    /* Check that value was written correctly */
              return ERROR_FILL;
      }
      else if (shift_type == SHIFT_NONE) {
          /* do nothing */
      }
      else {                   /* Error if non-valid fill type */
          return ERROR_FILL;
      }
    
      loc++;
  }

  return PASS;
}


/************************************************************************\
 name:      CheckTransfer(Uint32 desired_src_addr, Uint32 desired_dst_addr
                             Uint32 length )

 purpose:   Checks that a transfer was successful by comparing the data
            in the destination scratch area against the data in the 
            source space. The total amount of data compared is "length"
            32-bit words.

            Before checking src and dst data, it processes the source
            data so that it will look like the dst data.
            In this case, SRC data is shifted right 12 bits and sign-extended.

            original SRC      processed SRC        DST
            0xF0001000        0xFFFF0001           0xFFFF0001
            0xF0002000        0xFFFF0002           0xFFFF0002
            ...
            0x00000000        0x00000000           0x00000000
            ...etc.


 inputs:    Uint32 desired_src_addr : Memory in the source space.
                                       
            Uint32 desired_dst_addr : Memory in the destination space.
                                       Should match source space
            Uint32 length           : Number of 32-bit words to check  
                                     

 returns:   Uint32 flag : PASS for a matching comparison
                          ERROR_TEST for a non-match
\************************************************************************/
Uint32 CheckTransfer(Uint32 desired_src_addr, Uint32 desired_dst_addr, Uint32 length )
{
  Uint32         *src_loc;
  Uint32         *dst_loc;
  unsigned int   i;


  /* Process data for compare between src and dst */
  /* this is testcase specific.                   */
  ProcessMem(desired_src_addr, length, SHIFT_RIGHT_SIGNED, 12); 

  /* Compare */
  src_loc = (Uint32*) desired_src_addr;
  dst_loc = (Uint32*) desired_dst_addr;
  
  for (i = 0 ; i < length ; i++) {
  
      if (*src_loc != *dst_loc) { 
           return ERROR_TEST;
      }     

      src_loc++;
      dst_loc++;
  }
  
  return PASS;  /* If no error from the previous, test passed */

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性猛交一区二区三区精品| 国产欧美日韩综合精品一区二区| 亚洲精品在线观看网站| 国产精品国产三级国产专播品爱网| 天天亚洲美女在线视频| 白白色 亚洲乱淫| 2020国产精品自拍| 日本欧美肥老太交大片| 欧美三级电影网站| 亚洲人一二三区| 成人午夜电影久久影院| 2021中文字幕一区亚洲| 日本视频在线一区| 欧美日韩亚州综合| 亚洲已满18点击进入久久| 国产成人啪午夜精品网站男同| 欧美一区二区三区人| 亚洲一二三区在线观看| 色欧美片视频在线观看在线视频| 中文字幕av免费专区久久| 激情文学综合丁香| 日韩精品一区二区三区三区免费| 亚洲v中文字幕| 欧美性感一区二区三区| 亚洲综合激情网| 91麻豆精品秘密| 亚洲乱码国产乱码精品精可以看 | 欧美在线制服丝袜| 亚洲欧美偷拍另类a∨色屁股| 成人福利视频在线看| 中文字幕乱码亚洲精品一区| 国产91露脸合集magnet| 国产欧美一区二区三区在线看蜜臀| 国产一区二区精品久久| 久久久综合视频| 韩日av一区二区| 国产欧美日韩中文久久| 99久久国产综合精品色伊| 综合在线观看色| 在线观看免费亚洲| 亚洲成人午夜影院| 欧美一区二区精品久久911| 另类人妖一区二区av| 亚洲精品一区二区精华| 精品一区二区三区免费毛片爱| 精品久久久久久久人人人人传媒 | 久久久精品国产免大香伊| 欧美三级乱人伦电影| 亚洲国产欧美在线| 日韩亚洲欧美综合| 国产成人鲁色资源国产91色综| 久久精品网站免费观看| 99国产精品久久久久| 一区二区成人在线| 日韩一卡二卡三卡国产欧美| 激情欧美一区二区三区在线观看| 国产精品久久看| 欧美日韩一本到| 国产精品99久久久久| 亚洲精品免费在线播放| 欧美一级二级在线观看| 懂色av中文字幕一区二区三区| 一区二区三区四区乱视频| 日韩视频在线永久播放| 成人av网站在线观看| 日韩国产在线观看一区| 久久久精品国产免大香伊| 91丨九色porny丨蝌蚪| 裸体在线国模精品偷拍| 亚洲私人黄色宅男| 日韩欧美在线网站| 91猫先生在线| 狠狠色狠狠色合久久伊人| 亚洲另类春色校园小说| 精品国产乱码久久久久久1区2区| av亚洲精华国产精华精| 玖玖九九国产精品| 亚洲综合自拍偷拍| 国产欧美日韩激情| 在线不卡中文字幕| 色呦呦日韩精品| 国产一区二区电影| 青娱乐精品在线视频| 尤物av一区二区| 久久精品水蜜桃av综合天堂| 欧美久久久久免费| 色综合欧美在线| 国产成人精品影视| 韩国精品在线观看| 青青草国产精品97视觉盛宴| 一区二区在线观看免费视频播放| 国产欧美精品一区二区三区四区| 欧美精品色一区二区三区| 99re热这里只有精品免费视频| 国内偷窥港台综合视频在线播放| 日本视频免费一区| 午夜精品一区二区三区免费视频 | 欧美v国产在线一区二区三区| 色哟哟精品一区| 99久久99精品久久久久久| 国产一级精品在线| 韩日av一区二区| 精东粉嫩av免费一区二区三区| 日韩精品欧美精品| 五月天视频一区| 石原莉奈在线亚洲二区| 天天操天天综合网| 天天操天天干天天综合网| 亚洲一区二区成人在线观看| 亚洲精品亚洲人成人网在线播放| 亚洲日本在线a| 怡红院av一区二区三区| 亚洲精品久久7777| 亚洲在线成人精品| 亚洲一区二区视频在线观看| 亚洲一区免费在线观看| 亚洲成人激情社区| 视频一区中文字幕| 久久国产乱子精品免费女| 久久国产成人午夜av影院| 国产一区福利在线| 欧美一区国产二区| 欧美videossexotv100| 欧美精品一区二区久久婷婷| 欧美大片在线观看| 久久精品免视看| 国产精品久久久久久久久果冻传媒| 中文字幕一区av| 亚洲国产精品久久久久婷婷884 | 亚洲激情图片小说视频| 亚洲国产精品久久人人爱| 美女一区二区在线观看| 韩国v欧美v日本v亚洲v| www.欧美日韩| 欧美日韩午夜在线| 精品精品国产高清a毛片牛牛| 国产亚洲欧美中文| 亚洲精品一二三四区| 青青国产91久久久久久 | 毛片av一区二区三区| 国产夫妻精品视频| 91国偷自产一区二区三区观看| 欧美剧情电影在线观看完整版免费励志电影| 欧美精品在线一区二区| 亚洲国产精品二十页| 亚洲bt欧美bt精品| 国产91综合网| 欧美日韩国产小视频在线观看| 欧美大胆一级视频| 中文字幕制服丝袜成人av| 丝瓜av网站精品一区二区 | 欧美老年两性高潮| 亚洲国产精华液网站w| 丝袜亚洲精品中文字幕一区| 粉嫩高潮美女一区二区三区| 日本韩国欧美一区二区三区| 精品福利在线导航| 亚洲一区二区综合| 粉嫩绯色av一区二区在线观看| 欧美三区在线观看| 国产精品麻豆久久久| 久久国产精品免费| 欧美性做爰猛烈叫床潮| 国产欧美精品一区| 麻豆国产精品官网| 91行情网站电视在线观看高清版| 久久精品在这里| 日韩av中文字幕一区二区| 97se狠狠狠综合亚洲狠狠| 久久综合九色综合97婷婷女人| 午夜影院久久久| 色成人在线视频| 国产精品日韩成人| 激情综合网av| 欧美一区二视频| 一区二区免费在线| 99久久国产综合精品色伊| 国产午夜精品一区二区三区嫩草| 日本成人中文字幕| 欧美夫妻性生活| 亚洲综合色噜噜狠狠| 成人av电影在线网| 国产免费成人在线视频| 国产在线看一区| 日韩视频一区二区三区在线播放| 亚洲国产婷婷综合在线精品| 色综合天天综合给合国产| 国产精品人人做人人爽人人添| 青青草国产成人av片免费| 欧美精品色一区二区三区| 亚洲国产精品一区二区久久恐怖片| 色综合久久精品| 亚洲欧美激情一区二区| 91麻豆免费看片| 亚洲自拍偷拍av| 日本精品免费观看高清观看| 一区二区三区加勒比av| 色天天综合色天天久久| 亚洲国产色一区| 欧美精品第一页|