Main Content

setDataType

Configure data type for the data captured from a signal

Since R2024a

Description

setDataType(hub,signalName,type) specifies the data type, type, for the data captured from a signal, signalName for the first data capture IP.

example

setDataType(hub,signalName,type,DataCaptureName=dataCaptureIPName) specifies the data type, type, for the data captured from a signal, signalName, for a data capture IP specified by dataCaptureIPName.

Examples

collapse all

This example uses a customized data capture hub object, hub, that connects with two data capture IPs. The first data capture IP is datacapture1 and the second data capture IP is datacapture2. Each IP defines two signals for data capture. Signal A is 1 bit and signal B is 8 bits.

Specify data types for the A and B signals for the datacapture1 IP as boolean and uint8, respectively.

setDataType(hub,'A','boolean');
setDataType(hub,'B','uint8');

Specify data types for the A and B signals for the datacapture2 IP as boolean and uint8, respectively.

setDataType(hub,'A','boolean',DataCaptureName="datacapture2");
setDataType(hub,'B','uint8',DataCaptureName="datacapture2");

Input Arguments

collapse all

Data capture hub object that interacts with each data capture IP, specified as a dataCaptureHub object.

Specify a signal name matching one that you configured when you generated the data capture IPs using the FPGA Data Capture Component Generator tool. The signal must be configured as a data signal.

The bit width of the data type must match the bit width of the captured signal. This size is the width you specified for the port on the generated IP.

The function supports these data types, depending on the bit width of the captured signal: boolean, uint8, int8, uint16, int16, half, uint32, int32, single, uint64, int64, double, and numerictype.

Name of the data capture IP, specified as a character vector or string scalar. The default value for this argument is "generatedIPName1", where generatedIPName1 is the name of the first data capture IP set by the Generated IP name parameter of the FPGA Data Capture Component Generator tool.

Version History

Introduced in R2024a