Reset processing method and system based on multiple reset sources, electronic equipment and storage medium
By introducing a reset state machine and a wheel scheduling module into the PCIe switch, the reset signal of multiple reset sources is solved, and the reliability and stability of the system is improved.
Patent Information
- Application Number
- CN202510360744.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-26
AI Technical Summary
The existing PCIe switch design lacks flexibility in reset signal processing and cannot selectively respond to multiple reset requests according to different scenarios, resulting in system flexibility, reliability and stability issues.
A reset processing method based on multiple reset sources is proposed. Reset signals from different reset sources are received and latched by the reset state machine, and the reset application is generated and sent to the rotary scheduling module for scheduling, ensuring the accurate capture and processing of each reset request.
The orderly processing of reset signals of multiple reset sources is realized, which improves the reliability and stability of the system, and can selectively respond to multiple reset requests according to different scenarios.
Smart Images

Figure CN119882968A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer science, and in particular to a reset processing method, system, electronic device and storage medium based on multiple reset sources. Background Art
[0002] The PCIe (peripheral component interconnect express) system is mainly used to expand the data throughput of the computer system bus and improve the communication speed of devices. The architecture of the PCIe system generally includes RC (root complex), Switch, EP (endpoint), etc.
[0003] In existing PCIe switch designs, the processing of reset signals is relatively simple and lacks flexibility. Specifically, traditional PCIe switches can only support a single type of reset source, which means they cannot selectively respond to multiple reset requests according to the needs of different scenarios.
[0004] This limitation not only restricts the flexibility of the PCIe system, but can also cause reliability and stability issues during the reset process.
[0005] Therefore, it is necessary to propose a reset processing method based on multiple reset sources to solve at least one of the above technical problems. Summary of the invention
[0006] The embodiments of the present disclosure provide a reset processing method, system, electronic device and storage medium based on multiple reset sources.
[0007] In a first aspect, the present disclosure provides a reset processing method based on multiple reset sources, comprising: The reset state machine receives a reset signal from at least one reset source and latches each of the reset signals; The reset state machine generates a reset request corresponding to each reset source according to the reset signal and reset type of each reset source, and sends each reset request to the round-robin scheduling module; The round-robin scheduling module receives each of the reset applications, performs round-robin scheduling on each of the reset applications, generates a reset scheduling response signal for each of the reset applications, and sends each of the reset scheduling response signals to the reset state machine; The reset state machine receives each of the reset scheduling response signals, generates a reset release request for each of the reset sources according to each of the reset scheduling response signals and the reset type of each of the reset sources, and sends each of the reset release requests to the round-robin scheduling module; The round-robin scheduling module receives each of the reset release applications, performs round-robin scheduling on each of the reset release applications, generates a reset release scheduling response signal corresponding to each of the reset release applications, and sends each of the reset release scheduling response signals to the reset state machine; The reset state machine receives each of the reset release scheduling response signals, clears the reset application of each of the reset sources and unlocks the reset signal according to each of the reset release scheduling response signals.
[0008] In some optional implementations, after the round-robin scheduling module receives each of the reset applications, the method further includes: The round-robin scheduling module generates a physical layer reset signal of each reset source according to each reset application and a linkage physical layer reset control signal, and sends each physical layer reset signal to a physical layer module; The physical layer module receives each of the physical layer reset signals, and resets the physical layer of the corresponding reset source according to each of the physical layer reset signals.
[0009] In some optional implementations, after the round-robin scheduling module receives each of the reset release applications, the method further includes: The round-robin scheduling module generates a physical layer reset release signal of each reset source according to each reset release application and a linkage physical layer reset release control signal, and sends each physical layer reset release signal to a physical layer module; The physical layer module receives each of the physical layer reset release signals, and resets and releases the physical layer of the corresponding reset source according to each of the physical layer reset release signals.
[0010] In some optional implementations, the reset state machine generates a reset request corresponding to each of the reset sources according to the reset signal and reset type of each of the reset sources, including: The reset state machine updates a reset source mapping table according to the reset signal and the reset type of each reset source and generates a reset port vector of each reset source; The reset state machine generates the reset request of each reset source according to the updated reset source mapping table and each reset port vector, wherein the reset request includes the reset port vector of the reset source.
[0011] In some optional implementations, the reset type of the reset source includes basic reset and hot reset.
[0012] In some optional implementations, the reset state machine generates a reset port vector of each reset source according to the reset signal and the reset type of each reset source, including: The reset state machine generates a basic reset port vector according to the reset signal of the reset source and the basic reset; The reset state machine generates a warm reset port vector according to the reset signal of the reset source and the warm reset.
[0013] In some optional implementations, when the basic reset and the hot reset conflict, the reset state machine sends each reset request to the round-robin scheduling module, including: The reset state machine generates a reset request corresponding to each of the reset sources according to a reset type with a higher priority among the basic reset and the hot reset and a reset signal of each of the reset sources corresponding to the type.
[0014] In some optional implementations, the reset state machine clears the reset application of each reset source and unlocks the reset signal according to each reset release scheduling response signal, including: The reset state machine clears the reset application of each reset source according to each reset release scheduling response signal, and after the reset state machine clears the reset application corresponding to all the reset sources, the reset state machine generates a reset completion mapping table; The reset state machine unlocks the reset signal of each of the reset sources according to the reset completion mapping table.
[0015] In a second aspect, the present disclosure provides a reset processing system based on multiple reset sources, comprising: A reset state machine, configured to receive a reset signal from at least one reset source and latch each of the reset signals; The reset state machine is further used to generate a reset request for each reset source according to the reset signal and reset type corresponding to each reset source, and send each reset request to the round-robin scheduling module; The round-robin scheduling module is used to receive each of the reset applications, perform round-robin scheduling on each of the reset applications, generate a reset scheduling response signal for each of the reset applications, and send each of the reset scheduling response signals to the reset state machine; The reset state machine is further configured to receive each of the reset scheduling response signals, generate a reset release application for each of the reset sources according to each of the reset scheduling response signals and the reset type of each of the reset sources, and send each of the reset release applications to the round-robin scheduling module; The round-robin scheduling module is further used to receive each of the reset release applications, perform round-robin scheduling on each of the reset release applications, generate a reset release scheduling response signal corresponding to each of the reset release applications, and send each of the reset release scheduling response signals to the reset state machine; The reset state machine is further used to clear the reset application corresponding to each reset source and unlock the reset signal according to each reset release scheduling response signal.
[0016] In a third aspect, the present disclosure provides an electronic device, including: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in the implementation manner of the first aspect of the present disclosure.
[0017] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by one or more processors, implements the method described in the implementation manner of the first aspect of the present disclosure.
[0018] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program / instructions, which, when executed by a processor, implement the method described in the implementation manner of the first aspect of the present disclosure.
[0019] The embodiments of the present disclosure provide a reset processing method, system, electronic device and storage medium based on multiple reset sources, wherein a reset state machine receives a reset signal of at least one reset source and latches each reset signal; the reset state machine generates a reset application corresponding to each reset source according to the reset signal and reset type of each reset source, and sends each reset application to a round-robin scheduling module; the round-robin scheduling module receives each reset application, schedules each reset application, generates a reset scheduling response signal for each reset application, and sends each reset scheduling response signal to the reset state machine; the reset state machine receives each reset scheduling response signal, generates a reset release application for each reset source according to each reset scheduling response signal and the reset type of each reset source, and sends each reset release application to the round-robin scheduling module; the round-robin scheduling module receives each reset release application, schedules each reset release application, generates a reset release scheduling response signal corresponding to each reset release application, and sends each reset release scheduling response signal to the reset state machine; the reset state machine clears the reset application of each reset source and unlocks the reset signal according to each reset release scheduling response signal. The present invention receives and latches reset signals from different reset sources through a reset state machine, ensuring that each reset request can be accurately captured and processed, and then sends the reset application corresponding to each reset source to the round-robin scheduling module for scheduling, thereby realizing orderly processing of reset signals of multiple reset sources. Then, after the reset state machine receives the reset scheduling response signal, it will generate a reset release application and send it to the round-robin scheduling module again. The round-robin scheduling module will schedule these reset release applications and generate a reset release scheduling response signal to send to the reset state machine. Finally, the reset state machine will clear the corresponding reset application according to the reset release scheduling response signal and unlock the corresponding reset signal, thereby realizing selective response to multiple reset requests according to the needs in different scenarios, and can process multiple reset requests in an orderly and fair manner, thereby improving the reliability and stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Other features, objects and advantages of the present disclosure will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. In the drawings: Figure 1 is a system architecture diagram of an embodiment of a reset processing system based on multiple reset sources according to the present disclosure; Figure 2 is a flowchart of an embodiment of a reset processing method based on multiple reset sources according to the present disclosure; Figure 3 It is a structural diagram of an embodiment of a reset processing system based on multiple reset sources according to the present disclosure. DETAILED DESCRIPTION
[0021] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0022] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0023] Figure 1 An exemplary system architecture diagram 100 is shown to which embodiments of the reset processing method, apparatus, terminal device, and storage medium based on multiple reset sources of the present disclosure can be applied.
[0024] like Figure 1 As shown, the system architecture diagram 100 may include a reset state machine 101 , a round-robin scheduling module 102 and a physical layer module 103 .
[0025] The reset state machine 101 may be used to receive and process reset signals from multiple reset sources, latch each reset signal, and generate corresponding reset applications and reset release applications according to the reset type of the reset source.
[0026] The round-robin scheduling module 102 may be used to perform round-robin scheduling on reset applications, generate corresponding scheduling response signals, and the like.
[0027] The physical layer module 103 may be used to generate a physical layer reset signal, etc.
[0028] The reset state machine 101 , the round-robin scheduling module 102 , and the physical layer module 103 may communicate with each other via a PCIe link.
[0029] Through the cooperation of the reset state machine 101, the round-robin scheduling module 102 and the physical layer module 103, the latching, scheduling and releasing of the reset signal can be completed.
[0030] In some cases, the reset processing method based on multiple reset sources provided by the present disclosure can be jointly executed by the reset state machine 101 and the round-robin scheduling module 102. For example, the step of "receiving a reset signal from at least one reset source and latching each of the reset signals" can be executed by the reset state machine 101, and the step of "receiving each of the reset applications, scheduling each of the reset applications, generating a reset scheduling response signal corresponding to each of the reset applications, and sending each of the reset scheduling response signals to the reset state machine" can be executed by the round-robin scheduling module 102.
[0031] It should be understood that Figure 1The number of reset state machines 101, round-robin scheduling modules 102 and physical layer modules 103 in the embodiment is only for illustration. Any number of reset state machines 101, round-robin scheduling modules 102 and physical layer modules 103 may be provided according to implementation requirements.
[0032] Continue to refer Figure 2 , Figure 2 A flowchart 200 is shown of an embodiment of a reset processing method based on multiple reset sources according to the present disclosure. Figure 2 The reset processing method based on multiple reset sources shown can be applied to Figure 1 The reset state machine and round-robin scheduling module shown in . The flowchart 200 may include the following steps: Step 201: The reset state machine receives a reset signal from at least one reset source and latches each reset signal.
[0033] In this embodiment, the reset state machine is a finite state machine for managing and controlling reset operations in an electronic system or a computer system.
[0034] In a PCIe system, a reset source refers to the specific reason or source that triggers a reset operation on a device or the entire system.
[0035] In some optional embodiments, the reset source may include PERST# reset (low-level valid PCIe reset signal), upstream port hot reset, upstream port secondary bus reset, downstream port secondary bus reset, downstream port downstream link reset, virtual switch basic reset, non-transparent bridge link port reset, etc., which are not specifically limited here.
[0036] The upstream port hot reset may refer to a local reset mechanism for resetting an upstream port connected to a root complex.
[0037] The upstream port secondary bus reset may refer to resetting all devices on the secondary bus connected to the upstream port.
[0038] The downstream port secondary bus reset may refer to resetting all devices on the secondary bus connected to the downstream port.
[0039] The downstream port downstream link reset may refer to resetting all devices on the link connected to the downstream port.
[0040] The virtual switch basic reset may refer to resetting the basic part of the virtual switch.
[0041] The non-transparent bridge link port resetting may refer to resetting a specific link port of the non-transparent bridge.
[0042] A reset signal can be sent by a reset source. It is an electrical signal used to initialize or reinitialize a hardware device, circuit, or system. It is usually triggered at system startup or when errors and failures are detected to ensure that the system can return to a known, stable state.
[0043] The reset state machine latches each reset signal after receiving a reset signal sent by at least one reset source.
[0044] In this embodiment, there may be multiple reset sources that need to be reset at the same time. For example, the reset state machine may receive reset signals of upstream port hot reset and downstream port secondary bus reset, and latch the reset signals of upstream port hot reset and downstream port secondary bus reset.
[0045] The reset signal may include a reset source identifier of the reset source, and each reset source has a unique reset source identifier for identifying the identity of each reset source.
[0046] Latching refers to saving the state of the reset signal. Even if the reset signal itself disappears or changes later, the reset state machine can remember and process the reset signal, which helps to accurately manage and respond to different reset requests in complex systems.
[0047] Step 202: The reset state machine generates a reset request corresponding to each reset source according to the reset signal and reset type of each reset source, and sends each reset request to the round-robin scheduling module.
[0048] In some optional implementations, each reset source corresponds to a reset type, and the corresponding relationship between each reset source and the reset type can be preset and stored.
[0049] The reset state machine can identify the reset identifier of the reset source through the reset signal, determine the reset source corresponding to each reset signal, and generate a reset application corresponding to each reset source through the correspondence between the reset source and the reset type, and send each reset application to the round-robin scheduling module.
[0050] Four types of reset are defined in the PCIe system: cold reset, warm reset, hot reset, and functional layer reset.
[0051] Among them, cold reset and warm reset are also called basic reset. Basic reset is automatically handled by hardware, which will reset the devices on the entire PCIe system, initialize all hardware logic related to the reset state machine, port status, and configuration registers in the configuration space, etc.
[0052] Hot reset is a reset performed by sending the TS1 (Training Sequence 1) ordered set through the PCIe link layer protocol. It is used to reset a single PCIe device or link without affecting other devices or links.
[0053] Function-level resets are triggered by writing specific values to the device's configuration space registers, allowing a single PCIe function to be reset without affecting other functions of the device.
[0054] The reset type of the reset source may include basic reset and warm reset.
[0055] For example, PERST# reset and virtual switch basic reset may belong to basic reset, and upstream port hot reset, upstream port secondary bus reset, downstream port secondary bus reset, downstream port downstream link reset and non-transparent bridge link port reset may belong to hot reset.
[0056] In some optional implementations, the reset type of the reset source also includes a function layer reset, and the function layer reset can directly locate the target function through a function identifier to achieve the reset.
[0057] For basic reset and hot reset, the reset state machine generates a reset application corresponding to the basic reset of the virtual switch according to the reset signal and reset type of the basic reset of the virtual switch, the reset state machine generates a reset application corresponding to the upstream port hot reset according to the reset signal and reset type of the upstream port hot reset, and the reset state machine generates a reset application corresponding to the downstream port secondary bus reset according to the reset signal and reset type of the downstream port secondary bus reset, and sends each reset application to the round-robin scheduling module.
[0058] In some optional embodiments, the reset state machine generates a reset request corresponding to each reset source according to the reset signal and reset type of each reset source. Specifically, the reset state machine can update the reset source mapping table and the reset port vector corresponding to each reset source according to the reset signal and reset type corresponding to each reset source, and then generate a reset request for each reset source according to the updated reset source mapping table and reset port vector, and send each reset request to the round-robin scheduling module, wherein the reset request includes the reset port vector of the reset source.
[0059] Here, the reset source mapping table may be used to indicate the correspondence between the reset sources and the reset bits. In the reset mapping, each reset source corresponds to one bit.
[0060] For example, if there are 7 reset sources, the reset source mapping table may include 7 bits, wherein each bit corresponds to a reset source, and the initial state of the reset mapping table may be that each bit is set to 0, indicating that no reset source triggers a reset.
[0061] When the reset state machine receives a reset signal, the reset source that sends the reset signal can be determined based on the reset signals of each reset source to update the reset source mapping table. That is, the bit corresponding to the reset source that sends the reset signal can be set to 1 in the reset source mapping table to indicate that the reset source is to trigger a reset.
[0062] For example, the initial state of the reset mapping table may be 0000000, wherein the virtual switch basic reset, the upstream port hot reset, and the downstream port secondary bus reset correspond to the 1st, 2nd, and 4th bits of the reset mapping, respectively.
[0063] Then, the reset state machine may update the reset mapping table, and the updated reset source mapping table may be: 1101000.
[0064] The reset port vector can be used to indicate the port that needs to be reset corresponding to the reset source, that is, the reset port vector can be used to indicate which ports in the PCIe system need to be reset. The number of bits of the reset port vector depends on the number of ports in the PCIe system.
[0065] For example, there are n ports in the PCIe system, so the reset port vector can be an n-dimensional vector, in which each component corresponds to a port in the PCIe system, and if the port needs to be reset, the component corresponding to the port can be set to 1; if the port does not need to be reset, the component corresponding to the port can be set to 0.
[0066] For example, if there are 8 ports in the PCIe system, the reset port vector will be an 8-dimensional vector.
[0067] When ports 1, 3, and 5 need to be reset, the reset port vector can be represented as {01010100}, numbered from right to left, with the lowest bit being the first port.
[0068] It is understandable that the ports that need to be reset by each reset source are different, and the reset state machine can generate a reset port vector of each reset source according to the reset signal of each reset source.
[0069] In some optional implementations, according to the reset type of the reset source, the reset state machine may generate a reset port vector corresponding to the reset type.
[0070] In some optional implementations, the reset state machine generates a basic reset port vector according to a reset signal of a reset source and a basic reset. The reset state machine generates a hot reset port vector according to a reset signal of a reset source and a hot reset.
[0071] In this way, different reset port vectors are generated according to the reset type, which can clearly divide the scope of action of different reset types and facilitate management and maintenance by system administrators.
[0072] In this embodiment, the reset signal of the reset source also includes a port that needs to be reset by the reset source.
[0073] The basic reset vector may be used to indicate which ports need to be basic reset, and the warm reset port vector may be used to indicate which ports need to be warm reset.
[0074] The reset state machine generates a reset request for each reset source according to the reset source mapping table and the generated basic reset port vector and / or hot reset port vector, and sends each reset request to the round-robin scheduling module, wherein the reset request includes the reset port vector of the reset source.
[0075] In some optional embodiments, when a conflict occurs between a port basic reset and a hot reset, the reset state machine sends each reset request to a round-robin scheduling module. Specifically, the reset state machine generates a reset request corresponding to each reset source based on a reset type with a higher priority among the port basic reset and the hot reset and the reset signal of each reset source corresponding to the type.
[0076] Here, the priority of the basic port reset can be higher than the priority of the hot reset port. Therefore, when there are port basic reset and hot reset at the same time, the reset state machine can only send the reset application of the reset source corresponding to the basic reset with a higher priority to the round-robin scheduling module, and then generate the reset application corresponding to each reset source according to the reset signal of each reset source corresponding to the basic reset.
[0077] Step 203 , the round-robin scheduling module receives each reset application, performs round-robin scheduling on each reset application, generates a reset scheduling response signal corresponding to each reset application, and sends each reset scheduling response signal to the reset state machine.
[0078] Here, the round-robin scheduling module may include a task scheduling algorithm. The round-robin scheduling module may cyclically allocate resources to each reset application in a certain order to achieve the reset of each reset source.
[0079] The round-robin scheduling module can allocate a fixed time slice for each reset request. During this period, the CPU will be completely assigned to the reset request to perform the reset of the reset source. When the time slice is used up, the CPU will be assigned to the next reset request to perform the reset of the next reset source, and so on, forming a cycle. All waiting reset requests will be placed in the ready queue and scheduled in round-robin mode according to the first-in-first-out principle.
[0080] Here, the time slice of the round-robin scheduling module is configured as needed.
[0081] The round-robin scheduling module receives each reset application, performs round-robin scheduling on each reset application, generates a port reset signal to reset the port required to be reset by each reset source, and after the reset is completed, generates a reset scheduling response signal for each reset application, and sends each reset scheduling response signal to the reset state machine.
[0082] The reset scheduling response signal can be used to confirm to the reset state machine that the reset application has been processed by the round-robin scheduling module, which means that the round-robin scheduling module has arranged the reset operation of the reset source and the reset state machine can continue with the next step of operation.
[0083] Step 204 , the reset state machine receives each reset scheduling response signal, generates a reset release request for each reset source according to each reset scheduling response signal and the reset type corresponding to each reset source, and sends each reset release request to the round-robin scheduling module.
[0084] Here, the reset release request can be used to inform the round-robin scheduling module that the reset request can be released. Its main function is to restore the normal working state of the system and ensure that each port in the PCIe system safely exits from the reset state so that normal operation can be resumed.
[0085] Here, if it is a basic reset, you can wait for the reset source to fail and generate a reset release request for the reset source. If it is a hot reset, you can directly generate a reset release request for the reset source.
[0086] Without a proper reset release mechanism, different reset operations may conflict with each other, causing system instability. By applying for reset release, the reset and startup sequence of each reset source can be coordinated to avoid conflicts.
[0087] Through an orderly reset and reset release process, the overall reliability of the system can be improved.
[0088] Step 205 , the round-robin scheduling module receives each reset release application, performs round-robin scheduling on each reset release application, generates a reset release scheduling response signal corresponding to each reset release application, and sends each reset release scheduling response signal to the reset state machine.
[0089] Similarly, after receiving each reset release application, the round-robin scheduling module may cyclically allocate resources to each reset release application in a certain order to implement reset release of each reset source.
[0090] The round-robin scheduling module can allocate a fixed time slice for each reset release request. During this period, the CPU will be completely assigned to the reset release request to execute the reset release of the reset source. When the time slice is used up, the CPU will be assigned to the next reset release request to execute the reset release request of the next reset source, and so on, forming a cycle. All waiting reset release requests will be placed in the ready queue and scheduled in a round-robin manner according to the first-in-first-out principle.
[0091] The round-robin scheduling module receives each reset release application, performs round-robin scheduling on each reset release application, generates a port reset release signal to reset and release the ports reset by each reset source, and after the reset release is completed, generates a reset release scheduling response signal corresponding to each reset release application, and sends each reset release scheduling response signal to the reset state machine.
[0092] Step 206 , the reset state machine receives each reset release scheduling response signal, clears the reset application of each reset source and unlocks the reset signal according to each reset release scheduling response signal.
[0093] Here, when the reset state machine receives the reset release scheduling response signal from the reset source, it means that the corresponding ports of the reset source have been allowed to recover from the reset state. At this time, the reset state machine will update its internal status record, remove or mark the reset application of the reset source as completed or invalid, so as to clear the reset requests corresponding to each reset source and unlock the latched reset signal. The corresponding ports of the reset source can be restored to normal working state.
[0094] In some optional embodiments, the reset state machine clears the reset request corresponding to each reset source and unlocks the reset signal according to each reset release scheduling response signal. Specifically, the reset state machine can clear the reset application corresponding to each reset source according to each reset release scheduling response signal, and after the reset state machine clears the reset application corresponding to all reset sources, the reset state machine generates a reset completion mapping table. Further, the reset state machine unlocks the reset signal of each reset source according to the reset completion mapping table.
[0095] Here, the reset completion mapping table may be used to indicate which reset source has completed the reset. In the reset completion mapping, each reset source corresponds to a bit.
[0096] For example, if there are 7 reset sources in the PCIe system, the reset completion map may include 7 bits, wherein each bit corresponds to a reset source.
[0097] In some optional implementations, the reset completion mapping table may refer to a state after the reset source mapping table is reset after the reset operation of each reset source is completed.
[0098] For example, the initial state of the reset source mapping table may be 0000000, where the virtual switch basic reset, upstream port hot reset, and downstream port secondary bus reset correspond to the 1st, 2nd, and 4th bits of the reset mapping, respectively. Then, the reset state machine may generate a reset source mapping table 1101000 according to the reset signals corresponding to each reset source.
[0099] After the reset state machine clears the reset requests corresponding to all reset sources, the reset state machine generates a reset completion mapping table, which may refer to restoring the reset source mapping table 1101000 to the initial state 0000000 of the reset source mapping table to indicate that each reset source has completed the reset.
[0100] In some optional implementations, the reset completion mapping table may also be an independent mapping table.
[0101] For example, the initial state of the reset completion mapping table may be 0000000, wherein the upstream port hot reset and the downstream port secondary bus reset require a reset, and correspond to the 2nd and 4th bits of the reset completion mapping table respectively.
[0102] Then, after the upstream port hot reset and the downstream port secondary bus reset are completed, a reset completion mapping table 0101000 may be generated to indicate that the upstream port hot reset and the downstream port secondary bus reset have been completed.
[0103] In some optional implementations, after the round-robin scheduling module receives each of the reset applications, step 207 and step 208 may also be included.
[0104] Step 207: The round-robin scheduling module generates a physical layer reset signal of each reset source according to each reset application and the linked physical layer reset control signal, and sends each physical layer reset signal to the physical layer module.
[0105] Here, the linked physical layer reset control signal may be used to indicate which physical layers need to be reset.
[0106] Here, the round-robin scheduling module can determine which physical layers need to be reset under the reset source according to the reset application of each reset source and the linkage physical layer reset control signal, generate a corresponding physical layer reset signal, and then send the physical layer reset signal to the physical layer module.
[0107] Step 208: The physical layer module receives each physical layer reset signal, and resets the physical layer of the corresponding reset source according to each physical layer reset signal.
[0108] After receiving the physical layer reset signal sent by the round-robin scheduling module, the physical layer module processes the physical layer reset signal received from the round-robin scheduling module. Each physical layer reset signal corresponds to a specific reset source, that is, the hardware that needs to be reset under this reset source. The physical layer module physical layer reset signal performs the corresponding reset operation to ensure that each physical layer that needs to be reset can correctly enter the initial state.
[0109] In some optional implementations, after the round-robin scheduling module receives each reset release application, step 209 and step 210 may also be included.
[0110] Step 209: The round-robin scheduling module generates a physical layer reset release signal of each reset source according to each reset release application and the linked physical layer reset release control signal, and sends each physical layer reset release signal to the physical layer module.
[0111] Here, the linked physical layer reset control release signal may be used to indicate which physical layers need to be reset and released.
[0112] The round-robin scheduling module can determine which physical layers need to be reset under the reset source according to the reset application of each reset source and the linkage physical layer reset control signal, generate corresponding physical layer reset signals, and then send the physical layer reset signals to the physical layer module.
[0113] Here, after receiving the reset release request, the round-robin scheduling module can determine which physical layers need to be reset and released under the reset source according to the reset release application and the linkage physical layer reset release control signal, and generate the corresponding physical layer reset release signal. Then, the physical layer reset release signal is sent to the physical layer module.
[0114] Step 210: The physical layer module receives each physical layer reset release signal, and resets and releases the physical layer of the corresponding reset source according to each physical layer reset release signal.
[0115] After receiving the reset release signals of each physical layer, the physical layer module processes the reset release signals of each physical layer received from the round-robin scheduling module and performs the corresponding reset release operation, so that the corresponding physical layer will return to the normal operation mode from the reset state, allowing the previously reset physical layer to resume work.
[0116] The following describes each step in combination with the state of the reset state machine: The reset state machine can receive a reset signal from at least one reset source, latch each reset signal, and enter a reset application state.
[0117] The reset state machine generates a reset application for each reset source according to the reset signal and reset type corresponding to each reset source in the reset application state, and sends each reset application to the round-robin scheduling module.
[0118] The round-robin scheduling module receives each reset application, performs round-robin scheduling on each reset application, generates a reset scheduling response signal corresponding to each reset application, and sends each reset scheduling response signal to the reset state machine.
[0119] The reset state machine receives each reset scheduling response signal in the reset application state. When all reset applications are fully responded to, the reset state machine enters the reset release waiting state. In the reset waiting state, the reset state machine generates a reset release application for each reset source according to each reset scheduling response signal and the reset type corresponding to each reset source, and sends each reset release application to the round-robin scheduling module.
[0120] The round-robin scheduling module receives each reset release application, performs round-robin scheduling on each reset release application, generates a reset release scheduling response signal corresponding to each reset release application, and sends each reset release scheduling response signal to the reset state machine.
[0121] The reset state machine receives each reset release scheduling response signal in the reset release state. When all reset release applications are responded to, the reset state machine enters the reset completion state. In the reset completion state, the reset state machine clears the reset application corresponding to each reset source and unlocks the reset signal according to each reset release scheduling response signal.
[0122] The reset processing method based on multiple reset sources provided by the embodiment of the present disclosure comprises the following steps: a reset state machine receives a reset signal of at least one reset source and latches each reset signal; the reset state machine generates a reset application corresponding to each reset source according to the reset signal and reset type corresponding to each reset source, and sends each reset application to a round-robin scheduling module; the round-robin scheduling module receives each reset application, schedules each reset application, generates a reset scheduling response signal corresponding to each reset application, and sends each reset scheduling response signal to the reset state machine; the reset state machine receives each reset scheduling response signal, generates a reset release application of each reset source according to each reset scheduling response signal and the reset type corresponding to each reset source, and sends each reset release application to the round-robin scheduling module; the round-robin scheduling module receives each reset release application, schedules each reset release application, generates a reset release scheduling response signal corresponding to each reset release application, and sends each reset release scheduling response signal to the reset state machine; the reset state machine clears the reset request corresponding to each reset source and unlocks the reset signal according to each reset release scheduling response signal. The present invention receives and latches reset signals from different reset sources through a reset state machine, ensuring that each reset request can be accurately captured and processed, and then sends the reset application corresponding to each reset source to the round-robin scheduling module for scheduling, thereby realizing orderly processing of reset signals of multiple reset sources. Then, after the reset state machine receives the reset scheduling response signal, it will generate a reset release application and send it to the round-robin scheduling module again. The round-robin scheduling module will schedule these reset release applications and generate a reset release scheduling response signal to send to the reset state machine. Finally, the reset state machine will clear the corresponding reset application according to the reset release scheduling response signal and unlock the corresponding reset signal, thereby realizing selective response to multiple reset requests according to the needs in different scenarios, and can process multiple reset requests in an orderly and fair manner, thereby improving the reliability and stability of the system.
[0123] The present disclosure can be applied to FPGA (Field-Programmable Gate Array), has good performance and simple structure, can be used in one chip, and can also be applied to large-scale chip configuration design, not limited to PCIe switch reset design.
[0124] Further references Figure 3 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a reset processing system based on multiple reset sources. Figure 2 Corresponding to the method embodiment shown, the system may specifically include a reset state machine and a round-robin scheduling module.
[0125] like Figure 3As shown, the reset processing system based on multiple reset sources of this embodiment, the system 300 includes: a reset state machine 301 and a round-robin scheduling module 302, wherein the reset state machine 301 is used to receive a reset signal of at least one reset source and latch each reset signal; the reset state machine 301 is also used to generate a reset application corresponding to each reset source according to the reset signal and reset type of each reset source, and send each reset application to the round-robin scheduling module; the round-robin scheduling module 302 receives each reset application, performs round-robin scheduling on each reset application, generates a reset scheduling response signal of each reset application, and sends each reset scheduling response signal to Reset state machine; the reset state machine 301 is also used to receive each reset scheduling response signal, generate a reset release application for each reset source according to each reset scheduling response signal and the reset type of each reset source, and send each reset release application to the round-robin scheduling module; the round-robin scheduling module 302 is also used to receive each reset release application, perform round-robin scheduling on each reset release application, generate a reset release scheduling response signal corresponding to each reset release application, and send each reset release scheduling response signal to the reset state machine; the reset state machine 301 is also used to clear the reset request of each reset source and unlock the reset signal according to each reset release scheduling response signal.
[0126] In this embodiment, the specific processing of the reset state machine 301 and the round-robin scheduling module 302 and the technical effects thereof can be referred to in Figure 2 The relevant descriptions of steps 201 to 210 in the corresponding embodiment are not repeated here.
[0127] In some optional implementations, after the round-robin scheduling module receives each reset application, the reset processing system based on multiple reset sources of this embodiment further includes a physical layer module 303, and the round-robin scheduling module 302 and the physical layer module 303 can be further configured as follows: The round-robin scheduling module 302 is further used to generate a physical layer reset signal of each reset source according to each reset application and the linkage physical layer reset control signal, and send each physical layer reset signal to the physical layer module; The physical layer module 303 is used to receive each physical layer reset signal, and reset the physical layer of the corresponding reset source according to each physical layer reset signal.
[0128] In some optional implementations, after the round-robin scheduling module receives each reset release application, the round-robin scheduling module 302 and the physical layer module 303 may be further configured as follows: The round-robin scheduling module 302 is further used to generate a physical layer reset release signal of each reset source according to each reset release application and the linkage physical layer reset release control signal, and send each physical layer reset release signal to the physical layer module; The physical layer module 303 is further used to receive each physical layer reset release signal, and reset and release the physical layer of the corresponding reset source according to each physical layer reset release signal.
[0129] In some optional implementations, the reset state machine 301 may be further configured as follows: The reset state machine 301 is further used to update the reset source mapping table according to the reset signal and reset type of each reset source and generate a reset port vector corresponding to each reset source; The reset state machine 301 is further configured to generate a reset request for each reset source according to the updated reset source mapping table and each reset port vector, wherein the reset request includes the reset port vector of the reset source.
[0130] In some optional implementations, the reset type of the reset source includes a basic reset and a warm reset.
[0131] In some optional implementations, the reset state machine 301 may be further configured as follows: The reset state machine 301 is further used to generate a basic reset port vector according to the reset signal of the reset source and the basic reset; The reset state machine 301 is further used to generate a hot reset port vector according to the reset signal of the reset source and the hot reset.
[0132] In some optional implementations, the reset state machine 301 may be further configured as follows: The reset state machine 301 is further used to generate a reset request corresponding to each reset source according to a reset type with a higher priority in the port basic reset and the hot reset and a reset signal of each reset source corresponding to the type.
[0133] In some optional implementations, the reset state machine 301 may be further configured as follows: The reset state machine 301 is further used to clear the reset application of each reset source according to each reset release scheduling response signal, and after the reset state machine clears the reset application corresponding to all reset sources, the reset state machine generates a reset completion map; The reset state machine 301 is further used to unlock the reset signal of each reset source according to the reset completion mapping table according to the reset state machine.
[0134] It should be noted that the implementation details and technical effects of each unit in the reset processing system based on multiple reset sources provided by the embodiments of the present disclosure can be referred to the description of other embodiments in the present disclosure, and will not be repeated here.
[0135] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0136] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0137] The computer readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device implements the following Figure 3 The illustrated embodiment and its optional implementations illustrate a reset processing method based on multiple reset sources.
[0138] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0139] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0140] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, an acquisition unit may also be described as a "unit for acquiring configuration information".
[0141] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
Claims
1. A reset processing method based on multiple reset sources, characterized in that: The method comprises: The reset state machine receives a reset signal from at least one reset source and latches each of the reset signals; The reset state machine generates a reset request corresponding to each reset source according to the reset signal and reset type of each reset source, and sends each reset request to the round-robin scheduling module; The round-robin scheduling module receives each of the reset applications, performs round-robin scheduling on each of the reset applications, generates a reset scheduling response signal for each of the reset applications, and sends each of the reset scheduling response signals to the reset state machine; The reset state machine receives each of the reset scheduling response signals, generates a reset release request for each of the reset sources according to each of the reset scheduling response signals and the reset type of each of the reset sources, and sends each of the reset release requests to the round-robin scheduling module; The round-robin scheduling module receives each of the reset release applications, performs round-robin scheduling on each of the reset release applications, generates a reset release scheduling response signal corresponding to each of the reset release applications, and sends each of the reset release scheduling response signals to the reset state machine; The reset state machine receives each of the reset release scheduling response signals, clears the reset application of each of the reset sources and unlocks the reset signal according to each of the reset release scheduling response signals.
2. The method according to claim 1, characterized in that After the round-robin scheduling module receives each of the reset requests, the method further includes: The round-robin scheduling module generates a physical layer reset signal of each reset source according to each reset application and a linkage physical layer reset control signal, and sends each physical layer reset signal to a physical layer module; The physical layer module receives each of the physical layer reset signals, and resets the physical layer of the corresponding reset source according to each of the physical layer reset signals.
3. The method according to claim 1, characterized in that After the round-robin scheduling module receives each of the reset release applications, the method further includes: The round-robin scheduling module generates a physical layer reset release signal of each reset source according to each reset release application and a linkage physical layer reset release control signal, and sends each physical layer reset release signal to a physical layer module; The physical layer module receives each of the physical layer reset release signals, and resets and releases the physical layer of the corresponding reset source according to each of the physical layer reset release signals.
4. The method according to claim 1, characterized in that: The reset state machine generates a reset request corresponding to each reset source according to the reset signal and reset type of each reset source, including: The reset state machine updates a reset source mapping table according to the reset signal and the reset type of each reset source and generates a reset port vector of each reset source; The reset state machine generates the reset request of each reset source according to the updated reset source mapping table and each reset port vector, wherein the reset request includes the reset port vector of the reset source.
5. The method according to claim 4, characterized in that The reset type of the reset source includes a basic reset and a warm reset.
6. The method according to claim 5, characterized in that The reset state machine generates a reset port vector of each reset source according to the reset signal and the reset type of each reset source, including: The reset state machine generates a basic reset port vector according to the reset signal of the reset source and the basic reset; The reset state machine generates a warm reset port vector according to the reset signal of the reset source and the warm reset.
7. The method according to claim 6, characterized in that When the basic reset and the hot reset conflict, the reset state machine sends each reset request to the round-robin scheduling module, including: The reset state machine generates a reset request corresponding to each of the reset sources according to a reset type with a higher priority among the basic reset and the hot reset and a reset signal of each of the reset sources corresponding to the type.
8. The method according to claim 1, characterized in that The reset state machine clears the reset application of each reset source and unlocks the reset signal according to each reset release scheduling response signal, including: The reset state machine clears the reset application of each reset source according to each reset release scheduling response signal, and after the reset state machine clears the reset application corresponding to all the reset sources, the reset state machine generates a reset completion mapping table; The reset state machine unlocks the reset signal of each of the reset sources according to the reset completion mapping table.
9. A reset processing system based on multiple reset sources, characterized in that: The system comprises: A reset state machine, configured to receive a reset signal from at least one reset source and latch each of the reset signals; The reset state machine is further used to generate a reset request for each reset source according to the reset signal and reset type corresponding to each reset source, and send each reset request to the round-robin scheduling module; The round-robin scheduling module is used to receive each of the reset applications, perform round-robin scheduling on each of the reset applications, generate a reset scheduling response signal for each of the reset applications, and send each of the reset scheduling response signals to the reset state machine; The reset state machine is further configured to receive each of the reset scheduling response signals, generate a reset release application for each of the reset sources according to each of the reset scheduling response signals and the reset type of each of the reset sources, and send each of the reset release applications to the round-robin scheduling module; The round-robin scheduling module is further used to receive each of the reset release applications, perform round-robin scheduling on each of the reset release applications, generate a reset release scheduling response signal corresponding to each of the reset release applications, and send each of the reset release scheduling response signals to the reset state machine; The reset state machine is further used to clear the reset application corresponding to each reset source and unlock the reset signal according to each reset release scheduling response signal.
10. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon, When one or more programs are executed by one or more processors, the one or more processors are caused to implement the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by one or more processors, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product, characterized in that The method comprises a computer program / instruction, which implements the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Universal reset method and system for SoC system, universal reset unit and SoC reset circuit
CN111857306A
Reset structure of SRIO switching chip and reset state monitoring method thereof
CN111880634A
Sequence-adjustable multi-protocol switching chip and reset control method thereof
CN118631767A
Method, system and equipment for resetting multi-core heterogeneous system
CN119149295A
ASIC control system and method
US6289436B1
Cited By
Reset control method and device, electronic equipment, storage medium and computer program product
CN120909406A
Reset control method and device, electronic equipment, storage medium and computer program product
CN120909406B
Reset function arbitration method and device for multi-host system
CN121210350A