HadamardCode

Parent Previous Next

VisualSim.actor.lib.comm
Class HadamardCode


Produce a Hadamard codeword by selecting a row from a Hadamard matrix. The log base 2 of the matrix dimension is given by the log2Length parameter, which should be a non-negative integer smaller than 32. The row index is given by the index parameter or by the associated index port, which should be a non-negative integer smaller than the matrix dimension. If the index changes value when the actor is in the middle of producing a sequence of Hadamard codeword, the actor will take on the new index value, and start to produce the new codeword from the beginning.

A Hadamard matrix is defined in the following way:

H1 = [1, 1; 1, -1]

Hn+1 = [Hn, Hn; Hn, -Hn]

where n is a positive integer. Therefore, Hn is a 2n by 2n square matrix. The codeword length is 2n.

The actor produces Hadamard codeword in booleans. Therefore, 1 is treated as "true" and -1 is treated as "false".



Field Detail

index

public VisualSim.actor.parameters.PortParameter index


log2Length

public VisualSim.data.expr.Parameter log2Length



Created with the Personal Edition of HelpNDoc: Produce Kindle eBooks easily