Command execution method, device and equipment and computer readable storage medium
By receiving and processing commands from the ONFI host in the ONFI slave controller, creating target entries, and driving storage unit operations, the high complexity of command processing in the ONFI 5.2 protocol for the ONFI slave controller is solved, improving efficiency and resource management capabilities.
Patent Information
- Application Number
- CN202511528985.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-02-17
AI Technical Summary
Existing ONFI slave controllers suffer from high complexity and low efficiency when processing commands under the ONFI 5.2 protocol, especially when faced with multiple commands and concurrent instructions, resulting in low command processing efficiency.
By receiving commands from the ONFI host, obtaining operation configuration information, creating target entries, and operating the storage unit based on address command data, the system obtains return data and sends it to the ONFI host. This target entry management approach replaces the traditional state machine architecture, simplifying command processing.
It improves the efficiency of ONFI slave controllers in processing commands from ONFI hosts and storage units, reduces the complexity of command processing, and supports fast response to priority commands and resource management.
Smart Images

Figure CN121541826A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a command execution method, apparatus, device, and computer-readable storage medium. Background Technology
[0002] In the ONFI (Open NAND Flash Interface) protocol system, the ONFI slave controller is a controller located on the side of the NAND flash memory chip or new storage medium. It is responsible for responding to commands and timing signals from the master controller, performing corresponding operations, and returning status information.
[0003] Currently, ONFI slave controllers use a state machine architecture to manage commands. However, with the evolution of the protocol to ONFI 5.2, the number of supported commands has increased to 32 (data source: ONFI standard protocol document), and new concurrent commands such as Multi-plane Concurrent have been added. The state machine needs to use multi-level nested conditional transitions to parse commands, resulting in high complexity for ONFI slave controllers when processing commands, leading to inefficiency. Summary of the Invention
[0004] In view of the above, the purpose of this application is to overcome the shortcomings of the prior art and provide a command execution method, the method being applied to an ONFI slave controller connecting an ONFI host and a storage unit, the method comprising: Receive the first command sent by the ONFI host and obtain the operation configuration information corresponding to the first command; Create the target entry corresponding to the first command based on the operation configuration information; Based on the address command data issued by the ONFI host and the target entry, the storage unit is driven to perform corresponding operations, and the return data of the storage unit is obtained; The returned data is sent to the ONFI host.
[0005] In one embodiment, the step of receiving a first command sent by the ONFI host and obtaining operation configuration information corresponding to the first command includes: Receive the first command sent by the ONFI host and determine the priority type of the first command; If the first command is a priority command, then the command template corresponding to the first command is obtained from the preset priority command template set, and the operation configuration information corresponding to the first command is obtained based on the command template; If the first command is a non-priority command, obtain the command template corresponding to the first command from the preset non-priority command template set, and obtain the operation configuration information corresponding to the first command based on the command template.
[0006] In one embodiment, the step of creating the target entry corresponding to the first command based on the operation configuration information includes: Retrieve the preset entry data structure; The operation configuration information is filled into the entry data structure to create the target entry corresponding to the first command.
[0007] In one embodiment, the step of driving the storage unit to perform corresponding operations based on the address command data issued by the ONFI host and the target entry, and obtaining the return data from the storage unit, includes: Based on the address command data issued by the ONFI host, the target entry is updated for the first time; Based on the updated address information in the target entry, the storage unit is driven to perform corresponding operations, and the target entry is updated a second time based on the returned data from the storage unit.
[0008] In one embodiment, the address command data includes multiple different address information, and the step of performing a first update on the target entry based on the address command data issued by the ONFI host includes: The target entry is updated sequentially based on different address information in the address command data issued by the ONFI host; The steps of driving the storage unit to perform corresponding operations based on the updated address information in the target entry, and obtaining and performing a second update on the target entry based on the returned data from the storage unit, include: During the first update of the target entry, the target address information that has been updated in the target entry is determined; The target storage region corresponding to the target address information in the storage unit is driven to perform corresponding operations, and the return data of the target storage region is obtained; The target entry is updated a second time based on the returned data.
[0009] In one embodiment, after the step of sending the returned data to the ONFI host, the method includes: In response to the ONFI host's completion instruction for the first command, all information in the target entry is deleted to release the resources occupied by the target entry.
[0010] In one embodiment, the method further includes: During the execution of the first command, a second command sent by the ONFI host is received, wherein the second command has a higher priority than the first command; Pause the execution of the first command and record its execution status, then begin executing the second command; Once the second command is completed, the first command will be restarted based on the execution status.
[0011] This application also provides a command execution device, the command execution device comprising: The receiving module is used to receive the first command sent by the ONFI host and obtain the operation configuration information corresponding to the first command; A creation module is used to create a target entry corresponding to the first command based on the operation configuration information; The execution module is used to drive the storage unit to perform corresponding operations based on the address command data issued by the ONFI host and the target entry, and to obtain the return data from the storage unit; The sending module is used to send the returned data to the ONFI host.
[0012] This application also provides a computer device, which includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the command execution method described above.
[0013] This application also provides a computer-readable storage medium storing a computer program that executes the above-described command execution method when run on a processor.
[0014] The embodiments of this application have the following beneficial effects: This application embodiment is applied to an ONFI slave controller connecting an ONFI host and a storage unit. The method includes: receiving a first command sent by the ONFI host and obtaining operation configuration information corresponding to the first command; creating a target entry corresponding to the first command based on the operation configuration information; driving the storage unit to perform corresponding operations based on address command data and the target entry issued by the ONFI host, and obtaining return data from the storage unit; and sending the return data to the ONFI host. By establishing and maintaining target entries, the traditional ONFI host and storage unit are connected, avoiding the high complexity of command processing by the ONFI slave controller caused by using a state machine architecture to manage commands, and improving the efficiency of the ONFI slave controller in processing commands between the ONFI host and the storage unit. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and therefore should not be considered as a limitation on the scope of protection of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 A flowchart illustrating the first embodiment of the command execution method provided in this application; Figure 2 A schematic diagram of the entry data structure provided in this application; Figure 3 A flowchart illustrating a second embodiment of the command execution method provided in this application; Figure 4 A flowchart illustrating a third embodiment of the command execution method provided in this application; Figure 5 A flowchart illustrating the fourth embodiment of the command execution method provided in this application; Figure 6 A flowchart illustrating the fifth embodiment of the command execution method provided in this application; Figure 7 A timing diagram illustrating the entry creation and command execution of the first command provided in this application; Figure 8 A timing diagram illustrating the priority execution of the second command provided in this application; Figure 9 A schematic diagram of the command execution device provided in this application. Detailed Implementation
[0017] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0018] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0019] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0020] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0021] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0022] It is understood that the method of this application is applied to an ONFI slave controller that connects an ONFI host and a storage unit. For ease of explanation, the following embodiments use an ONFI slave controller as an example for detailed description.
[0023] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0024] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a first embodiment of the command execution method provided in this application. The method includes: Step S101: Receive the first command sent by the ONFI host and obtain the operation configuration information corresponding to the first command.
[0025] In this embodiment, the ONFI slave controller is positioned between the ONFI host and the storage unit. The ONFI slave controller receives a first command sent by the ONFI host and obtains the operation configuration information corresponding to the first command. The ONFI slave controller has pre-set command templates for various commands. Based on the command template corresponding to the first command, the ONFI slave controller obtains the operation configuration information corresponding to the first command. The operation configuration information includes, but is not limited to: operation type (read / write), address cycle count, data transfer volume, voltage control information, command priority level, etc.
[0026] It should be noted that ONFI (Open NAND Flash Interface) is an open standard jointly developed by multiple semiconductor manufacturers (such as Intel, Micron, SK Hynix, etc.) to unify the physical interface and communication protocol between NAND flash memory chips and controller chips. Its goal is to improve compatibility, reduce development costs, and increase data transfer rates.
[0027] Step S102: Create a target entry corresponding to the first command based on the operation configuration information.
[0028] In this embodiment, the ONFI slave controller creates the target entry corresponding to the first command based on the operation configuration information.
[0029] In one embodiment, the ONFI slave controller obtains a preset entry data structure, fills the operation configuration information into the entry data structure, and creates the target entry corresponding to the first command.
[0030] For example, Figure 2 A schematic diagram of the entry data structure provided in this application, wherein, as Figure 2 As shown, Evld indicates the entry's valid status, HD indicates the ONFI host-side operation completion indication, Addr0-5 are address command codes 0-5 received by the ONFI slave controller from the ONFI host, ALen indicates the number of addresses corresponding to the command, INFO indicates the voltage information of the memory cell in the command received from the ONFI host, WR indicates that the operation on the memory cell in the command received from the ONFI host is a write operation, and RD indicates that the operation on the memory cell in the command received from the ONFI host is a read operation. It should be noted that the above only illustrates a few key parameters. The parameters in the entry data structure are related to the ONFI standard, and those skilled in the art can determine them through research; they will not be elaborated upon here.
[0031] Step S103: Based on the address command data issued by the ONFI host and the target entry, drive the storage unit to perform corresponding operations and obtain the return data from the storage unit.
[0032] In this embodiment, the ONFI slave controller drives the storage unit to perform corresponding operations based on the address command data and target entry issued by the ONFI host, and obtains the return data from the storage unit. It can be understood that the first command issued by the ONFI host is usually aimed at a storage area of a specific address on the storage unit. Therefore, after the ONFI slave controller establishes the target entry corresponding to the first command, it receives the address command data issued by the ONFI host, which indicates the storage area affected by the first command. This allows it to drive the storage unit to perform corresponding operations and obtain the return data from the storage unit.
[0033] Step S104: Send the returned data to the ONFI host.
[0034] In this embodiment, after the ONFI slave controller drives the storage unit to perform the corresponding operation and obtains the return data from the storage unit, it sends the return data to the ONFI host.
[0035] In this embodiment, the ONFI slave controller receives a first command sent by the ONFI host and obtains the operation configuration information corresponding to the first command; it creates a target entry corresponding to the first command based on the operation configuration information; based on the address command data and target entry issued by the ONFI host, it drives the storage unit to perform corresponding operations and obtains the return data from the storage unit; and it sends the return data to the ONFI host. By establishing and maintaining target entries, the traditional ONFI host and storage unit are connected, avoiding the high complexity of command processing by the ONFI slave controller caused by using a state machine architecture to manage commands, thus improving the efficiency of the ONFI slave controller in processing commands from the ONFI host and storage unit.
[0036] Please refer to Figure 3 , Figure 3 The flowchart illustrates a second embodiment of the command execution method provided in this application. The difference between the second embodiment and the first embodiment is that the step of receiving the first command sent by the ONFI host and obtaining the operation configuration information corresponding to the first command includes: Step S201: Receive the first command sent by the ONFI host and determine the priority type of the first command.
[0037] In this embodiment, the ONFI slave controller receives the first command sent by the ONFI host and determines the priority type of the first command. It should be noted that the priority of each command is pre-set in the ONFI slave controller, and the priority type of the first command can be queried and determined when the first command is received from the ONFI host.
[0038] In one embodiment, the ONFI slave controller pre-stores a priority command list and a non-priority command list. When receiving the first command sent by the ONFI host, it can query whether the first command belongs to the priority command list or the non-priority command list to determine the priority type of the first command.
[0039] Step S202: If the first command is a priority command, then obtain the command template corresponding to the first command from the preset priority command template set, and obtain the operation configuration information corresponding to the first command based on the command template.
[0040] Step S203: If the first command is a non-priority command, obtain the command template corresponding to the first command from the preset non-priority command template set, and obtain the operation configuration information corresponding to the first command based on the command template.
[0041] In this embodiment, if the ONFI slave controller determines that the first command is a priority command, it obtains the command template corresponding to the first command from the preset priority command template set, and obtains the operation configuration information corresponding to the first command based on the command template. If it determines that the first command is a non-priority command, it obtains the command template corresponding to the first command from the preset non-priority command template set, and obtains the operation configuration information corresponding to the first command based on the command template.
[0042] In one embodiment, the ONFI slave controller pre-stores a priority command template set and a non-priority command template set. The priority command template set contains the command template corresponding to each command in the priority command list, and the non-priority command template set contains the command template corresponding to each command in the non-priority command list.
[0043] In one embodiment, a user can create a custom command template in the ONFI slave controller and customize whether the command corresponding to the template is a priority command or a non-priority command. The ONFI slave controller pre-stores priority and non-priority command templates to meet scalability requirements. Users can adjust the preset command characteristics of the templates according to their custom command requirements, ONFI command requirements, and media requirements. For example, if a new custom media register command is needed, a new command template starting with the command 02h for register access can be added; this adapts to the variable frequency of address cycles and data transmission volume in ONFI commands.
[0044] In this embodiment, the ONFI slave controller receives a first command sent by the ONFI master, determines the priority type of the first command, and looks up the corresponding command template and operation configuration information based on the priority type, enabling the rapid generation of the target entry corresponding to the first command. By transforming the traditional command recognition process, which relies on state machine state transitions, into a data lookup + structure instantiation process as described in this solution, command parsing and control flow are decoupled, improving the efficiency of command parsing and control.
[0045] Please refer to Figure 4 , Figure 4The flowchart illustrates a third embodiment of the command execution method provided in this application. The difference between this third embodiment and the first to second embodiments lies in the step of driving the storage unit to perform corresponding operations based on the address command data issued by the ONFI host and the target entry, and obtaining the return data from the storage unit, including: Step S301: Based on the address command data issued by the ONFI host, perform a first update on the target entry.
[0046] In this embodiment, the ONFI slave controller performs a first update on the target entry based on the address command data issued by the ONFI host. It should be noted that the ONFI slave controller only creates the target entry based on the first command issued by the ONFI host. The first command is merely a command type, such as a write command or a read command, and does not specify which addresses in the storage unit it operates on. After creating the target entry, the ONFI host issues the address command data corresponding to the first command, and the ONFI slave controller fills the address information corresponding to the address command data into the target entry to perform the first update.
[0047] Step S302: Based on the updated address information in the target entry, drive the storage unit to perform corresponding operations, and obtain and perform a second update on the target entry based on the returned data from the storage unit.
[0048] In this embodiment, the ONFI slave controller drives the storage unit to perform corresponding operations based on the updated address information in the target entry, and obtains the return data from the storage unit, and performs a second update on the target entry based on the return data.
[0049] For example, the first command is a write command. The ONFI slave controller writes the corresponding data to the storage unit based on the updated address information in the target entry, obtains the return data from the storage unit to determine whether the write was successful, and writes the returned data to the target entry to perform a second update on the target entry.
[0050] For example, the first command is a read command. The ONFI slave controller reads the corresponding data from the corresponding address of the storage unit based on the updated address information in the target entry, obtains the returned data of the storage unit as the read data, and writes the returned data into the target entry to perform a second update on the target entry.
[0051] In one embodiment, the address command data includes multiple different address information, and the step of performing a first update on the target entry based on the address command data issued by the ONFI host includes: Step S3011: Based on the different address information in the address command data issued by the ONFI host, the target entry is updated for the first time.
[0052] In this embodiment, the ONFI slave controller sequentially writes each address information from the address command data issued by the ONFI host into the target entry, and performs the first update on the target entry.
[0053] In one embodiment, the steps of driving the storage unit to perform corresponding operations based on the updated address information in the target entry, and obtaining and performing a second update on the target entry based on the returned data from the storage unit, include: Step S3021: During the first update of the target entry, determine the target address information that has been updated in the target entry.
[0054] In this embodiment, during the first update of the target entry by the ONFI slave controller, the target address information that has been updated in the target entry is determined. It can be understood that the first update involves writing each address information into the target entry sequentially, with some address information being written before others, and the already written address information being used as the target address information.
[0055] Step S3022: Drive the target storage area corresponding to the target address information in the storage unit to perform the corresponding operation, and obtain the return data of the target storage area.
[0056] Step S3023: Update the target entry a second time based on the returned data.
[0057] In this embodiment, the ONFI slave controller performs corresponding operations on the target storage area corresponding to the target address information in the drive storage unit, obtains the return data of the target storage area, and performs a second update on the target entry based on the return data. It can be understood that during the first update process where the ONFI slave controller writes each address information into the target entry, the ONFI slave controller can simultaneously perform corresponding operations on the corresponding target storage area in the drive storage unit based on the already written address information, thereby obtaining the return data for the second update of the target entry. This achieves decoupling between the control on the ONFI master side and the return data on the storage unit side.
[0058] In this embodiment, the ONFI slave controller can determine the updated target address information in the target entry during the first update process, drive the target storage area corresponding to the target address information in the storage unit to perform corresponding operations, and obtain the returned data from the target storage area to perform a second update on the target entry. This achieves decoupling between the control on the ONFI host side and the returned data on the storage unit side, supports simultaneous updates on both sides, efficiently maintains the internal state at the command granularity, and improves the efficiency of the ONFI slave controller in executing commands.
[0059] Please refer to Figure 5 , Figure 5 A flowchart illustrating a fourth embodiment of the command execution method provided in this application. The difference between the fourth embodiment and the first to third embodiments is that, after the step of sending the returned data to the ONFI host, the method includes: Step S401: In response to the ONFI host's completion instruction for the first command, delete all information in the target entry to release the resources occupied by the target entry.
[0060] In this embodiment, the ONFI slave controller responds to the ONFI host's completion instruction for the first command by deleting all information in the target entry to release the resources occupied by the target entry.
[0061] For example, the first command is a write command. The ONFI slave controller writes the corresponding data to the storage unit based on the updated address information in the target entry, obtains the return data from the storage unit to determine whether the write was successful, and sends the return data to the ONFI host. When the ONFI host receives the return data, it issues a completion command. Upon receiving the completion command, the ONFI slave controller deletes all information in the target entry of the first command to release the resources occupied by the target entry.
[0062] For example, the first command is a read command. The ONFI slave controller reads the corresponding data from the corresponding address of the storage unit based on the updated address information in the target entry, obtains the returned data of the storage unit as the read data, and sends the returned data to the ONFI host. When the ONFI host receives the returned data, it issues a completion command. When the ONFI slave controller receives the completion command, it deletes all information in the target entry of the first command to release the resources occupied by the target entry.
[0063] In one embodiment, the ONFI slave controller monitors the entry corresponding to each command, sets a timer when the entry is created, and when the timer value reaches a preset threshold, it will forcibly delete all information in the corresponding entry to release the resources occupied by the entry and avoid the emergence of zombie entries.
[0064] In this embodiment, the ONFI slave controller, in response to the ONFI host's completion instruction for the first command, deletes all information in the target entry to release the resources occupied by the target entry; or, when the entry reaches a preset time limit, it forcibly deletes all information in the corresponding entry to release the resources occupied by the entry. This improves the utilization rate of storage resources by the ONFI slave controller.
[0065] Please refer to Figure 6 , Figure 6 This is a flowchart illustrating a fifth embodiment of the command execution method provided in this application. The difference between the fifth embodiment and the first to fourth embodiments is that the method further includes: Step S501: During the execution of the first command, a second command sent by the ONFI host is received, wherein the second command has a higher priority than the first command.
[0066] Step S502: Pause the execution of the first command and record the execution status of the first command, and start executing the second command.
[0067] Step S503: Until the second command is completed, restart the execution of the first command according to the execution status.
[0068] In this embodiment, during the execution of the first command, the ONFI slave controller receives a second command sent by the ONFI host. The second command has a higher priority than the first command. At this time, the ONFI slave controller pauses the execution of the first command, records its execution status, and begins executing the second command. This continues until the second command is completed, and then the execution of the first command resumes based on its execution status. It can be understood that the execution status of the first command indicates which step the first command was at when the second command was received. After the second command is completed, the ONFI slave controller can resume executing the first command from the step where it was paused, without having to start from the beginning.
[0069] For example, such as Figure 7 and Figure 8 As shown, Figure 7 A timing diagram illustrating the entry creation and command execution for the first command provided in this application. Figure 8 This is a timing diagram illustrating the priority execution of the second command provided in this application. The first command is the Page Read command, and the second command is the Read Status command; as shown... Figure 7As shown, when the ONFI slave controller receives the Page Read command, it sequentially executes EntryCreate, Entry Element Collect, Read Data Prepare, Host Read Data, and Entry Release. Figure 8 As shown, when the ONFI slave controller receives a Read Status command during the Read Data Prepare process of the Page Read command, the Read Status command has a higher priority than the Page Read command. At this time, the ONFI slave controller suspends the execution of the Page Read command and records the execution status of the Page Read command as Read Data Prepare. It prioritizes the execution of the Read Status command in the following order: High Entry Create, Host Read Data, and Entry Release. After completing the Read Status command, the ONFI slave controller restarts the execution of the Page Read command from Read Data Prepare until the Page Read command is completed.
[0070] In this embodiment, the ONFI slave controller receives a second command from the ONFI host during the execution of the first command. The second command has a higher priority than the first command. The execution of the first command is paused, its execution status is recorded, and the execution of the second command begins. The execution of the second command continues until it is completed, at which point the execution of the first command is restarted based on its execution status. This approach, which does not rely on traditional state machine state transitions, encapsulates each command as an independent entry with its own priority. Through a scheduling strategy, it automatically achieves rapid response and preemptive execution of high-priority commands, resulting in a more flexible, lower-latency, and more scalable ONFI command management method.
[0071] refer to Figure 9 , Figure 9 This is a schematic diagram of the command execution device provided in this application. The command execution device includes: The receiving module 10 is used to receive the first command sent by the ONFI host and obtain the operation configuration information corresponding to the first command.
[0072] The creation module 20 is used to create the target entry corresponding to the first command based on the operation configuration information.
[0073] The execution module 30 is used to drive the storage unit to perform corresponding operations based on the address command data issued by the ONFI host and the target entry, and to obtain the return data from the storage unit.
[0074] The sending module 40 is used to send the returned data to the ONFI host.
[0075] It is understood that the command execution device of this embodiment corresponds to the command execution method of the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described again here.
[0076] This application also provides a computer device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer device to perform the command execution method described above by running the computer program.
[0077] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0078] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.
[0079] This application also provides a computer storage medium for storing the computer program used in the aforementioned computer device. The computer storage medium can be a readable storage medium, a non-volatile storage medium, or a volatile storage medium. For example, the computer storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0080] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0081] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0082] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0083] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A command execution method, characterized in that, The method is applied to an ONFI slave controller that connects an ONFI host and a storage unit. The method includes: Receive the first command sent by the ONFI host and obtain the operation configuration information corresponding to the first command; Create the target entry corresponding to the first command based on the operation configuration information; Based on the address command data issued by the ONFI host and the target entry, the storage unit is driven to perform corresponding operations, and the return data of the storage unit is obtained; The returned data is sent to the ONFI host.
2. The command execution method according to claim 1, characterized in that, The step of receiving the first command sent by the ONFI host and obtaining the operation configuration information corresponding to the first command includes: Receive the first command sent by the ONFI host and determine the priority type of the first command; If the first command is a priority command, then the command template corresponding to the first command is obtained from the preset priority command template set, and the operation configuration information corresponding to the first command is obtained based on the command template; If the first command is a non-priority command, obtain the command template corresponding to the first command from the preset non-priority command template set, and obtain the operation configuration information corresponding to the first command based on the command template.
3. The command execution method according to claim 1, characterized in that, The step of creating the target entry corresponding to the first command based on the operation configuration information includes: Retrieve the preset entry data structure; The operation configuration information is filled into the entry data structure to create the target entry corresponding to the first command.
4. The command execution method according to claim 1, characterized in that, The step of driving the storage unit to perform corresponding operations based on the address command data issued by the ONFI host and the target entry, and obtaining the return data from the storage unit, includes: Based on the address command data issued by the ONFI host, the target entry is updated for the first time; Based on the updated address information in the target entry, the storage unit is driven to perform corresponding operations, and the target entry is updated a second time based on the returned data from the storage unit.
5. The command execution method according to claim 4, characterized in that, The address command data includes multiple different address information. The step of updating the target entry based on the address command data issued by the ONFI host includes: The target entry is updated sequentially based on different address information in the address command data issued by the ONFI host. The steps of driving the storage unit to perform corresponding operations based on the updated address information in the target entry, and obtaining and performing a second update on the target entry based on the returned data from the storage unit, include: During the first update of the target entry, the target address information that has been updated in the target entry is determined; The target storage region corresponding to the target address information in the storage unit is driven to perform corresponding operations, and the return data of the target storage region is obtained; The target entry is updated a second time based on the returned data.
6. The command execution method according to claim 1, characterized in that, After the step of sending the returned data to the ONFI host, the following steps are included: In response to the ONFI host's completion instruction for the first command, all information in the target entry is deleted to release the resources occupied by the target entry.
7. The command execution method according to any one of claims 1-6, characterized in that, The method further includes: During the execution of the first command, a second command sent by the ONFI host is received, wherein the second command has a higher priority than the first command; Pause the execution of the first command and record its execution status, then begin executing the second command; Once the second command is completed, the first command will be restarted based on the execution status.
8. A command execution device, characterized in that, The command execution device includes: The receiving module is used to receive the first command sent by the ONFI host and obtain the operation configuration information corresponding to the first command; A creation module is used to create a target entry corresponding to the first command based on the operation configuration information; The execution module is used to drive the storage unit to perform corresponding operations based on the address command data issued by the ONFI host and the target entry, and to obtain the return data from the storage unit; The sending module is used to send the returned data to the ONFI host.
9. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the command execution method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a processor, executes the command execution method according to any one of claims 1-7.