PBCH Interleaver

This interleaver is used by PBCH chain before CRC encoder. The payload size of PBCHInterleaver must be 32.

Important

The payload size to be PBCHInterleaved/PBCHDeInterleaved must be 32.

PBCH Interleaver

The usage of PBCHInterleaver module can be understood using following examples: If input_bits is vector:

bits   = np.random.randint(2, size = (1,32)) # Bits to be interleaved

interleavedBits   = PBCHInterleaver()(bits) # Interleaved Bits

If input_bits is 2D array:

numBatches = 8 # Number of batches
bits       = np.random.randint(2, size = (numBatches, 32)) # Bits to be interleaved

interleavedBits   = PBCHInterleaver()(bits)  # Interleaved Bits

If input_bits is tensor:

numBatches = 5  # Number of batches
numPBCHs   = 10 # Number of PBCH payloads/MIBs
bits       = np.random.randint(2, size = (numBatches, numPBCHs, 32)) # Bits to be interleaved

interleavedBits   = PBCHInterleaver()(bits) # Interleaved Bits

The details about the implementation, usage and application interface is provided in following sections.

class toolkit5G.PhysicalChannels.PBCH.PBCHInterleaver[source]

This module implements the PBCH Interleaver as described in section 7.1.1 of 3GPP TS 38.211. The interleaver pattern for this module is defined in Table 7.1.1-1 of 3GPP TS 38.211.

Parameters:

None

Input:

input_bits ((…,32), int) – Input bits to be interleaved.

Output:

(…,32), int – Interleaved bits.

Raises:
  • ValueError – [Error-PBCHInterleaver]: ‘input_bits’ must be an NumPy array of numbers

  • ValueError – [Error-PBCHInterleaver]: ‘input_bits’ must have 32 bits!

PBCH DeInterleaver

The usage of PBCHInterleaver module can be understood using following examples:

deInterleavedBits = PBCHDeInterleaver()(interleavedBits) # De-Interleaved Bits
class toolkit5G.PhysicalChannels.PBCH.PBCHDeInterleaver[source]

This module implements the PBCH Interleaver as described in section 7.1.1 of 3GPP TS 38.211. The interleaver pattern pattern for this module is defined in Table 7.1.1-1 of 3GPP TS 38.211.

Parameters:

None

Input:

input_bits ((…,32), int) – Input bits to be de-interleaved.

Output:

(…,32), int – deinterleaved bits.

Raises:
  • ValueError – [Error-PBCHDeInterleaver]: ‘input_bits’ must be an NumPy array of numbers

  • ValueError – [Error-PBCHDeInterleaver]: ‘input_bits’ must have 32 bits!