estimateResources
Class: dlhdl.ProcessorConfig
Namespace: dlhdl
Syntax
Description
estimateResources(
returns the estimated resources used by the custom bitstream configuration.processorConfigObject
)
returns a table containing the estimated resources used by the custom bitstream
configuration.resources
= estimateResources(processorConfigObject
)
estimateResources(
returns the estimated resources used by the custom bitstream configuration, with
additional options specified by one or more name-value arguments.processorConfigObject
,Name,Value
)
Estimate Resource Utilization for Custom Board and Reference Design
returns the estimated resources used by the custom bitstream configuration, with
additional options specified by one or more name-value arguments.resources
= estimateResources(processorConfigObject
,Name,Value
)
Input Arguments
processorConfigObject
— Processor configuration
dlhdl.ProcessorConfig
object
Processor configuration, specified as a
dlhdl.ProcessorConfig
object.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
IncludeReferenceDesign
— Display reference design resource utilization
false (default) | false | true | logical
Flag to enable the display of reference design resource utilization specified as
alogical
data type.
Example: 'IncludeReferenceDesign',true
Output Arguments
resources
— Custom processor configuration object resource utilization
table
Resources used by the custom bitstream configuration, returned as a table.
Examples
Estimate Resources Used by Default Custom Processor Configuration
Create a default custom processor configuration object. Use the
dlhdl.ProcessorConfig
class.hPC = dlhdl.ProcessorConfig;
To retrieve the resources used by the custom processor configuration, call the
estimateResources
method.hPC.estimateResources;
Calling
estimateResources
returns these results:Deep Learning Processor Estimator Resource Results DSPs Block RAM* LUTs(CLB/ALUT) ------------- ------------- ------------- Available 2520 912 274080 ------------- ------------- ------------- DL_Processor 722( 29%) 508( 56%) 216119( 79%) * Block RAM represents Block RAM tiles in Xilinx devices and Block RAM bits in Intel devices
Estimate Resource Utilization for Custom Board and Reference Design
Rapidly prototype the deployment of deep learning networks to your custom board by using the estimateResources
function. Estimate the resource utilization of the deep learning processor configuration for your custom board. Optimize the integration of custom IP cores and reference design into your system by using the estimateResources
function to estimate the resource utilization of your reference design. The synthesis tool that you use must be in the list of tools supported by the SynthesisTool
property of the dlhdl.ProcessorConfig
object. For a list of supported tools and device families, see SynthesisTool and SynthesisToolChipFamily.
In this example, estimate the resource utilization for your custom board that has the Kintex® Ultrascale+™ chip family. Also estimate the resource utilization of the reference design for the Xilinx® Zynq® Ultrascale+™ MPSoC ZCU102 board.
Prerequisites
Deep Learning HDL Toolbox™
Deep Learning HDL Toolbox™ Support Package for Xilinx FPGA and SoC
HDL Coder™
Estimate Resource Utilization for Kintex® Ultrascale™ Board
To estimate the resource utilization for your custom board that has a Kintex® Ultrascale™ chip family , use the estimateResource
function of the dlhdl.ProcessorConfig
object.
Add the
dlhdl_device_registration.m
file to the MATLAB® search path.Create a
dlhdl.ProcessorConfig
object.Update the
SynthesisToolChipFamily
andSynthesisToolDeviceName
properties of thedlhdl.ProcessorConfig
object.Use the
estimateResources
function to retrieve the resource utilization for your custom board.
Deep Learning HDL Toolbox™ does not support lookup table (LUT) estimation for custom boards.
hPC = dlhdl.ProcessorConfig; hPC.SynthesisToolChipFamily = 'KintexU'; hPC.SynthesisToolDeviceName = 'xcku040-ffva1156-2-e'; hPC.estimateResources
Warning: Device family "KintexU" is not supported for LUT Estimation. Supported families are Zynq, Zynq UltraScale+ and Arria 10.
Deep Learning Processor Estimator Resource Results DSPs Block RAM* LUTs(CLB/ALUT) ------------- ------------- ------------- Available 1920 600 242400 ------------- ------------- ------------- DL_Processor 722( 38%) 508( 85%) 0( 0%) * Block RAM represents Block RAM tiles in Xilinx devices and Block RAM bits in Intel devices
Estimate Resource Utilization for Custom Reference Design
Estimate the resource utilization for a reference design that you want to integrate into your system that has a Xilinx® Zynq® Ultrascale+™ MPSoC ZCU102 board. Use the estimateResource
function with the IncludeReferenceDesign
name-value argument. The estimateResources
function uses the ResourcesUsed.LogicElements
, ResourcesUsed.DSP
, and ResourcesUsed.RAM
information in the reference design plugin file to perform the resource estimation. To estimate resource utilization for your custom reference design, you must populate your reference design file with values for ResourcesUsed.LogicElements
, ResourcesUsed.DSP
, and ResourcesUsed.RAM
. See ResourcesUsed. The reference design used in this code is located at $supportpackageinstallationfolder/Xilinx/boards/+DLZCU102/+matlab_libiio_3axi4_master_2019_1/plugin_rd.m
.
hPC_referencedesign = dlhdl.ProcessorConfig;
hPC_referencedesign.estimateResources('IncludeReferenceDesign',true)
Deep Learning Processor Estimator Resource Results DSPs Block RAM* LUTs(CLB/ALUT) ------------- ------------- ------------- Available 2520 912 274080 ------------- ------------- ------------- Total 725( 29%) 586( 65%) 251119( 92%) ReferenceDesign 3( 1%) 78( 9%) 35000( 13%) DL_Processor 722( 29%) 508( 56%) 216119( 79%) * Block RAM represents Block RAM tiles in Xilinx devices and Block RAM bits in Intel devices
The estimateResources
function returns the resource utilization for the reference design and for the deep learning processor configuration.
Supporting Files
Device Registration File
Use the dlhdl_device_registration.m
file to register a custom device family. Estimate the resource utilization of the custom device by using the estimateResources
function.
type dlhdl_device_registration.m
function hFPGADeviceFamily = dlhdl_device_registration % Register a new device family by providing the following details: % 1. Device Family Name % 2. Vendor(Intel/Xilinx) % 3. DSP Width % 4. RAM Width % 5. RAM Depth % 6. SplitDSP Width(Optional) - alternative DSP Width supported by the DSP macro % 7. SplitRAM Width(Optional) - alternative RAM Width supported by the RAM macro hFPGADeviceFamily = { ... kintex_ultrascale();... }; end function hFPGADeviceFamily = kintex_ultrascale() % Datasheets : % https://www.xilinx.com/support/documentation/user_guides/ug579-ultrascale-dsp.pdf % https://www.xilinx.com/support/documentation/user_guides/ug573-ultrascale-memory-resources.pdf hFPGADeviceFamily = hdlcoder.FPGADeviceInfo('Name', 'KintexU'); hFPGADeviceFamily.Vendor = 'Xilinx'; hFPGADeviceFamily.DSPWidth = [27, 18]; hFPGADeviceFamily.RAMWidth = 36; hFPGADeviceFamily.SplitRAMWidth = 18; hFPGADeviceFamily.RAMDepth = 1024; end
Version History
Introduced in R2021a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)