On-chip module control method and apparatus, electronic device, and storage medium
By employing a ring topology for module control in the system-on-a-chip, the problem of high device initialization and configuration time in existing technologies is solved, achieving efficient system startup and real-time response, and reducing bus resource waste.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YIHUA TECHNOLOGY (BEIJING) CO LTD
- Filing Date
- 2025-10-29
- Publication Date
- 2026-06-19
AI Technical Summary
In modern system-on-a-chip (SoC) design, the initialization and configuration operations of multiple devices by the main controller in the existing technology are performed serially, which results in a large time consumption, becomes a bottleneck for system startup, and seriously affects the system startup efficiency and real-time response capability.
A ring topology is used for module control. By acquiring access requests from the standard bus interface, the requests are converted into control messages in a preset format and propagated unidirectionally along the ring topology, enabling multiple device agent modules to perform corresponding operations, including writing or reading data, and skipping faulty or bypass devices.
It improves system startup efficiency and real-time response capability, reduces time overhead and bus resource waste, and significantly improves operational efficiency, especially during the initialization of homogeneous devices.
Smart Images

Figure CN121349937B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of module control technology, and in particular to an on-chip module control method, device, electronic device, and storage medium. Background Technology
[0002] In modern System-on-Chip (SoC) design, the number of functional modules (or IP cores) integrated on a single chip is increasing. Efficiently and quickly configuring, controlling, and monitoring the status of these modules is crucial for ensuring overall system performance and startup efficiency.
[0003] Currently, the industry generally adopts a standard bus-based interconnect architecture to achieve communication between the master controller (such as the CPU core) and various slave device modules. In related technologies, when the master controller needs to initialize and configure multiple devices, the operation process is serial and performed one by one. Each independent transaction includes complete steps such as address decoding, bus arbitration, data transmission, and response.
[0004] However, since configuration operations must be performed serially, this process consumes a significant amount of time in complex SoCs containing a large number of homogeneous devices, becoming a bottleneck in system startup and severely restricting system startup efficiency and real-time response capabilities. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide an on-chip module control method, device, electronic device and storage medium, which improves the system startup efficiency and real-time response capability, and reduces time overhead and bus resource waste.
[0006] In a first aspect, embodiments of the present invention provide an on-chip module control method, comprising: acquiring an access request from a standard bus interface; converting the access request into a control message of a preset format; sending the control message to the first device in a ring topology; and controlling the control message to propagate unidirectionally along the ring topology so that multiple device agent modules on the ring topology perform corresponding operations according to the control message.
[0007] In a preferred embodiment of the present invention, the above-mentioned conversion of the access request into a control message of a preset format includes: parsing the access address in the access request; mapping the access address to a target device identifier based on a preset address mapping relationship; generating a control message containing the target device identifier, message type, register address, and data; the message type includes at least one of the following: write message, read message, bypass message, and error message.
[0008] In a preferred embodiment of the present invention, the control message includes a broadcast identifier; when the broadcast identifier is valid, the control message is received and processed by all device agent modules on the ring topology.
[0009] In a preferred embodiment of the present invention, the control message is propagated unidirectionally along the ring topology, including: at each device agent module, determining whether the control message is a local message; if the control message is a local message, performing the operation corresponding to the control message and forwarding the updated control message to the next device; if the control message is not a local message, directly forwarding the control message to the next device.
[0010] In a preferred embodiment of the present invention, the above-mentioned determination of whether the control message is a local message includes: comparing the target device identifier and the local device identifier in the control message; if the target device identifier and the local device identifier match, it is determined to be a local message; if the target device identifier and the local device identifier do not match, it is determined to be a non-local message.
[0011] In a preferred embodiment of the present invention, the above-mentioned operation of performing the corresponding operation according to the control message includes: when the control message is a write message, writing data into the local register; when the control message is a read message, reading data from the local register, filling the read data into the control message, and then forwarding it.
[0012] In a preferred embodiment of the present invention, the method further includes: when a control message is propagating in a ring topology, if the message type of the control message is detected to be error or bypass, the current device processing is skipped and the message is directly forwarded to the next device.
[0013] Secondly, embodiments of the present invention also provide an on-chip module control device, comprising: an access request acquisition module for acquiring access requests from a standard bus interface; an access request conversion module for converting access requests into control messages of a preset format; a control message sending module for sending control messages to the first device in a ring topology; and a control message control module for controlling the control messages to propagate unidirectionally along the ring topology, so that multiple device agent modules on the ring topology perform corresponding operations according to the control messages.
[0014] Thirdly, embodiments of the present invention also provide an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the on-chip module control method of the first aspect described above.
[0015] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to implement the on-chip module control method of the first aspect described above.
[0016] The embodiments of the present invention bring the following beneficial effects:
[0017] This invention provides an on-chip module control method, apparatus, electronic device, and storage medium. By acquiring access requests from a standard bus interface, converting the access requests into control messages of a preset format, and sending the control messages to the first device in a ring topology, the control messages propagate unidirectionally along the ring topology, enabling multiple device proxy modules on the ring topology to execute corresponding operations based on the control messages. This approach improves system startup efficiency and real-time response capabilities while reducing time overhead and bus resource waste.
[0018] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.
[0019] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0020] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0021] Figure 1 A flowchart of an on-chip module control method provided in an embodiment of the present invention;
[0022] Figure 2 A flowchart of another on-chip module control method provided in an embodiment of the present invention;
[0023] Figure 3 This is a schematic diagram of the structure of an on-chip module control device provided in an embodiment of the present invention;
[0024] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] In modern System-on-Chip (SoC) design, the number of functional modules (or IP cores) integrated on a single chip is increasing. Efficiently and quickly configuring, controlling, and monitoring the status of these modules is crucial for ensuring overall system performance and startup efficiency.
[0027] Currently, the industry commonly uses a standard bus-based interconnect architecture to achieve communication between the main controller (such as the CPU core) and various slave device modules. Among them, the tree structure or hierarchical bus structure is the most classic implementation scheme. Specifically, the system usually uses one or more centralized buses (such as AMBA, AHB, or AXI) as the backbone, and then connects to multiple low-speed bus branches through bridging devices (such as AXI-to-APB bridges). Each device is then attached as a slave device to a specific address on these bus branches.
[0028] In related technologies, when the main controller needs to initialize and configure multiple devices, the operation process is serial and performed one by one. The software driver must initiate an independent register write transaction for each device to be configured: first, access the register of device A via the bus, then access the register of device B, and so on, until all devices are configured. Each independent transaction includes complete steps such as address decoding, bus arbitration, data transmission, and response.
[0029] However, this existing technical solution has significant drawbacks. Since configuration operations must be performed serially, the total time consumed is linearly proportional to the number of devices N to be configured, i.e., the time complexity is O(N). In complex SoCs containing a large number of homogeneous devices (e.g., dozens or even hundreds of processing cores, accelerators, or interface controllers), this linear initialization process consumes a significant amount of time, becoming a bottleneck in system startup and severely restricting system startup efficiency and real-time responsiveness. Especially in scenarios where the same configuration parameters need to be written to all homogeneous devices, repeatedly executing almost identical bus operations results in enormous time overhead and wasted bus resources.
[0030] Based on this, the on-chip module control method, apparatus, electronic device, and storage medium provided in this embodiment of the invention can acquire access requests from a standard bus interface, convert the access requests into control messages of a preset format, and send the control messages to the first device in a ring topology. The control messages propagate unidirectionally along the ring topology, enabling multiple device proxy modules on the ring topology to execute corresponding operations based on the control messages. This approach improves system startup efficiency and real-time response capabilities while reducing time overhead and bus resource waste.
[0031] To facilitate understanding of this embodiment, a detailed description of an on-chip module control method disclosed in this embodiment of the invention will be provided first.
[0032] Example 1
[0033] This invention provides an on-chip module control method. Figure 1 This is a flowchart illustrating an on-chip module control method provided in an embodiment of the present invention. Figure 1 As shown, the on-chip module control method may include the following steps:
[0034] Step S101: Obtain an access request from the standard bus interface.
[0035] The main controller (such as a CPU or DMA controller) configures or reads the various modules on the chip through a standard bus protocol.
[0036] The standard bus interface is a common communication protocol interface widely used in chip design, such as AMBA, AHB / APB, AXI, and Wishbone. This ensures compatibility between the embodiments of this application and existing chip architectures. The main controller does not need to use special instructions; it can initiate read and write operations simply like accessing ordinary memory or registers.
[0037] The access request can include the operation type, the target address, and the data to be written (if it is a write operation). The operation type can be, for example, read or write.
[0038] This bus transaction can be received by a dedicated control agent. This agent acts as a bridge between the standard bus and the ring control structure of this embodiment.
[0039] Step S102: Convert the access request into a control message in a preset format.
[0040] The conversion of access requests involves translating standard, address-oriented read and write operations into "data packets" with a specific format that can be transmitted in a ring topology.
[0041] The preset format control message is a message format specifically designed for transmission on a loop, as defined in this application embodiment. It may contain multiple fields, such as DID (Device ID), MID (Message ID), ADDR (Register Address), DATA (Data), TYPE (Type), and BROADCAST (Broadcast Identifier).
[0042] The conversion of access requests is handled by a protocol conversion module within the control agent device. This module parses the bus request and fills the information into the various fields according to a predetermined format, assembling it into a complete control message.
[0043] Specifically, converting an access request into a control message in a preset format may include: parsing the access address in the access request; mapping the access address to a target device identifier based on a preset address mapping relationship; and generating a control message containing the target device identifier, message type, register address, and data.
[0044] The message types include at least one of the following: write message, read message, bypass message, and error message.
[0045] Among them, write message: writes data to a specified register of the target device; read message: reads data from a specified register of the target device; bypass message: a control instruction that tells the device to "ignore this message and forward it directly", which can be used for testing or dynamically skipping certain devices; error message: may be generated by an upstream device, indicating that an error was detected during transmission. Subsequent devices will continue to transmit the error status after receiving it, and eventually report it.
[0046] The control message includes a broadcast identifier, which is a special flag bit in the control message, such as 1 bit, where 1 indicates valid and 0 indicates invalid. When the broadcast identifier is valid, the control message is received and processed by all device agent modules on the ring topology.
[0047] The software can configure the broadcast mode for an operation via a set of control registers in the software interface module of the control agent. When the control agent assembles a message, if it finds that the broadcast mode is enabled, it sets the broadcast flag in the message. All device agent modules on the loop check the broadcast flag when they receive a message. If the flag is valid, the write operation (if it is a write message) will be performed regardless of whether the DID matches.
[0048] For example, during system startup, it is necessary to set a configuration register of all eight homogeneous processor cores to the same value. Traditional methods require eight independent write operations. However, this embodiment only requires a single write operation and setting the broadcast flag. This message propagates through the loop, and all eight cores will perform this write operation, reducing the initialization time from O(N) to O(1).
[0049] When the system software accesses devices, it uses a unified address space. The protocol conversion module needs to understand the meaning of this address and therefore needs to parse the access address in the access request. Specifically, it extracts the target address field from the bus transaction.
[0050] The high-order bits of the system address (e.g., addr[31:28]) can be interpreted as the target device identifier, while the low-order bits (e.g., addr[7:0]) can be interpreted as the register address inside the device.
[0051] The target device identifier, or DID, is a unique ID for each device proxy module on the loop. For example, suppose the software wants to access address 0x12000008. The mapping rule specifies that the high 4 bits (0x1) represent the DID. Then the protocol conversion module will know that this is a command to be sent to the device with DID=1, whose register address is 0x08.
[0052] Step S103: Send the control message to the first device in the ring topology.
[0053] Among them, the sending of control messages refers to the message sending module of the control agent device pushing messages to its downstream, that is, the entry point of the loop.
[0054] In this ring topology, all device agent modules are connected in a ring via unidirectional links. Each module has one upstream input and one downstream output. The first device is the first device agent module directly connected to the control agent device.
[0055] Step S104: Control messages are propagated unidirectionally along the ring topology so that multiple device agent modules on the ring topology can perform corresponding operations according to the control messages.
[0056] Specifically, performing the corresponding operation based on the control message may include: when the control message is a write message, writing data into a local register; when the control message is a read message, reading data from the local register, filling the read data into the control message, and then forwarding it.
[0057] Specifically, when writing a message, the device agent module decodes the ADDR field in the message into the address of an internal register and writes the value of the DATA field into that register.
[0058] For example: The message {DID=2, TYPE=WRITE, ADDR=0x0C, DATA=0x1234} arrives at the device with DID=2. The device writes the value 0x1234 into its configuration register at its internal offset address 0x0C.
[0059] When reading a message, the device agent module reads data from the corresponding local register based on the ADDR field in the message. Then, it does not change the message's DID, TYPE, or other fields, but it overwrites the DATA field in the message with the read data. This data-filled message is then forwarded.
[0060] Each device agent module in the loop contains receiving and forwarding logic. When a message enters a device agent, the device determines whether the message is relevant to it. Regardless of relevance, the message is eventually passed to the next device until it returns to the control agent to complete a loop (for read operations) or is consumed (for broadcast write operations).
[0061] In particular, unidirectional propagation means that messages are always transmitted from the output of one device to the input of the next device, with a fixed direction, thus avoiding complex bus arbitration and collision detection.
[0062] The device proxy module is equipped with a proxy device as defined in this invention for each physical functional module that needs to be controlled, such as a clock controller, power management unit, or IP core. It is responsible for interacting with the ring network and operating the actual functional modules behind it.
[0063] Specifically, when a control message propagates in a ring topology, if the message type of the control message is detected as error or bypass, the current device's processing is skipped, and the message is directly forwarded to the next device.
[0064] If a device agent encounters an error while processing a message, such as a parity error or accessing a non-existent register address, it can modify the message's TYPE field to "error" and then forward it. Subsequent devices, upon seeing the error type, will skip the normal processing logic and only be responsible for relaying the error status back to the control agent, thus quickly reporting the fault.
[0065] The software can send a message with the TYPE set to bypass, or configure a device to put itself into bypass mode under specific conditions. When the device is in bypass mode, it performs "direct forwarding" of all non-broadcast messages.
[0066] Skipping current device processing means that the processing core (register read / write logic) inside the device agent module does not operate on this message, but the message receiving and forwarding link is still open to ensure the integrity of the loop.
[0067] By constructing a programmable configuration propagation ring, a cascading control channel is established between devices. When the master controller initiates a single register write operation, the configuration information can be automatically broadcast to all associated devices along the ring path, completing the parallel initialization of multiple devices. While maintaining compatibility with standard bus interfaces, this architecture can successfully optimize the initialization time of N homogeneous devices from the traditional linear complexity O(n) to constant time O(1), significantly improving system startup efficiency and real-time response capability.
[0068] The on-chip module control method provided in this invention can acquire access requests from a standard bus interface, convert the access requests into control messages of a preset format, and send the control messages to the first device in a ring topology. The control messages propagate unidirectionally along the ring topology, enabling multiple device proxy modules on the ring topology to execute corresponding operations based on the control messages. This approach improves system startup efficiency and real-time response capabilities while reducing time overhead and bus resource waste.
[0069] Example 2
[0070] This invention also provides another on-chip module control method; this method is implemented based on the method in the above embodiments; this method focuses on describing the specific implementation of unidirectional propagation of control messages along the ring topology.
[0071] Figure 2 A flowchart of another on-chip module control method provided in an embodiment of the present invention is shown below. Figure 2 As shown, the control message propagates unidirectionally along the ring topology and may include the following steps:
[0072] Step S201: At each device agent module, determine whether the control message is a local message.
[0073] Specifically, determining whether a control message is a local message can include: comparing the target device identifier in the control message with the local device identifier; if the target device identifier matches the local device identifier, it is determined to be a local message; if the target device identifier does not match the local device identifier, it is determined to be a non-local message.
[0074] Among them, the local device identifier refers to the fixed DID assigned to each device agent module during the hardware design, or it can be configured through a programmable register.
[0075] The device proxy module contains a comparator that compares the target device identifier of the incoming message with its own local device identifier. If they match, the message is sent to itself and is considered a local message. If they do not match, the message is sent to someone else and is considered a non-local message.
[0076] In step S202, if the control message is a local message, the operation corresponding to the control message is executed, and the updated control message is forwarded to the next device.
[0077] Specifically, performing the corresponding operation based on the control message may include: when the control message is a write message, writing data to the local register; when the control message is a read message, reading data from the local register, filling the read data into the control message, and then forwarding it.
[0078] For message writing, after execution, the original message or the message marked as processed can be forwarded directly. For message reading, after execution, the read data needs to be filled into the DATA field of the message, and then the updated message carrying the data is forwarded. This message will continue to be transmitted in the loop, eventually returning to the control agent, which will then return the data to the master controller via the standard bus.
[0079] In step S203, if the control message is not a local message, the control message is directly forwarded to the next device.
[0080] The path selection logic within the device agent directly connects the input signal to the output, possibly passing through only a single register buffer to meet timing requirements.
[0081] Example 3
[0082] Corresponding to the above method embodiments, this invention provides an on-chip module control device. Figure 3 This is a schematic diagram of the structure of an on-chip module control device provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the on-chip module control device may include:
[0083] Access request acquisition module 301 is used to acquire access requests from the standard bus interface.
[0084] Access request conversion module 302 is used to convert access requests into control messages in a preset format.
[0085] The control message sending module 303 is used to send control messages to the first device in the ring topology.
[0086] The control message control module 304 is used to control the unidirectional propagation of control messages along the ring topology, so that multiple device agent modules on the ring topology can perform corresponding operations according to the control messages.
[0087] The on-chip module control device provided in this embodiment of the invention can acquire access requests from a standard bus interface, convert the access requests into control messages of a preset format, and send the control messages to the first device in a ring topology. The control messages propagate unidirectionally along the ring topology, enabling multiple device proxy modules on the ring topology to execute corresponding operations based on the control messages. This approach improves system startup efficiency and real-time response capabilities while reducing time overhead and bus resource waste.
[0088] In some embodiments, the access request conversion module is further configured to parse the access address in the access request; map the access address to the target device identifier based on a preset address mapping relationship; and generate a control message containing the target device identifier, message type, register address, and data; the message type includes at least one of the following: write message, read message, bypass message, and error message.
[0089] In some embodiments, the control message includes a broadcast identifier; when the broadcast identifier is valid, the control message is received and processed by all device agent modules on the ring topology.
[0090] In some embodiments, the control message control module is further configured to determine at each device agent module whether the control message is a local message; if the control message is a local message, the operation corresponding to the control message is executed and the updated control message is forwarded to the next device; if the control message is not a local message, the control message is directly forwarded to the next device.
[0091] In some embodiments, the control message control module is further configured to compare the target device identifier and the local device identifier in the control message; if the target device identifier matches the local device identifier, it is determined to be a local message; if the target device identifier does not match the local device identifier, it is determined to be a non-local message.
[0092] In some embodiments, the control message control module is further configured to write data to a local register when the control message is a write message; and to read data from the local register when the control message is a read message, and then fill the read data into the control message before forwarding it.
[0093] In some embodiments, the control message control module is further configured to, when a control message is propagating in a ring topology, if the message type of the control message is detected to be an error or bypass, skip the current device processing and directly forward it to the next device.
[0094] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.
[0095] Example 4
[0096] This invention also provides an electronic device for running the above-described on-chip module control method; see [link to related documentation]. Figure 4 The diagram shows the structure of an electronic device, which includes a memory 400 and a processor 401. The memory 400 is used to store one or more computer instructions, which are executed by the processor 401 to implement the above-mentioned on-chip module control method.
[0097] Furthermore, Figure 4 The electronic device shown also includes a bus 402 and a communication interface 403. The processor 401, the communication interface 403 and the memory 400 are connected via the bus 402.
[0098] The memory 400 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 403 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 402 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0099] Processor 401 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 401 or by instructions in software form. Processor 401 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 400, and processor 401 reads information from memory 400 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0100] This invention also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are called and executed by a processor, they cause the processor to implement the above-described on-chip module control method. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0101] The computer program product for performing on-chip module control method provided in the embodiments of the present invention includes a computer-readable storage medium storing non-volatile program code executable by a processor. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0102] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0103] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0104] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0105] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0106] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0107] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An on-chip module control method, characterized in that, The method includes: Obtain access requests from the standard bus interface; Convert the access request into a control message of a preset format; The control message is sent to the first device in the ring topology; The control message is controlled to propagate unidirectionally along the ring topology, so that multiple device agent modules on the ring topology perform corresponding operations according to the control message; The control message propagates unidirectionally along the ring topology, including: At each device agent module, it is determined whether the control message is a local message; If the control message is a local message, the operation corresponding to the control message is executed, and the updated control message is forwarded to the next device; wherein, the path selection logic inside the device agent module will directly connect the input signal to the output, and buffer it through a first-level register to meet the timing requirements; If the control message is not a local message, then the control message is directly forwarded to the next device; The step of performing the corresponding operation according to the control message includes: When the control message is a write message, data is written to the local register; When the control message is a read message, data is read from the local register, and the read data is filled into the control message before forwarding.
2. The method according to claim 1, characterized in that, The step of converting the access request into a control message of a preset format includes: Parse the access address in the access request; Based on a preset address mapping relationship, the access address is mapped to the target device identifier; Generate a control message containing the target device identifier, message type, register address, and data; the message type includes at least one of write message, read message, bypass message, and error message.
3. The method according to claim 2, characterized in that, The control message includes: a broadcast identifier; When the broadcast identifier is valid, the control message is received and processed by all device agent modules on the ring topology.
4. The method according to claim 1, characterized in that, The step of determining whether the control message is a local message includes: The target device identifier and the local device identifier in the control message; If the target device identifier matches the local device identifier, it is determined to be a local message; If the target device identifier does not match the local device identifier, it is determined to be a non-local message.
5. The method according to claim 1, characterized in that, The method further includes: When the control message propagates in the ring topology, if the message type of the control message is detected as error or bypass, the current device processing is skipped and the message is directly forwarded to the next device.
6. An on-chip module control device, characterized in that, The apparatus for implementing the on-chip module control method according to any one of claims 1 to 5, the apparatus comprising: The access request acquisition module is used to acquire access requests from the standard bus interface; An access request conversion module is used to convert the access request into a control message in a preset format; A control message sending module is used to send the control message to the first device in the ring topology; The control message control module is used to control the unidirectional propagation of the control message along the ring topology, so that multiple device agent modules on the ring topology can perform corresponding operations according to the control message.
7. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the on-chip module control method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the on-chip module control method according to any one of claims 1 to 5.