面向Abstract shell的DFX

作者: Jeson Zhang,文章来源: Ingdan FPGA微信公众号

1. 什么是DFX

从Vivado2019.1开始,Xilinx为之前的Partial Reconfiguration(部分重配置)功能取了个新名字--Dynamic Function eXchange(动态功能交换),在Vivado ML 2021.1, DFX是一项基本特性,不再和之前版本里的PR功能一样需要特定License。

Xilinx认为:DFX 技术允许设计者动态修改功能性,无需全面重配置和重构建链路,极大地增强了 FPGA 提供的灵活性;它是平台化设计流程的关键功能,对于Alveo 加速卡而言,尤为明显。使用 DFX 有助于设计者转而采用更少或更小的器件,降低功耗并提高系统升级能力。随时按需加载功能,更有效利用芯片。现在DFX也是高层次设计特性的一部分,并列于HLS,IPI,Model composel。

但标准的Vivado DFX开发流是有一些局限问题的:

DFX 设计需要专门的设计结构与布局,以匹配“片内芯片”模式。这种比较僵化的结构可能会导致设计处理时间拖长,从而导致Time To Market的时间拉长。

作为平台化设计,可重配置模块可能是给其他团队开发的,但是标准的VivadoDFX 需要complete locked static image,这样可能会导致静态设计部分的泄露。

2. 改进的Abstract shell DFX

目前对于Ultrascale+器件,Xilinx提供了面向Abstract shell的DFX,对于Abstract shell,可以理解为是保留静态设计部分的最小必要bit流。

右边是Standard DFX设计,左边是Abstract shell DFX,可以看见右边的静态区域显著减小,这对于编译来讲,会显著减少编译时间,另外由于静态设计是绝大部分不可见的,保证了静态设计的安全。
从设计流程上来比较,Standard DFX与之前版本的PR设计是相同的,Abstract shell DFX相比于Standard DFX,是多了write_abstract_shell封装成黑盒子,以及pr_verify 验证结果。

3. AbstractShell DFX 开发流程

1. UG947在附录里有提供参考工程,以这个工程为基础,generate,完成Implementation后,打开imp文件夹,可以看见以下几个文件。

其中,top_routed包含了全部PR信息,top_routed_bb只包含了静态设计部分,U_count和U_Shift是两个可重配置模块。
2. 为u_count 和u_shift instances创建Abstract shell

write_abstract_shell -force -cell u_count ./abstract_shell/ab_sh_count.dcp

write_abstract_shell -force -cell u_shift ./abstract_shell/ ab_sh_shift.dcp

就可以分别为Count RP, Shift RP创建对应的DCP文件。

3. 查看对比Checkpoint

从左到右分别是包含全部设计的Checkpoint,只包含静态设计的checkpoint,count RM的checkpoint,很明显可以看到对于Count RM的Abstract shell,绝大部分已经被删除屏蔽,Count的Abstract shell中也没有包括Shift。

在基于Conut RM的Abstract shell上,我们可以继续开发,比如添加封装好的网表文件一起link,再添加RM模块,此处不再赘述。

4. 生成full和Partial比特流

在基于Abstract shell的DFX,相比于Standard DFX,因为每个RM都是独立于静态设计实现,所以不需要创建多个配置文件。

使用source create_all_bitstreams_via_configs_vcu118.tcl,生成full和partition的比特流,之后就可以上板,进行硬件调试了。

4. 总结

在DFX设计里,Xilinx提出了几个建议:

1)Think “FPGA inside an FPGA”: Each Reconfigurable Partition (RP) is like itsown FPGA within the fabric;

2)Simplify IO of each RP as much as possible: Reducing number of ports, especially clocks,will improve routability;

3)Build the design requirements up incrementally: Add requirements one at a time to solvechallenges incrementally;

4)Iterate on most difficult configuration first: Establish static design first, especiallyinterfaces to RP;

5)Consider reconfiguration events early in thedesign process: Partial bitstream delivery and decoupling aredesigner’s responsibility;

总而言之,DFX就像在FPGA里面又给了一块FPGA,可以动态加载功能,为了实现FPGA嵌入FPGA,在设计中需要注意简化IO,提高路由性,解耦合模块等,而Abstract shell DFX是Xilinx对于先进制程的器件在Standard DFX上的局限性提出的优化功能后的方法。

如果您在DFX方面有疑问,欢迎与我们联系:simonyang@comtech.com.cn charlesxu@comtech.com.cn

最新文章

最新文章