主要内容

Deep Learning HDL Handshake Interface

Model interface signals for data processing modes

Since R2026a

  • Deep Learning HDL Handshake Interface block

Description

The Deep Learning HDL Handshake Interface block models interface signals for three data processing modes:

  • Batch processing

  • Streaming to a frame count

  • Continuous streaming

To access the block at the MATLAB® command line, enter:

open_system("dlhdlutils")

To learn more, see Interface with the Deep Learning Processor IP Core.

Ports

Input

expand all

Trigger to start processing data, specified as a Boolean scalar.

Data Types: Boolean

Number of input data frames, specified as an uint32 data type scalar.

Data Types: uint32

Next input frame ready flag, specified as a Boolean scalar.

Dependencies

To enable this port, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Data Types: Boolean

Current output data read complete flag, specified as a Boolean scalar.

Dependencies

To enable this port, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Data Types: Boolean

Trigger to stop data streaming, specified as a Boolean scalar.

Dependencies

To enable this port, set Select Data Processing Mode to Continuous Streaming Mode.

Data Types: Boolean

Control bus from the data consumer signaling that data consumer is ready to accept data, specified as a scalar. This control bus comprises these control signals:

Signal NamePurposeData Type
wr_ready Indicates the block can send data to the data consumerBoolean scalar
wr_complete Indicates the write transaction has completed at the data consumerBoolean scalar

For more information, see Model Design for AXI4 Master Interface Generation (HDL Coder).

To learn how to create the bus signals, see Tips.

Data Types: BusAXIWriteCtrlS2M

Data to write to handshake signals, specified as a uint32 data type scalar or vector.

Data Types: uint32

Input control bus from the data producer, specified as a bus. This control bus comprises these control signals:

Signal NamePurposeData Type
rd_aready Indicates the data source accepted the read requestBoolean scalar
rd_dvalidIndicates the data returned for the read request is validBoolean scalar

For more information, see Model Design for AXI4 Master Interface Generation (HDL Coder).

To learn how to create the bus signals, see Tips.

Data Types: BusAXIReadCtrlS2M

Output

expand all

Trigger for data processing complete, returned as a Boolean scalar.

Data Types: Boolean

Handshake signals to read, returned as a uint32 data type scalar or vector.

Data Types: uint32

Control bus to the data consumer, returned as a bus. This control bus comprises these control signals:

Signal NamePurposeData Type
wr_addrSpecifies the starting address that the block writesuint32 scalar
wr_lenSpecifies the number of data elements in the write transactionuint32 scalar
wr_valid Indicates the data sampled at the RegisterWriteData output port is validBoolean scalar

For more information, see Model Design for AXI4 Master Interface Generation (HDL Coder).

To learn how to read the bus signals, see Tips.

Data Types: BusAXIWriteCtrlM2S

Output control bus to the data source indicating the block is ready to accept data, returned as a scalar. This control bus comprises these control signals:

Signal NamePurposeData Type
rd_addr Starting address for the read transaction that is sampled at the first cycle of the transactionuint32 scalar
rd_len Number of data values you want to read, sampled at the first cycle of the transactionuint32 scalar
rd_avalid Control signal that specifies whether the read request is validBoolean scalar
rd_dreadyControl signal that indicates when the block can read dataBoolean scalar

For more information, see Model Design for AXI4 Master Interface Generation (HDL Coder).

To learn how to read the bus signals, see Tips.

Data Types: BusAXIReadCtrlM2S

Input data memory address, returned as a uint32 scalar.

Dependencies

To enable this port, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Data Types: uint32

Size of next input data frame, returned as a uint32 scalar. The input data frame size is in bytes.

Dependencies

To enable this port, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Data Types: uint32

Input data valid flag, returned as a Boolean scalar.

Dependencies

To enable this port, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Data Types: Boolean

Processed output data memory address, returned as a uint32 data type scalar.

Dependencies

To enable this port, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Data Types: uint32

Size of next output data frame, returned as a uint32 data type scalar. Use this signal when the OutputValid signal is on.

Dependencies

To enable this port, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Data Types: uint32

Output data valid flag, returned as a Boolean scalar.

Dependencies

To enable this port, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Data Types: Boolean

Streaming mode test flag, returned as a Boolean scalar. When you test streaming modes, this signal is true when you retrieve the last output.

Dependencies

To enable this port, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Data Types: Boolean

Parameters

expand all

Data processing mode, specified as one of these options:

  • Batch processing mode — Use this mode when you have all your input data available and access to a large double data rate (DDR) memory space.

  • Streaming Mode upto a Frame Count — Use this mode when your input data is streaming, when you have access to limited DDR memory space, and when your application requires handshaking protocols. In this mode, the deep learning processor processes frames up to the value specified by the signal at the FrameCount port. To use this mode, the input value at the FrameCount port must be a value greater than or equal to one.

  • Continuous Streaming Mode — Use this mode when your input data is streaming, when you have access to limited DDR memory space, and when your application requires handshaking protocols. In this mode, the deep learning processor processes frames until the value at the InputStop port is true. To use this mode, the input value at the FrameCount port must be zero.

Base address source, specified as one of these options:

  • Base Address — Provide the base address of the deep learning processor IP core.

  • Reference Design File — Provide the path to the reference design file that contains the base address.

Path to reference design file.

Dependencies

To enable this parameter, set Specify Deep Learning IP Base Address to Reference Design File.

Base address of deep learning processor IP core, specified as an uint32 data type scalar.

When you set Specify Deep Learning IP Base Address to Reference Design File, this property is read-only.

Deep Learning IP Input Signals

This parameter is read-only.

Option to enable or disable the InputStart port.

Programmatic Use

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

Parameter: InputStart
Values: Read-only: on (default) | off

Example: get_param(gcb,"InputStart")

This parameter is read-only.

Option to enable or disable the FrameCount port.

Programmatic Use

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

Parameter: FrameCount
Values: Read-only: on (default) | off

Example: get_param(gcb,"FrameCount")

This parameter is read-only.

Option to enable or disable the InputNext port.

Dependencies

To enable this parameter, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Programmatic Use

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

Parameter: InputStart
Values: Read-only: on (default) | off

Example: get_param(gcb,"InputNext")

This parameter is read-only.

Option to enable or disable the OutputNext port.

Dependencies

To enable this parameter, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Programmatic Use

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

Parameter: InputStart
Values: Read-only: on (default) | off

Example: get_param(gcb,"OutputNext")

This parameter is read-only.

Option to enable or disable the InputStop port.

Dependencies

To enable this parameter, set Select Data Processing Mode to Continuous Streaming Mode.

Programmatic Use

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

Parameter: InputStart
Values: Read-only: on (default) | off

Example: get_param(gcb,"InputStop")

Deep Learning IP Output Signals

This parameter is read-only.

Option to enable or disable the Done port.

Programmatic Use

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

Parameter: Done
Values: Read-only: on (default) | off

Example: get_param(gcb,"Done")

This parameter is read-only.

Option to enable or disable the InputAddr port.

Dependencies

To enable this parameter, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Programmatic Use

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

Parameter: Done
Values: Read-only: on (default) | off

Example: get_param(gcb,"InputAddr")

This parameter is read-only.

Option to enable or disable the InputSize port.

Dependencies

To enable this parameter, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Programmatic Use

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

Parameter: Done
Values: Read-only: on (default) | off

Example: get_param(gcb,"InputSize")

This parameter is read-only.

Option to enable or disable the InputValid port.

Dependencies

To enable this parameter, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Programmatic Use

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

Parameter: Done
Values: Read-only: on (default) | off

Example: get_param(gcb,"InputValid")

This parameter is read-only.

Option to enable or disable the OutputAddr port.

Dependencies

To enable this parameter, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Programmatic Use

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

Parameter: Done
Values: Read-only: on (default) | off

Example: get_param(gcb,"OutputAddr")

This parameter is read-only.

Option to enable or disable the OutputSize port.

Dependencies

To enable this parameter, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Programmatic Use

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

Parameter: Done
Values: Read-only: on (default) | off

Example: get_param(gcb,"OutputSize")

This parameter is read-only.

Option to enable or disable the OutputValid port.

Dependencies

To enable this parameter, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Programmatic Use

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

Parameter: Done
Values: Read-only: on (default) | off

Example: get_param(gcb,"OutputValid")

This parameter is read-only.

Option to enable or disable the StreamingDone port.

Dependencies

To enable this parameter, set Select Data Processing Mode to Streaming Mode upto a Frame Count or Continuous Streaming Mode.

Programmatic Use

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

Parameter: Done
Values: Read-only: on (default) | off

Example: get_param(gcb,"StreamingDone")

Tips

To create the RegisterReadCtrlIn and RegisterWriteCtrlIn bus signals, use the Bus Creator (Simulink) block, and then set Output data type to BusAXIWriteCtrlS2M or BusAXIReadCtrlS2M.

To read the RegisterWriteCtrlOut and RegisterReadCtrlOut bus signals, use the Bus Selector (Simulink) block. When you add the block to your Simulink® model and update the block diagram, the block InitFcn callback function loads the BusAXIWriteCtrlS2M, BusAXIReadCtrlS2M, BusAXIWriteCtrlM2S, and BusAXIReadCtrlS2M data types into the MATLAB workspace.

Version History

Introduced in R2026a