AN2254 Freescale Semiconductor / Motorola, AN2254 Datasheet - Page 12

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
respecively
value 1,
1,
12
Scrambling Code Generation for WCDMA on the StarCore™ SC140/SC1400 Cores, Rev. 1
g
h
i
j
k
;--------------------mapping into real values sarts here-------------------------
]
[
or d1,d6
lsrr #10,d7
eor d7,d8
]
[
tfr d6,d1
tfr d6,d0
or d9,d7
lsrr #2,d6
]
[
eor d6,d8
lsr d6
tfr d7,d9
lsr d7
]
[
eor d7,d8
eor d7,d9
eor d9,d0
lsr d7
]
[
eor d6,d1
lsr d6
eor d7,d9
lsr d7
]
[
and #MASK_DECM2,d8.l
dosetup1 mappingloop
]
asl d8,d4
or d4,d8
[
eor d12,d8
doen1 #15
and #MASKONE,d12,d2
asr d12,d12
]
[
eor #MASK_PN1,d8.l
tsteq d2
tfr d13,d10
and #MASKONE,d8,d3
]
[
asr d8,d8
tfrf d14,d10
tsteq d3
tfr d13,d11
;//x |= x25
;//y >> 16, was at y6
;//c2 = y4^x4^x7 ^y6
;//x25 = x0
;//c1 = x0
;//y |= y25
;//x18
;//c2 = y4^x4^y6^x7^x18
;//x3
;//y25 = y0
;//y17 = y16 >> 1
;//c2 = y4^x4^y6^x7^x18^y17
;//y25 = y0^y1
;//c2 = x0^y0
;//y2
;//x25 = x0^x3
;//x4
;//y25 = y0^y1^y2
;//y3
;//decimation of every other sample of c2
;//setup mappingloop
;//left shift decimated version of c2
;//or with itself, repeats one sample twice
;//Q part of scrambling = c1(i)*c2(i) -- eqn. 12
;//set mappingloop counter to 15
;//extract c1’s least sig. bit
;//shift out the c1 bit already checked
;//Q part of scrambling [c1(i)*c2(i)] * +1 and -1
;//-- eqn. 12
;//test c1’s bit for 0 or 1
;//I part of scram. code, assume c1==0, map into real
;//i.e. put 0.5
;//extracts c2’s least sig. bit
;//extracts c2’s least sig. bit
;//I part of scram. code, if c1==1, map into real value -
;//i.e. put -0.5
;//test c2’s bit for 0 or 1
;//assume c2==0, map into real value 1, i.e. put 0.5
(y1)
Freescale Semiconductor

Related parts for AN2254