step

System object: comm.HDLCRCGenerator
Package: comm

Generate CRC checksums for input message based on control signals and appends checksums to output message

Syntax

[Y,startOut,endOut,validOut] = step(H,X,startIn,endIn, validIn)

Description

[Y,startOut,endOut,validOut] = step(H,X,startIn,endIn, validIn) generates CRC checksums for input message X based on control signals and appends the checksums to X.

    Note:   H specifies the System object™ on which to run this step method.

    The object performs an initialization the first time the step method is executed. This initialization locks nontunable properties and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first call the release method to unlock the object.

Input Arguments

H

HDL CRC Generator System object

X

Input message

  • Must be a binary column vector or a scalar integer representing several bits. That is, vector input [0,0,0,1,0,0,1,1] is equivalent to uint8 input 19.

  • If the input is a vector the data type can be double or logical. If the input is a scalar the data type can be unsigned integer (uint8/16/32) or unsigned fixed-point (fi object) with 0 fractional bits (fi([],0,N,0)).

  • X can be part or all of the message to be encoded.

  • The length of X must be less than or equal to the CRC length, and the CRC length must be divisible by the length of X.

  • The CRC length is the order of the polynomial that you specify in the Polynomial property.

startIn

Indicates the start of an input message. startIn is scalar with logical data type.

endIn

Indicates the end of an input message. endIn is scalar with logical data type.

validIn

When validIn is high, input message is processed for CRC checksum computation. validIn is scalar with logical data type.

Output Arguments

Y

Object output, consisting of X + checksum plus the delay. Output Y has the same width and data type as input X.

startOut

Indicates the start of an output message. startOut is scalar with logical data type.

endOut

Indicates the end of an output message. endOut is scalar with logical data type.

validOut

Indicates the validation of output message plus CRC checksums.validOut is scalar with logical data type.

Was this topic helpful?