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

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

?? zl5011xtm.c

?? Zalink50114----TDMoIP芯片驅動源碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
 Remarks:
    None

*******************************************************************************/

zlStatusE zl5011xTmWriteLookUpRam(zl5011xParamsS *zl5011xParams,
      zl5011xFlowTypeE flow, zl5011xTmSrcPortE srcPort, zl5011xTmDestPortE destPort)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T bits;
   AddressT address;

   ZL5011X_TRACE(ZL5011X_TM_FN_ID, "zl5011xTmWriteLookUpRam: flow %d, src port %d, dest port %d",
         flow, srcPort, destPort, 0, 0, 0);

   status = ZL5011X_CHECK_FLOW_TYPE(flow);

   /* check that the port ID's are valid */
   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_TM_SRC_PORT(srcPort);
   }

   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_TM_DEST_PORT(destPort);
   }

   if (status == ZL5011X_OK)
   {
      /* the address within the lookup RAM is determined by the flow.
         Which lookup RAM to use, is determined by the source port, and the
         address offset of the lookup RAM is
         number of entries in the RAM x size of each entry x 2
         The 2 is because the lookup RAM's are spaced in memory by a complete RAM,
         which is not implemented */
      address = ZL5011X_TM_LOOKUP_RAM + (flow * ZL5011X_TM_LOOKUP_RAM_SIZE) +
            (srcPort * (2 * ZL5011X_TM_LOOKUP_RAM_SIZE * ZL5011X_TM_NUM_LOOKUP_RAM_ENTRIES));

      bits = (destPort & ZL5011X_TM_LOOKUP_RAM_MASK) << ZL5011X_TM_LOOKUP_RAM_BITS;

      status = zl5011xWrite(zl5011xParams, address, bits);
   }

   return(status);
}

/*******************************************************************************

 Function:
    zl5011xTmConfigureInputBuffer

 Description:
   This configures the destination queue sizes with in the input source port.
   Each TM message uses 16 bytes (4 words), and the total queue size is
   2048 bytes (512 words). In addition, there is a maximum size for each queue.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   srcPort        TM source port
   cpuSize        size for the destination queue in the source port
   tfqSize        size for the destination queue in the source port
   rtpSize        size for the destination queue in the source port
   pkqSize        size for the destination queue in the source port

 Outputs:
    None

 Returns:
   zlStatusE

 Remarks:
    None

*******************************************************************************/

zlStatusE zl5011xTmConfigureInputBuffer(zl5011xParamsS *zl5011xParams,
      zl5011xTmSrcPortE srcPort, Uint32T cpuSize, Uint32T tfqSize,
      Uint32T rtpSize, Uint32T pkqSize)
{
   zlStatusE status = ZL5011X_OK;
   AddressT startAddress, endAddress;

   ZL5011X_TRACE(ZL5011X_TM_FN_ID, "zl5011xTmConfigureInputBuffer: src port %d, cpu %d, tfq %d, rtp %d, pkq %d",
         srcPort, cpuSize, tfqSize, rtpSize, pkqSize, 0);

   /* check the requested size of each of the queues */
   status = ZL5011X_CHECK_TM_PORT_SIZE(cpuSize);

   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_TM_PORT_SIZE(tfqSize);
   }

   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_TM_PORT_SIZE(rtpSize);
   }

   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_TM_PORT_SIZE(pkqSize);
   }

   /* check the total size of the queues, to check that they are in limits */
   if (status == ZL5011X_OK)
   {
      if ((cpuSize + tfqSize + rtpSize + pkqSize) > ZL5011X_TM_PORT_TOTAL_QUEUE_SIZE)
      {
         status = ZL5011X_PARAMETER_INVALID;
      }
   }

   /* set the start, end address and size for the CPU segment of the input port */
   if (status == ZL5011X_OK)
   {
      startAddress = 0;
      endAddress = cpuSize * ZL5011X_TM_MESSAGE_SIZE_WORDS;

      /* set the addresses */
      status = zl5011xTmSetInputBufferAddress(zl5011xParams, srcPort,
            ZL5011X_TM_DEST_PORT_CPU, startAddress, endAddress - 1);

      /* set the size of the queue */
      if (status == ZL5011X_OK)
      {
         status = zl5011xTmSetInputBufferSize(zl5011xParams, srcPort,
               ZL5011X_TM_DEST_PORT_CPU, cpuSize * ZL5011X_TM_MESSAGE_SIZE_WORDS);
      }
   }

   /* set the start, end address and size for the TFQ segment of the input port */
   if (status == ZL5011X_OK)
   {
      startAddress = endAddress;
      endAddress += tfqSize * ZL5011X_TM_MESSAGE_SIZE_WORDS;

      /* set the addresses */
      status = zl5011xTmSetInputBufferAddress(zl5011xParams, srcPort,
            ZL5011X_TM_DEST_PORT_TFQ, startAddress, endAddress - 1);

      /* set the size of the queue */
      if (status == ZL5011X_OK)
      {
         status = zl5011xTmSetInputBufferSize(zl5011xParams, srcPort,
               ZL5011X_TM_DEST_PORT_TFQ, tfqSize * ZL5011X_TM_MESSAGE_SIZE_WORDS);
      }
   }

   /* set the start, end address and size for the RTP segment of the input port */
   if (status == ZL5011X_OK)
   {
      startAddress = endAddress;
      endAddress += rtpSize * ZL5011X_TM_MESSAGE_SIZE_WORDS;

      /* set the addresses */
      status = zl5011xTmSetInputBufferAddress(zl5011xParams, srcPort,
            ZL5011X_TM_DEST_PORT_RTP, startAddress, endAddress - 1);

      /* set the size of the queue */
      if (status == ZL5011X_OK)
      {
         status = zl5011xTmSetInputBufferSize(zl5011xParams, srcPort,
               ZL5011X_TM_DEST_PORT_RTP, rtpSize * ZL5011X_TM_MESSAGE_SIZE_WORDS);
      }
   }

   /* set the start, end address and size for the PKQ segment of the input port */
   if (status == ZL5011X_OK)
   {
      startAddress = endAddress;
      endAddress += pkqSize * ZL5011X_TM_MESSAGE_SIZE_WORDS;

      /* set the addresses */
      status = zl5011xTmSetInputBufferAddress(zl5011xParams, srcPort,
            ZL5011X_TM_DEST_PORT_PKQ, startAddress, endAddress - 1);

      /* set the size of the queue */
      if (status == ZL5011X_OK)
      {
         status = zl5011xTmSetInputBufferSize(zl5011xParams, srcPort,
               ZL5011X_TM_DEST_PORT_PKQ, pkqSize * ZL5011X_TM_MESSAGE_SIZE_WORDS);
      }
   }

   /* set the start, end address and size for the unused segment
      of the input port */
   if (status == ZL5011X_OK)
   {
      startAddress = endAddress;
      endAddress += 1 * ZL5011X_TM_MESSAGE_SIZE_WORDS;

      status = zl5011xTmSetInputBufferAddress(zl5011xParams, srcPort,
            ZL5011X_TM_DEST_PORT_UNUSED, startAddress, endAddress - 1);

      /* set the size of the queue */
      if (status == ZL5011X_OK)
      {
         status = zl5011xTmSetInputBufferSize(zl5011xParams, srcPort,
               ZL5011X_TM_DEST_PORT_UNUSED, 1 * ZL5011X_TM_MESSAGE_SIZE_WORDS);
      }
   }

   if (status == ZL5011X_OK)
   {
      /* update the device structure */
      zl5011xParams->taskManager.portSizes[srcPort][ZL5011X_TM_DEST_PORT_CPU] = cpuSize;
      zl5011xParams->taskManager.portSizes[srcPort][ZL5011X_TM_DEST_PORT_TFQ] = tfqSize;
      zl5011xParams->taskManager.portSizes[srcPort][ZL5011X_TM_DEST_PORT_RTP] = rtpSize;
      zl5011xParams->taskManager.portSizes[srcPort][ZL5011X_TM_DEST_PORT_PKQ] = pkqSize;
   }

   return(status);
}

/*******************************************************************************

 Function:
    zl5011xTmSetInputBufferAddress

 Description:
   This sets the start and end address for the queue (within the input port).
   The address is specified in 32 bit words, and a TM message is 4 x 32 bit
   words. The queue must be able to hold at least 1 message.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   srcPort        TM source port
   destPort       TM destination port
   startAddress   start address for the queue in words (32 bits)
   endAddress     end address for the queue in words (32 bits)

 Outputs:
    None

 Returns:
   zlStatusE

 Remarks:
    None

*******************************************************************************/

zlStatusE zl5011xTmSetInputBufferAddress(zl5011xParamsS *zl5011xParams,
      zl5011xTmSrcPortE srcPort, zl5011xTmDestPortE destPort,
      AddressT startAddress, AddressT endAddress)
{
   zlStatusE status = ZL5011X_OK;
   AddressT address;
   Uint32T bits;

   ZL5011X_TRACE(ZL5011X_TM_FN_ID, "zl5011xTmSetInputBufferAddress: src port %d, dest port %d, start %d, end %d",
         srcPort, destPort, startAddress, endAddress, 0, 0);

   /* check that the port ID's are valid */
   status = ZL5011X_CHECK_TM_SRC_PORT(srcPort);

   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_TM_DEST_PORT(destPort);
   }

   /* check that the addresses are valid */
   if (status == ZL5011X_OK)
   {
      if ((startAddress & ~ZL5011X_TM_INPUT_SEG_ADDRESS_MASK) != 0)
      {
         status = ZL5011X_PARAMETER_INVALID;
      }
   }

   if (status == ZL5011X_OK)
   {
      if ((endAddress & ~ZL5011X_TM_INPUT_SEG_ADDRESS_MASK) != 0)
      {
         status = ZL5011X_PARAMETER_INVALID;
      }
   }

   if (status == ZL5011X_OK)
   {
      if (endAddress < (startAddress + ZL5011X_TM_MESSAGE_SIZE_WORDS - 1))
      {
         status = ZL5011X_PARAMETER_INVALID;
      }
   }

   if (status == ZL5011X_OK)
   {
      /* program the new addresses */
      bits = (startAddress << ZL5011X_TM_INPUT_SEG_START_BITS) |
            (endAddress << ZL5011X_TM_INPUT_SEG_END_BITS);

      /* get the base address for the input port registers */
      address = ZL5011X_TM_PORT0_BASE + (srcPort * ZL5011X_TM_PORT_REG_SIZE);

      /* get the address of the segment offset for the destination port */
      address += ZL5011X_TM_SEG_ADDRESS_OFFSET + (destPort * sizeof(Uint32T));

      status = zl5011xWrite(zl5011xParams, address, bits);
   }

   return(status);
}

/*******************************************************************************

 Function:
    zl5011xTmSetInputBufferSize

 Description:
   This sets the size of the queue (within the input port).
   The size is specified in 32 bit words, and a TM message is 4 x 32 bit
   words.
   The queue size for odd and even numbered queues is stored in the high
   and low 16 bits of a shared register.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   srcPort        TM source port
   destPort       TM destination port
   size           size of the queue in words (32 bits)

 Outputs:
    None

 Returns:
   zlStatusE

 Remarks:
    None

*******************************************************************************/

zlStatusE zl5011xTmSetInputBufferSize(zl5011xParamsS *zl5011xParams,
      zl5011xTmSrcPortE srcPort, zl5011xTmDestPortE destPort, Uint32T size)
{
   zlStatusE status = ZL5011X_OK;
   AddressT address;
   Uint32T bits, bitMask;

   ZL5011X_TRACE(ZL5011X_TM_FN_ID, "zl5011xTmSetInputBufferSize: src port %d, dest port %d, size %d",
         srcPort, destPort, size, 0, 0, 0);

   /* check that the port ID's are valid */
   status = ZL5011X_CHECK_TM_SRC_PORT(srcPort);

   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_TM_DEST_PORT(destPort);
   }

   if (status == ZL5011X_OK)
   {
      bits = size;
      bitMask = ZL5011X_TM_SEG_SPACE_MASK;

      /* the odd and even ports share the same register for the buffer size,
         so need to use a different shift for odd bits */
      if ((destPort & 1) == 0)
      {
         /* this is an even numbered port */
         bits <<= ZL5011X_TM_EVEN_SEG_SPACE_BITS;
         bitMask <<= ZL5011X_TM_EVEN_SEG_SPACE_BITS;
      }
      else
      {
         /* this is an odd numbered port */
         bits <<= ZL5011X_TM_ODD_SEG_SPACE_BITS;
         bitMask <<= ZL5011X_TM_ODD_SEG_SPACE_BITS;
      }

      /* get the base address for the input port registers */
      address = ZL5011X_TM_PORT0_BASE + (srcPort * ZL5011X_TM_PORT_REG_SIZE);

      /* get the address of the segment offset for the destination port */
      address += ZL5011X_TM_SEG_SPACE_OFFSET + ((destPort / 2) * sizeof(Uint32T));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费色视频| 成人黄色在线看| 国产精品亚洲第一区在线暖暖韩国 | 欧美日韩国产免费一区二区 | 亚洲欧洲av另类| 久久国产精品99久久人人澡| 99久久婷婷国产综合精品| 欧美一区二区三区四区视频| 亚洲一区二区三区四区的| 国产成人午夜高潮毛片| 欧美v日韩v国产v| 亚洲成av人片在线| 在线亚洲人成电影网站色www| 久久久久亚洲综合| 麻豆精品一区二区三区| 欧美高清精品3d| 亚洲一区二区三区在线看| 99精品视频一区| 国产日产亚洲精品系列| 久久99精品网久久| 91精品国产欧美一区二区| 亚洲电影视频在线| 欧美自拍丝袜亚洲| 伊人夜夜躁av伊人久久| 99国产麻豆精品| 国产精品日产欧美久久久久| 国产黄色成人av| 国产亚洲成年网址在线观看| 国产一区三区三区| 精品国产青草久久久久福利| 蜜臀91精品一区二区三区| 欧美一三区三区四区免费在线看| 午夜欧美大尺度福利影院在线看| 在线亚洲一区二区| 亚洲高清免费视频| 欧美日韩高清一区二区三区| 天天av天天翘天天综合网色鬼国产 | 国产自产v一区二区三区c| 日韩欧美在线综合网| 麻豆91在线观看| 日韩女优av电影| 国产资源精品在线观看| 国产色综合久久| 成人av在线资源网站| 亚洲啪啪综合av一区二区三区| 不卡的av在线播放| 亚洲狠狠丁香婷婷综合久久久| 在线免费观看日本欧美| 午夜精品影院在线观看| 欧美一区二区大片| 国产成人在线影院| 亚洲日本乱码在线观看| 欧美日韩国产小视频| 久久99这里只有精品| 久久一二三国产| 97精品电影院| 日日夜夜免费精品| 欧美极品少妇xxxxⅹ高跟鞋| 91美女片黄在线观看91美女| 五月天亚洲精品| 久久久久青草大香线综合精品| 在线精品观看国产| 蜜臀久久99精品久久久久宅男 | 一区二区三区成人在线视频| 欧美日韩精品三区| 久久99深爱久久99精品| 国产精品欧美一区二区三区| 欧美视频一区二| 欧美日韩中字一区| 国产一区二区三区四| 亚洲色图欧美激情| 欧美日韩国产片| 粉嫩在线一区二区三区视频| 一区二区三区欧美| 久久综合九色综合97婷婷女人| 一本色道亚洲精品aⅴ| 久久狠狠亚洲综合| 亚洲午夜在线电影| 国产亚洲一二三区| 91精品国产入口| av亚洲精华国产精华| 蜜臀久久99精品久久久久久9| 亚洲天堂福利av| 久久人人爽爽爽人久久久| 欧美日韩中文一区| 99国产麻豆精品| 国产精品一区二区91| 天堂蜜桃91精品| 亚洲精品视频观看| 中文字幕精品三区| 26uuu国产在线精品一区二区| 欧美色视频在线| 国产jizzjizz一区二区| 欧美aaaaa成人免费观看视频| **欧美大码日韩| 欧美国产一区在线| 精品国产91九色蝌蚪| 欧美精品黑人性xxxx| 91福利国产精品| 99re这里只有精品视频首页| 国产精品亚洲午夜一区二区三区| 秋霞电影网一区二区| 亚洲国产视频在线| 亚洲综合偷拍欧美一区色| 自拍偷在线精品自拍偷无码专区| 国产三级三级三级精品8ⅰ区| 日韩你懂的在线播放| 51精品国自产在线| 欧美精品v国产精品v日韩精品| 欧美在线你懂得| 在线欧美日韩国产| 在线精品视频一区二区| 日本久久一区二区| 91精品福利在线| 91国产免费观看| 欧美性猛片xxxx免费看久爱| 欧美中文字幕一区二区三区亚洲| 色琪琪一区二区三区亚洲区| 91黄色免费网站| 欧美影院一区二区三区| 日本福利一区二区| 欧美日韩一区二区三区免费看| 欧美色图免费看| 欧美一区二区三区在线观看视频| 欧美一级久久久久久久大片| 日韩一区二区三区四区| 欧美不卡一二三| 久久久99精品久久| ●精品国产综合乱码久久久久| 亚洲欧美综合另类在线卡通| 亚洲美女在线国产| 日韩经典中文字幕一区| 国内久久婷婷综合| av激情亚洲男人天堂| 欧美日韩一区在线| 精品女同一区二区| 国产精品天干天干在线综合| 亚洲免费三区一区二区| 日产国产欧美视频一区精品 | 首页国产丝袜综合| 日本一区中文字幕| 国产一区二区三区av电影| 91在线观看一区二区| 欧美日韩国产在线观看| 久久久久久黄色| 亚洲一区二区高清| 激情亚洲综合在线| 色婷婷综合激情| 欧美刺激午夜性久久久久久久| 久久精品一区二区三区不卡| 国产精品传媒入口麻豆| 亚洲激情图片小说视频| 日韩精品视频网| 久草在线在线精品观看| 一本在线高清不卡dvd| 欧美日韩国产电影| 日韩欧美一二三| 国产亚洲福利社区一区| 亚洲欧美日韩中文播放 | 丁香婷婷综合激情五月色| 99久久伊人精品| 欧美精品第1页| 2017欧美狠狠色| 综合av第一页| 免费久久精品视频| 丁香啪啪综合成人亚洲小说| 5858s免费视频成人| 国产网站一区二区| 亚洲在线视频一区| 久久精品国产亚洲a| 欧美性色欧美a在线播放| 日韩精品一区二区三区中文不卡| 国产欧美日韩视频一区二区| 一区二区国产视频| 99麻豆久久久国产精品免费优播| 欧美日韩国产免费一区二区| 欧美极品另类videosde| 国产视频不卡一区| 美脚の诱脚舐め脚责91 | 日本在线不卡视频| 成人一道本在线| 91日韩精品一区| 精品盗摄一区二区三区| 亚洲一二三四久久| 男人的天堂久久精品| 欧美亚洲一区二区在线| 2014亚洲片线观看视频免费| 亚洲综合色视频| 国产一区二三区| 精品久久久久久久久久久久久久久久久 | 国产精品性做久久久久久| 欧美一级午夜免费电影| 一区二区成人在线视频| 粉嫩av亚洲一区二区图片| 欧美精品在欧美一区二区少妇| 性久久久久久久| 欧美亚洲日本一区| 亚洲少妇30p| 美女视频黄久久| 欧美mv和日韩mv的网站|