Function API. STMicroelectronics SPC563M60L5, SPC56xx DSP function library 1
إعلان
إعلان
Function API RM0019
Function call:
Arguments: void conv_enc_mux(int n, unsigned short *message_ptr, unsigned long *out_ptr); n out_ptr
Table 1.
message_ptr in conv_enc_mux arguments size of input message in half-words, must be multiple of 2 in out pointer to input sequence of bits, each half-word contains bits b(15) b(14) ... b(0), must be half-word aligned memory layout: message_ptr(0) message_ptr(1) ... message_ptr(n-1) pointer to output sequence of bits, each word contains bits b(31) b(30)
... b(0), must be word aligned memory layout: out_ptr(0) out_ptr(1) ... out_ptr(n-1)
Description: Computes rate 1/2 constraint length 9 convolutional encoder. Input sequence of bits is stored in message_ptr. Output sequence of bits is written to out_ptr.
Algorithm:
Generator polynomials are fixed: g_0 = 561 (octal), g_1 = 753 (octal). These are the polynomials given in the 3G specification.
Encoder output sequences G_0 and G_1 are given by:
Equation 1 G_0 k = x k
– 2
– 3
– 4
– 8
Equation 2 = – 1
– 2
– 3
– 5
– 7
Output bit sequence is obtained by interleaving bit sequences G_0 and G_1.
– for each k = 0, 1, ..., 16n-1 where x 0
bits). Note that x 1 x
... x 16n
– 15
x
–
–
14
1
is the input message (i.e., input sequence of
... x
– 1
are zero for 3G.
8
Performance: See
Example1: conv_enc_mux
#define K 8 unsigned short message[K]; unsigned long out[K]; conv_enc_mux(K, message, out);
9/29
تنزيل
إعلان