Hierarchical shift circuit in correlation operations of parity check matrix for two-level loops
By combining a hierarchical shift circuit with a two-stage cyclic parity check matrix, the utilization problem of traditional shifters under non-power-of-2 data widths is solved, achieving efficient QC-LDPC encoding and decoding operations, and reducing circuit area and cost.
Patent Information
- Application Number
- CN202511370527.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-05-07
- Filing Date
- 2025-09-24
- Publication Date
- 2026-11-10
AI Technical Summary
Traditional barrel shifters are underutilized when handling data widths that are not powers of 2, resulting in wasted circuit area and manufacturing costs, and making it difficult to effectively support QC-LDPC encoding and decoding operations.
A hierarchical shift circuit architecture is adopted, combined with a two-stage cyclic parity check matrix structure. The upper shifter and the barrel shifter are used to perform coarse-grained and fine-grained cyclic shift operations respectively, thereby optimizing hardware utilization.
With data widths that are not powers of 2, the utilization of the shifter is significantly improved, the circuit area and cost are reduced, while maintaining the efficiency of QC-LDPC encoding and decoding.
Smart Images

Figure CN123074512A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to encoding systems, and more particularly to a hierarchical shift circuit for correlation operations in a two-level loop parity check matrix. Background Technology
[0002] Low-Density Parity-Check (LDPC) codes are widely recognized for their near-capacity error correction performance and efficient iterative decoding algorithms. Due to their strong error recovery capabilities and scalability, LDPC codes have been used in numerous high-throughput communication and storage standards, including 5G NR, Wi-Fi, and flash memory systems.
[0003] Quasi-Cyclic (QC)-LDPC codes are a subclass of LDPC codes, whose parity check matrix consists of a circulant permutation matrix (CPM) and a zero matrix. The quasi-cyclic nature of QC-LDPC allows for conventional and modular encoding and decoding operations, making it more hardware-friendly and significantly reducing memory requirements and architectural complexity. The inherent structure of QC-LDPC codes makes them suitable for implementation using barrel shifters, which can efficiently perform the cyclic shift operations required during encoding and decoding. However, traditional barrel shifters typically have good utilization for data widths that are powers of 2. When applied to data widths other than powers of 2, insufficient utilization leads to wasted circuit area and manufacturing costs.
[0004] Therefore, there is a need in the art for an improved shift circuit that can effectively support QC-LDPC encoding and decoding operations while minimizing circuit area and manufacturing cost, especially in systems where the data width does not conform to a power of 2. Summary of the Invention
[0005] This invention provides a hierarchical shift circuit architecture that uses a barrel shifter with an input width of powers of 2 to perform cyclic shift operations on input data of arbitrary bit width. This hierarchical architecture includes an up shifter for performing coarse-grained cyclic shifts and a barrel shifter (with an input width of powers of 2) for performing fine-grained cyclic shifts. The up shifter performs segment-wise cyclic shifts on the input data to rearrange the segments, while the barrel shifter performs bit-wise cyclic shifts within each segment.
[0006] To enable the hierarchical architecture to be widely applied in QC-LDPC encoding systems, this invention also proposes a two-level cyclic parity check matrix structure. This two-level cyclic parity check matrix structure is compatible with the operating characteristics of hierarchical shift circuits, ensuring that encoding and decoding operations in the QC-LDPC encoding system can be implemented using the same hardware-friendly and economical hierarchical shift circuits.
[0007] Embodiments of the present invention provide a shift circuit for performing data shift operations in an operation associated with a two-level cyclic parity check matrix, and the shift circuit includes: an upper shifter and at least one first barrel shifter. The upper shifter is used to perform a coarse-grained cyclic shift operation on an input data to produce intermediate shifted data. The at least one first barrel shifter is used to receive a first portion of the intermediate shifted data and perform a fine-grained cyclic shift operation on the first portion of the intermediate shifted data to produce a first output shifted data.
[0008] Embodiments of the present invention provide a memory controller for a flash memory, the memory controller including a shift circuit for performing data shift operations in an operation associated with a two-level cyclic parity check matrix. The shift circuit includes an upper shifter and at least one first barrel shifter. The upper shifter performs a coarse-grained cyclic shift operation on input data to produce intermediate shifted data. The at least one first barrel shifter receives a first portion of the intermediate shifted data and performs a fine-grained cyclic shift operation on the first portion of the intermediate shifted data to produce a first output shifted data. Attached Figure Description
[0009] Figure 1 This is a schematic diagram of the architecture of a data storage device and electronic apparatus according to an embodiment of the present invention.
[0010] Figure 2 This invention demonstrates the decomposition of a two-level loop parity check matrix according to an embodiment of the invention.
[0011] Figure 3 This paper presents an abstract representation of a traditional parity check matrix and a two-level cyclic parity check matrix according to an embodiment of the present invention.
[0012] Figure 4 A schematic diagram of the architecture of a shift circuit according to an embodiment of the present invention is shown.
[0013] Figure 5 A schematic diagram of the architecture of a local shift circuit according to another embodiment of the present invention is shown.
[0014] [Symbol Explanation]
[0015] 10 Electronic Systems
[0016] 50 Main unit
[0017] 52 processor
[0018] 54 RAM
[0019] 100 Data storage devices
[0020] 110 Memory Controller
[0021] 112 Processing Unit
[0022] 112M ROM
[0023] 112C program code
[0024] 113 Internal Memory
[0025] 114 Control Logic Circuit
[0026] 118 Transmission Interface Circuit
[0027] 120 NV memory
[0028] 122_1, 122_2, 122_(N-1), 122_N NV memory elements
[0029] 130 ECC processing circuit
[0030] 131 encoder
[0031] 132 decoder
[0032] BLK Block
[0033] SBLK Super Block
[0034] 300 shift circuit
[0035] 400 Local Shift Circuit
[0036] 301, 401 Upper Shifter
[0037] 302_1~302_3, 402 Barrel Shifter
[0038] ID Input Data
[0039] Partial data of SD1~SD3 input data
[0040] ISD intermediate shift data
[0041] Local shift data between ISD_1 and ISD_3, and ISD_K
[0042] OSD output shift data
[0043] Partial output of shift data from OSD_1 to OSD_3
[0044] USCS, BSCS_1~BSCS_3 control signals Detailed Implementation
[0045] Embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, the inventive concept can be embodied in various different forms and should not be construed as limited to the embodiments shown. Rather, these embodiments are provided to make this disclosure thorough and complete, and to fully convey the inventive concept to those skilled in the art. Therefore, known processes, elements, and techniques relating to some embodiments of the inventive concept will not be described. Unless otherwise stated, the same reference numerals in the drawings and written description denote the same elements and are therefore not repeated. In the drawings, the dimensions and relative dimensions of layers and regions may be exaggerated for clarity.
[0046] The terms "an embodiment" or "an example" used in this specification mean that a particular feature, structure, or characteristic shown in that embodiment or example will be included in at least one embodiment of the invention. Therefore, the terms "in an embodiment" or "in an example" appearing throughout this specification do not all refer to the same embodiment. Furthermore, specific features, structures, or characteristics of the invention may be combined in any suitable combination and / or sub-combination to be implemented in one or more embodiments.
[0047] Figure 1 This diagram illustrates the architecture of an electronic device and a data storage device according to an embodiment of the present invention. As shown, the electronic device 10 includes a host device 50 and a data storage device 100. The host device 50 may include: at least one processor 52 for controlling the operation of the host device 50, and a random-access memory (RAM) 54 for storing data and information required by the processor 52. Examples of the host device 50 may include (but are not limited to): smartphones, tablets, wearable devices, personal computers (such as desktop computers or laptops), image capturing devices (such as digital cameras or camcorders), game consoles, in-vehicle navigation systems, printers, scanners, or server systems. Examples of the data storage device 100 may include, but are not limited to: portable storage devices (e.g., memory cards conforming to SD / MMC, CF, MS, XD, or UFS specifications), solid-state drives, and various embedded storage devices (such as embedded storage devices conforming to UFS or eMMC standards).
[0048] In different embodiments of the present invention, the data storage device 100 may include a memory controller 110 and further include non-volatile (NV) memory 120. NV memory 120 may include one or more NV memory elements, such as a plurality of NV memory elements (MUs) 122-1-122_N. In some embodiments, NV memory 120 may be NAND flash memory, and NV memory elements 122_1-122_N may be a plurality of NAND flash memory packages or a plurality of NAND flash memory dies, but the present invention is not limited thereto.
[0049] In some embodiments, the NV memory 120 may include multiple memory blocks (BLKs), which may be grouped into multiple superblocks (SBLKs). A memory block (BLK) may be a physical block containing multiple memory cells. A superblock (SBLK) may be a unit of logical memory region used by the memory controller 110 to manage the NV memory 120. Furthermore, the composition of a superblock (SBLK) may span NV memory dies 122_1 to 122_N. A memory block (BLK) may be an array of memory cells, with multiple memory cells forming a two-dimensional or three-dimensional array structure. A memory cell may be programmed as a single-level memory cell with one bit of information, or as a multi-level memory cell with two or more bits of information (e.g., a two-level, three-level, or four-level memory cell). Additionally, a memory block (BLK) may contain multiple pages, where a page may consist of memory cells coupled to the same word line. Additionally, a memory block (BLK) may be the unit of an erase operation, while a page may be the unit of a program or read operation.
[0050] In some embodiments, each NV memory die 122_1 to 122_N is equipped with control circuitry for executing memory operation commands issued by the memory controller 110. Each NV memory die 122_1 to 122_N may contain multiple planes, each plane having multiple blocks and associated column and row control circuitry. Through multi-plane operation commands, various memory operations can be performed in parallel on different planes to perform multi-plane read, write, or erase operations.
[0051] The memory controller 110 may include a processing unit 112, a read-only memory (ROM) 112M, internal memory 113, a transmission interface circuit 118, and an error correction code (ECC) processing circuit 130. At least a portion of these circuits and components may be coupled to each other via a bus. The internal memory 113 may be implemented by one or more RAM devices. For example, the internal memory 113 may include static RAM (SRAM) and / or dynamic RAM (DRAM). The internal memory 113 may be used to provide internal storage space for the memory controller 110, such as temporarily storing information like data, addresses, commands, mapping information, variables, and / or parameters. In some embodiments, the memory controller 110 may not include DRAM. Instead, the memory controller 110 may rely on host memory buffer (HMB) technology. Using HMB technology, the memory controller 110 can utilize the host device 50's RAM 54 (e.g., DRAM) as all, part, or an extension of the internal memory 113, thereby improving the read and write performance of the data storage device 100.
[0052] Furthermore, in this embodiment, ROM 112M is used to store program code 112C, and processing unit 112 is used to execute program code 112C to control access to NV memory 120. Program code 112C may contain one or more program modules, such as boot loader code. When data storage device 100 obtains power from host device 50, processing unit 112 can initiate the initialization process of data storage device 100 by executing program code 112C. During the initialization process, microprocessor 112 can load a set of in-system programming (ISP) code from NV memory 120. Microprocessor 112 can execute ISP code, enabling data storage device 100 to perform various functions. According to one embodiment of the present invention, the ISP code may include, but is not limited to, one or more program modules related to memory access (e.g., reading, programming, and erasing), such as a read operation module, a lookup table module, a wear-leveling module, a read refresh module, a read reclaim module, a garbage collection module, and a sudden power-off recovery (SPOR) module. These modules are used to perform corresponding read, lookup table, wear-leveling, read refresh, read reclaim, garbage collection, SPOR, and other operations.
[0053] The memory controller 110 can control the reading, writing, and erasing of the NV memory 120. In addition, the memory controller 110 can simultaneously process host commands from the host device 50 to write data, and read and rewrite valid data from the NV memory 120 through garbage collection and / or wear leveling operations. The transmission interface circuit 118 may conform to specific communication specifications, such as Universal Serial Bus (USB), Secure Digital (SD) interface or its subsequent upgrades, Ultra High Speed-I (UHS-I) interface, Ultra High Speed-II (UHS-II) and its subsequent upgrades, Compact Flash (CF) interface and its subsequent upgrades, Multimedia Card (MMC) interface, Embedded Multimedia Card (eMMC) specification, Serial Advanced Technology Attachment (SATA), Parallel Advanced Technology Attachment (PATA), Peripheral Component Interconnect Express (PCI-E), and Universal Flash Storage (UFS) specification, and may communicate with the host device 50 according to the specific communication specifications.
[0054] Typically, host device 50 may indirectly access memory device 100 by transmitting host commands and corresponding logical addresses to memory controller 110. Memory controller 110 receives host commands and logical addresses, translates host commands into memory operation commands, and further uses memory operation commands to control NV memory 120 to perform read, program, or erase operations on memory storage cells or data pages with physical addresses within NV memory 120.
[0055] In one embodiment, the ECC processing circuit 130 includes an encoder 131 and a decoder 132, whose encoding and decoding operations are based on a parity-check matrix with two-stage cyclic characteristics to generate or verify codewords. Specifically, the encoder 131 uses a parity-check generation matrix derived from the two-stage cyclic parity-check matrix to encode user data received from the host device 50 and outputs the corresponding codewords for storage in the NV memory 120. On the other hand, the decoder 132 uses the two-stage cyclic parity-check matrix to verify the integrity of the codewords retrieved from the NV memory 120 and performs bit error correction if necessary. According to various embodiments of the present invention, the encoder 131 and decoder 132 may be QC-LDPC encoders and decoders for performing quasi-cyclic low-density parity-check (QC-LDPC) encoding and decoding.
[0056] refer to Figure 2 The parity check matrix used in the ECC operations of encoder 131 and decoder 132 may have a structure exhibiting two-level cyclic characteristics. In the illustrated embodiment, the parity check matrix H can be decomposed into 5×7 first-level submatrixes (FSMs), each FSM being a 96×96 matrix (i.e., Z = 96). Each first-level submatrix FSM can be further decomposed into 6×6 second-level submatrixes (SSMs), each SSM being a 16×16 matrix (Z² = 16). Although specific matrix dimensions and decompositions are shown in the figures for the purpose of explaining the inventive concept, the invention is not limited thereto.
[0057] like Figure 2As shown, one or more of the first-level submatrices FSM are block circulant matrices. In a block circulant's first-level submatrice FSM, each row or column contains only one non-zero second-level submatrice SSM, while all other second-level submatrices SSM are zero matrices. Furthermore, the non-zero second-level submatrices SSM in each row or column are essentially circulant permutation matrices (CPMs). As shown, each column of a block circulant's first-level submatrice FSM is a circulant shift of the previous column (e.g., a circulant shift one position to the right), thus forming a regular cyclic pattern throughout the matrix. Moreover, a circulant permutation matrix is a binary matrix in square row form, and each column is a "one-bit" circulant shift of its preceding column to the right. A circulant permutation matrix contains exactly one logical "1" element in each column and each row, while all other elements are logical "0". Based on the above arrangement, the parity check matrix H presents a two-level cyclic structure, including an outer block-wise cycle and an inner element-wise cycle.
[0058] Figure 3 This paper presents an abstract comparison between a two-level cyclic parity check matrix H1 according to an embodiment of the present invention and a conventional QC-LDPC parity check matrix H0. As shown in the figure, the conventional QC-LDPC parity check matrix H0 exhibits global cyclicity, where non-zero submatrices (or non-zero elements) follow a uniform cyclic pattern throughout the matrix. In contrast, the two-level cyclic parity check matrix H1 exhibits local cyclicity. Specifically, the cyclicity is manifested in certain sub-regions of the entire matrix. Figure 3 In the diagram, white squares represent non-zero submatrices (e.g., cyclic permutation matrices) or non-zero elements, while black squares represent zero submatrices or zero.
[0059] Please refer to Figure 4 The figure shows a schematic diagram of the architecture of the hierarchical shift circuit according to an embodiment of the present invention. Figure 4 The shift circuit (SC) 300 shown can be implemented in encoder 131 or decoder 132 to perform data shift operations related to the parity check matrix of two-level loops.
[0060] As shown in the figure, the shift circuit 300 includes an upper shifter 301 and multiple barrel shifters 302_1 to 302_3. The number of barrel shifters can vary depending on the design requirements of the encoder 131 or decoder 132 and / or the structure of the corresponding two-stage cyclic parity check matrix.
[0061] The upper shifter 301 performs a coarse-grained cyclic shift operation on the input data ID to generate intermediate shifted data ISD. Bucket shifters 302_1 to 302_3 each receive a portion of the intermediate shifted data ISD and perform a fine-grained cyclic shift operation on that portion to generate a portion of the output shifted data OSD. For example, bucket shifter 302_1 receives the first portion ISD_1 of the intermediate shifted data ISD and performs a fine-grained cyclic shift operation on it to generate the first portion OSD_1 of the output shifted data OSD. Bucket shifter 302_2 receives the second portion ISD_2 of the intermediate shifted data ISD and performs a fine-grained cyclic shift operation on it to generate the second portion OSD_2 of the output shifted data OSD. The barrel shifter 302_3 is used to receive the third part ISD_3 of the intermediate shift data ISD and perform a fine-grained cyclic shift operation on the third part ISD_3 of the intermediate shift data ISD to generate the third part OSD_3 of the output shift data OSD.
[0062] By hierarchically dividing the shift operation into coarse-grained and fine-grained stages, the shift circuit 300 can efficiently implement a shift pattern that conforms to the structural characteristics of a two-level cyclic parity check matrix, while optimizing hardware utilization, especially when the input data width is not a power of 2.
[0063] In a more specific example, the up shifter 301 is used to perform a segment-wise cyclic shift operation on the input data ID (e.g., 96-bit wide data). For example, the input data ID can be divided into a first segment SD1, a second segment SD2, and a third segment SD3, where each segment contains multiple bits of the input data ID (e.g., 32-bit wide data). Under the control of the up shift control signal USCS, the up shifter 301 performs a segment-wise cyclic shift operation, cyclically shifting the first segment SD1, the second segment SD2, and the third segment SD3 segment by segment (i.e., treating the 32-bit segments as a whole), thereby producing the intermediate shifted data ISD.
[0064] Furthermore, barrel shifters 302_1-302_3 are used to perform bit-wise cyclic shift operations on each part of the intermediate shifted data ISD. For example, barrel shifter 302_1 is used to perform a bit-wise cyclic shift on the first part ISD_1 (e.g., 32-bit wide data) of the intermediate shifted data ISD according to the barrel shift control signal BSCS_1, thereby rotating or cyclically shifting the bits within the first part ISD_1 bit by bit to generate the first part OSD_1 of the output shifted data OSD (i.e., 32-bit wide data). Barrel shifter 302_2 is used to perform a bit-wise cyclic shift on the second part ISD_2 of the intermediate shifted data ISD according to the barrel shift control signal BSCS_2, thereby rotating or cyclically shifting the bits within the second part ISD_2 bit by bit to generate the second part OSD_2 of the output shifted data OSD. The barrel shifter 302_3 is used to perform bit-by-bit cyclic shifting of the third part ISD_3 of the intermediate shift data ISD according to the barrel shift control signal BSCS_3, thereby rotating or cyclically shifting the bits in the third part ISD_3 in a bit-by-bit manner to generate the third part OSD_3 of the output shift data OSD.
[0065] The hierarchical structure of the shift circuit 300 is characterized by being an improved design based on the barrel shifters 302_1 to 302_3 (whose utilization is optimal when the data width is a power of 2). Even if the overall data block processed by the encoder 131 or decoder 132 is not a power of 2 (e.g., the 96-bit metadata block in the illustrated embodiment), the hierarchical structure of the shift circuit 300 can maintain the 32-bit segmented shift operation performed by each barrel shifter 302_1 to 302_3. Note that although a specific data processing bit width is shown in the figure, this is not a limitation of the invention.
[0066] Generally, digital circuits designed with data widths based on powers of 2 have many advantages, including lower circuit complexity and compatibility with memory and register structures. This invention enables cyclic shifting of input data that is not a power of 2, based on a highly utilized bucket shifter module aligned with powers of 2, by decomposing the shift operation into coarse-grained and fine-grained stages.
[0067] Please refer to Figure 5 The diagram illustrates the architecture of a hierarchical shift circuit according to an embodiment of the present invention. Figure 5 The partial shift circuit (PSC) 400 shown can be implemented in encoder 131 or decoder 132 to perform the data shift operation of the related operations of the two-stage cyclic parity check matrix described above. Figure 3Compared to the shift circuit 300, the local shift circuit 400 is optimized for local output.
[0068] As shown in the figure, the local shift circuit 400 includes an up shifter 401 and a barrel shifter 402. Similarly, the up shifter 401 performs a coarse-grained cyclic shift operation on the input data ID to produce intermediate shifted data ISD. The barrel shifter 402 receives a specific portion of the intermediate shifted data ISD and performs a fine-grained cyclic shift operation on that specific portion of the intermediate shifted data ISD to produce output shifted data OSD. For example, the barrel shifter 402 receives a specific portion ISD_K of the intermediate shifted data ISD (e.g., any 32-bit segment in a 96-bit input data) and performs a fine-grained cyclic shift operation on that specific portion ISD_K to produce output shifted data OSD.
[0069] Specifically, the up shifter 401 is used to perform a segmented cyclic shift operation on the input data ID (e.g., 96-bit wide data). For example, the input data ID can be divided into a first segment SD1, a second segment SD2, and a third segment SD3, where each segment contains multiple bits of the input data ID (e.g., 32-bit wide data). The up shifter 401 is used to perform a segmented cyclic shift operation according to the up shift control signal USCS, thereby rotating or cyclically shifting the first segment SD1, the second segment SD2, and the third segment SD3 segment by segment (i.e., treating the 32-bit segments as a whole) to produce the intermediate shifted data ISD (i.e., 32-bit wide data).
[0070] Furthermore, the barrel shifter 402 is used to perform a bit-by-bit cyclic shift operation on a specific portion of the intermediate shifted data ISD. For example, the barrel shifter 402 is used to perform a bit-by-bit cyclic shift on a specific portion ISD_K (e.g., 32-bit wide data) of the intermediate shifted data ISD according to the barrel shift control signal BSCS_1, thereby rotating or cyclically rotating or cyclically the bits within the specific portion ISD_K bit by bit to produce output shifted data OSD.
[0071] The advantage of the hierarchical structure of the local shift circuit 400 is that the hardware implementation of the barrel shifter 402 can be optimized for data widths that are powers of 2. Even if the data blocks processed by the encoder 131 or decoder 132 are not powers of 2 (e.g., 96 bits wide in the illustrated embodiment), the hierarchical structure of the shift circuit 400 allows the barrel shifter 402 to be designed to operate on 32-bit wide data segments.
[0072] In summary, the hierarchical shift circuit of this invention, combined with the two-stage cyclic parity check matrix structure, significantly improves the utilization rate of the barrel shifter in practice while retaining the error correction performance of the traditional QC-LDPC code.
[0073] Embodiments of the present invention can be implemented as an apparatus, method, or computer program product. Accordingly, embodiments of the present invention may take the form of a completely hardware implementation, a completely software implementation, or an implementation combining software and hardware aspects, all of which are collectively referred to as "modules" or "systems" in this specification. Furthermore, embodiments of the present invention may take the form of a computer program product embodied in any tangible medium containing computer-usable program code. In terms of hardware, the present invention can be implemented by applying any of the following techniques or related combinations: individual operation logic having logic gates capable of performing logical functions based on data signals, and application-specific integrated circuits (ASICs), programmable gate arrays (PGAs), or field-programmable gate arrays (FPGAs) having appropriate combinatorial logic.
[0074] The flowcharts and block diagrams illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of program code, containing one or more executable instructions for implementing a specified logical function. It should also be noted that each block in the block diagram and / or flowchart description, and combinations of blocks in the block diagram and / or flowchart description, may be implemented by a dedicated hardware system that performs the specified function or action, or a combination of dedicated hardware and computer instructions. These computer program instructions may be stored in a computer-readable medium that directs a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture containing means of instruction to implement the functions / actions specified in the blocks of the flowchart and / or block diagram.
[0075] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made in accordance with the claims of the present invention shall be covered by the present invention.
Claims
1. A shift circuit for performing data shift operations in a parity check matrix operation associated with a two-level loop, comprising: An upper shifter is used to perform a coarse-grained cyclic shift operation on an input data to produce an intermediate shifted data; and At least one first barrel shifter is used to receive a first portion of the intermediate shifted data and perform a fine-grained cyclic shift operation on the first portion of the intermediate shifted data to generate a first output shifted data.
2. The shift circuit as described in claim 1, characterized in that, Also includes: At least one second barrel shifter is used to receive a second portion of the intermediate shifted data and perform a fine-grained cyclic shift operation on the second portion of the intermediate shifted data to generate a second output shifted data.
3. The shift circuit as described in claim 2, characterized in that, The at least one first barrel shifter and the at least one second barrel shifter are used to process local data with a bit width equal to a power of 2.
4. The shift circuit as described in claim 2, characterized in that, The at least one first barrel shifter and the at least one second barrel shifter are used to perform a bit-by-bit cyclic shift operation on the first and second portions of the intermediate shifted data.
5. The shift circuit as described in claim 1, characterized in that, This shifter is used to perform a segment-by-segment cyclic shift operation on the input data.
6. The shift circuit as described in claim 1, characterized in that, The two-level cyclic parity check matrix contains one or more block cyclic matrices, each of which is formed by arranging multiple cyclic permutation matrices in a cyclic shift manner.
7. The shift circuit as described in claim 1, characterized in that, This shift circuit is used in low-density parity coding or decoding processes associated with a two-stage cyclic parity check matrix.
8. A memory controller for a flash memory, comprising: A shift circuit for performing data shift operations in a parity check matrix operation associated with a two-level loop, comprising: An upper shifter is used to perform a coarse-grained cyclic shift operation on an input data to produce an intermediate shifted data; and At least one first barrel shifter is used to receive a first portion of the intermediate shifted data and perform a fine-grained cyclic shift operation on the first portion of the intermediate shifted data to generate a first output shifted data.
9. The memory controller as claimed in claim 8, characterized in that, The shift circuit also includes: At least one second barrel shifter is used to receive a second portion of the intermediate shifted data and perform a fine-grained cyclic shift operation on the second portion of the intermediate shifted data to generate a second output shifted data.
10. The memory controller as claimed in claim 9, characterized in that, The at least one first barrel shifter and the at least one second barrel shifter are used to process local data with a bit width equal to a power of 2.
11. The memory controller as claimed in claim 9, characterized in that, The at least one first barrel shifter and the at least one second barrel shifter are used to perform a bit-by-bit cyclic shift operation on the first and second portions of the intermediate shifted data.
12. The memory controller as claimed in claim 8, characterized in that, This shifter is used to perform a segment-by-segment cyclic shift operation on the input data.
13. The memory controller as claimed in claim 8, characterized in that, The two-level cyclic parity check matrix contains one or more block cyclic matrices, each of which is formed by arranging multiple cyclic permutation matrices in a cyclic shift manner.
14. The memory controller as claimed in claim 8, characterized in that, This shift circuit is used in low-density parity coding or decoding processes associated with a two-stage cyclic parity check matrix.
15. A data storage device comprising a flash memory and a memory controller as claimed in claim 8.
