码迷,mamicode.com
首页 > 其他好文 > 详细

HLS Optimization: Pipeline

时间:2019-05-29 14:56:27      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:final   col   explicit   rar   better   str   pip   OWIN   reg   

Optimization
Using Vivado HLS, you can apply different optimization directives to the design, including:
• Instruct a task to execute in a pipeline, allowing the next execution of the task to begin
before the current execution is complete.
• Specify a latency for the completion of functions, loops, and regions.
• Specify a limit on the number of resources used.
• Override the inherent or implied dependencies in the code and permit specified
operations. For example, if it is acceptable to discard or ignore the initial data values,
such as in a video stream, allow a memory read before write if it results in better
performance.
• Select the I/O protocol to ensure the final design can be connected to other hardware
blocks with the same I/O protocol.

 

技术图片

Function and Loop Pipelining
Pipelining allows operations to happen concurrently.

Functions or loops are pipelined using the PIPELINE directive. The directive is specified in
the region that constitutes the function or loop body. The initiation interval defaults to 1 if
not specified but may be explicitly specified.
Pipelining is applied only to the specified region and not to the hierarchy below: all loops
in the hierarchy below are automatically unrolled. Any sub-functions in the hierarchy below
the specified function must be pipelined individually. If the sub-functions are pipelined, the
pipelined functions above it can take advantage of the pipeline performance. Conversely,
any sub-function below the pipelined top-level function that is not pipelined, may be the
limiting factor in the performance of the pipeline.

技术图片

技术图片

There is a difference in how pipelined functions and loops behave.
• In the case of functions, the pipeline runs forever and never ends.
• In the case of loops, the pipeline executes until all iterations of the loop are completed.

技术图片

Rewinding Pipelined Loops for Performance


Loops which are the top-level loop in a function or are used in a region where the
DATAFLOW optimization is used can be made to continuously execute using the PIPELINE
directive with the rewind option.

技术图片

 

Reference:

1.Xilinx UG902

 

HLS Optimization: Pipeline

标签:final   col   explicit   rar   better   str   pip   OWIN   reg   

原文地址:https://www.cnblogs.com/wordchao/p/10943227.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!