常用HLS优化指令总结

1.pragma HLS inline

删除函数作为层次结构中的独立实体。内联之后,函数被分解到调用函数中,在RTL中不再作为单独的层次结构出现
注:内联子函数还会分解应用于该函数的任何pragmas或directives。In Vitis HLS,在子上下文中应用的任何语用将被忽略
在某些情况下,内联函数允许函数内的操作与调用函数共享并更有效地优化。但是,内联函数不能共享或重用,所以如果父函数多次调用内联函数,就会增加实现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.

#pragma HLS array_partition variable=<name> <type>  factor=<int>  dim=<int>

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/wzx_numberone/article/details/119464016