A BCH code Chien search control method, system, ECC controller chip, and electronic device.

By dynamically controlling the parallelism and search order of the Chien search, combined with AI models and early stop backoff mechanisms, the high power consumption and high latency issues in the hardware implementation of BCH codes are solved, achieving more efficient error correction performance.

CN123114846APending Publication Date: 2026-11-17PUYA SEMICON SHANGHAI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611179564.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-05
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing BCH code Chien search suffers from high power consumption and high latency in hardware implementations, especially when there are no error pages or errors are concentrated in a specific address range. Fixed parallelism and search order lead to invalid flips and unnecessary search cycles.

Method used

By dynamically controlling the parallelism and search order of Chien search, using AI models to predict error distribution, dividing the search window and enabling some or all parallel channels, and combining early stopping and rollback mechanisms, the search process is optimized.

Benefits of technology

It reduces the average power consumption and average search cycle of Chien search while ensuring the reliability and efficiency of error correction, and adapts to different error distribution scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114846A_ABST
    Figure CN123114846A_ABST
Patent Text Reader

Abstract

This invention provides a Chien search control method, system, ECC controller chip, and electronic device for BCH codes. The method includes: performing synodal computation on the received codeword to obtain the error location polynomial when errors exist; extracting decoding features; inputting the decoding features into an AI model to obtain search window priority, Chien parallel channel enable mask, and early stop control information; performing segmented search of the search window according to the search window priority; enabling some or all parallel channels within each search window based on the Chien parallel channel enable mask; counting the number of found error locations; terminating subsequent searches early when the number of found error locations reaches the theoretical error count; otherwise, performing a full-range backoff search. This scheme can dynamically control the parallelism and search order of the Chien search based on the data state and storage medium state, thereby improving the average power consumption and cycle time of the search.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of memory error correction code technology, and more particularly to a BCH code Chien search control method, system, ECC controller chip, and electronic device. Background Technology

[0002] BCH codes are widely used for memory data protection. A typical BCH decoding process includes syndrome calculation, error location polynomial calculation, Chien search, and error correction. The Chien search is used to detect the roots of the error location polynomial position by position within the codeword address space and output the address of the error bit.

[0003] In hardware implementations, Chien search typically employs a multi-bit parallel structure to reduce decoding latency. For example, designing the Chien searcher as an 8-bit or 16-bit parallel structure allows for the detection of multiple candidate bit positions per clock cycle. However, higher parallelism necessitates more hardware resources such as finite field constant multipliers, XOR trees, registers, and selectors, resulting in higher power consumption and area for dynamic flipping.

[0004] Existing designs typically employ fixed parallelism and a fixed search order. For error-free or slightly faulty pages, fixed high-parallelism Chien search results in numerous invalid flips; for scenarios where errors are concentrated in a specific address range, fixed linear search may consume unnecessary search cycles in low-risk address ranges. Therefore, reducing the average power consumption and average search cycle of Chien search while ensuring the correctness of BCH error correction is a pressing issue that needs to be addressed. Summary of the Invention

[0005] The purpose of this invention is to provide a method, system, ECC controller chip, and electronic device for controlling the Chien search of BCH codes, which can dynamically control the parallelism and search order of the Chien search according to the data state and the storage medium state, thereby improving the average power consumption and average search cycle of the Chien search.

[0006] The technical solution provided by this invention is as follows: Firstly, this application provides a method for controlling the Chien search of BCH codes, including: Perform syntactic calculation on the received codeword, and calculate the error position polynomial and theoretical error number when a decoding error is detected; Extract the decoding features corresponding to the current codeword or current sector; The decoding features are input into a preset AI model to obtain search window priority, Chien parallel channel enable mask, and early stop control information. The address space of the codeword to be searched is divided into multiple search windows, and the corresponding search windows are searched in segments according to their priority. Within each search window, some or all of the parallel Chien search channels are enabled according to the Chien parallel channel enable mask. The number of error locations found is counted. When the number of error locations found reaches the theoretical number of errors and meets the verification conditions, the subsequent search is terminated in advance according to the early stop control information; otherwise, a full-range rollback search is performed.

[0007] In some implementations, the decoding features include at least one or more of the following: a non-zero syndrome flag, a syndrome weight, a syndrome sequence distribution feature, the order of the error location polynomial, the theoretical number of errors, the current number of errors, the historical number of error corrections, the sector number, the page address, the number of block erase / write cycles, the hold time, the number of read perturbations, temperature information, the read retry setting, or the reference voltage setting.

[0008] In some implementations, before inputting the decoded features into a preset AI model, the following steps are also included: Acquire multiple read data samples along with their corresponding actual error locations, actual error counts, associated features, and storage medium status information, and use them as the model training set; Using search window hit rate, channel enable mode selection accuracy, early stopping misjudgment penalty, and backtracking search cost as training objectives or loss functions, a pre-set initial AI model is trained to obtain an AI model for predicting search window priority, channel enable mask, and early stopping confidence.

[0009] In some implementations, within each search window, enabling some or all of the parallel Chien search channels according to the Chien parallel channel enable mask includes: According to the Chien parallel channel enable mask, N Chien search channels are selected from M parallel Chien search channels for operation, where N≥1 and N≤M. Each Chien search channel can complete the root detection of at least one candidate error position within one clock cycle.

[0010] In some implementations, the address space of the codeword to be searched is divided into multiple search windows, including: The codeword address space to be searched is divided into multiple search windows according to continuous address intervals; or the codeword address space to be searched is divided into multiple search windows according to physical storage units, word lines, and bit lines; or the codeword address space to be searched is divided into multiple search windows according to the main data area, spare data area, and check area within a sector.

[0011] In some implementations, the verification conditions include at least one or more of the following: the number of found error locations equals the theoretical number of errors; all error locations are within the range of valid codewords; the syndrome after flipping the corresponding bit is recalculated to be zero; and the number of polynomial roots at the error locations is consistent with the theoretical number of errors.

[0012] In some implementations, the search window priority is determined by sorting the error probabilities of each search window output by the AI ​​model; When switching search windows, the Chien iteration state of the polynomial coefficients at the error location is offset and initialized according to the starting address of the search window, or the initial root detection state of the corresponding window is quickly loaded by pre-calculating constant multiplication factors.

[0013] Secondly, this application provides a BCH code Chien search and control system, comprising: The synergy calculation module is used to perform synergy calculations on the received codewords; The error location polynomial calculation module is used to calculate the error location polynomial and the theoretical number of errors when a decoding error is detected. The feature extraction module is used to extract the decoding features corresponding to the current codeword or the current sector; The AI ​​inference module is used to input the decoding features into a preset AI model to obtain search window priority, Chien parallel channel enable mask and early stop control information. The segmented scheduling search module is used to divide the codeword address space to be searched into multiple search windows, and to perform segmented searches of the corresponding search windows in sequence according to the priority of the search windows; within each search window, some or all parallel Chien search channels are enabled according to the Chien parallel channel enable mask. The early stop determination module is used to count the number of error locations found, and when the number of error locations found reaches the theoretical number of errors and meets the verification conditions, it terminates the subsequent search in advance according to the early stop control information. The rollback control module is used to perform a full-range rollback search when the verification conditions are not met or the confidence of the AI ​​inference is insufficient.

[0014] Thirdly, this application provides an ECC controller chip, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the Chien search control method described in the first aspect.

[0015] Fourthly, this application provides an electronic device including the ECC controller chip described in the third aspect.

[0016] The present invention provides a BCH code Chien search control method, system, ECC controller chip, and electronic device. It offers at least the following technical advantages: 1) This scheme disables unused Chien search channels by using a channel enable mask, which reduces the dynamic flipping of finite field constant multipliers, XOR trees and registers, thereby reducing average power consumption.

[0017] 2) This scheme prioritizes high error probability intervals through the search window, which can reduce the average search cycle when the error distribution is local or predictable.

[0018] 3) This scheme uses an early stopping mechanism that matches the number of found errors with the theoretical number of errors, which can end the Chien search in advance without traversing the entire codeword space, thereby reducing the average decoding latency.

[0019] 4) This solution, through full-range backtracking search and accompanying verification, can ensure that the traditional BCH decoding path can still be returned when the AI ​​prediction fails, thus avoiding a reduction in error correction reliability.

[0020] 5) This solution is compatible with existing BCH decoders. It mainly adds feature extraction, AI inference, window scheduling and gating control logic. It does not require changes to the BCH generator polynomial or error position polynomial calculation algorithm, making it simpler to implement. Attached Figure Description

[0021] The preferred embodiments will now be described in a clear and easy-to-understand manner, with reference to the accompanying drawings, to further explain the above-mentioned characteristics, technical features, advantages, and implementation methods of this solution.

[0022] Figure 1 This is a schematic diagram of the overall process of one embodiment of the present invention; Figure 2 This is a schematic diagram of the overall structure of a decoder according to an embodiment of the present invention; Figure 3 This is a schematic diagram of an AI model process according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the Chien search window partitioning according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the early stop and rollback search process according to an embodiment of the present invention. Detailed Implementation

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.

[0024] To keep the drawings concise, only the parts relevant to the invention are shown schematically in each figure, and they do not represent the actual structure of the product. Furthermore, for ease of understanding, in some figures, only one of components with the same structure or function is shown schematically, or only one is labeled. In this document, "one" can mean not only "only one" but also "more than one".

[0025] BCH codes are widely used for memory data protection. A typical BCH decoding process includes syndrome calculation, error location polynomial calculation, Chien search, and error correction. The Chien search is used to detect the roots of the error location polynomial position by position within the codeword address space and output the address of the error bit.

[0026] In hardware implementations, Chien search typically employs a multi-bit parallel structure to reduce decoding latency. For example, designing the Chien searcher as an 8-bit or 16-bit parallel structure allows for the detection of multiple candidate bit positions per clock cycle. However, higher parallelism necessitates more hardware resources such as finite field constant multipliers, XOR trees, registers, and selectors, resulting in higher power consumption and area for dynamic flipping.

[0027] Existing designs typically employ fixed parallelism and a fixed search order. For error-free or slightly faulty pages, fixed high-parallelism Chien search results in numerous invalid flips; for scenarios where errors are concentrated in a specific address range, fixed linear search may consume unnecessary search cycles in low-risk address ranges. Therefore, reducing the average power consumption and average search cycle of Chien search while ensuring the correctness of BCH error correction is a pressing issue that needs to be addressed.

[0028] After completing the synergistic calculation and error location polynomial calculation, this scheme extracts synergistic features, theoretical error counts, historical error correction information, and storage medium status information. The lightweight AI inference module then outputs the Chien search window priority, Lane enable mask, and early stopping confidence. The Chien searcher searches in segments according to priority and dynamically enables some or all parallel search channels based on the Lane enable mask. The search terminates early when the number of found errors reaches the theoretical error count and the verification condition is met; otherwise, it enters a full-range backoff search. This reduces invalid search cycles and invalid flip power consumption, and improves ECC average latency and power consumption without changing the mathematical correctness of BCH decoding. The following is a detailed description of this scheme with reference to the accompanying figures: In one embodiment, refer to the appendix to the specification. Figure 1 This application provides a method for controlling the Chien search of BCH codes, including: S100. Perform syntactic calculation on the received codeword, and calculate the error position polynomial and theoretical error number when a decoding error is detected.

[0029] S200, Extract the decoding features corresponding to the current codeword or current sector.

[0030] S300: Input the decoding features into the preset AI model to obtain the search window priority, Chien parallel channel enable mask, and early stop control information.

[0031] S400: Divide the address space of the codeword to be searched into multiple search windows, and perform segmented searches of the corresponding search windows in sequence according to the search window priority; within each search window, enable some or all parallel Chien search channels according to the Chien parallel channel enable mask.

[0032] S500: Count the number of error locations found. When the number of error locations found reaches the theoretical number of errors and meets the verification conditions, terminate the subsequent search in advance according to the early stop control information; otherwise, perform a full-range rollback search.

[0033] For details, please refer to the attached instruction manual. Figure 2 The Chien search control method in this scheme is applied to a BCH decoder that includes a synodal calculation module, an error position polynomial calculation module, and a Chien search module. The synodal calculation module performs synodal calculation on the received codeword, and the error position polynomial calculation module obtains the error position polynomial and the theoretical error number when an error exists.

[0034] This solution adds decoding feature extraction and AI prediction to the existing BCH decoder. It extracts decoding features related to the current codeword or sector; inputs these features into a preset AI model, outputting search window priority, Chien parallel channel enable mask, and early stop control information; divides the address space of the codeword to be searched into multiple search windows, and drives the Chien search module to perform segmented searches according to the search window priority; within each search window, only some or all parallel Chien search channels are enabled based on the Chien parallel channel enable mask, while inactive channels are clock-gated or power-gated; counts the number of found error locations, and terminates the subsequent search early when the number of found error locations reaches the theoretical error count and meets the verification condition; if the verification condition is not met or the AI ​​inference confidence is lower than a preset threshold, a full-range backoff search is performed.

[0035] Compared to existing technologies, this solution reduces average power consumption by closing unused Chien search channels using channel enable masks, thereby reducing the dynamic flipping of finite field constant multipliers, XOR trees, and registers. Prioritizing high-error-probability regions through search window priority reduces the average search cycle when error distributions are localized or predictable. An early-stop mechanism matching the number of found errors with the theoretical number of errors allows the Chien search to end prematurely without traversing the entire codeword space, further reducing average decoding latency. Full-range backtracking and accompanying verification conditions ensure that even if AI prediction fails, the solution can still return to the traditional BCH decoding path, preventing a decrease in error correction reliability.

[0036] In one specific implementation, the decoding features include at least one or more of the following: a non-zero syndrome flag, a syndrome weight, a syndrome sequence distribution feature, the order of the error location polynomial, the theoretical number of errors, the current number of errors, the historical number of error corrections, the sector number, the page address, the number of block erase / write cycles, the hold time, the number of read perturbations, temperature information, the read retry setting, or the reference voltage setting.

[0037] The feature extraction unit extracts decoding feature vectors from the synaptic expression, theoretical error count, historical error information, and storage medium status, and feeds them into the AI ​​model. The AI ​​model outputs window priority (win_prio), lane enable mask (lane_en_mask), early stop enable (early_stop_en), and fallback flag (fallback_en). The ECC control module configures the Chien searcher accordingly.

[0038] In one embodiment, based on the foregoing embodiments, before inputting the decoding features into a preset AI model, the method further includes: Acquire multiple read data samples along with their corresponding actual error locations, actual error counts, associated features, and storage medium status information, and use them as the model training set; Using search window hit rate, channel enable mode selection accuracy, early stopping misjudgment penalty, and backtracking search cost as training objectives or loss functions, a pre-set initial AI model is trained to obtain an AI model for predicting search window priority, channel enable mask, and early stopping confidence.

[0039] For details, please refer to the attached instruction manual. Figure 3 The AI ​​model can be a quantized neural network, decision tree, gradient boosting tree, lookup table model, logistic regression model, or a hardware state machine compressed from the above models. To avoid the AI ​​model's inference affecting the main timing path, AI inference can be completed between the end of the adjoint computation and the start of the Chien search, or in parallel with the BM iteration process. Furthermore, offline training is required during the chip design phase or the product usage data accumulation phase before actual use. Training data includes the actual error location, actual number of errors, adjoint features, BM theoretical error number, sector address, page address, erase / write cycles, hold time, read perturbation cycles, and temperature information of the sample read data. Training objectives include: improving the high-risk window sorting hit rate, reducing the Lane enable mode selection error rate, reducing the risk of early stop misjudgment, and controlling the backoff search overhead. After training, the model can be quantized into integer weights or converted into lookup tables and combinational logic to adapt to the ECC hardware control path. The output of the AI ​​model includes at least the window sorting vector, Lane enable mask, early stop enable signal, and backoff search enable signal. Specifically, the input and output signals of the AI ​​model can be found in Table 1 below.

[0040]

[0041] After quantization, pruning, or lookup table transformation, the AI ​​model can be deployed into the ECC hardware control path to achieve compatibility with existing BCH decoders.

[0042] In one embodiment, based on the foregoing embodiments, within each search window, enabling some or all of the parallel Chien search channels according to the Chien parallel channel enable mask includes: Based on the Chien parallel channel enable mask, N Chien search channels are selected from M parallel Chien search channels for operation, where N≥1 and N≤M. Each Chien search channel can complete the root detection of at least one candidate error position within one clock cycle.

[0043] Specifically, the Chien search module is divided into multiple parallel lanes. For example, a 16-bit parallel Chien searcher can be divided into two 8-bit lanes or four 4-bit lanes. Each lane includes a finite field constant multiplier, an XOR tree, registers, and candidate position output logic. Each lane completes root detection of at least one candidate error position within one clock cycle. When the AI ​​model predicts a low error risk, a smaller number of parallel lanes are enabled, and high-probability windows are searched first. When the AI ​​model predicts a high error risk, all parallel lanes are enabled, and a full or near-full window search is performed. When the AI ​​model predicts an uncorrectable risk, the determination is still based at least on the error position polynomial calculation results and backoff rules, rather than the AI ​​inference module alone providing a final uncorrectable conclusion. For example, in a 16-bit parallel Chien searcher, it can be divided into two 8-bit lanes, Lane 0 and Lane 1. When the AI ​​predicts a low error risk or minor error scenario, only Lane 0 is enabled; when the prediction is a high error risk or fast decoding is required, both Lane 0 and Lane 1 are enabled. For inactive lanes, the lane gating unit either disables its clock input, keeps its input register unchanged, or disables its data input switching, thereby reducing the dynamic power consumption of the finite field constant multiplier and the XOR tree. Since lane gating only changes the search throughput and not the root detection mathematical formula, it does not affect the correctness of the Chien search results. Specifically, the parallel channel control based on AI model-predicted risk can be found in Table 2 below.

[0044]

[0045] In one embodiment, based on the foregoing embodiments, the address space of the codeword to be searched is divided into multiple search windows, including: The codeword address space to be searched can be divided into multiple search windows according to continuous address intervals; or the codeword address space to be searched can be divided into multiple search windows according to physical storage units, word lines, and bit lines; or the codeword address space to be searched can be divided into multiple search windows according to the main data area, spare data area, and parity area within a sector.

[0046] For details, please refer to the attached instruction manual. Figure 4 This scheme divides the codeword space to be searched from 0 to n-1 into K search windows W0 to WK-1. The windows can be divided into equal lengths, for example, each window can be 256 bits or 512 bits long; or they can be divided according to the storage structure, for example, separate windows can be set for the main data area, the spare data area, and the parity area.

[0047] Preferably, the search window priority is determined by sorting the error probabilities of each search window output by the AI ​​model; when switching search windows, the Chien iteration state of the polynomial coefficients at the error position is offset and initialized according to the starting address of the search window, or the initial root detection state of the corresponding window is quickly loaded by pre-calculating constant multiplication factors.

[0048] The AI ​​model outputs the error probability for each window based on historical error distribution and current features, and the segmented scheduling unit sorts the windows from highest to lowest probability. Before entering a window, the Chien searcher needs to adjust the root detection state of the error location polynomial to the state corresponding to the starting address of that window. This adjustment can be achieved through continuous iterative jumps or through fast offset initialization using pre-calculated constant multiplication factors. Subsequently, the Chien searcher performs root detection only within that window.

[0049] In one embodiment, based on the foregoing embodiments, the verification conditions include at least one or more of the following: the number of found error locations equals the theoretical number of errors; all error locations are within the range of valid codewords; the syndrome after flipping the corresponding bit is recalculated to be zero; and the number of polynomial roots at the error locations is consistent with the theoretical number of errors.

[0050] This solution includes early stop detection and rollback search; please refer to the attached instruction manual. Figure 5 During the Chien search, the error counter err_cnt continuously counts the number of error locations found. When err_cnt equals theory_err_cnt, the early stopping decision unit further checks the early stopping conditions. For example, it checks if the number of found error locations equals the theoretical number of errors, or if all error locations are within the valid range, or it performs bit flipping on the found error locations and recalculates the syndrome. If the syndrome is zero, the search result is considered valid and the Chien search ends early. If err_cnt is less than theory_err_cnt and the high-priority window has been searched, the segmented scheduling unit continues searching the next priority window. If the early stopping conditions are still not met after all AI-specified windows have been searched, the rollback control unit triggers a full-range search. If err_cnt is still not equal to theory_err_cnt after the full-range search, or the syndrome is not zero after correction, an uncorrectable error is reported.

[0051] Furthermore, this solution can be embedded into existing ECC control modules. For existing syndrome 32-bit parallel, BM 2PE, and Chien 16-bit parallel architectures, an AI control path and segmented scheduling unit can be added before the Chien search module, extending the original fixed 16-bit parallel search path to a dynamic search path with configurable 8-bit / 16-bit or more granularity. When the AI ​​control path is disabled or fails, the ECC control module defaults to the traditional Chien search order and default parallelism, thus supporting bypass mode, debug mode, and reliability verification mode.

[0052] This solution is applicable to NAND Flash controllers, embedded Flash controllers, memory card controllers, solid-state drive controllers, automotive-grade memory controllers, low-power IoT memory chips, and other semiconductor chips requiring BCH-ECC decoding. This solution can reduce average power consumption and average decoding latency while maintaining error correction reliability, and has good engineering feasibility.

[0053] In one embodiment, this application provides a Chien search control system for BCH codes, comprising: a synodal calculation module for performing synodal calculations on received codewords; an error location polynomial calculation module for calculating the error location polynomial and the theoretical error number when a decoding error is determined to exist; a feature extraction module for extracting decoding features corresponding to the current codeword or current sector; an AI inference module for inputting the decoding features into a preset AI model to obtain search window priority, Chien parallel channel enable mask, and early stop control information; a segmented scheduling search module for dividing the address space of the codeword to be searched into multiple search windows and performing segmented searches of the corresponding search windows in sequence according to the search window priority; within each search window, enabling some or all parallel Chien search channels according to the Chien parallel channel enable mask; an early stop determination module for counting the number of error locations found and terminating subsequent searches in advance according to the early stop control information when the number of error locations found reaches the theoretical error number and the verification condition is met; and a backoff control module for performing a full-range backoff search when the verification condition is not met or the AI ​​inference confidence is insufficient.

[0054] The Chien search control system in this embodiment has the same technical concept as the Chien search control method in the previous embodiment, and will not be described in detail here.

[0055] In one embodiment, this application provides an ECC controller chip, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the Chien search control method of the foregoing embodiments.

[0056] The ECC controller chip in this solution is used to perform BCH error correction decoding on data from NAND Flash, NOR Flash, embedded non-volatile memory, SRAM, or other storage media.

[0057] In one embodiment, this application provides an electronic device including the ECC controller chip of the foregoing embodiment.

[0058] The present invention provides a BCH code Chien search control method, system, ECC controller chip, and electronic device. It offers at least the following technical advantages: 1) This scheme disables unused Chien search channels by using a channel enable mask, which reduces the dynamic flipping of finite field constant multipliers, XOR trees and registers, thereby reducing average power consumption.

[0059] 2) This scheme prioritizes high error probability intervals through the search window, which can reduce the average search cycle when the error distribution is local or predictable.

[0060] 3) This scheme uses an early stopping mechanism that matches the number of found errors with the theoretical number of errors, which can end the Chien search in advance without traversing the entire codeword space, thereby reducing the average decoding latency.

[0061] 4) This solution, through full-range backtracking search and accompanying verification, can ensure that the traditional BCH decoding path can still be returned when the AI ​​prediction fails, thus avoiding a reduction in error correction reliability.

[0062] 5) This solution is compatible with existing BCH decoders. It mainly adds feature extraction, AI inference, window scheduling and gating control logic. It does not require changes to the BCH generator polynomial or error position polynomial calculation algorithm, making it simpler to implement.

[0063] It should be noted that the above embodiments can be freely combined as needed. The above description is only a preferred embodiment of the present invention. It should be pointed out that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A Chien search control method for BCH codes, characterized in that, include: Perform syntactic calculation on the received codeword, and calculate the error position polynomial and theoretical error number when a decoding error is detected; Extract the decoding features corresponding to the current codeword or current sector; The decoding features are input into a preset AI model to obtain search window priority, Chien parallel channel enable mask, and early stop control information. The address space of the codeword to be searched is divided into multiple search windows, and the corresponding search windows are searched in segments according to their priority. Within each search window, some or all of the parallel Chien search channels are enabled according to the Chien parallel channel enable mask. The number of error locations found is counted. When the number of error locations found reaches the theoretical number of errors and meets the verification conditions, the subsequent search is terminated in advance according to the early stop control information; otherwise, a full-range rollback search is performed.

2. The Chien search control method according to claim 1, characterized in that, The decoding features include at least one or more of the following: a non-zero syndrome flag, a syndrome weight, a syndrome sequence distribution feature, the order of the error position polynomial, the theoretical number of errors, the current number of errors, the historical number of error corrections, the sector number, the page address, the number of block erase / write cycles, the hold time, the number of read perturbations, temperature information, the read retry setting, or the reference voltage setting.

3. The Chien search control method according to claim 1, characterized in that, Before inputting the decoded features into the preset AI model, the process also includes: Acquire multiple read data samples along with their corresponding actual error locations, actual error counts, associated features, and storage medium status information, and use them as the model training set; Using search window hit rate, channel enable mode selection accuracy, early stopping misjudgment penalty, and backtracking search cost as training objectives or loss functions, a pre-set initial AI model is trained to obtain an AI model for predicting search window priority, channel enable mask, and early stopping confidence.

4. The Chien search control method according to claim 1, characterized in that, Within each search window, some or all of the parallel Chien search channels are enabled according to the Chien parallel channel enable mask, including: According to the Chien parallel channel enable mask, N Chien search channels are selected from M parallel Chien search channels for operation, where N≥1 and N≤M. Each Chien search channel can complete the root detection of at least one candidate error position within one clock cycle.

5. The Chien search control method according to claim 1, characterized in that, The address space of the codeword to be searched is divided into multiple search windows, including: The codeword address space to be searched is divided into multiple search windows according to continuous address intervals; or the codeword address space to be searched is divided into multiple search windows according to physical storage units, word lines, and bit lines; or the codeword address space to be searched is divided into multiple search windows according to the main data area, spare data area, and check area within a sector.

6. The Chien search control method according to claim 1, characterized in that, The verification conditions include at least one or more of the following: the number of found error positions equals the theoretical number of errors; all error positions are within the range of valid codewords; the syndrome after flipping the corresponding bit is recalculated to be zero; and the number of polynomial roots at the error positions is consistent with the theoretical number of errors.

7. The Chien search control method according to claim 1, characterized in that, The priority of the search windows is determined by sorting the error probabilities of each search window output by the AI ​​model; When switching search windows, the Chien iteration state of the polynomial coefficients at the error location is offset and initialized according to the starting address of the search window, or the initial root detection state of the corresponding window is quickly loaded by pre-calculating constant multiplication factors.

8. A BCH code-based Chien search control system, characterized in that, include: The synergy calculation module is used to perform synergy calculations on the received codewords; The error location polynomial calculation module is used to calculate the error location polynomial and the theoretical number of errors when a decoding error is detected. The feature extraction module is used to extract the decoding features corresponding to the current codeword or the current sector; The AI ​​inference module is used to input the decoding features into a preset AI model to obtain search window priority, Chien parallel channel enable mask and early stop control information. The segmented scheduling search module is used to divide the codeword address space to be searched into multiple search windows, and to perform segmented searches of the corresponding search windows in sequence according to the priority of the search windows; within each search window, some or all parallel Chien search channels are enabled according to the Chien parallel channel enable mask. The early stop determination module is used to count the number of error locations found, and when the number of error locations found reaches the theoretical number of errors and meets the verification conditions, it terminates the subsequent search in advance according to the early stop control information. The rollback control module is used to perform a full-range rollback search when the verification conditions are not met or the confidence of the AI ​​inference is insufficient.

9. An ECC controller chip, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the Chien search control method according to any one of claims 1-7.

10. An electronic device, characterized in that, Includes the ECC controller chip as described in claim 9.