注册自定义参考设计:
定义参考设计。
创建一个参考设计插件。
Define a reference design registration function, or add the new reference design plugin to an existing reference design registration function.
参考设计定义必须是MATLAB®function that returns anhdlcoder.ReferenceDesign
object. Create the reference design definition function in the reference design plugin folder. You can use any name for the reference design definition function.
创建参考设计定义:
Create a new file that defines a MATLAB function with any name.
在MATLAB函数中,创建一个hdlcoder.ReferenceDesign
对象并根据嵌入式系统设计的特征来指定其属性和接口。
如果要检查定义是否完成,请运行valialateRectedSign
method.
此MATLAB函数定义了自定义参考设计:
functionhRD = plugin_rd()%参考设计定义% Construct reference design objecthrd = hdlcoder.trefendedesign('SynthesisTool',,,,'Xilinx Vivado');hRD.ReferenceDesignName ='Demo system (Vivado 2014.2)';HRD.BoardName ='Digilent Zynq Zybo';%工具信息%建议使用与受支持的工具兼容的工具版本金宝app% 版本。如果选择其他工具版本,则可能是HDL编码器是%无法为IP核心集成创建参考设计项目。hRD.SupportedToolVersion = {'2015.4'};%% Add custom design files% add custom Vivado designhrd.addcustomvivadodesign(...'CustomBlockDesigntCl',,,,'design_led.tcl');hrd.customfiles = {'zybo_zynq_def.xml'};%% Add interfaces% add clock interfacehrd.addclockinterface(...“时钟连接”,,,,'clk_wiz_0/clk_out1',,,,...'ResetConnection',,,,'proc_sys_reset_0/peripheral_aresetn');% add AXI4 and AXI4-Lite slave interfaceshrd.addaxi4slaveinterface(...“交流连接”,,,,'axi_interconnect_0/m00_axi',,,,...'BaseAddress',,,,'0x40010000',,,,...“ masteraddressspace”,,,,'processing_system7_0/data');
默认情况下,HDL Coder™生成具有默认设置的IP核心,并将其集成到参考设计项目中。要自定义这些默认设置,请在hdlcoder.ReferenceDesign
对象定义自定义参数并注册自定义回调函数的功能句柄。有关更多信息,请参阅定义自定义参数和回调函数的自定义参考设计。
参考设计插件是您在MATLAB路径上定义的软件包文件夹。该文件夹包含板定义文件和任何自定义回调功能。
创建参考设计插件:
在关联板的板插件文件夹中,创建一个新文件夹,该文件夹带有一个名称+
字首。
For example, the reference design plugin can be a folder named+vivado_base_ref_design
。
在新文件夹中,保存您的参考设计定义文件和您创建的任何自定义回调功能。
在新文件夹中,保存嵌入式系统设计项目所需的任何文件,并且是您的第三方合成工具(包括TCL,项目和设计文件)的特定文件。
将文件夹添加到您的MATLAB路径中。
参考设计注册功能包含参考设计功能和关联板名称的列表。您必须命名功能hdlcoder_ref_design_customization.m
。When the HDL Workflow Advisor opens, it searches the MATLAB path for files namedhdlcoder_ref_design_customization.m
,并使用信息来填充每个板的参考设计选项。
To define a reference design registration function:
创建一个名称的文件hdlcoder_ref_design_customization.m
and save it anywhere on the MATLAB path.
在hdlcoder_board_customization.m
,定义一个返回相关板名称的函数,该函数指定为字符向量,以及指定为字符向量的单元格数组的参考设计插件列表。
For example, the following code defines a reference design registration function.
function[rd,boardName] = hdlcoder_ref_design_customization%参考设计插件注册文件rd = {'ZyBoRegistration.Vivado2015_4.plugin_rd',,,,...}; boardName ='Digilent Zynq Zybo';结尾
参考设计注册函数返回the associated board name, specified as a character vector, and a list of reference design plugins, specified as a cell array of character vectors.
hdlcoder.board
|hdlcoder.ReferenceDesign