HLS DATAFLOW & HLS stream ERROR: [XFORM 203-711]

http://www.elecfans.com/d/921179.html

ERROR: [XFORM 203-711]

Description
The specified variable is both written to and read from. This violates the requirements for using the DATAFLOW directive, which supports only single-producer and single-consumer variable. The variable must only be read from or written to.
Explanation
The DATAFLOW directive allows functions and loops to consume data as soon as data is available from the producer, allowing task level pipelining where tasks can execute in parallel (each task does not have to complete all operations before the next task can begin).
All variables in a DATAFLOW region must operate in a single-producer single-consumer fashion: data must flow from one task to the next. If the coding style violates this policy, the DATAFLOW directive cannot implement task level pipelining.
Solution
Errors in use of the DATAFLOW directive require coding changes to ensure the code follows a single-producer single-consumer model. To more easily understand the code structure, use the dataflow viewer within the Analysis Perspective in the Vivado HLS GUI. The dataflow viewer is available when the DATAFLOW directive has been specified. Care should be taken to review the code inside of tasks (loops or functions) and notice some cases imply both reading and writing to the same variable. In the following example,
C_matrix[i][j] += A_matrix[i][k]*B_matrix[k][j];
It is easier to see the violation when the code is re-written as (C_matrix is both read from and written to)
C_matrix[i][j] = C_matrix[i][j] + (A_matrix[i][k]*B_matrix[k][j]);
This case is also present when slices are written to a larger variable: HLS uses a read-modify-write operation when writing to parts of a larger word.

ERROR: [XFORM 203-711]
描述
pragma指定的变量既被写又被读。这违反了使用DATAFLOW指令的要求,该指令只支持单个生产者和单个消费者变量。只能从变量中读取或写入变量。
解释
DATAFLOW指令允许functions 和loops在生产者提供数据时立即使用数据,允许任务级流水线,任务可以并行执行(每个任务不必在下一个任务开始之前完成所有操作)。
DATAFLOW 区域中的所有变量必须以单生产者单消费者的方式操作:数据必须从一个任务流向下一个任务。如果编码样式违反此策略,则DATAFLOW指令无法实现任务级流水线。
解决方案
使用DATAFLOW指令时出现的错误要求修改代码,要确保代码遵循单生产者单消费者模型。要更容易地理解代码结构,请在Vivado HLS GUI的分析透视图 Analysis Perspective中使用dataflow查看器。当指定了dataflow指令时,dataflow查看器是可用的。应该仔细检查任务(loops or functions)内部的代码,并注意同时读写相同的变量的情况。在下面的例子中,

   C_matrix[i][j] += A_matrix[i][k]*B_matrix[k][j];

当代码被重写为(C_matrix既可以被读,也可以被写)时,就更容易发现冲突

   C_matrix[i][j] = C_matrix[i][j] + (A_matrix[i][k]*B_matrix[k][j]);

这种情况也出现在将slices 写入较大的变量时:HLS在写入较大word的部分时,使用read-modify-write操作。

Description
Vivado HLS issues this message when dataflow is requested for code that does not conform to the canonical dataflow form.
Explanation
Use Help > User Guide to open the Vivado HLS User Guide (UG902) and review the “Dataflow Optimization Limitations” section for an explanation of the supported canonical dataflow form. Solution It is recommended that all code use the canonical dataflow form. This message can be disabled via by setting config_dataflow -strict_mode to “off”.
描述
在不符合规范dataflow form的代码 要求dataflow时,Vivado HLS发出此消息。
解释
Vivado HLS用户指南(UG902),并查看“Dataflow Optimization Limitations”一节,了解支持的规范数据流表单。
解决方案
建议所有代码都使用规范的数据流形式。可以通过将config_dataflow -strict_mode设置为“off”来禁用此消息。

ERROR: [XFORM 203-733]

在这里插入图片描述
该信息表明,在非dataflow区域使用默认的FIFO规模(这个FIFO是因为stream而生成的,默认深度为1),会导致Deadlock。根据提示我们修改这个FIFO的深度。之后,重新执行C综合和C/RTL Cosimulation,均可通过。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值