Command processing method and device, storage medium and electronic equipment

By deploying the reset protection device in the system on chip, the rapid and accurate problems of subsystem reset abnormality handling in the system on chip are solved, and the stability and reliability of the system are improved.

CN119166582APending Publication Date: 2024-12-20SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411296349.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The prior art cannot quickly and accurately deal with reset abnormalities in subsystems in a system-on-chip, resulting in impaired system stability and reliability.

Method used

Deploy the reset protection device in the system on chip, which is connected to the command request subsystem and the command response subsystem. By obtaining the reset status, parsing the request cache table and closing the obstruction function of the obstruction module, it replaces the command response subsystem to respond to the request command, ensuring that The system handles the reset abnormality in time.

Benefits of technology

It effectively avoids the problem of slacking of the command request subsystem, improves the reliability and stability of the system on chip, and quickly deals with reset exceptions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166582A_ABST
    Figure CN119166582A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a command processing method and device, a storage medium and electronic device.The method comprises the steps that in the process that a command request subsystem accesses a command response subsystem, the reset state of the command response subsystem is obtained; when it is determined that the command response subsystem is in a lost state from the reset state, a request cache table is analyzed, the lost state is used for representing that access of the command request subsystem to the command response subsystem is abnormal, and the request cache table is used for caching request commands sent by the command request subsystem; and when it is determined that the number of the request commands included in the request cache table is greater than the preset number, responding to the request commands. Through the method and the device, the problem that the reset abnormity of the subsystem in the system-on-chip cannot be quickly and accurately processed in the related technology is solved, and the effect of quickly and accurately processing the reset abnormity of the subsystem in the system-on-chip is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data processing, and specifically, to a command processing method and device, a storage medium, and an electronic device. Background Art

[0002] As the complexity of System on Chip (SOC) increases, its functions are also becoming more and more abundant, and some functions may involve multiple subsystems such as analog, digital, radio frequency, power management, memory control, etc. In SOC design, there may be access conflicts between different subsystems, resulting in reset abnormalities.

[0003] In order to solve the above problems, the related art usually adopts the following two methods to solve the reset anomaly. The first method is to configure the access priority of the subsystem when the subsystem accesses the same memory subsystem. The second method is to adopt the "fault injection" technology, that is, when one subsystem is reset, the other subsystem controls the access to the memory subsystem to ensure that the access when one subsystem is reset will not cause reset anomalies to the other subsystem. However, both of the above methods have certain disadvantages. For example, the access priority method will cause one subsystem to be unable to access the memory subsystem after the reset of the other subsystem, resulting in a reset anomaly. In addition, when the "fault injection" technology is adopted, when one subsystem is reset, the other subsystem controls the access to the memory subsystem, which may cause access anomalies or even inaccessibility, thereby causing reset anomalies.

[0004] With respect to the above-mentioned problem that a reset anomaly of a subsystem in a system on chip cannot be processed quickly and accurately, no effective solution has been proposed in the related art. Summary of the invention

[0005] The embodiments of the present application provide a command processing method and device, a storage medium, and an electronic device to at least solve the problem in the related art that a reset anomaly of a subsystem in a system on chip cannot be processed quickly and accurately.

[0006] According to an embodiment of the present application, a command processing method is provided, which is applied to a reset protection device, wherein the reset protection device is deployed in a system on chip, and the reset protection device is respectively connected to a command request subsystem and a command response subsystem in the system on chip, and the above method includes: in the process of the command request subsystem accessing the command response subsystem, obtaining the reset state of the command response subsystem, wherein the command request subsystem is used to send a request command to the command response subsystem, and the command response subsystem is used to respond to the request command, and the reset state is used to indicate whether the system configuration of the command response subsystem has been reset; in the case where it is determined from the reset state that the command response subsystem is in a lost state, parsing a request cache table, wherein the lost state is used to indicate that an abnormality occurs in the access of the command request subsystem to the command response subsystem, and the request cache table is used to cache the request command sent by the command request subsystem; in the case where it is determined that the number of the request commands included in the request cache table is greater than a preset number, responding to the request command, wherein the preset number is an integer greater than or equal to 0.

[0007] In an exemplary embodiment, during the process of the command request subsystem accessing the command response subsystem, before obtaining the reset state of the command response subsystem, the method further includes: formatting a first request command sent by the command request subsystem to obtain a second request command, wherein the second request command includes the first request command and the system number of the command response subsystem; caching the second request command and a count identifier of the second request command in the request cache table, wherein the request cache table is set in the reset protection device; when the command response subsystem responds to the second command request, instructing the command response subsystem to return a first response command to the command request subsystem; formatting the first response command to obtain a second response command, wherein the second response command includes the system number of the command response subsystem and the first response command; caching the second response command and a count identifier of the second response command in the response cache table, wherein the response cache table is set in the reset protection device.

[0008] In an exemplary embodiment, during the process of the command request subsystem accessing the command response subsystem, the reset state of the command response subsystem is obtained, including: obtaining the reset state from a reset state monitoring module, wherein the reset state monitoring module is used to monitor the reset state of the command response subsystem in real time, the reset state monitoring module is deployed in the reset protection device, and the reset state monitoring module is connected to the command response subsystem.

[0009] In an exemplary embodiment, when it is determined that the number of request commands included in the request cache table is greater than a preset number, before responding to the request command, the method further includes: reading the system number of the command response subsystem from the request cache table; determining the number of request commands to be responded to by the command response subsystem based on the system number of the command response subsystem; and comparing the number of request commands to be responded to by the command response subsystem with the preset number to obtain a comparison result.

[0010] In an exemplary embodiment, before comparing the number of request commands to be responded to by the command response subsystem and the preset number to obtain a comparison result, the method further includes: when the number of request commands to be responded to by the command response subsystem is 0, ending the response of the command response subsystem to the command request subsystem.

[0011] In an exemplary embodiment, when it is determined that the number of request commands included in the request cache table is greater than a preset number, responding to the request command includes: when it is determined that the number of request commands included in the request cache table is greater than a preset number, turning off the blocking function of the blocking module, wherein the blocking module is used to block the proxy module from responding to the request command, the proxy module is deployed in the response parsing module, the response parsing module is deployed in the reset protection device, and the response parsing module is used to respond to the request command of the command request subsystem on behalf of the command response subsystem when the reset state of the command response subsystem is in a lost state and the command request subsystem has not entered an abnormal power-off protection state; reading the request command from the request cache table; the system number included in the request command is the same as the system number included in the request command. When the system number of the command response subsystem matches, the command type of the request command is determined; when it is determined from the command type that the request command is a write data command, the request command is deleted from the request cache table; when the request command is a read data command, the request command is responded to through the answering module, wherein, after the request command is responded to through the answering module, a third response command is allowed to be sent to the command response subsystem through the response parsing module, the third response command is a command generated by the answering module in response to the request command, the third response command includes the system number of the command response subsystem, and the third response command is used to notify the command request subsystem that the reset state of the command response subsystem is in a lost state, and the answering module has responded to the request command.

[0012] In an exemplary embodiment, when the request command is a read data command, after the answering module responds to the request command, the method further includes: monitoring the duration for which the command response subsystem is in a lost state; and when the duration for which the command response subsystem is in a lost state is greater than a preset duration, triggering an abnormal power-off protection mode of the command response subsystem, and controlling the answering module to stop responding to the request command.

[0013] According to another embodiment of the present application, a command processing device is provided, which is applied to a reset protection device. The reset protection device is deployed in a system on chip, and the reset protection device is respectively connected to a command request subsystem and a command response subsystem in the system on chip. The device includes: a first acquisition module, which is used to acquire the reset state of the command response subsystem during the process of the command request subsystem accessing the command response subsystem, wherein the command request subsystem is used to send a request command to the command response subsystem, and the command response subsystem is used to respond to the request command, and the reset state is used to indicate whether the system configuration of the command response subsystem has been reset; a first parsing module, which is used to parse a request cache table when it is determined from the reset state that the command response subsystem is in a lost state, wherein the lost state is used to indicate that an abnormality occurs in the access of the command request subsystem to the command response subsystem, and the request cache table is used to cache the request command sent by the command request subsystem; a first response module, which is used to respond to the request command when it is determined that the number of the request commands included in the request cache table is greater than a preset number, wherein the preset number is an integer greater than or equal to 0.

[0014] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0015] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0016] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0017] Through the present application, since the reset protection device can replace the command response subsystem response request command with the request command read from the request cache table when the command response subsystem is in a lost state from the reset state, the command request subsystem can be prevented from hanging. The reliability and stability of the system on chip are improved. Therefore, the problem that the reset anomaly of the subsystem in the system on chip cannot be processed quickly and accurately in the related art can be solved, and the effect of quickly and accurately processing the reset anomaly of the subsystem in the system on chip can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a hardware structure block diagram of a server device of a command processing method according to an embodiment of the present application;

[0019] Figure 2 is a flowchart of a command processing method according to an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of the circuit structure of the address mapping module according to an embodiment of the present application;

[0021] Figure 4 is a schematic diagram of a request cache table according to an embodiment of the present application;

[0022] Figure 5 is a circuit structure diagram of a reset monitoring module according to an embodiment of the present application;

[0023] Figure 6 is a circuit diagram of a monitoring answering module according to an embodiment of the present application;

[0024] Figure 7 This is a flow chart of a monitoring answering module answering request command according to an embodiment of the present application;

[0025] Figure 8 is a structural diagram of a reset protection device built into a SOC according to an embodiment of the present application;

[0026] Fig. 9 is a flow chart of interaction between a master subsystem and a slave subsystem according to an embodiment of the present application;

[0027] Fig.10 It is a structural block diagram of a command processing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0030] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a command processing method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the command processing method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0032] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0033] In this embodiment, a command processing method is provided, which is applied to a reset protection device. The reset protection device is deployed in a system on chip. The reset protection device is connected to a command request subsystem and a command response subsystem in the system on chip respectively. Figure 2 is a flowchart of a command processing method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0034] Step S202, in the process of the command request subsystem accessing the command response subsystem, obtaining the reset state of the command response subsystem, wherein the command request subsystem is used to send a request command to the command response subsystem, the command response subsystem is used to respond to the request command, and the reset state is used to indicate whether the system configuration of the command response subsystem has been reset;

[0035] Optionally, this embodiment includes but is not limited to being applied to scenarios of anti-hanging and anti-blocking in a system on chip. For example, when the central processing unit (CPU) of the SoC processes the interaction of various subsystems, it may face the sudden loss of subsystem reset, but the CPU cannot detect it in time, resulting in the CPU waiting for the subsystem to feedback a response after sending a command until the CPU hangs, resulting in abnormal problems such as CPU program running away.

[0036] Optionally, the command request subsystem in this embodiment includes but is not limited to a CPU in the system on chip, and the command response subsystem includes but is not limited to a salve subsystem in the system on chip that responds to the CPU.

[0037] Optionally, the reset state in this embodiment may also refer to the command response subsystem being restored to an initial state or a preset state when the command response subsystem is restarted or initialized. This state helps to ensure that the command response subsystem can correctly perform its functions after restarting or initializing. The reset state includes but is not limited to: all registers in the command response subsystem are restored to initial values ​​or default values. The command response subsystem is reset to an initial state. All configuration parameters of the command response subsystem are restored to initial settings or default values. All internal counters in the command response subsystem are cleared or set to initial values. The interrupt state of the command response subsystem is cleared or set to the initial state.

[0038] Step S204, when it is determined from the reset state that the command response subsystem is in a lost state, parsing the request cache table, wherein the lost state is used to indicate that the command request subsystem has accessed the command response subsystem abnormally, and the request cache table is used to cache the request command sent by the command request subsystem;

[0039] Optionally, the request cache table in this embodiment is used to store request commands sent by the command request subsystem, so that when the command response subsystem cannot respond normally, these commands can be re-parsed and processed.

[0040] In an exemplary embodiment, the request cache table may be parsed in the following manner:

[0041] S1, defines abnormal state, the loss state means that the command response subsystem cannot receive, process or return the request of the command request subsystem for some reason. This may be due to network problems, system failures or other reasons.

[0042] S2, checking the status of the command request subsystem to determine whether the command request subsystem is in normal working condition and can send commands to the command response subsystem.

[0043] S3, access request cache table, lookup and access request cache table, this table may be stored in database, memory or other storage system.

[0044] S4, determine the lost command request, and check whether the command request in the cache table has been responded to. If a command request has no response and the status is not updated within a specified time, it can be considered lost.

[0045] S5, reprocessing the lost command request. For the command request in the lost state, it is necessary to resend it or take other measures to ensure that the command is executed.

[0046] Through the above processing flow, the loss state of the command response subsystem can be effectively managed and processed to ensure the stability and reliability of the system.

[0047] Step S206: When it is determined that the number of request commands included in the request cache table is greater than a preset number, respond to the request command, where the preset number is an integer greater than or equal to 0.

[0048] Optionally, when the preset number is equal to 0, that is, when the request cache table includes the request command, the request command will be responded to. When the preset number is greater than 0, that is, when the request cache table includes multiple request commands (for example, the number of request commands is 3), the request commands are read in batches from the request cache table for response, thereby reducing processing time.

[0049] Through the above steps, since the reset protection device can replace the command response subsystem response request command with the request command read from the request cache table when the command response subsystem is in the lost state from the reset state, the command request subsystem can be prevented from hanging. The reliability and stability of the system on chip are improved. Therefore, the problem that the reset anomaly of the subsystem in the system on chip cannot be processed quickly and accurately in the related art can be solved, and the effect of quickly and accurately processing the reset anomaly of the subsystem in the system on chip can be achieved.

[0050] In an exemplary embodiment, during the process of the command request subsystem accessing the command response subsystem, before obtaining the reset state of the command response subsystem, the method further includes: formatting a first request command sent by the command request subsystem to obtain a second request command, wherein the second request command includes the first request command and the system number of the command response subsystem; caching the second request command and a count identifier of the second request command in the request cache table, wherein the request cache table is set in the reset protection device; when the command response subsystem responds to the second command request, instructing the command response subsystem to return a first response command to the command request subsystem; formatting the first response command to obtain a second response command, wherein the second response command includes the system number of the command response subsystem and the first response command; caching the second response command and a count identifier of the second response command in the response cache table, wherein the response cache table is set in the reset protection device.

[0051] Optionally, the reset protection device in this embodiment includes an address mapping module, which is used to convert the format of the first request command sent by the command request subsystem to obtain a second request command. The first request command includes a command address, which can be converted into the format of the system number of the corresponding command response subsystem + the first request command through mapping conversion. The second response command is then stored in the command cache table, and the command response subsystem stores the returned response data in the format of the system number of the command response subsystem + response number + response data in the response cache table.

[0052] In an exemplary embodiment, Figure 3As shown, it is a schematic diagram of the circuit structure of the address mapping module in this embodiment. This embodiment is explained by taking the command request subsystem as the master subsystem and the command response subsystem as the slave subsystem as an example. The master subsystem sends the request command to the address mapping module, and the request address includes the address range of the master subsystem accessing other slave subsystems. The address mapping module converts the address range of the master subsystem accessing other slave subsystems into the ID of the salve subsystem, and then caches the converted command in the request cache table. Among them, since the address access space size of each salve subsystem has been set, the address of the master subsystem accessing the salve subsystem is converted into IDn, so as to distinguish the slave subsystem accessed by the master subsystem according to the ID number. The mapping address range of this address mapping module can be adapted to access spaces of different sizes through the master subsystem configuration.

[0053] Optionally, the request cache table is used to store the access command with the salve subsystem ID converted by the address mapping module and the response data of the salve subsystem module or the subsystem monitoring answering module, and is used as a cache for command requests and response commands. Figure 4 As shown, the request cache table is divided into two tables: the command cache table and the response cache table, which respectively store the request command for the master subsystem to access the slave subsystem ID and the response data and the number of responses / commands fed back by the slave subsystem to the master subsystem. For example, the request commands cached in the command cache table include: write command (slave subsystem ID + write command), read command (slave subsystem ID + read command), and command count (slave subsystem ID + command count). The response commands cached in the response cache table include: write response (slave subsystem ID + write response), read response (slave subsystem ID + read data + read response), and response count (slave subsystem ID + response count).

[0054] In addition, the request cache table also has a clearing function. For example, by counting the request commands and responses of the same ID and determining whether they are equal, the same request commands and response data in the request cache table can be cleared.

[0055] This embodiment can ensure that request and response commands are transmitted in a unified format between different subsystems through format conversion, reducing communication delays caused by format incompatibility. In addition, combining request commands and response commands with the system number of the subsystem helps to ensure the integrity of data during transmission and avoid data being misread or lost during transmission. By setting a request cache table and a response cache table in the reset protection device, the cache of requests and responses can be effectively managed, reducing errors caused by cache conflicts or request / response losses. The reliability of the reset protection device is improved.

[0056] In an exemplary embodiment, during the process of the command request subsystem accessing the command response subsystem, the reset state of the command response subsystem is obtained, including: obtaining the reset state from a reset state monitoring module, wherein the reset state monitoring module is used to monitor the reset state of the command response subsystem in real time, the reset state monitoring module is deployed in the reset protection device, and the reset state monitoring module is connected to the command response subsystem.

[0057] Optionally, the reset protection device in this embodiment includes a reset state monitoring module and an access record cache module. The reset state monitoring module is mainly used to read the reset state of each command response subsystem. Figure 5 As shown, it is a circuit structure diagram of the reset monitoring module in this embodiment. When the command response subsystem is a slave subsystem, the reset monitoring module includes a reset pulse monitoring module, a reset register module and an access record cache module. The reset state monitoring module obtains the reset state of each slave subsystem, and inputs the reset cancellation (rstn_pos) and reset validity (rstn_neg) states of each slave subsystem's soft reset signal into the reset state register module through the reset pulse monitoring module, and records the reset state of each slave subsystem through the reset state register module. When accessing the slave subsystem, the command request subsystem (master subsystem) first reads the reset information of the corresponding subsystem register bit to confirm whether the reset state can be accessed normally.

[0058] Optionally, the access record cache module in this embodiment is mainly used to record which slave subsystem the current master subsystem is accessing. The access record cache module is a memory type, which can be repeatedly updated, written and read. When the master subsystem reads the reset bit data of the reset status register module, the read bit information is recorded in the access cache module, which is convenient for recording which slave subsystem the current master subsystem is accessing.

[0059] This embodiment obtains the reset state of the command response subsystem through the reset state monitoring module, which can timely discover possible reset anomalies, avoid affecting the stability and reliability of the entire system, and improve the response speed of the system. In addition, the reset state monitoring module can accurately identify the reset state of the command response subsystem, avoid misjudgment and missed judgment, and improve the accuracy of the system.

[0060] In an exemplary embodiment, when it is determined that the number of request commands included in the request cache table is greater than a preset number, before responding to the request command, the method further includes: reading the system number of the command response subsystem from the request cache table; determining the number of request commands to be responded to by the command response subsystem based on the system number of the command response subsystem; and comparing the number of request commands to be responded to by the command response subsystem with the preset number to obtain a comparison result.

[0061] Optionally, this embodiment can read the request commands cached therein by traversing the request cache table. And parse the system number of the corresponding command response subsystem from the request command. Since one request command corresponds to one system number, the number of request commands can be determined based on the number of system numbers. In addition, the system number is a unique identifier between the request command and the response subsystem. By comparing the number of request commands to be responded to in the system with a preset threshold or number, it can be quickly determined whether it is necessary to call the reset protection device for a response.

[0062] Optionally, before comparing the number of request commands to be responded to by the command response subsystem with the preset number and obtaining the comparison result, the method further includes: when the number of request commands to be responded to by the command response subsystem is 0, ending the response of the command response subsystem to the command request subsystem.

[0063] For example, when the number of ID command data corresponding to the salve subsystem is 0, it means that the response to the request command has been completed before the reset occurs. If the number of request commands is not 0, the format of the command (read / write) needs to be parsed. The reset protection device is called to respond to the request command to ensure timely response to the request command.

[0064] This embodiment can dynamically monitor and adjust resource allocation by comparing the number of request commands to be responded to by the command response subsystem with a preset number, thereby ensuring that the request commands can be effectively processed.

[0065] In an exemplary embodiment, when it is determined that the number of request commands included in the request cache table is greater than a preset number, responding to the request command includes: when it is determined that the number of request commands included in the request cache table is greater than a preset number, turning off the blocking function of the blocking module, wherein the blocking module is used to block the proxy module from responding to the request command, the proxy module is deployed in the response parsing module, the response parsing module is deployed in the reset protection device, and the response parsing module is used to respond to the request command of the command request subsystem on behalf of the command response subsystem when the reset state of the command response subsystem is in a lost state and the command request subsystem has not entered an abnormal power-off protection state; reading the request command from the request cache table; the system number included in the request command is the same as the system number included in the request command. When the system number of the command response subsystem matches, the command type of the request command is determined; when it is determined from the command type that the request command is a write data command, the request command is deleted from the request cache table; when the request command is a read data command, the request command is responded to through the answering module, wherein, after the request command is responded to through the answering module, a third response command is allowed to be sent to the command response subsystem through the response parsing module, the third response command is a command generated by the answering module in response to the request command, the third response command includes the system number of the command response subsystem, and the third response command is used to notify the command request subsystem that the reset state of the command response subsystem is in a lost state, and the answering module has responded to the request command.

[0066] Optionally, the reset protection device in this embodiment includes a monitoring and answering module (corresponding to the response parsing module mentioned above), which is connected to the reset state monitoring module in the above embodiment and to the command request subsystem. For example, the monitoring and answering module is mainly used to handle the sudden loss of the slave subsystem reset when the master subsystem accesses the slave subsystem. The monitoring and answering module replies to the command issued by the master subsystem on behalf of the salve subsystem to avoid the master subsystem from hanging. The monitoring and answering module is composed of a state parsing module, a table parsing module, a blocking module, and an answering module.

[0067] For example, Figure 6 As shown, it is a circuit diagram of the monitoring answering module in this embodiment, wherein the state analysis module, the table analysis module, the blocking module (bypass module), and the answering module are connected in sequence, the table analysis module is connected to the cache table module, and the answering module includes a response answering module and an answering module.

[0068] The status parsing module is used to read the master subsystem access reset status detection module, determine the salve subsystem module that the master subsystem is accessing, and then output a start detection signal to open the reset status loop parsing module. The reset status loop parsing module uses a built-in counter to cyclically read the reset status register module in the reset monitoring module to determine whether the master subsystem is accessing the reset status of each salve subsystem. When the salve subsystem reset is lost, the bypass module turns off the bypass function and starts parsing the master subsystem command request. The dynamic cache table parsing traverses the dynamic cache table to find the number of commands and command formats corresponding to the salve subsystem ID to complete the command response.

[0069] like Figure 7 As shown, it is a flow chart of the answering request command of the monitoring answering module in this embodiment, which specifically includes the following steps:

[0070] S701, the state analysis module analyzes the access state of the master subsystem and reads the reset record of the master subsystem accessing the subsystem; the master subsystem access state analysis module analyzes the selection switch according to the access record of the salve subsystem and turns on the reset state loop analysis module. The reset state loop analysis module loop reads the reset state of the corresponding bit of the corresponding reset detection module according to the selection switch;

[0071] S702, according to the reset state, when the reset of the salve subsystem being accessed is in the revocation stage, the dynamic cache table parsing module starts to parse the data and command number of the corresponding salve subsystem ID of the command table in the dynamic cache table; if the salve subsystem being accessed is in the reset state, the bypass module is closed, and the dynamic cache table parsing module starts to parse the data and command number of the corresponding salve subsystem ID of the command table in the dynamic cache table;

[0072] S703, when the number of request commands corresponding to the ID of the sa lve subsystem is 0 (that is, the response to the command has been completed before the reset occurs), the bypass module turns on the bypass function and turns off the response reply;

[0073] S704, when the number of request commands is not 0, the format (read / write) of the request command is parsed. The bypass module turns off the bypass function, the response answering module sends a response, and the master subsystem write data is discarded; when the request command is a read command, the response answering module sends a response, and the data answering module sends data (for example, the data format is 32′5A5A_5A5A), completing the request command of the master subsystem;

[0074] The S705 cache table parsing module also parses the status of the slave subsystem that needs to answer the call and sends it to the master subsystem, notifying the master subsystem which slave subsystem is reset and in the lost state.

[0075] The response parsing module of this embodiment responds to the request command of the command request subsystem on behalf of the command response subsystem when the reset state of the command response subsystem is in a lost state and the command request subsystem has not entered the abnormal power-off protection state. This can quickly respond to the request command and save the manpower cost and error caused by the command request subsystem hanging.

[0076] In an exemplary embodiment, when the request command is a read data command, after the answering module responds to the request command, the method further includes: monitoring the duration for which the command response subsystem is in a lost state; and when the duration for which the command response subsystem is in a lost state is greater than a preset duration, triggering an abnormal power-off protection mode of the command response subsystem, and controlling the answering module to stop responding to the request command.

[0077] Optionally, this embodiment needs to continuously monitor whether the command response subsystem is in a lost state and record the duration of this state. If the command response subsystem is in a lost state for longer than a preset duration, the system will trigger a protection mechanism, namely, an abnormal power-off protection mode. This is usually to prevent further deterioration of the system or data loss. While triggering the abnormal power-off protection mode, it is also necessary to control the answering module to stop responding to the request command to avoid executing commands in an unstable or unsafe state.

[0078] By monitoring the status of the command response subsystem, this embodiment can promptly detect possible abnormal conditions of the subsystem, thereby improving the operational stability and reliability of the entire system. When the command response subsystem fails to work properly for a long time, the system can be prevented from incorrectly responding to the user's request, thereby avoiding potential risks. When the subsystem loss time exceeds the preset duration, the abnormal power-off protection mode is triggered to ensure system safety and prevent equipment damage or data loss due to subsystem failure. Controlling the answering module to stop responding to the request command can avoid continued consumption of resources when the subsystem is in an abnormal state, thereby improving resource utilization efficiency.

[0079] The present application is described below in conjunction with specific embodiments:

[0080] This specific embodiment takes the command request subsystem as the master subsystem and the command response subsystem as the slave subsystem as an example for explanation. Aiming at the problem of master subsystem hanging due to reset loss existing in the related art, a reset protection strategy for SOC anti-hanging and anti-blocking is proposed. Figure 8As shown, it is a structural diagram of a reset protection device built into the SOC in this specific embodiment. The reset protection device is connected to the master subsystem and the slave subsystem in the SOC respectively, and the reset protection device includes a reset state monitoring module and a response parsing module, wherein the response parsing module includes an address mapping module, a data caching module, and a parsing and answering module. A response parsing module is added to the reset state monitoring module and each master subsystem to ensure that when the master subsystem accesses other slave submodules, the reset state of the slave subsystem it accesses can be predicted first, and when the master subsystem accesses other slave subsystem modules, if the reset of the slave subsystem is suddenly lost and the master subsystem does not enter the abnormal power-off protection state, the slave subsystem is replaced to complete the data interaction with the master subsystem until the slave subsystem module and the master subsystem enter the abnormal power-off protection state.

[0081] For example, Fig. 9 FIG. 1 is a flowchart of the interaction between the master subsystem and the slave subsystem in this embodiment. The interaction process between the master subsystem and the slave subsystem includes the following steps:

[0082] S901, when the master subsystem accesses the slave subsystem, it reads the reset state of the slave subsystem monitored by the reset state monitoring module;

[0083] S902, the master subsystem determines whether the reset of accessing the slave subsystem is in the revoked state. When the subsystem is in the revoked state, the master subsystem can normally access the slave subsystem module;

[0084] S903, the address mapping module converts the command address of the master subsystem accessing the slave subsystem into the corresponding slave subsystem ID number + command through mapping, and stores the command data in the command cache table. At the same time, the slave subsystem stores the returned response data in the response cache table as slave subsystem ID + response / subsystem ID + data, thus completing the interaction between the master subsystem and other slave subsystems;

[0085] S904, when the master subsystem detects that the slave subsystem is in a reset valid state, the master subsystem sends an abnormal interrupt signal, and can determine whether to access other normal slave subsystems or perform abnormal power-off process operations;

[0086] S905, when the interaction between the master subsystem and the slave subsystem is not completed, the reset state loop module analyzes that the reset of the slave subsystem being interacted is suddenly lost, and the cache table analyzes the number of request commands to be responded to;

[0087] S906 ends the response process when it is found that the number of request commands to be responded to in the request command cache table is 0 (the slave subsystem has completed the response to all commands issued by the master subsystem before the reset occurs);

[0088] S907, when it is parsed that the number of request commands to be responded to in the command cache table is not 0, the response answering module and the data answering module, based on the type and number of request commands, replace the reset lost slave subsystem to answer the response request command until the master subsystem and other slave subsystems enter the abnormal power-off process.

[0089] This specific embodiment can detect the reset state of the slave subsystem in real time by building a reset protection device in the SOC. When the slave subsystem reset is lost during the master subsystem access to the slave subsystem, the reset protection device can complete the response to the master subsystem request command, thus avoiding the master subsystem from hanging until the SoC system enters the abnormal power-off protection mode. The reliability and stability of the SoC are improved, while reducing the human cost investment.

[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0091] In this embodiment, a command processing device is also provided, which is applied to a reset protection device. The reset protection device is deployed in a system on chip. The reset protection device is connected to a command request subsystem and a command response subsystem in the system on chip respectively. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions thereof will not be repeated. As used below, the term "module" may be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation in hardware, or a combination of software and hardware, is also possible and conceivable.

[0092] Fig.10 is a structural block diagram of a command processing device according to an embodiment of the present application, such as Fig.10 As shown, the device comprises:

[0093] A first acquisition module 1002 is used to acquire a reset state of the command response subsystem during the process of the command request subsystem accessing the command response subsystem, wherein the command request subsystem is used to send a request command to the command response subsystem, and the command response subsystem is used to respond to the request command, and the reset state is used to indicate whether the system configuration of the command response subsystem has been reset;

[0094] A first parsing module 1004 is used to parse a request cache table when it is determined from the reset state that the command response subsystem is in a lost state, wherein the lost state is used to indicate that an abnormality occurs in the access of the command request subsystem to the command response subsystem, and the request cache table is used to cache the request command sent by the command request subsystem;

[0095] The first response module 1006 is used to respond to the request command when it is determined that the number of the request commands included in the request cache table is greater than a preset number, wherein the preset number is an integer greater than or equal to 0.

[0096] In an exemplary embodiment, the above-mentioned device also includes: a first conversion module, which is used to convert the format of the first request command sent by the command request subsystem to obtain a second request command before obtaining the reset state of the command response subsystem during the process of the command request subsystem accessing the command response subsystem, wherein the second request command includes the first request command and the system number of the command response subsystem; a first cache module, which is used to cache the second request command and the count identifier of the second request command in the request cache table, wherein the request cache table is set in the reset protection device; a first indication module, which is used to instruct the command response subsystem to return a first response command to the command request subsystem when the command response subsystem responds to the second command request; a second conversion module, which is used to convert the format of the first response command to obtain a second response command, wherein the second response command includes the system number of the command response subsystem and the first response command; a first cache module, which is used to cache the second response command and the count identifier of the second response command in the response cache table, wherein the response cache table is set in the reset protection device.

[0097] In an exemplary embodiment, the above-mentioned first acquisition module 1002 includes: a first acquisition unit, used to obtain the reset state from a reset state monitoring module, wherein the reset state monitoring module is used to monitor the reset state of the command response subsystem in real time, the reset state monitoring module is deployed in the reset protection device, and the reset state monitoring module is connected to the command response subsystem.

[0098] In an exemplary embodiment, the above-mentioned device also includes: a first reading module, which is used to read the system number of the command response subsystem from the request cache table before responding to the request command when it is determined that the number of request commands included in the request cache table is greater than a preset number; a first determination module, which is used to determine the number of request commands to be responded to by the command response subsystem based on the system number of the command response subsystem; and a first comparison module, which is used to compare the number of request commands to be responded to by the command response subsystem with the preset number to obtain a comparison result.

[0099] In an exemplary embodiment, the above-mentioned device also includes: a first ending module, which is used to compare the number of request commands to be responded to by the command response subsystem with the preset number, and before obtaining the comparison result, if the number of request commands to be responded to by the command response subsystem is 0, end the command response subsystem's response to the command request subsystem.

[0100] In an exemplary embodiment, the first response module 1006 includes: a first shutting down module, used to shut down the blocking function of the blocking module when it is determined that the number of request commands included in the request cache table is greater than a preset number, wherein the blocking module is used to block the proxy module from responding to the request command, the proxy module is deployed in the response parsing module, the response parsing module is deployed in the reset protection device, and the response parsing module is used to respond to the request command of the command request subsystem on behalf of the command response subsystem when the reset state of the command response subsystem is in a lost state and the command request subsystem has not entered an abnormal power-off protection state; a second reading module, used to read the request command from the request cache table; a second determining module, used to compare the system number included in the request command with the system number of the command response subsystem When the numbers match, determine the command type of the request command; a first deletion module, used to delete the request command from the request cache table when it is determined from the command type that the request command is a write data command; a second response module, used to respond to the request command through the answering module when the request command is a read data command, wherein after the request command is responded to through the answering module, allow the response parsing module to send a third response command to the command response subsystem, the third response command is a command generated by the answering module in response to the request command, the third response command includes the system number of the command response subsystem, and the third response command is used to notify the command request subsystem that the reset state of the command response subsystem is in a lost state, and the answering module has responded to the request command.

[0101] In an exemplary embodiment, the above-mentioned device also includes: a first monitoring module, which is used to monitor the duration of time that the command response subsystem is in a lost state after the proxy module responds to the request command when the request command is a read data command; a second triggering module, which is used to trigger the abnormal power-off protection mode of the command response subsystem and control the proxy module to stop responding to the request command when the duration of time that the command response subsystem is in the lost state is greater than a preset duration.

[0102] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0103] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0104] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0105] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0106] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0107] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0108] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0109] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.

[0110] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0111] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0112] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A command processing method, characterized in that: Applied to a reset protection device, the reset protection device is deployed in a system on chip, the reset protection device is respectively connected to a command request subsystem and a command response subsystem in the system on chip, and the method includes: In the process of the command request subsystem accessing the command response subsystem, acquiring the reset state of the command response subsystem, wherein the command request subsystem is used to send a request command to the command response subsystem, the command response subsystem is used to respond to the request command, and the reset state is used to indicate whether the system configuration of the command response subsystem has been reset; In the case where it is determined from the reset state that the command response subsystem is in a lost state, parsing a request cache table, wherein the lost state is used to indicate that an abnormality occurs in the access of the command request subsystem to the command response subsystem, and the request cache table is used to cache the request command sent by the command request subsystem; In case it is determined that the number of the request commands included in the request cache table is greater than a preset number, respond to the request command, wherein the preset number is an integer greater than or equal to 0.

2. The method according to claim 1, characterized in that In the process of the command request subsystem accessing the command response subsystem, before obtaining the reset state of the command response subsystem, the method further includes: Converting the format of the first request command sent by the command request subsystem to obtain a second request command, wherein the second request command includes the first request command and the system number of the command response subsystem; caching the second request command and the count identifier of the second request command into the request cache table, wherein the request cache table is set in the reset protection device; When the command response subsystem responds to the second request command, instructing the command response subsystem to return a first response command to the command request subsystem; Converting the first response command into a format to obtain a second response command, wherein the second response command includes a system number of the command response subsystem and the first response command; The second response command and the count identifier of the second response command are cached in a response cache table, wherein the response cache table is set in the reset protection device.

3. The method according to claim 1, characterized in that In the process of the command request subsystem accessing the command response subsystem, obtaining the reset state of the command response subsystem includes: The reset state is obtained from a reset state monitoring module, wherein the reset state monitoring module is used to monitor the reset state of the command response subsystem in real time, the reset state monitoring module is deployed in the reset protection device, and the reset state monitoring module is connected to the command response subsystem.

4. The method according to claim 1, characterized in that: In the case where it is determined that the number of the request commands included in the request cache table is greater than a preset number, before responding to the request command, the method further includes: Read the system number of the command response subsystem from the request cache table; The number of request commands to be responded to by the command response subsystem is determined based on the system number of the command response subsystem; and the number of request commands to be responded to by the command response subsystem is compared with the preset number to obtain a comparison result.

5. The method according to claim 4, characterized in that Before comparing the number of request commands to be responded to by the command response subsystem with the preset number and obtaining a comparison result, the method further includes: When the number of request commands to be responded to by the command response subsystem is 0, the command response subsystem ends its response to the command request subsystem.

6. The method according to claim 1, characterized in that In the case where it is determined that the number of the request commands included in the request cache table is greater than a preset number, responding to the request command includes: In the case where it is determined that the number of the request commands included in the request cache table is greater than a preset number, the blocking function of the blocking module is turned off, wherein the blocking module is used to block the proxy module from responding to the request command, the proxy module is deployed in the response parsing module, the response parsing module is deployed in the reset protection device, and the response parsing module is used to replace the command response subsystem to respond to the request command of the command request subsystem when the reset state of the command response subsystem is in a lost state and the command request subsystem has not entered an abnormal power-off protection state; Read the request command from the request cache table; In a case where the system number included in the request command matches the system number of the command response subsystem, determining the command type of the request command; In the case where it is determined from the command type that the request command is a write data command, deleting the request command from the request cache table; In the case that the request command is a read data command, the request command is responded to through the answering module, wherein, after the request command is responded to through the answering module, the response parsing module is allowed to send a third response command to the command response subsystem, the third response command is a command generated by the answering module in response to the request command, the third response command includes the system number of the command response subsystem, and the third response command is used to notify the command request subsystem that the reset state of the command response subsystem is in a lost state, and the answering module has responded to the request command.

7. The method according to claim 6, characterized in that In the case where the request command is a read data command, after the answering module responds to the request command, the method further includes: monitoring the length of time the command response subsystem is in a lost state; When the duration of the command response subsystem being in the lost state is longer than a preset duration, the abnormal power-off protection mode of the command response subsystem is triggered, and the answering module is controlled to stop responding to the request command.

8. A command processing device, characterized in that: Applied to a reset protection device, the reset protection device is deployed in a system on chip, the reset protection device is respectively connected to a command request subsystem and a command response subsystem in the system on chip, and the device comprises: A first acquisition module is used to acquire a reset state of the command response subsystem during the process of the command request subsystem accessing the command response subsystem, wherein the command request subsystem is used to send a request command to the command response subsystem, and the command response subsystem is used to respond to the request command, and the reset state is used to indicate whether the system configuration of the command response subsystem has been reset; A first parsing module is used to parse a request cache table when it is determined from the reset state that the command response subsystem is in a lost state, wherein the lost state is used to indicate that an abnormality occurs in the access of the command request subsystem to the command response subsystem, and the request cache table is used to cache the request command sent by the command request subsystem; The first response module is used to respond to the request command when it is determined that the number of the request commands included in the request cache table is greater than a preset number, wherein the preset number is an integer greater than or equal to 0.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.