AN2254 Freescale Semiconductor / Motorola, AN2254 Datasheet - Page 15

no-image

AN2254

Manufacturer Part Number
AN2254
Description
Scrambling Code Generation for WCDMA
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Freescale Semiconductor
Scrambling Code Generation for WCDMA on the StarCore™ SC140/SC1400 Cores, Rev. 1
the
to
;-------------------code and scaling to preserve the energy of the constellation----------
-------------
;-------------------code and scaling to preserve the energy of the constellation--------
;----------------------------end of code to preserve energy of constellation--------------
------
to
mainloop
memory
move.l #INPUT_IQ,r0
move.l #CODE_IQ,r4
move.l #OUTPUT_IQ,r2
move.f #INV_SQRT2,d15
dosetup1 mainloop
[
move.4f (r0)+,d0:d1:d2:d3
move.4f (r4)+,d4:d5:d6:d7
]
[
mpy d0,d4,d8
mpy d0,d5,d9
mpy d2,d6,d10
mpy d2,d7,d11
]
[
mac -d1,d5,d8
mac d1,d4,d9
mac -d3,d7,d10
mac d3,d6,d11
]
[
mpy d15,d8,d8
mpy d15,d9,d9
mpy d15,d10,d10
mpy d15,d11,d11
]
[
asl d8,d8
asl d9,d9
asl d10,d10
asl d11,d11
sample
]
[
move.4f (r0)+,d0:d1:d2:d3
move.4f (r4)+,d4:d5:d6:d7
]
falign
loopstart1
[
moves.4f d8:d9:d10:d11,(r2)+
Software Implementation on the StarCore SC140/SC1400 Cores
;//R0 -> received input signal
;//R4 -> complex scrambling signal
;//R2 -> IQ complex scrambled signal to be stored
;//(1/sqrt(2)), required for scrambling to keep
;//energy of the srambled signal constant
doen1 #NUM_ITER
;//move 2 input IQ samples from memory to data
;//registers
;//move 2 scrambling IQ code samples from memory
;//data registers
;//(DI*SI) part from eqn. 16, 1st sample
;//(DI*SQ) part from eqn. 16, 1st sample
;//(DI*SI) part from eqn. 16, 2nd sample
;//(DI*SQ) part from eqn. 16, 2nd sample
;//(-(DQ*SQ)) part from eqn. 16, 1st sample
;//(DQ*SI) part from eqn. 16, 1st sample
;//(-(DQ*SQ)) part from eqn. 16, 2nd sample
;//(DQ*SI) part from eqn. 16, 2nd sample
;//(1/sqrt(2)) x (scrambled output I), 1st sample
;//(1/sqrt(2)) x (scrambled output Q), 1st sample
;//(1/sqrt(2)) x (scrambled output I), 2nd sample
;//(1/sqrt(2)) x (scrambled output Q), 2nd sample
;//output I scaling factor change from 4 to 2, 1st
;//sample
;//output Q scaling factor change from 4 to 2, 1st
;//sample
;//output I scaling factor change from 4 to 2, 2nd
;//sample
;//output Q scaling factor change from 4 to 2, 2nd
;//move 2 input IQ samples from memory to data
;//registers
;//move 2 scrambling IQ code samples from memory
;//data registers
;//move 2 complex scrambled IQ samples into
;//buffer
15

Related parts for AN2254