LDPC decoding device and electronic equipment
By introducing the first and second data queues in the LDPC decoding device, and performing data enqueuing and dequeuing operations through the controller, the rate mismatch problem between the front-end demodulation unit and the back-end decoder is solved, ensuring The order and integrity of data improve decoding efficiency.
Patent Information
- Application Number
- CN202410688308.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-05-30
AI Technical Summary
The existing FIFO buffer unit cannot meet the rate mismatch problem between the front-end demodulation unit and the back-end decoder during the LDPC decoding process, resulting in the decoder not working properly or the decoding efficiency being low.
The first data queue and the second data queue are used as the buffering mechanism, and the controller performs data enqueue and dequeue operations according to the decoding requirements to ensure that the LDPC decoder can receive data at its expected rate and pass the queue's first-in-first-out operation. Properties ensure the order and integrity of data.
It solves the problem of mismatch between the digital codeword sequence rate demodulated by the demodulation unit and the input rate of the LDPC decoder, ensuring the correct order and integrity of the data, meeting the data length requirements under different decoding requirements, and improving the decoding efficiency.
Smart Images

Figure CN118694378A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of circuits, and in particular to an LDPC decoding device and an electronic device. Background Art
[0002] The current FIFO buffer units all use fixed bit width input and fixed bit width output to buffer data. The LDPC codes in the WIFI protocol are mainly 648 / 1296 / 1944, but the previous demodulation unit will have variable code lengths of 1 / 2 / 4 / 6 / 8. At the same time, there are also structures such as shorten / puncture / repeat bit in the LDPC code, which requires some fixed code words to be inserted into the previous code length. Therefore, the current FIFO buffer unit cannot meet the flexible and variable code length during the LDPC decoding process. Summary of the invention
[0003] The LDPC decoding device and electronic device provided in the embodiments of the present application can solve the rate mismatch problem between the front-end demodulation unit and the back-end LDPC decoder. The technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides an LDPC decoding device, including:
[0005] A demodulation unit, a first buffer unit, a second buffer unit, an LDPC decoder and a controller;
[0006] The output end of the demodulation unit is connected to the input end of the first buffer unit, the output end of the first buffer unit is connected to the input end of the second buffer unit, and the output end of the second buffer unit is connected to the LDPC decoding unit; the controller is respectively connected to the control end of the first buffer unit and the control end of the second buffer unit; the first buffer unit is provided with a first data queue, and the second buffer unit is provided with a second data queue;
[0007] Demodulation unit, used to demodulate the RF signal into a digital codeword sequence
[0008] The controller is used to read a digital codeword sequence of a first fixed length from a demodulation unit, perform an enqueue operation on the read digital codeword sequence according to the position of the tail element of the first data queue, determine a target length according to a decoding requirement, and perform a dequeue operation on the element of the target length according to the position of the head element of the first data queue, perform an enqueue operation on the dequeued element of the first data queue according to the position of the tail element of the second data queue, and perform a dequeue operation on the element of the second fixed length according to the position of the head element of the second data queue;
[0009] The LDPC decoder is used to perform a decoding operation on the elements dequeued from the second data queue.
[0010] In a second aspect, the present application provides an electronic device, comprising the above-mentioned LDPC decoding device.
[0011] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:
[0012] When the rate of the digital codeword sequence demodulated by the demodulation unit from the radio frequency signal does not match the input rate expected by the LDPC decoder, the decoder will not work properly or the decoding efficiency will be low. The present application solves this rate mismatch problem by introducing a first data queue and a second data queue as a buffer mechanism. The digital codeword sequence demodulated by the demodulation unit is first stored in the first data queue, and the controller performs data entry and exit operations according to the decoding requirements and the queue state to ensure that the LDPC decoder can receive data at its expected rate. In the process of data transmission and processing, the order and integrity of the data are crucial to the correctness of decoding. By using the first-in-first-out (FIFO) feature of the queue, the present application ensures that the digital codeword sequence demodulated by the demodulation unit can be received by the LDPC decoder in the correct order, and the integrity of the data is guaranteed. Different decoding requirements may require data input of different lengths. In the present application, the controller can determine the target length according to the decoding requirements and perform a dequeue operation from the first data queue, thereby ensuring that the LDPC decoder can receive the data length that meets its decoding requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0014] Figure 1 is a structural diagram of an LDPC decoding device provided in an embodiment of the present application;
[0015] Figure 2 is an operation diagram of the first data queue provided in an embodiment of the present application;
[0016] Figure 3 This is an operation diagram of the second data queue provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] See also Figure 1 The present invention provides a structural schematic diagram of an LDPC decoding device according to an embodiment. The LDPC decoding device includes: a demodulation unit 10, a first buffer unit 11, a second buffer unit 12, an LDPC decoder 13 and a controller 14.
[0019] The connection relationship of the above-mentioned components is as follows: the output end of the demodulation unit 10 is connected to the input end of the first buffer unit 11, the output end of the first buffer unit 11 is connected to the input end of the second buffer unit 12, and the output end of the second buffer unit 12 is connected to the LDPC decoding unit 13; the controller 14 is respectively connected to the control end of the first buffer unit 11 and the control end of the second buffer unit 12; the first buffer unit 11 is provided with a first data queue, and the second buffer unit 12 is provided with a second data queue. The data queue (Data Queue) is a special linear table, which only allows deletion operations at the front end of the table (front), and insertion operations at the rear end (rear) of the table. This data structure follows the FIFO (First In First Out) principle, that is, the element that first enters the queue will be removed from the queue first. The first buffer unit 11 and the second buffer unit 12 are combined and set in the same chip, which can improve the integration of the device. The controller 14 may include one or more processing cores. The controller 14 uses various interfaces and lines to connect various parts of the entire server 400, and runs or executes instructions, programs, code sets or instruction sets stored in the memory, and calls data stored in the memory. Optionally, the controller 14 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA).
[0020] The working principle of the LDPC decoding device of this application is as follows:
[0021] The demodulation unit demodulates the radio frequency signal into a digital codeword sequence.
[0022] Among them, the RF signal can be a RF signal such as a WiFi RF signal. Select a suitable antenna to ensure that the signal can be accurately captured. Use the RF receiver to receive the RF signal from the antenna and send it to the demodulation system. Since the RF signal will have a certain attenuation during the transmission process, the signal needs to be amplified to enhance the strength and stability of the signal. The mixer in the demodulation unit mixes the received RF signal with the local oscillation signal to generate an intermediate frequency signal. This step is a key step in the demodulation process. The high-frequency RF signal is converted into a lower-frequency intermediate frequency signal through mixing, which is convenient for subsequent processing. The mixed intermediate frequency signal is filtered to remove spurious signals and noise and retain the target signal. The design of the filter needs to be optimized for signals of a specific frequency to improve the signal-to-noise ratio. The intermediate frequency signal is demodulated into a baseband signal using technologies such as coherent demodulation or incoherent demodulation. During the demodulation process, the corresponding demodulation algorithm needs to be selected according to the modulation mode of the signal (such as ASK, FSK, PSK, etc.). After demodulation to the baseband signal, the continuous baseband signal is converted into a discrete digital signal through an analog-to-digital converter (ADC). The digital signal is then encoded into a series of digital codeword sequences.
[0023] The controller reads a first fixed-length digital codeword sequence from the demodulation unit, performs an enqueue operation on the read digital codeword sequence according to the position of the tail element of the first data queue, determines the target length according to the decoding requirements, and performs a dequeue operation on the elements of the target length according to the position of the head element of the first data queue, performs an enqueue operation on the dequeued elements in the first data queue according to the position of the tail element of the second data queue, and performs a dequeue operation on the elements of the second fixed length according to the position of the head element of the second data queue.
[0024] Among them, the controller sends a read request to the demodulation unit, specifying the length of the codeword sequence to be read (i.e., the first fixed length). The demodulation unit responds to the request and sends the digital codeword sequence of the specified length to the controller. After receiving the digital codeword sequence, the controller needs to store it in the first data queue. The controller first checks the position of the tail element of the first data queue to determine the position where the new data should be inserted. The controller performs an enqueue operation on the read digital codeword sequence according to the position of the tail element, that is, adding the new data to the end of the queue. According to the decoding requirements, the controller needs to determine a target length, that is, the number of elements to be extracted from the first data queue. The controller reads the position of the head element of the first data queue to determine from which position to start extracting data. Starting from the head of the first data queue, the controller continuously extracts elements corresponding to the target length and performs a dequeue operation. The controller transfers the dequeued elements in the first data queue to the second data queue. The controller first checks the position of the tail element of the second data queue to determine the position where the new data should be inserted. The controller performs an enqueue operation on the dequeued elements in the first data queue according to the position of the tail element, that is, adding these elements to the end of the second data queue. According to the processing requirements or decoding process, the controller needs to extract elements of a certain length from the second data queue for processing. The controller determines a second fixed length, that is, the number of elements that need to be extracted from the second data queue. The controller reads the first element position of the second data queue, extracts elements of the corresponding length from this position, and performs a dequeue operation.
[0025] For example, see Figure 2 The schematic diagram of the enqueue operation and dequeue operation of the first data queue is shown. In the initial state, the first data queue is an empty queue, and the first fixed length is 6. The controller first receives 6 data (elements) from the decoding unit, enqueues the 6 data, and then reads 3 data from the first data queue for the first time, and reads 2 data from the first data queue for the second time.
[0026] See also Figure 3 The schematic diagram of the enqueue operation and dequeue operation of the second data queue is shown. In the initial state, the second data queue is an empty queue, and the second fixed length is 5. The controller performs an enqueue operation on 2 data from the first data queue for the first time, and performs an enqueue operation on 3 data from the first data queue for the second time. When the current number of elements in the second data queue is greater than or equal to 5, the first 5 elements are dequeued according to the position of the head element of the second data queue.
[0027] The LDPC decoder performs a decoding operation on the elements dequeued from the second data queue.
[0028] The LDPC decoder receives dequeued elements from the second data queue, which are digital codeword sequences that have been demodulated and stored in the queue. The decoder takes the received data as input and prepares to perform LDPC decoding operations. The LDPC decoder first performs an initialization operation, including loading a predefined check matrix of the LDPC code. The selection of the check matrix is crucial to the performance of the decoder, and it defines the relationship between the information bits and the check bits. Initialization may also include setting parameters of the decoding algorithm, such as the number of iterations, thresholds, etc. The LDPC decoder uses an algorithm based on iterative decoding, such as the belief propagation (BP) algorithm or its optimized version (such as LLRBP, Min-Sum, etc.). During the iteration process, the decoder transmits information between the variable nodes and the check nodes through reliability messages (i.e., "messages") to gradually approximate the original transmitted information bits. In each iteration, the decoder updates the node information based on the current soft information (such as the log-likelihood ratio LLR), and detects and corrects possible errors based on this information. The LDPC decoder approximates the best decoding result through multiple iterations. After each iteration, the decoder checks whether the current decoding result meets the constraints of the check matrix. If the condition is met (i.e. the check is passed), the decoder considers that the correct decoding result has been found and stops iterating. If the condition is not met (i.e. the check is not passed), the decoder continues to the next iteration until the preset maximum number of iterations is reached or other stop conditions are met. When the decoder stops iterating, it outputs the final decoding result. This result is an estimate of the original transmitted information, which has corrected the errors that may have occurred during the transmission process as much as possible. The decoding result can be used by subsequent digital signal processing units, such as for further verification, error correction or transmission.
[0029] In one or more possible embodiments, the second data queue is provided with a read pointer, and the read pointer is used to indicate the position of the first element in the second data queue.
[0030] Among them, during or after the initialization of the data queue, a read pointer is set. This read pointer is a variable that is used to track and indicate the position of the current head element in the queue. When the queue is empty, the read pointer can point to a predefined invalid position or an empty mark. When a new element is enqueued, the position of the read pointer remains unchanged because it still points to the head element. However, when an element is dequeued from the queue, the read pointer needs to be updated to point to the new head element. This process usually involves moving the read pointer forward by one position. The head element in the queue can be accessed by reading the position pointed to by the read pointer. Since the read pointer always points to the head of the queue, the value of the head element can be obtained by simply reading this position without traversing the entire queue. When performing queue enqueue and dequeue operations, it is necessary to ensure that the read pointer is synchronized with the queue state. For example, after a dequeue operation, the read pointer must be updated to reflect the new head position
[0031] In one or more possible embodiments, the step of selecting a second fixed-length digital codeword sequence from the head element of the second data queue for dequeue operation includes:
[0032] Detecting the current number of elements in the second data queue;
[0033] If the current number of elements is equal to the second fixed length, selecting elements of the second fixed length from the head element of the second data queue for dequeue operation;
[0034] If the current number of elements is less than the second fixed length, continue to detect the number of elements in the second data queue.
[0035] Among them, the queue management interface or related functions are used to query the current number of elements in the second data queue. This is usually achieved by reading a counter or state variable inside the queue, which records the number of elements currently stored in the queue. The detected current number of elements is compared with a predefined second fixed length. This second fixed length is a constant that represents the number of elements that the queue should contain under certain conditions (such as a full queue state). If the current number of elements is equal to the second fixed length, the next step of the dequeue operation is performed; otherwise, the number of queue elements is continued to be detected. When the current number of elements is equal to the second fixed length, the dequeue process is started. This is usually achieved by calling the dequeue function or method of the queue, which removes the head element of the queue and may return the value of the element. Because the elements of the second fixed length need to be removed, the dequeue function or method needs to be called cyclically until the number of elements dequeued reaches the second fixed length. Each dequeue operation updates the read pointer and element number counter of the queue.
[0036] If the current number of elements is less than the second fixed length when judging the current number of elements, the dequeue operation is not performed, but the number of elements in the queue is continuously detected. This is usually achieved by setting a timer, an event listener, or using a polling mechanism, so that a timely response can be made when the queue state changes. In the process of continuing detection, appropriate detection frequencies and thresholds can be set according to specific application scenarios and requirements to avoid unnecessary overhead on system performance caused by frequent detection operations. Throughout the process, it is necessary to pay attention to handling possible errors and abnormal situations, such as dequeue operations when the queue is empty and enqueue operations when the queue is full. These errors and abnormal situations should be properly handled to avoid program crashes or data loss. At the same time, it is also necessary to check boundary conditions, such as the maximum capacity limit of the queue, the minimum number of elements required, etc. These boundary conditions should be strictly observed to ensure the stability and reliability of the queue. Through the implementation of the above steps, it can be ensured that the second data queue can automatically perform a dequeue operation when it reaches a specific length, thereby maintaining the stability and efficiency of the queue. At the same time, by continuing to detect the number of queue elements, it is possible to respond to changes in the queue state in a timely manner and make corresponding processing.
[0037] In one or more possible embodiments, performing an enqueue operation on the read digital codeword sequence according to the position of the tail element of the first data queue includes:
[0038] Detecting the number of free elements in the first data queue;
[0039] If the number of free elements is less than the length of the read digital codeword sequence, discard the read digital codeword sequence;
[0040] If the number of the idle elements is greater than or equal to the length of the read digital codeword sequence, the read digital codeword sequence is inserted behind the tail element of the first data sequence.
[0041] Among them, the number of idle elements in the first data queue is detected:
[0042] First, the number of currently used elements and the maximum capacity of the first data queue need to be determined. The number of free elements can be obtained by calculating the difference between the maximum capacity and the number of currently used elements. This usually involves accessing the internal state information of the queue or using a specific API function.
[0043] After reading the digital codeword sequence, the length of the sequence is obtained. Next, this length is compared with the number of free elements in the first data queue. If the number of free elements is less than the length of the digital codeword sequence, it means that the queue does not have enough space to store the entire sequence.
[0044] If the number of free elements is less than the length of the digital codeword sequence, a discard operation is performed. This can be achieved by simply ignoring or deleting the digital codeword sequence that has been read to ensure that no attempt is made to insert it into a queue with insufficient capacity. In some cases, it may be necessary to return an error indication or status code to the caller to inform it that the data has been discarded.
[0045] If the number of free elements is greater than or equal to the length of the digital codeword sequence, the insertion operation is performed. This is usually implemented by calling the queue's enqueue function or method, which adds each element of the digital codeword sequence to the end of the queue one by one. In this process, it is necessary to ensure that the order of the digital codeword sequence remains unchanged and the queue status information (such as the number of used elements) is updated correctly.
[0046] Throughout the process, you need to be careful to handle possible boundary conditions and error situations. For example, if the queue is full (that is, the number of free elements is 0), you need to ensure that no attempt is made to perform the enqueue operation. In addition, if the sequence of digital codewords read is empty or invalid, appropriate measures need to be taken to handle this situation (such as returning an error code or throwing an exception).
[0047] If the first data queue is accessed in a multi-threaded or concurrent environment, synchronization and concurrency control issues need to be considered. This can be achieved by using locks, semaphores, mutexes or other synchronization mechanisms to ensure that only one thread or process can modify the state of the queue at any time. This can avoid data contention and inconsistency issues.
[0048] By implementing the above steps, it is possible to ensure that the first data queue has enough space when inserting the digital codeword sequence, and discard the sequence that cannot be stored when necessary. At the same time, through appropriate synchronization and concurrency control, the correctness and reliability in a multi-threaded or concurrent environment can be ensured.
[0049] In one or more possible embodiments, the target length is set based on a setting instruction, and the target length can be flexibly set according to actual needs. The number of elements (ie, the target length) for each dequeue operation performed on the first data queue may be the same or may be different.
[0050] In one or more possible embodiments, the first buffer unit and the buffer unit perform enqueue operations and dequeue operations in an asynchronous manner.
[0051] Among them, the asynchronous execution strategy of the enqueue and dequeue operations is determined, such as using multi-threading, event-driven or interruption methods to implement asynchronous operations.
[0052] When data needs to be written into the buffer unit, the producer thread or task encapsulates the data into a sequence of digital code words and calls the asynchronous enqueue interface.
[0053] The asynchronous enqueue interface puts the enqueue request into a pending queue or triggers an event / interrupt, and then returns immediately without waiting for the enqueue operation to complete.
[0054] The consumer thread or task (which may be a dedicated enqueue processing thread) is responsible for taking the enqueue request from the pending queue and performing the actual enqueue operation (adding the data to the end of the buffer unit).
[0055] When data needs to be read from the buffer unit, the consumer thread or task calls the asynchronous dequeue interface.
[0056] The asynchronous dequeue interface also puts the dequeue request into a pending queue or triggers an event / interrupt, and then returns immediately.
[0057] Another consumer thread or task (possibly a dedicated dequeue processing thread) takes the dequeue request from the pending queue and performs the actual dequeue operation (removing data from the head of the buffer unit).
[0058] In order to ensure data consistency and integrity, it is necessary to introduce appropriate synchronization mechanisms when using buffer units.
[0059] For example, locks, semaphores, or atomic operations can be used to ensure that the state of a buffer cell is not modified simultaneously by multiple threads during enqueue and dequeue operations.
[0060] The synchronization mechanism should be as efficient as possible to avoid becoming a performance bottleneck.
[0061] In asynchronous operations, special attention needs to be paid to error handling and boundary condition checking.
[0062] For example, when the buffer unit is full, new enqueue requests should be rejected or queued; when the buffer unit is empty, dequeue operations should return an error or wait for new data to arrive.
[0063] You also need to consider communication and coordination between threads to ensure that exceptional situations are handled properly.
[0064] Asynchronous operations can generally improve system throughput and responsiveness, but can also increase system complexity and overhead.
[0065] Therefore, when implementing asynchronous enqueue and dequeue operations, performance optimization and testing are required to ensure that the system can remain efficient and stable while meeting the requirements.
[0066] The electronic device provided in the embodiments of the present application includes but is not limited to communication equipment, terminal equipment, computer equipment, etc. In addition to the above-mentioned LDPC decoding device, the electronic device may also include: a housing for accommodating various components, a display screen and an input device (for example: a keyboard, a mouse or a touch screen), etc.
[0067] The above-described implementation methods do not constitute a limitation on the protection scope of the technical solution. Any modification, equivalent replacement and improvement made within the spirit and principle of the above-described implementation methods shall be included in the protection scope of the technical solution.
Claims
1. An LDPC decoding device, characterized in that: include: A demodulation unit, a first buffer unit, a second buffer unit, an LDPC decoder and a controller; The output end of the demodulation unit is connected to the input end of the first buffer unit, the output end of the first buffer unit is connected to the input end of the second buffer unit, and the output end of the second buffer unit is connected to the LDPC decoding unit; the controller is respectively connected to the control end of the first buffer unit and the control end of the second buffer unit; the first buffer unit is provided with a first data queue, and the second buffer unit is provided with a second data queue; Demodulation unit, used to demodulate the RF signal into a digital codeword sequence The controller is used to read a digital codeword sequence of a first fixed length from a demodulation unit, perform an enqueue operation on the read digital codeword sequence according to the position of the tail element of the first data queue, determine a target length according to a decoding requirement, and perform a dequeue operation on the element of the target length according to the position of the head element of the first data queue, perform an enqueue operation on the dequeued element of the first data queue according to the position of the tail element of the second data queue, and perform a dequeue operation on the element of the second fixed length according to the position of the head element of the second data queue; The LDPC decoder is used to perform a decoding operation on the elements dequeued from the second data queue.
2. The device according to claim 1, characterized in that The second data queue is provided with a read pointer, and the read pointer is used to indicate the position of the first element in the second data queue.
3. The device according to claim 1 or 2, characterized in that: The step of selecting a digital codeword sequence of a second fixed length from the head element of the second data queue for dequeue operation includes: Detecting the current number of elements in the second data queue; If the current number of elements is equal to the second fixed length, selecting elements of the second fixed length from the head element of the second data queue for dequeue operation; If the current number of elements is less than the second fixed length, continue to detect the number of elements in the second data queue.
4. The device according to claim 3, characterized in that The step of performing a queue operation on the read digital codeword sequence according to the position of the tail element of the first data queue comprises: Detecting the number of free elements in the first data queue; If the number of free elements is less than the length of the read digital codeword sequence, discard the read digital codeword sequence; If the number of the idle elements is greater than or equal to the length of the read digital codeword sequence, the read digital codeword sequence is inserted behind the tail element of the first data sequence.
5. The device according to claim 1, 2 or 4, characterized in that: The target length is set based on the setup execution.
6. The device according to claim 5, characterized in that The first buffer unit and the buffer unit perform enqueue operations and dequeue operations in an asynchronous manner.
7. The device according to claim 3, characterized in that The first buffer unit and the second buffer unit are combined and arranged in the same chip.
8. An electronic device, characterized in that: The LDPC decoding device comprises any one of claims 1 to 7.
Citation Information
Patent Citations
Quasi-cyclic low-density odd-even check convolution code coding-decoding system and coding-decoding method thereof
CN102075198A
LDPC (Low-Density Parity-Check) code channel decoder and decoding method thereof
CN108337070A
Rate self-adaptive LDPC decoder suitable for aerospace communication
CN109889209A
Rate dematching processing device
JP2005012420A
Symbol Flipping LDPC Decoding System
US20130305114A1
