日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

HLS pragmas(1)bind_storage

發布時間:2024/4/17 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 HLS pragmas(1)bind_storage 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

問題描述:在Vivado生成bit流文件時,編譯出現問題。
Resource utilization:LUT as Distributed RAM over-utilized in Top Level Design
問題解決:可以嘗試使用URAM來解決BRAM不夠用的問題,從而解決LUT資源的緊張(LUT as Distributed RAM)
從Vivado的報告可知,對URAM的利用率為零,那么如何充分利用URAM呢

Arrays on the Interface

在Vivado IP flowVitis HLS中,默認情況下將數組合成為內存元素。當使用數組作為頂級函數的參數時,Vitis HLS假定以下情況之一
1.Memory is off-chip
2.Memory is standard block RAM with a latency of 1
To configure how Vitis HLS creates these ports:
? Specify the interface as a RAM or FIFO interface using the INTERFACE pragma or directive.
? Specify the RAM as a single or dual-port RAM using the storage_typeoption of theINTERFACE pragma or directive.
? Specify the RAM latency using the latencyoption of the INTERFACE pragma or directive.
? Use array optimizationdirectives, ARRAY_PARTITION, or ARRAY_RESHAPE, to reconfigurethe structure of the array and therefore, the number of I/O ports.

Array Interface

如果沒有明確storage_type,Vitis HLS使用:

  • A single-port RAM by default
  • A dual-port RAM if it reduces the initation interval or reduces
    latency

pragma HLS bind_storage

描述:
BIND_STORAGE pragma將代碼中的變量(數組或函數參數)賦給RTL中的特定內存類型(type)。
這種用法對于頂級函數接口上的數組很重要,因為與數組關聯的內存類型決定了在theRTL中需要的端口的數量和類型,如接口上的數組所討論的
語法:

#pragma HLS bind_storage variable=<variable> type=<type>\ [ impl=<value> latency=<int> ] variable=<variable>:Defines the variable to assign the BIND_STORAGE pragma to. type=<type>: Defines the type of memory to bind to the specified variable. Supported types include: fifo, ram_1p, ram_1wnr, ram_2p, ram_s2p, ram_t2p, rom_1p, rom_2p,rom_np.

impl=<value>: Defines the implementation for the specified memory type. Supportedimplementations include: bram, bram_ecc, lutram, uram, uram_ecc, srl, memory, andauto as described below.



latency=<int>: Defines the default latency for the binding of the type. As shown in thefollowing table, the valid latency varies according to the specifiedtype and impl. The defaultis -1, which lets Vitis HLS choose the latency


Example

#pragma HLS bind_storage variable=coeffs type=RAM_1P impl=bram

the coeffs[128] variable is an argument to the top-level functionfoo_top. The pragma specifies that coeffs uses a single port RAM implemented on a BRAM

總結

以上是生活随笔為你收集整理的HLS pragmas(1)bind_storage的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。