FPGA设计会遇到这样的情况,将验证过的模块移植到新的工程中,在移植过程中不改变模块的布局布线。这时可以使用Core_Partiton_Reuse和Root Partition Reuse 功能。
- Core Partition Reuse—将使用fpga内部资源 (LUTs, flip-flops, M20K memory, and DSP blocks) 生成的模块移植到别的工程。
- Root Partition Reuse—将使用fpga内部资源其他IP (including I/O,HSSIO, PCIe, PLLs)生成的模块移植到别的工程。
下面对Core Partition Reuse功能进行介绍。
Core_Partiton_Reuse
设计和验证模块的工程叫Developer Project,将模块移植到Consumer Project 。如下图所示,Developer Project输出模块网表qdb文件和Black Box。Black Box就是只包含模块输入输出端口声明的文件,在Consumer Project 中调用。
在Developer Project中要进行5个步骤:
Developer Project
- Define a Core Partition
- Compile and Export the Core Partition
- Create the Black Box File
- Copy Files to Consumer Project
- Hardware Verification (Optional)
在Consumer Project中要进行5个步骤:
**Consumer Project **
- Add Files and Run Synthesis
- Create a Partition
- Compile the Design
- Hardware Verification (Optional)
Developer Project
**Define a Core Partition **
在定义core Partition之前,先进行Analysis & Synthesis。选定要进行移植的模块,右键选择Design Partition->Default。
**Compile and Export the Core Partition **
编译工程后,导出Core Partition。Project ->Export Design Partition,选择要导出模块名称,导出文件为qdb文件。
**Create the Black Box File **
创建.v文件,文件名称与模块名相同。Black Box File文件内容与下面类似,只包括输入输出声明,创建完成后不要加入工程。
module blinking_led (
output [3:0] value,
input clock
);
endmodule
**Copy Files to Consumer Project **
将qdb文件和Black Box File拷贝到Consumer Project。
**Hardware Verification (Optional) **
这一步验证模块是否正常工作,不是必须步骤。
Consumer Project
**Add Files and Run Synthesis **
将Black Box File加入到Consumer Project工程中,运行Analysis & Synthesis 。
Create a Partition
在工程中选中 u_blinking_led模块, 右键选择Design Partition->Default。这步操作与在develop project中类似。接下来打开Design Partitions Window,Assignments -> Design。将blinking_led.qdb 添加到Partition Database File中。
Compile the Design
对工程进行全编译。
Hardware Verification
验证移植模块是否正常工作。
参考文档
an839
ug-qpp-block-based-design