Contenuto principale

Deep Learning HDL Output Format

R2026b

Convert deep learning processor outputs in external memory into per-element data and indices

Since R2026b

  • Deep Learning HDL Output Format Block

Description

The Deep Learning HDL Output Format block converts a stream of deep learning processor outputs in external memory into per element data and indices. Use the converted output data to implement post-processing algorithms in Simulink® or to generate HDL code.

To access the block open the dlhdlutils library. At the MATLAB® command line, enter:

open_system("dlhdlutils")

Ports

Input

expand all

Streaming input data from external memory, specified as a single or int8 data type scalar.

Data Types: single | int8

Input valid data flag, specified as a Boolean scalar.

Data Types: Boolean

Trigger to start streaming input data, specified as a Boolean scalar.

Data Types: Boolean

Output

expand all

Formatted output data, returned as a single or int8 data type scalar.

Data Types: single | int8

Trigger to read processed output data, returned as a Boolean scalar.

Data Types: Boolean

Row index of the formatted output data, returned as an uint16 data type scalar. To see which element the row index corresponds to, see Read Convolution Memory Format Data or Read Fully Connected Memory Format Data.

Data Types: uint16

Column index of the formatted output data, returned as an uint16 data type scalar. To see which element the column index corresponds to, see Read Convolution Memory Format Data or Read Fully Connected Memory Format Data.

Data Types: uint16

Depth index of the formatted output data, returned as an uint16 data type scalar. To see which element the depth index corresponds to, see Read Convolution Memory Format Data or Read Fully Connected Memory Format Data.

Data Types: uint16

Output selection index for multiple-output networks, returned as an uint16 data type scalar.

Data Types: uint16

Number of output data frames, returned as an uint16 data type scalar. To see which element the frame count corresponds to, see Read Convolution Memory Format Data or Read Fully Connected Memory Format Data.

Dependencies

To enable this port, select Enable FrameCount.

Data Types: uint16

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Location of the network object to use in the block.

  • Network from MATLAB function — Provide the name of the MATLAB function that returns a network object.

  • Network from MAT-file — Provide the path to the MAT file that stores the network object.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

To get the block parameter value programmatically, use the get_param (Simulink) function.

Parameter: networkOption
Values: Network from MATLAB function (default) | Network from MAT-FILE

Example: get_param(gcb,"networkOption")

Name of the MATLAB function that returns a network object.

Dependencies

To enable this parameter, set Network to Network from MATLAB function.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

To get the block parameter value programmatically, use the get_param (Simulink) function.

Parameter: netFunction
Values: getDigitsNetwork (default)

Example: get_param(gcb,"netFunction")

Path to the MAT-file that contains the network object.

Dependencies

To enable this parameter, set Network to Network from MAT-file.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

To get the block parameter value programmatically, use the get_param (Simulink) function.

Parameter: netFile
Values: tinyyolov4.mat (default)

Example: get_param(gcb,"netFile")

Name of a dlhdl.ProcessorConfig object or a MATLAB function that returns a dlhdl.ProcessorConfig object. If you set Network to MATLAB function, you must enter the name of a MATLAB function that returns a dlhdl.ProcessorConfig object. For example, this MATLAB function returns a dlhdl.ProcessorConfig object called hPCinMATLAB.

function hPCinMATLAB = hPCinMATLAB()
hPC = dlhdl.ProcessorConfig;
hPC.RunTimeControl = "port";
hPCinMATLAB = hPC;
end

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

To get the block parameter value programmatically, use the get_param (Simulink) function.

Parameter: processorConfig
Values: on (default) | off

Example: get_param(gcb,"processorConfig")

Set this parameter to enable the FrameCount output port.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

To get the block parameter value programmatically, use the get_param (Simulink) function.

Parameter: enableFrameCount
Values: on (default) | off

Example: get_param(gcb,"enableFrameCount")

Algorithms

expand all

Version History

Introduced in R2026b