AN2254 Freescale Semiconductor / Motorola, AN2254 Datasheet - Page 10

no-image

AN2254

Manufacturer Part Number
AN2254
Description
Scrambling Code Generation for WCDMA
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Software Implementation on the StarCore SC140/SC1400 Cores
sample. Moreover, before the multiplication to calculate the complex part of the scrambling sequence, the c2 used
is a decimated version of the original c2 by 2. Decimation of c2 by a factor of 2 is accomplished by ANDing c2
with 0x5555, shifting the result to the left by one bit and then ORing the shifted result with itself.
The next step is the multiplication of c1 and decimated c2 using an exclusive-or (EOR) operation.
The final step is the multiplication by +1 or -1, depending on whether it is an even or odd sample. This step is also
performed using an EOR operation with 0xAAAA. Thus, for each 16-bit sample of PN code, 16 chip segments of
complex scrambling code are formed. Finally, the complex scrambling code is mapped into real values and stored
into the memory buffer as interleaved IQ samples. To prevent overflow, a scaled-down version of the real-valued
code (+1 or –1 to +0.5 or –0.5) is stored in memory. The mappingloop program iterates 15 times for one iteration of
the mainloop program because one iteration of the code is performed while mappingloop is being set up.
10
Scrambling Code Generation for WCDMA on the StarCore™ SC140/SC1400 Cores, Rev. 1
;*******************************************************************************
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*******************************************************************************
;*
;*
;*
;*
;*******************************************************************************
;----------------------------pn_generation_param.asm----------------------------
;*******************************************************************************
;
;MASK16
;REG2_INIT EQU
;NUM_ITER
;MASKONE EQU
;MASK_DECM2 EQU
;MASK_PN1 EQU
;
;*******************************************************************************
;------------------------------WCDMA PN GENERATION------------------------------
;*******************************************************************************
main_pn_generation type func
File:
Function:
Author:
Version/Date:
Target Processor: Star*Core 140
Description:
Module Details:
Registers Used:
d0,d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15
r0
entry : jsr
Revision History:
section .data local
endsec
section .text local
EQU
EQU #2400
$0000000001
Example 3. Generating PN Codes
$000000AAAA
include ’pn_generation_param.asm’
global main_pn_generation
$0000005555
$000000FFFF
$0001FFFFFF
pn_generation.asm
binary pn code generation for WCDMA
Imran Ahmed
1.0 Oct 10 2001
Date
----
Change Details
--------------
Initials
--------
Freescale Semiconductor

Related parts for AN2254