跳转到主要内容

如何在Block diagram中为PR区域添加.bd格式的Reconfigurable Module

本文转载自:<span id="profileBt"><a href="https://mp.weixin.qq.com/s/2hKn0qMOst6CFs_5J751OA"&gt; XILINX开发者社区微信公众号</a></span>

关于DFX的问题: 正在尝试为Xilinx Github下的PYNQ_Composable_Pipeline工程的PR_0区域添加新的RM(Reconfigurable Module),让这个动态函数区域支持更多函数,但是在implement这个config对应的的child_2_impl_1时遇到了以下报错:
<center><img src="http://xilinx.eetrend.com/files/2022-07/wen_zhang_/100561926-260750-1.p…; alt=""></center>

[Netlist 29-77] Could not replace (cell 'pr_0_dilate_erode_bb', library 'work_pr_0_pr_0_99', file 'NOFILE') with (cell 'pr_0_test_fifo', library 'work', file 'pr_0_test_fifo.edf') because of a port interface mismatch; 100 ports are missing on the replacing cell. 5 of the missing ports are: 's_axi_control1_arready' 's_axi_control1_arvalid' 's_axi_control1_awready' 'stream_in1_tlast[0]' 'stream_out1_tlast[0]'.

Resolution: Modify RTL to reference correct ports from the netlist

但没能找到在Block Diagram的PR中添加新的.bd文件作为RM的教程或案例。

<strong>错误流程:</strong>

pr_0_dilate_erode.bd是工程原本含有的RM
<center><img src="http://xilinx.eetrend.com/files/2022-07/wen_zhang_/100561926-260751-2.p…; alt=""></center>

pr_0_test_fifo.bd是新添加的RM
<center><img src="http://xilinx.eetrend.com/files/2022-07/wen_zhang_/100561926-260752-3.p…; alt=""></center>

在make原始工程后进行了以下操作:

<li>新建了pr_0_test_fifo.bd</li>

<li>将pr_0_dilate_erode.bd的接口复制到了pr_0_test_fifo.bd中</li>

<li>仿照pr_0_dilate_erode.bd一样在pr_0_test_fifo.bd中放置了两个IP并完成连线</li>

<li>仿照pr_0_dilate_erode.bd配置各口的时钟、分配bd地址,validate与save bd_design</li>

<li>在DFX wizard中添加pr_0_test_fifo为RM与完成其他配置</li>

在运行对应的child_2_impl_1后,pr_0_test_fifo_synth_1、synth_1与impl_1正常,但在child_2_impl_1处出现上述错误。

A: 建议按以下步骤操作,可以参考一下:

1. 从"Partition Definitions" Tab 打开已有RM的BD

2. 执行"write_bd_tcl bd.tcl", 从生成的bd.tcl中直接copy接口相关的内容到新建的BD中,同时自己在新BD中做Block连接

3. 从DFX Wizard中为RP创建新的RM,内容就是新建的BD,也可以参考以下命令:

create_reconfig_module -name $pr_0_hongh -partition_def pr_0 -define_from $pr_0_hongh

4. 设置新的Configuration,执行这个child run的impl