常用HLS优化指令总结
1.pragma HLS inline
刪除函數(shù)作為層次結(jié)構(gòu)中的獨(dú)立實(shí)體。內(nèi)聯(lián)之后,函數(shù)被分解到調(diào)用函數(shù)中,在RTL中不再作為單獨(dú)的層次結(jié)構(gòu)出現(xiàn)
注:內(nèi)聯(lián)子函數(shù)還會(huì)分解應(yīng)用于該函數(shù)的任何pragmas或directives。In Vitis HLS,在子上下文中應(yīng)用的任何語(yǔ)用將被忽略
在某些情況下,內(nèi)聯(lián)函數(shù)允許函數(shù)內(nèi)的操作與調(diào)用函數(shù)共享并更有效地優(yōu)化。但是,內(nèi)聯(lián)函數(shù)不能共享或重用,所以如果父函數(shù)多次調(diào)用內(nèi)聯(lián)函數(shù),就會(huì)增加實(shí)現(xiàn)RTL所需的面積
2.pragma HLS array_partition
Partitions an array into smaller arrays or individual elements and provides the following:
? Results in RTL with multiple small memories or multiple registers instead of one large memory.
?Effectively increases the amount of read and write ports for the storage.
?Potentially improves the throughput of the design.
? Requires more memory instances or registers.
總結(jié)
以上是生活随笔為你收集整理的常用HLS优化指令总结的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: zynqNet整体思路框架
- 下一篇: HLS Pargmas(2) inter