Calculating Downlink Scramble Codes

The N7600C Signal Studio software implements scrambling codes for downlink channels in compliance with 3GPP specifications. This is done through the use of Scramble Code, Scramble Type, and Scramble Offset fields in the downlink channel parameter selection table. These fields are linked so that an entry to any field affects the actual scramble code.

The Primary Scrambling Code for all channels is set in the downlink carrier parameter selection table.

To better understand the relationship, please refer to the following formula.

n = (16 x i) + k + m

n = scramble code

Range: 0 to 511

i = scramble code field input

Primary Range: 0 to 511

Secondary Range: 0 to 511

k = scramble offset field input

Range: 0 to 15

m = scramble type field input

Standard: adds 0

Right Alternate: adds16384

Left Alternate: adds 8192

The Scramble Code field has two sets: primary and secondary, each with a field range of 0 through 511. The primary and secondary sets are determined by the Scramble Offset field. If the Scramble Offset field is zero, then the scramble code is in the primary set. Any non-zero entry enables the secondary set. The Scramble Offset field has a range of 0 through 15.

The Scramble Type field has three modes: Standard, Right Alternate, and Left Alternate. The standard scramble type has a value of zero and does not contribute to the scramble code. Selecting the right alternate adds 16384 to the actual scramble code, whereas the left alternate adds 8192.

Scramble Codes with Standard Scramble Type

A primary scramble code is the product of the Scramble Code field entry and 16. Therefore, the primary scramble code set contains all multiples of 16 from 0 through 8176.

A secondary scramble code is the sum of the non-zero Scramble Offset field entry and the primary scramble code. The secondary scramble code set uses the numbers in between the multiples of 16.

Thus, all numbers from 0 through 8191 are available for scramble codes when using the standard scramble type.

Refer to the following for examples of scramble codes generated with the primary and secondary sets:

n = (16 x i) + k + m

n = scramble code

i = scramble code field input

k = scramble offset field input

m = scramble type field input

Primary Set

Secondary Set

i = 6

i = 8

k = 0

k = 7

m = 0

m = 0

n = 96

n = 135

Scramble Codes with Right and Left Alternate Scramble Types

Recalling that right alternate adds 16384 to the scramble code and left alternate adds 8192, refer to the following examples of scramble codes generated with the right alternate and left alternate scramble types:

n = (16 x i) + k + m

n = scramble code

i = scramble code field input

k = scramble offset field input

m = scramble type field input

Primary Set + Left Alternate

Secondary Set + Right Alternate

i = 6

i = 8

k = 0

k = 7

m = 8192

m = 16384

n = 8288

n = 16519