A method for processing a timer register based on an SSD host chip

By encapsulating the timer variable into a class and processing the timer register in the post_randomize function, the problem of low verification efficiency of the timer register in SSD controller chip development is solved, realizing a more efficient and complete verification process, saving manpower and accelerating the R&D process.

CN117112427BActive Publication Date: 2026-11-27SHANDONG SINOCHIP SEMICON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311109362.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2026-11-27
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

In the development of enterprise-level SSD controller chips, there is a lack of efficient and accurate methods for setting and verifying timer registers, resulting in low verification efficiency and incomplete verification.

Method used

All timer variables are encapsulated into a class, and the timer register is processed in the class's post_randomize handler function. The timer generation method is determined by judging use_direct_timer, the priority is set according to the association relationship, and random or directed assignment is performed. The correlation of timer values ​​is checked, and after ensuring that the requirements are met, they are configured into the register.

Benefits of technology

It improved verification efficiency, increased verification completeness, saved manual debugging time, and shortened the R&D process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117112427B_ABST
    Figure CN117112427B_ABST
Patent Text Reader

Abstract

The application provides a timer register processing method based on an SSD host chip, and belongs to the technical field of solid state disks. Related values of the timer are concentrated in a class for processing together, when the timer needs to be modified, the timer that needs to be modified does not need to be searched from all configurations, and only the code related to the timer in the file where the class is located needs to be modified, thereby accelerating verification efficiency. Optionally, a directed value or a random timer can be used. The directed value is suitable for scenarios such as directed use case fast simulation and error use case reproduction. When the random timer is used, different combinations of multiple timer values that meet the requirements can be verified to more scenes, and verification completeness is increased. In addition, when the value is randomly given, the simulation parameters can be used to control the values of various timers, and the parameters can be more flexibly controlled. After the timer value is determined in a directed or random manner, it is checked whether the related conditions of different timers meet the conditions, and an error is reported when the conditions are not met. The problems of the directed value or the random parameter setting timer error can be exposed in a timely manner, and the time for manual debugging is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for processing timer registers based on an SSD controller chip, belonging to the field of solid-state drive technology. Background Technology

[0002] In the development of enterprise-level SSD controller chips, multiple sets of timer registers are designed and configured to better support the suspend function of various commercially available NAND flash chips. Each set of timer registers contains multiple timers with different functions for software configuration. To ensure verification completeness, these timer values ​​need to be set while meeting the requirements of NAND flash, and different timers may be correlated. Currently, there is a lack of an efficient and accurate method to solve this problem. Summary of the Invention

[0003] The purpose of this invention is to provide a method for processing timer registers based on SSD controller chips, which saves verification manpower, improves verification efficiency, greatly increases verification completeness, and accelerates the R&D process.

[0004] To achieve the above objectives, the present invention employs the following technical solution: A method for processing timer registers based on an SSD controller chip, characterized by the following steps: Step 1: Encapsulate all timer variable definitions into a single class.

[0005] Step 2: Handle the timer function in the class's post_randomize method.

[0006] The specific steps are as follows: Step 2-1: Set the variable use_direct_timer to determine how the timer is generated.

[0007] Step 2-2: Determine if use_direct_timer is 0.

[0008] Step 2-2-1: If the value is 0, then arrange the timers according to their relationships. Set the variable max_rnd_times to determine the number of random times a timer can run.

[0009] Step 2-2-2: If use_direct_timer is not 0, then set the variable max_rnd_times=1.

[0010] Steps 2-3: Set the initial value of the loop variable i_rnd_times to 0.

[0011] Step 2-4: Determine whether use_direct_timer is 0, and assign a value to the timer variable based on the judgment result.

[0012] Step 2-5: Determine whether various timer values meet the requirements. If the requirements are met, exit the loop and each timer value is determined. If the requirements are not met, when i_rnd_times < use_direct_timer-1, re-randomize; otherwise, report an error directly.

[0013] Step 3: Declare and instantiate to randomize this class.

[0014] Step 4: Configure various timer values randomized from this class into registers.

[0015] Preferably, the priority of the timers is arranged according to the association relationship between each timer, and the specific rules are as follows: If more than half of the timers are calculated based on one of the times as a base, this timer is processed first.

[0016] If there is a dependency relationship between the configurations of two timers, the dependent timer is processed first, and then the dependent timer is processed.

[0017] Preferably, the assignment method in step 2-4 is as follows: If use_direct_timer=0, the timer variable is randomly assigned, and the timer variables are processed in sequence according to the priority.

[0018] If use_direct_timer is not 0, the timer variable is assigned a directed value according to the value of use_direct_timer.

[0019] Preferably, the specific directed assignment is as follows: If use_direct_timer=1: set various timer values for directed use case 1.

[0020] If use_direct_timer=2: set various timer values for directed use case 2.

[0021] If use_direct_timer=3: reproduce various timer values set by a certain mixed transmission error use case.

[0022] Preferably, the directed assignment situation of the timer variables can be increased, and it can be increased when a new directed use case needs to add a set of timer combination values, or a set of timer combination configuration values needs to be retained randomly.

[0023] The advantages of this invention are as follows: This invention centralizes timer-related values ​​into a single class for processing. When a timer needs modification, it eliminates the need to search through all configurations for the timer to be modified; only the code related to that timer in the file containing that class needs to be modified, thus accelerating verification efficiency. Optional methods include assigned values ​​or randomized timers. Assigned values ​​are suitable for scenarios such as rapid simulation of targeted test cases and reproduction of erroneous test cases. Randomized timers allow for the verification of more scenarios through different combinations of randomly generated timer values ​​that meet the requirements, increasing verification completeness. Furthermore, randomized values ​​allow for the transmission of simulation parameters to control the values ​​of various timers, enabling more flexible parameter control. After a timer value is determined through either assignment or randomization, the relevant conditions for different timers are checked. If the conditions are not met, an error is reported. Errors in setting timers through assigned values ​​or randomized parameter passing can be promptly exposed, saving manual debugging time. Attached Figure Description

[0024] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0025] Figure 1 This is a schematic diagram of the process structure of the present invention. Detailed Implementation

[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] A method for processing timer registers based on an SSD controller chip, characterized by the following steps: Step 1: Encapsulate all timer variable definitions into a single class.

[0028] Step 2: Handle the timer function in the class's post_randomize:

[0029] The specific steps are as follows: Step 2-1: Set the variable use_direct_timer to determine how the timer is generated.

[0030] Step 2-2: Determine if use_direct_timer is 0.

[0031] Step 2-2-1: If it is 0, arrange the priorities of the timers according to the association relationships between the various timers. Set the variable max_rnd_times to determine the number of times the timers can be randomized. The priorities of the timers are arranged according to the association relationships between the various timers, with the specific rules as follows: If most timers are calculated based on timeA, then timerA is processed first.

[0032] If the configuration of timerC depends on timerB, then timerB is processed first, followed by timerC.

[0033] Step 2-2-2: If use_direct_timer is not 0, set the variable max_rnd_times = 1.

[0034] Step 2-3: Set the initial value of the loop variable i_rnd_times to 0.

[0035] Step 2-4: Determine whether use_direct_timer is 0, and assign values to the timer variables according to the determination result.

[0036] If use_direct_timer = 0, randomly assign values to the timer variables, specifically processing the timer variables sequentially according to their priorities.

[0037] If use_direct_timer is not 0, directly assign values to the timer variables according to the value of use_direct_timer. The specific direct assignment is as follows: If use_direct_timer = 1: set various timer values for directed use case 1.

[0038] If use_direct_timer = 2: set various timer values for directed use case 2.

[0039] If use_direct_timer = 3: reproduce various timer values set for a certain mixed transmission error use case.

[0040] Step 2-5: Determine whether the various timer values meet the requirements. If the requirements are met, exit the loop and the timer values are determined. If the requirements are not met, re-randomize when i_rnd_times < use_direct_timer - 1; otherwise, report an error directly.

[0041] Step 3: Declare and instantiate randomization of this class.

[0042] Step 4: Configure the various timer values ​​randomly generated by this class into the register.

[0043] The number of cases for assigning targeted values ​​to the timer variable can be increased. If a new targeted use case requires an additional set of timer combination values, or if a random set of timer combination configuration values ​​needs to be retained, this can be added.

[0044] This method is more flexible. By processing timer-related values ​​together, it can assign values ​​in a targeted or random manner for different test scenarios and check whether different timers meet the relevant requirements. This saves verification manpower, improves verification efficiency, greatly increases verification completeness, and speeds up the R&D process.

[0045] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for processing timer registers based on an SSD controller chip, characterized in that, includes the following steps: Step 1: encapsulate all timer variable definitions into a class; Step 2: process the timer function in post_randomize of the class; The specific steps are as follows: Step 2-1: set the variable use_direct_timer to determine the timer generation mode; Step 2-2: determine whether use_direct_timer is 0; Step 2-2-1: if it is 0, arrange the priority of the timers according to the association relationship between the timers; set the variable max_rnd_times to determine the number of times the timer can be randomized; Step 2-2-2: if use_direct_timer is not 0, set the variable max_rnd_times=1; Step 2-3: set the initial value of the loop variable i_rnd_times to 0; Step 2-4: determine whether use_direct_timer is 0, and assign values to timer variables according to the judgment result; Step 2-5: determine whether various timer values meet the requirements; if they meet the requirements, exit the loop, and each timer value is determined; if they do not meet the requirements, when i_rnd_times<max_rnd_times-1, re-randomize, otherwise, directly report an error; Step 3: declare and instantiate the random class; Step 4: configure various timer values randomly generated by the class to registers; The priority of the timers is arranged according to the association relationship between the timers, and the specific rules are as follows: If more than half of the timers are calculated based on one of the timers, the timer is processed first; If there is a dependency relationship between the configurations of two timers, the dependent timer is processed first, and then the dependent timer is processed; The assignment method in the step 2-4 is as follows: If use_direct_timer=0, randomly assign values to timer variables, and process timer variables in turn according to priority; If use_direct_timer is not 0, assign values to timer variables in a targeted manner according to the value of use_direct_timer.

2. The method for processing timer registers based on an SSD controller chip according to claim 1, characterized in that, The specific targeted assignment is as follows: If use_direct_timer=1: set various timer values for targeted use case 1; If use_direct_timer=2: set various timer values for targeted use case 2; If use_direct_timer=3: reproduce various timer values set by a certain mixed sending error use case.

3. The method for processing timer registers based on an SSD controller chip according to claim 1, characterized in that, The targeted assignment situation of the timer variables can be increased. If a new targeted use case needs to add a set of timer combination values, or a set of random timer combination configuration values needs to be retained, it can be increased.

4. A storage medium storing program instructions, characterized in that, When the program instruction is running, it executes the method based on SSD main control chip processing timer registers according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Data processing method for solid state disk and related device

    CN109062509A

  • Task scheduling method and device, electronic equipment and storage medium

    CN115658277A