zoukankan      html  css  js  c++  java
  • HLS Optimization: Local Memory Bandwidth

    Array Partition

    #pragma HLS array_partition variable=<variable> <block, cyclic, complete> factor=<int> dim=<int>

    Array Reshape

    #pragma HLS array_reshape variable=<variable> <block, cyclic, complete> factor=<int> dim=<int>

    Example 1

    Reshapes (partition and maps) an 8-bit array with 17 elements, AB[17], into a new 32-bit array with five elements using block mapping.

    #pragma HLS array_reshape variable=AB block factor=4

    TIP: factor=4 indicates that the array should be divided into four. So 17 elements is reshaped into an array of 5 elements, with four times the bit-width. In this case, the last element, AB[17], is mapped to the lower eight bits of the fifth element, and the rest of the fifth element is empty.

    Example 2

    Reshapes the two-dimensional array AB[6][4] into a new array of dimension [6][2], in which dimension 2 has twice the bit-

    #pragma HLS array_reshape variable=AB block factor=2 dim=2

    Example 3

    Reshapes the three-dimensional 8-bit array, AB[4][2][2] in function foo, into a new single element array (a register), 128 bits wide (4*2*2*8):

    #pragma HLS array_reshape variable=AB complete dim=0

    TIP: dim=0 means to reshape all dimensions of the array.

     Reference:

    1. https://www.xilinx.com/support/documentation/sw_manuals/xilinx2015_2/sdsoc_doc/topics/calling-coding-guidelines/concept_increasing_local_memory_bandwidth.html

    2. https://japan.xilinx.com/html_docs/xilinx2017_4/sdaccel_doc/mrl1504034361747.html

  • 相关阅读:
    客户端验证用户名和密码
    特殊日期提示
    python 多态这一部分的知识点相关应用
    类的继承
    栈,队列的应用
    生成器与for循环的纠葛
    类(class)的形成过程
    报错信息看着哇
    死脑筋要活用(我只放贴图)01
    正则运算跟py语言的结合,知识点层出不穷
  • 原文地址:https://www.cnblogs.com/wordchao/p/10964294.html
Copyright © 2011-2022 走看看