主要内容

hdlcoder.ReferenceDesign class

Package:hdlcoder

Reference design registration object that describes SoC reference design

Description

refdesign= hdlcoder.ReferenceDesign('SynthesisTool',toolname)creates a reference design object that you use to register a custom reference design for an SoC platform.

To specify the characteristics of your reference design, set the properties of the reference design object.

Use a reference design tool version that is compatible with the supported tool version. If you choose a different tool version, it is possible that HDL Coder™ is unable to create the reference design project for IP core integration.

Construction

refdesign= hdlcoder.ReferenceDesign('SynthesisTool',toolname)creates a reference design object that you use to register a custom reference design for an SoC platform.

Input Arguments

expand all

Synthesis tool name, specified as a character vector.

Example:“ Altera Quartus II”

Properties

expand all

Reference design name, specified as a character vector. In the HDL Workflow Advisor, this name appears in theReference designdrop-down list.

Example:“默认系统(Vivado 2015.4)”

Board associated with this reference design, specified as a character vector.

Example:“带PM3基板的Enclustra Mars ZX3”

One or more tool versions that work with this reference design, specified as a cell array of character vectors.

Example:{'2015.4'}

Example:{'13.7','14.0'}

One or more design constraint files, specified as a cell array of character vectors. This property is optional.

Example:{'MarsZX3_PM3.xdc'}

Example:{'mydesign.qsf'}

One or more relative paths to files or folders that the reference design requires, specified as a cell array of character vectors. This property is optional.

Examples of required files or folders:

  • Existing IP core used in the reference design.

    For example, if the IP core,my_ip_core, is in the reference design folder, setCustomFilesto{'my_ip_core']

  • PS7 definition XML file.

    例如,要包括一个PS7定义XML文件,ps7_system_prj.xml,在文件夹中,data, setCustomFilesto{fullfile('data','ps7_system_prj.xml')}}

  • 包含参考设计中使用的现有IP芯的文件夹。HDL编码器仅支持每金宝app个合成工具的特定IP核心文件夹名称:

    • For Altera®Qsys, IP core files must be in a folder namedip。放CustomFilesto{'ip'}

    • For Xilinx®Vivado®,IP核心文件或包含IP核心文件的zip文件,必须在名为的文件夹中ipcore。放CustomFilesto{'ipcore'}

    • 对于Xilinx EDK,IP核心文件必须在名为的文件夹中pcores。放CustomFilesto{'pcores'}

Note

To add IP modules to the reference design, it is recommended to create an IP repository folder that contains these IP modules, and then use theaddIPRepository方法。

Example:{'my_ip_core'}

Example:{fullfile('data', 'ps7_system_prj.xml')}

Example:{'ip'}

Example:{'ipcore'}

Example:{'pcores'}

Specify the device tree file name. For an example that shows how to use different device tree file names when mapping the DUT ports to different AXI4-Stream channels, seeDynamically Create Master Only or Slave Only or Both Master and Slave Reference Designs

Example:'devicetree_axistream_iio.dtb'

Specify whether you want the parameterInsert JTAG MATLAB as AXI Master (HDL Verifier Required)to be displayed in the设定目标参考设计task of the HDL Workflow Advisor. By default, this property value is set to真的。The parameter is displayed in the设定目标参考设计任务。启用此属性后,要指定是否要代码生成器将JTAG MATLAB插入Axi Master IP,请使用JTAGMATLABasAXIMasterDefaultValueproperty. If you do not want the parameter to be displayed, set the property value tofalse

This property is optional.

Example:'false'

Specify whether you want the code generator to insert the JTAG MATLAB as AXI Master IP. The values that you specify are the choices for theInsert JTAG MATLAB as AXI Master (HDL Verifier Required)drop-down in the设定目标参考设计task of the HDL Workflow Advisor. To specify insertion of the JTAG as AXI Master automatically, before you set this property to,设置AddJTAGMATLABasAXIMasterParameterproperty to真的

This property is optional.

Example:'on'

Specify the IP cache zip file to include in your project. When you run theIP Core Generationworkflow in the HDL Workflow Advisor, the code generator extracts this file in the创建项目任务。TheBuild FPGA Bitstreamtask reuses the IP cache, which accelerates reference design synthesis.

This property is optional.

Example:'ipcache.zip'

Specify whether you want the code generator to report timing failures in theBuild FPGA Bitstream任务是警告或错误。当您运行IP Core Generationworkflow in the HDL Workflow Advisor, by default, the code generator reports any timing failures as error. If you have implemented the custom logic to resolve timing failures, you can specify these failures to be reported as warning instead of error. To learn more, seeResolve Timing Failures in IP Core Generation and Simulink Real-Time FPGA I/O Workflows

This property is optional.

Example:'hdlcoder.reporttiming.warning'

Specify if the reference design has an existing PS.

Example:'false'

Enable generation of device tree nodes for an HDL Coder generated IP core, and then insert the nodes into the device tree. To enable the generation of device tree nodes for the IP core,HasProcessingSystem必须设置为真的

Do not enable this property if you do not need any additional device tree nodes to be inserted into the registered device tree for the generated IP core.

Example:'真的'

参考设计使用的董事会资源,作为带有字段的结构返回:

Reference design resources utilized by FPGA lookup tables (LUTs), specified as a number.

Example:hRD.ResourcesUsed.LogicElements = 100

FPGA DSP切片使用的参考设计资源,指定为数字。

Example:hRD.ResourcesUsed.DSP = 3

参考设计资源利用FPGA板内存resources, specified as a number.

Example:hRD.ResourcesUsed.RAM = 32000

方法

CallbackCustomProgrammingMethod Function handle for custom callback function that gets executed during Program Target Device task in the Workflow Advisor
CustomizeReferenceDesignFcn Function handle for callback function that gets executed before Set Target Interface task in the HDL Workflow Advisor
嵌入式codersuppo金宝apprtpackage 指定是否使用Embedded Codersupport package
PostBuildBitstreamFcn 在HDL Workflow Advisor中构建FPGA bitstream任务后执行的回调函数的函数句柄
PostCreateProjectFcn Function handle for callback function that gets executed after Create Project task in the HDL Workflow Advisor
PostSWInterfaceFcn Function handle for custom callback function that gets executed after Generate Software Interface task in the HDL Workflow Advisor
PostTargetInterfaceFcn Function handle for callback function that gets executed after Set Target Interface task in the HDL Workflow Advisor
PostTargetReferenceDesignFcn Function handle for callback function that gets executed after Set Target Reference Design task in the HDL Workflow Advisor
addAXI4MasterInterface Add and define AXI4 Master interface
addAXI4SlaveInterface 添加并定义AXI4从接口
addAXI4StreamInterface 添加AXI4-Stream接口
addAXI4StreamVideoInterface Add AXI4-Stream Video interface
addClockInterface Add clock and reset interface
AddCustomedKdesign SpecifyXilinxEDK MHS project file
AddCustomqsysdesign SpecifyAlteraQsys project file
addCustomVivadoDesign SpecifyXilinxVivado导出块设计TCL文件
addDeviceTree Add device tree for reference design object
addDeviceTreeIncludeDirectory Specify the path of an include file to compile the device tree against
addIPRepository Include IP modules from your IP repository folder in your custom reference design
addInternalIOInterface Add and define internal IO interface between generated IP core and existing IP cores
addParameter Add and define custom parameters for your reference design
validateReferenceDesign 在参考设计对象中检查属性值
在R2015a中引入