A Brief Overview of CRC Implementation for 5G NR

In fifth generation (5G) new radio (NR), the medium access control (MAC) layer organizes the data into the transport block and transmits it to the physical layer. The transport block consists of up to million bits. When the transport block size exceeds a threshold, the transport block is divided into multiple equal size code blocks. The code block consists of up to 8448 bits. Both the transport block and the code block have a cyclic redundancy check (CRC) attached. Due to the difference in the size of the transport block and the code block, the CRC processing scheme suitable for the transport block and that suitable for the code block are different. This chapter gives an overview of the CRC implementation in 5G NR.


Introduction
In order to provide high data transmission rates, the bandwidth of mobile communication systems is increasing. In fourth generation (4G) long term evolution (LTE), the maximum transmission bandwidth for one component carrier is 20 MHz [1]. In fifth generation (5G) new radio (NR), the frequency bands are divided into two parts: frequency range 1 (FR1) below 6 GHz and frequency range 2 (FR2) above 24.25 GHz. The maximum transmission bandwidth for one component carrier is 100 MHz and 400 MHz in FR1 and FR2 respectively [2]. The increasing system bandwidth brings new problems to the design of the transmitter and the receiver. In this chapter of the book, we focus on the cyclic redundancy check (CRC) implementation in 5G NR.
In 5G NR, there are many physical channels defined in the downlink and the uplink [3]. The downlink physical channels consist of the physical downlink shared channel (PDSCH), the physical downlink control channel (PDCCH), the physical broadcast channel (PBCH), etc. The uplink physical channels consist of physical uplink shared channel (PUSCH), the physical uplink control channel (PUCCH), the physical random access channel (PRACH), etc. The PDSCH and the PDSCH are mainly used to transmit data. The usage scenarios of 5G NR consist of enhanced mobile broadband (eMBB), massive machine-type communications (mMTC) and ultra-reliable and low latency communications (URLLC) [4,5]. The usage scenario of the eMBB requires high data transmission rates. As a consequence, we focus on the PDSCH and the PUSCH in this chapter.
The medium access control (MAC) layer organizes the data into the transport block and transmits it to the physical layer. In 5G NR, the maximum transport block size is 1,277,992 [6]. The processing of the transport block is shown in Figure 1 [7]. If the transport block size is larger than 3824, a 16-bit CRC is added at the end of the transport block. Otherwise, a 24-bit CRC is added at the end of the transport block. The transport block is divided into multiple equal size code blocks when the transport block size exceeds a threshold. For quasi-cyclic low-density parity-check code (QC-LDPC) base graph 1, the threshold is equal to 8448. For QC-LDPC base graph 2, the threshold is equal to 3840. In 5G NR, the maximum code block size number is 8448. An additional 24-bit CRC is added at the end of each code block when there is a segmentation. Due to the difference in the size of the transport block and the code block, the CRC processing scheme suitable for the transport block and that suitable for the code block are different.
The rest of this chapter is organized as follows. Section 2 describes the system model of the transport block and the code block in 5G NR. Section 3 gives two properties of the CRC. Section 4 presents the overview of the CRC implementation. Finally, Section 5 gives the conclusion.

System model
Let a ¼ a 0 , a 1 , … , a LÀ1 , a L , a Lþ1 , … , a LþNÀ1 ½ be the transport block including the transport block level CRC, where L is the transport block size and N is the transport block level CRC size. Note that p ¼ a L , a Lþ1 , … , a LþNÀ1 ½ is the transport block level CRC. If L is smaller than or equal to 3824, then N is equal to 16 and p is generated by the following cyclic generator polynomial: If L is larger than 3824, then N is equal to 24 and p is generated by the following cyclic generator polynomial: When L þ N is larger than M, the transport block including the transport block level CRC is segmented into multiple code blocks. Let R be code rate of the initial transmission indicated by the modulation and coding scheme (MCS) index. If L > 292 and R > 0:67 or L > 3824 and R > 0:25, then QC-LDPC base graph 1 is used and M is equal to 8448. Otherwise, QC-LDPC base graph 2 is used and M is equal to 3840.
When there is no segmentation, the number of code blocks C is equal to 1. When there is a segmentation, the number of code blocks C is equal to In the following sections, we mainly consider the case that there is a segmentation. Let be the ith code block, where K is the code block size and is equal to Note that the procedure of the transport block size determination guarantees is the code block level CRC, which is generated by the cyclic generator polynomial where 0 ≤ j ≤ K À 25. In the following, the processing of the transport block includes: QC-LPDC encoding, rate matching, bit interleaving and code block concatenation. The encoded transport block is transmitted over the air after the symbol level processing.
At the receiver side, the following steps are carried out for the transport block: code block segmentation, bit de-interleaving, de-rate matching, QC-LPDC decoding, code block concatenation. We need to check whether each code block and the transport block are correctly received.
be the ith received code block after the hard decision and e ¼ e 0 , e 1 , … , e LþNÀ1 ½ be the received transport block after the hard decision. e j is equal to The undetected error probability is required to be less than 10 À6 in 5G NR [8,9]. Since the parity check capacity of QC-LDPC codes alone cannot meet the undetected error probability requirement of 5G NR [8,9], we need to use the CRC check to determine whether d i and e are correctly received.

Properties of the CRC
In this section, we give two properties of the CRC. These properties are useful in the CRC implementation. Before giving these properties, we define some variables. Let A x ð Þ and B x ð Þ be the polynomials. Let g x ð Þ be the cyclic generator polynomial.
is defined as the remainder when A x ð Þ is divided by g x ð Þ. The two properties are listed as follows. Property 1.
can be obtained by computing the CRC of A x ð Þ and B x ð Þ independently. The proof of the property 1 and the property 2 can be found in Refs. [10,11]. It is omitted for brevity. g x ð Þ in the expression of CRC g x ð Þ A x ð Þ ½ is clear from the context. As a consequence, g x ð Þ in the expression of CRC g x ð Þ A x ð Þ ½ is omitted in the following.

Overview of the CRC implementation
In this section, we give an overview of the CRC implementation. In the following, the received transport block after the hard decision e is used as an example. The implementation is easily generalized to other cases.

CRC implementation by direct calculation
In this scheme, the CRC of e is directly calculated by the division of polynomial using modulo-2 arithmetic. Figure 2 illustrates an example. The dividend is equal to x 5 þ x 4 þ x þ 1 and the divisor is equal to x 2 þ x þ 1. The division of polynomial begins by putting x 5 þ x 4 þ x 3 below x 5 þ x 4 . Subtracting and bringing down the next term give us the intermediate variable x 3 þ x. This process is repeated until the degree of the intermediate variable is less than 2. Finally, we obtain that the quotient is equal to x 3 þ x þ 1 and the remainder is equal to x. That is, The division of polynomial using modulo-2 arithmetic is a computationally intensive operation. In the worst case, it requires a shift operation and an XOR logic operation for each bit of e. As a consequence, this scheme is rarely used in actual systems. In order to solve the problem of the direct calculation, many schemes have been proposed in the literatures.
For example, the CRC implementation for g x ð Þ ¼ x 5 þ x 3 þ x þ 1 is shown in Figure 3 [12,13]. The parallelism of this CRC implementation is 1 and thus one bit is processed on every clock cycle. Multiple bits can be processed on every clock cycle to speed the CRC calculation. For example, another CRC implementation for Figure 4 [14,15]. The parallelism of this CRC implementation is 3 and thus three bits are processed on every clock cycle. From  Figures 3 and 4, it is clear that parallelism comes at the expense of the increased circuit complexity.

CRC implementation by parallel processing
In this scheme, e is segmented into multiple blocks and the CRC of each block is obtained by parallel processing. e is segmented into multiple blocks [16]: The size of e MÀ1 is n and the size of e j is m, where 0 ≤ j ≤ M À 2. Note that L þ N is equal to n þ m M À 1 ð Þ. As a consequence, e can be expressed as The CRC of e is given by The above expression explains how CRC e ½ is obtained. The detail is shown in Figure 5.
and CRC x n ½ do not depend on the transport block size and can be precomputed. Since n is in the range 0, m À 1 ½ , variables that need to be precomputed include As a consequence, the number of variables that needs to be precomputed is m þ M À 3.
It is clear that the memory that needs to store the variables increases with the transport block size. To reduce the memory, CRC x αm ½ can be recursively calculated by using CRC x m ½ [17]. That is, CRC x αm ½ is recursively obtained by the following expression In this way, the variables that need to be precomputed include As a consequence, the number of variables that needs to be precomputed is m.

CRC implementation by serial processing
In this scheme, e is segmented into multiple blocks and the CRC of each block is obtained by serial processing. e is segmented into multiple blocks [18]: The size of e MÀ1 is n and the size of e j is m, where 0 ≤ j ≤ M À 2. Note that L þ N is equal to n þ m M À 1 ð Þ. e can be expressed as The CRC of e is given by where e ¼ ⌊ M À 1 ð Þ=P⌋. The above expression explains how CRC e ½ is calculated. The detail is shown in Figure 6.
and CRC x n ½ do not depend on the transport block size and can be precomputed. Since n is in the range 0, m À 1 ½ , variables that need to be precomputed include As a consequence, the number of variables that needs to be precomputed is m þ p À 2.
It is clear that the memory that needs to store the variables increases with the transport block size. To reduce the memory, CRC x αm ½ can be recursively calculated by using CRC x m ½ [17]. That is, CRC x αm ½ is recursively obtained by the following expression In this way, the variables that need to be precomputed include As a consequence, the number of variables that needs to be precomputed is m.

The Sarwate algorithm
Sarwate proposes an algorithm based on the lookup table [19]. The detail and the proof of the algorithm can be found in [19]. The Sarwate algorithm is shown in     [20]. The Sarwate algorithm uses a single table of 256 32-bit elements and reads the bits byte by byte. Modern processors usually access 32 bits or 64 bits at a time. As a consequence, the Sarwate algorithm is not efficient. Some schemes have been proposed in the literatures to solve this problem.

The slicing-by-4 and slicing-by-8 algorithms
Kounavis and Berry propose the slicing-by-4 and slicing-by-8 algorithms based on the lookup table [20]. The detail and the proof of the algorithms can be found in [20]. The slicing-by-4 and slicing-by-8 algorithms are shown in Figures 8 and 9 respectively [20]. The slicing-by-4 algorithm uses four tables of 256 32-bit elements and reads 32 bits at a time. The slicing-by-8 algorithm uses eight tables of 256 32-bit elements and reads 64 bits at a time. The performance of the slicing-by-4 and slicing-by-8 algorithms is improved compared to the Sarwate algorithm.

Conclusion
In 5G NR, the transport block consists of up to million bits and the code block consists of up to 8448 bits. Due to the difference in the size of the transport block and the code block, the scheme of the CRC processing suitable for the transport block and that suitable for the code block are different. This chapter gives an overview of the CRC implementation in 5G NR.