A bus-based communication method, system and device
By dynamically configuring module connection relationships and introducing broadcast mode, the fixed data exchange problem in bus technology is solved, and the data transmission efficiency and bus scalability are improved.
Patent Information
- Application Number
- CN202410900353.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-07-05
AI Technical Summary
In existing bus technologies, the data exchange relationship between ports is fixed, bus extension functions and broadcast modes are not supported, and the reusability is not high.
It adopts dynamic configuration method to dynamically change the connection relationship between modules, supports data exchange between any two modules, and introduces broadcast mode.
It realizes flexible connection between modules, improves data transmission efficiency, supports broadcast mode, and enhances the scalability and multiplexing of the bus.
Smart Images

Figure CN118860930B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technology, and more specifically, relates to a bus-based communication method, system and device. Background Art
[0002] In chip design, dynamic data exchange often occurs between different ports. The routing mechanism in existing bus technology and the data exchange relationship between ports are fixed. They do not support bus expansion functions or broadcast modes. They are all customized designs and have low reusability. Summary of the Invention
[0003] In response to the above-mentioned defects or improvement needs of the prior art, the present invention provides a bus-based communication method, system and device, which aims to adopt a dynamic configuration method to dynamically change the connection relationship between modules, and to conveniently realize rapid data exchange between any two modules. It also supports broadcast mode, so that the data transmission efficiency can be improved in certain scenarios, thereby solving the technical problems that the data exchange relationship between ports is fixed, bus expansion function is not supported, and broadcast mode is not supported.
[0004] To achieve the above objectives, according to a first aspect of the present invention, a bus-based communication method is provided, wherein a plurality of first communication modules are mounted on a first bus of a high-speed routing module; the first bus side is configured with at least one first channel, the second bus side of the high-speed routing module is configured with at least one second channel, and a second communication module is mounted on the second channel;
[0005] The bus-based communication method includes:
[0006] Dynamically configuring a data request source address of the first communication module so that the data request source address of the first communication module is a source address of any one of the first channels or a source address of another first communication module;
[0007] Dynamically configure the configuration value of the register of the first channel, establish a connection relationship between the first channel and any one or more second channels, so that the connection relationship between each communication module can be dynamically changed.
[0008] Further, the configuration value of each register has m encoding bits, where m is greater than the total number of the second communication modules;
[0009] Each coding bit corresponds to a second communication module. If the value of the corresponding coding bit is a first preset value, it means that the first channel is connected to the corresponding second communication module; if the value of the corresponding coding bit is a second preset value, it means that the first channel is not connected to the corresponding second communication module.
[0010] Furthermore, the bus-based communication method further includes:
[0011] If the communication modules with a connection relationship need to meet strict synchronization performance, the communication mode of the corresponding communication module is configured to blocking mode and the polling cycle is configured;
[0012] If the communication modules with a connection relationship do not need to meet strict synchronization performance, the communication mode of the corresponding communication module is configured as a non-blocking mode.
[0013] Furthermore, the bus-based communication method further includes:
[0014] Poll each communication module to check whether there is a read request for each communication module;
[0015] If there is a read request, data is obtained from the corresponding source port according to the data request source address provided by the communication module; if there is no read request, it is skipped.
[0016] Furthermore, if there is a read request, obtaining data from a corresponding source port according to the data request source address provided by the communication module includes:
[0017] When the communication mode of the communication module is blocking mode, if the source port is not ready for data, it will continue to wait for the source port to be ready for data within the preset polling period until the data is obtained; if the preset polling period is exceeded and the data is still not obtained, a read failure alarm will be fed back;
[0018] When the communication mode of the communication module is non-blocking mode, if the source port is not ready for data, a read failure alarm is directly fed back.
[0019] Furthermore, when polling the plurality of first communication modules, a two-way polling method is used for the polling operation, and the meeting of the operation pointers represents the end of one polling.
[0020] Furthermore, different first communication modules can exchange data one-to-one through a high-speed routing channel;
[0021] The first communication module is capable of sending data to one or more second communication modules via a broadcast channel; wherein the first channel and the corresponding one or more second channels constitute the broadcast channel;
[0022] The second communication module can send data to the corresponding first communication module through a broadcast channel.
[0023] To achieve the above object, according to a second aspect of the present invention, there is provided a bus-based high-speed routing system, comprising: a host computer, a high-speed routing module, a plurality of first communication modules and a plurality of second communication modules;
[0024] A plurality of first communication modules are mounted under the first bus of the high-speed routing module; the first bus side is configured with at least one first channel, the second bus side of the high-speed routing module is configured with at least one second channel, and a second communication module is mounted under the second channel;
[0025] The high-speed routing module is used to receive the first configuration instruction and the second configuration instruction from the host computer;
[0026] The high-speed routing module is used to dynamically configure the data request source address of the first communication module according to the first configuration instruction, so that the data request source address of the first communication module is the source address of any one of the first channels or the source address of other first communication modules;
[0027] The high-speed routing module is used to dynamically configure the configuration value of the register of the first channel according to the second configuration instruction, establish a connection relationship between the first channel and any one or more second channels, so that the connection relationship between each communication module can be dynamically changed.
[0028] To achieve the above objectives, according to a third aspect of the present invention, a high-speed routing module is provided, comprising at least one processor and a memory, wherein the at least one processor and the memory are connected via a data bus, and the memory stores instructions that can be executed by the at least one processor, and after being executed by the processor, the instructions are used to complete the bus-based communication method described in the first aspect.
[0029] To achieve the above-mentioned purpose, according to the fourth aspect of the present invention, a non-volatile storage medium is provided, wherein the computer storage medium stores computer-executable instructions, which are executed by one or more processors to complete the bus-based communication method described in the first aspect.
[0030] In general, the above technical solution conceived by the present invention has the following beneficial effects compared with the existing technology: in the present invention, the connection relationship between modules is not fixed. The dynamic configuration method is adopted to dynamically change the connection relationship between modules. Different first communication modules can exchange data one-to-one through a high-speed routing channel, and can easily realize rapid data exchange between any two modules; the first communication module can send data to one or more second communication modules through a broadcast channel. One first communication module can send data to multiple second communication modules, and supports broadcast mode, so that the data transmission efficiency can be improved in certain scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 This is a schematic structural diagram of a bus-based high-speed routing system provided by an embodiment of the present invention;
[0032] Figure 2 1 is a flow chart of a bus-based communication method provided by an embodiment of the present invention;
[0033] Figure 3 This is a schematic structural diagram of a broadcast channel provided by an embodiment of the present invention;
[0034] Figure 4 This is a schematic diagram of a process in which a first communication module An sends data to multiple second communication modules through a broadcast channel according to an embodiment of the present invention;
[0035] Figure 5 This is a schematic diagram of a process in which a second communication module sends data to a first communication module via a broadcast channel, provided by an embodiment of the present invention;
[0036] Figure 6 is a flow chart of another bus-based communication method provided by an embodiment of the present invention;
[0037] Figure 7 This is a timing diagram provided by an embodiment of the present invention;
[0038] Figure 8 This is a schematic diagram of the structure of a two-way polling provided by an embodiment of the present invention;
[0039] Figure 9 It is a structural diagram of a high-speed communication module provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0041] Unless the context requires otherwise, throughout the specification and claims, the term "including" is to be interpreted as meaning open inclusion, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "example", "specific example" or "some examples" and the like are intended to indicate that the specific features, structures, materials or characteristics associated with the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representation of the above terms does not necessarily refer to the same embodiment or example. In addition, the specific features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner, that is, although they may be carried in the embodiments or examples of the above terms due to reasons such as the order and position of appearance, it is not limited to that they can be carried in combination by one embodiment or example.
[0042] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "multiple" means two or more. In addition, for example, the description may also use the method of adding "A" and "B" at the end to describe the same type of nouns as two independent individuals. In this case, the corresponding features defined as "A" and "B" are only used to distinguish the description purposes of the same type of individuals, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0043] Example 1:
[0044] The routing mechanism in existing bus technology has a fixed data exchange relationship between ports. Consequently, the connection relationships between modules mounted on these ports are also fixed and cannot be dynamically changed. In some scenarios, a sending module needs to send data to multiple receiving modules, but the current routing mechanism does not support this function.
[0045] In order to solve the above problems, this embodiment provides a bus-based communication method, which is applied to a high-speed communication module. In order to more clearly explain the solution of the present invention, refer to Figure 1 The high-speed routing module can support a first bus and a second bus, and multiple first communication modules are mounted under the first bus of the high-speed routing module; the first bus side is configured with at least one first channel, and the second bus side of the high-speed routing module is configured with at least one second channel, and a second communication module is mounted under the second channel.
[0046] The number of the first communication modules and the second communication modules can be expanded according to actual conditions and is not specifically limited here. Different first communication modules can exchange data with each other, and the first communication module can exchange data with at least one second communication module.
[0047] Before being mounted on the high-speed routing module, each module needs to be divided into the first communication module or the second communication module according to whether the broadcast function is required. The advantage of this design is that the first communication module and the second communication module can indirectly exchange data while being independent of each other and not affecting each other.
[0048] The first and second channels are bus interfaces within the high-speed routing module. They are similar to a simple handshake protocol. A first channel can connect to at least one second channel to implement a broadcast function. A first channel can connect to multiple second channels, and thus to multiple second communication modules.
[0049] In one embodiment, the first communication module can serve as a transmitter and the second communication module can serve as a receiver. In this scenario, the first communication module can simultaneously send data to one or more second communication modules.
[0050] In one embodiment, the second communication module can serve as a transmitter and the first communication module can serve as a receiver. In this scenario, the second communication module can only send data to one of the first communication modules.
[0051] See Figure 2 , the bus-based communication method includes:
[0052] Step 101: Dynamically configure the data request source address of the first communication module so that the data request source address of the first communication module is the source address of any one of the first channels or the source address of other first communication modules.
[0053] In one embodiment, each submodule mounted on the high-speed routing module is assigned a unique source address. Figure 1 For example, the first communication module A0 to the first communication module An are each configured with a unique source address; the first channel X0 to the first channel Xn are also each configured with a unique source address.
[0054] In one embodiment, when the first communication module is a sending end, a connection relationship between the first communication module and other modules can be dynamically established by configuring a data request source address of the first communication module to exchange data.
[0055] Step 102: Dynamically configure the configuration value of the register of the first channel, establish a connection relationship between the first channel and any one or more second channels, so that the connection relationship between each communication module can be dynamically changed.
[0056] In one embodiment, the first channel may establish a connection relationship with one or more second channels to form the broadcast channel, so that the first communication module can simultaneously send data to at least one second communication module to implement a broadcast function.
[0057] In this embodiment, different first communication modules can exchange data one-to-one through a high-speed routing channel; the first communication module can send data to one or more second communication modules through a broadcast channel; wherein, the first channel and the corresponding one or more second channels constitute the broadcast channel; the second communication module can send data to the corresponding first communication module through the broadcast channel.
[0058] For example, when the first communication module A0 needs to send data to the second communication module A2, the data request source address of the first communication module A0 is configured as the source address of the second communication module A2.
[0059] For example, if the first communication module A0 simultaneously sends data to the second communication module B0 and the second communication module B1, and the second communication module B0 is mounted under the second channel Y0, and the second communication module B1 is mounted under the second channel Y1, then the connection relationship between the first communication module A0 and the second communication module B0 and the second communication module B1 can be established as follows. The data request source address of the first communication module A0 is configured to be the source address of the first channel X0, and the configuration value of the register of the first channel X0 is modified so that the first channel X0 is connected to the second channel Y0, and the first channel X0 is connected to the second channel Y1 to form a broadcast channel. After the connection relationship between the modules is established in this manner, the first communication module A0 can broadcast data to the second communication module B0 and the second communication module B1.
[0060] like Figure 3The figure shows a schematic diagram of a broadcast channel. The first bus side is configured with first channels X0, X1, ..., and Xn, and the second bus side is configured with second channels Y0, Y1, ..., and Ym. The first bus can establish connections with first communication modules (A0, A1, ..., An) via the first channels (X0, X1, ..., Xn). The biggest difference between a broadcast channel and a high-speed routing channel is that a single X-type channel can establish connections with multiple Y-type channels.
[0061] In the present invention, the connection relationship between modules is not fixed. A dynamic configuration method is adopted to dynamically change the connection relationship between modules. Different first communication modules can exchange data one-to-one through a high-speed routing channel, which can conveniently realize rapid data exchange between any two modules; the first communication module can send data to one or more second communication modules through a broadcast channel, and one first communication module can send data to multiple second communication modules, supporting the broadcast mode, so that the data transmission efficiency can be improved in certain scenarios.
[0062] In one embodiment, a first channel corresponds to a register, and the configuration value of each register has m coding bits, where m is greater than the total number of the second communication modules; each coding bit corresponds to a second communication module, and if the value of the corresponding coding bit is a first preset value, it means that the first channel is connected to the corresponding second communication module; if the value of the corresponding coding bit is a second preset value, it means that the first channel is not connected to the corresponding second communication module.
[0063] The channel number of the second channel may correspond to the coding bit of the register, so that one second communication module corresponds to one coding bit.
[0064] For example, if the value of a certain coding bit is 1, it means that the first channel is connected to the corresponding second communication module; if the value of a certain coding bit is 0, it means that the first channel is not connected to the corresponding second communication module.
[0065] In some application scenarios, data exchange between two modules must be strictly synchronized. To meet this requirement, the bus-based communication method further includes: if the communication modules in a connected relationship need to meet strict synchronization performance, the communication mode of the corresponding communication module is configured to be blocking mode and a polling period; if the communication modules in a connected relationship do not need to meet strict synchronization performance, the communication mode of the corresponding communication module is configured to be non-blocking mode.
[0066] The most significant feature of non-blocking mode is fast data exchange. It only takes two clock cycles from sending a read request to obtaining data. If modules need to exchange data quickly, non-blocking mode can be used. The most significant feature of blocking mode is synchronization. The time between a read request and obtaining data is strictly fixed (trip time). If synchronization is lost, an alarm is generated. If there are strict requirements for data synchronization between modules, blocking mode can be used. Data synchronization is crucial in complex scenarios, such as large, complex timers controlling various motor models.
[0067] like Figure 4 The figure shows a schematic diagram of a broadcast channel receiving data, in which the first communication module An sends data to multiple second communication modules through the broadcast channel. Data is forwarded between the same group of second channels (connected to the same first communication module) through polling. Similar to the high-speed routing channel, blocking mode and non-blocking mode are also supported during the polling process. In blocking mode, after the first channel receives the read data, it will not immediately initiate the next read request, but will wait until all the second channels in the group have received the data before initiating the next read request, so that the data consistency between the second communication modules mounted under the same group of second channels can be guaranteed. In non-blocking mode, after the first channel receives the read data, it will immediately initiate the next read request, regardless of whether the second communication modules in the same group have received new data, which can ensure the maximum throughput of the bus. The two modes can be configured according to different needs.
[0068] like Figure 5 The figure shows a diagram of data transmission over a broadcast channel. A second communication module can also send data to a first communication module via the broadcast channel. It's worth noting that data exchange between second communication modules is not possible. When a second communication module initiates a read request to a first channel, the broadcast channel transmits the data from the second communication module via polling. To avoid impacting the speed of the entire high-speed routing channel, this polling process is non-blocking.
[0069] Combine Figure 1 and Figure 6 The host computer configures the data request source address of the first communication module according to the connection relationship between each module, and configures the registers of the first channel. After the configuration is completed, the modules begin to exchange data normally. The communication mode between any two modules is configured according to the actual data synchronization requirements. If any two modules are set to blocking mode, they need to configure the same polling cycle. The advantage of this is that if a synchronization error occurs, the anomaly can be quickly detected and reported to the host computer, thereby generating a timely response.
[0070] In one embodiment, the bus-based communication method further includes: performing a polling operation on each communication module to check whether each communication module has a read request; if there is a read request, obtaining data from the corresponding source port according to the data request source address provided by the communication module; if there is no read request, skipping.
[0071] In one embodiment, when the communication module is in blocking mode, if the source port is not ready for data, the module continues to wait for the source port to be ready for data within a preset polling period until the data is obtained. If the data is still not obtained after the preset polling period, a read failure alarm is fed back. The preset polling period can be determined based on actual conditions and is not specifically limited here.
[0072] In one embodiment, when the communication mode of the communication module is non-blocking mode, if the source port is not ready for data, a read failure alarm is directly fed back.
[0073] by Figure 7 Taking the timing diagram of the data interaction process shown in the figure as an example, the data interaction process of this embodiment is explained. Figure 7 In the figure, clk is the clock signal, req is the read request signal, des_addr is the data request source address, rsp is the read response signal, des_data is the read return data, and err is the error indication signal).
[0074] When polling reaches clk2, a non-blocking read request is initiated, and the data request source address is AD0.
[0075] When polling reaches clk3, a non-blocking read request is initiated, the data request source address is AD1, and the read data DA0 is fed back at the same time (it can be seen that a non-blocking data interaction only requires two clock cycles, that is: from the read request being initiated at clk2 to the read data being fed back at clk3).
[0076] When polling reaches clk4, a non-blocking read request is initiated, the data request source address is AD2, and the read data DA1 is fed back at the same time.
[0077] When polling reaches clk5, no read request is initiated, the target channel is not ready for data, and the error indication err is fed back.
[0078] At the time of polling to clk6, a blocking read request is initiated, and the data request source address is AD3. After the pre-configured triptime (T0) time, it reaches the time of clk9.
[0079] At the time of polling to clk9, a blocking read request is initiated, the data request source address is AD4, and the read data DA3 is fed back at the same time. After the pre-configured trip time (T1) (T0 and T1 are independent of each other and have no connection), it reaches clk12.
[0080] When polling reaches clk12, no read request is initiated, the target channel is not ready for data within the specified T1 time, and an error indication err is fed back (if the target channel prepares data in advance within the specified T1 time, an error indication err will still be fed back).
[0081] From the actual scenario simulated above, it can be seen that in the process of data exchange between channels (modules), there are two modes: blocking and non-blocking. The most important feature of non-blocking mode is fast data exchange. It only takes two clock cycles from sending a read request to obtaining data. If fast data exchange between modules is required, non-blocking mode can be used. The most important feature of blocking mode is synchronization. The clock cycle (trip time) from a read request to obtaining data is strictly fixed. If synchronization is lost, an error will be generated (T1 is less than the trip time or T1 is greater than the trip time). If data synchronization is required between modules, blocking mode can be used. Data synchronization is very important in some complex scenarios, such as large and complex timers controlling various types of motors.
[0082] When working, the high-speed routing module will poll the mounting module (the first communication module or the second communication module) to check whether there is a read request on each target end. If there is a read request, it will fetch data from the source port according to the source address (source address) provided by the target end (the data on the source end will be consumed after the fetching). If there is no read request, it will be skipped.
[0083] In order to improve the efficiency of polling, when polling multiple first communication modules, a two-way polling method is used to perform the polling operation, and when the operation pointers meet, it means that one polling is completed. Figure 8 As shown, target module 0 to target module n are target ports, source module 0 to source module n are source ports, target module 0 to target module n can be first communication module 0 to first communication module n, source module 0 to source module can be second communication module 0 to second communication module n, and when the first communication module serves as the request sending end and the second communication module serves as the request receiving end, a two-way polling method can be used for polling operation.
[0084] Example 2:
[0085] Based on the above embodiment 1, combined with Figure 1, this embodiment provides a bus-based high-speed routing system, including: a host computer, a high-speed routing module, a plurality of first communication modules and a plurality of second communication modules;
[0086] A plurality of first communication modules are mounted under the first bus of the high-speed routing module; the first bus side is configured with at least one first channel, the second bus side of the high-speed routing module is configured with at least one second channel, and a second communication module is mounted under the second channel;
[0087] The high-speed routing module is used to receive the first configuration instruction and the second configuration instruction from the host computer;
[0088] The high-speed routing module is used to dynamically configure the data request source address of the first communication module according to the first configuration instruction, so that the data request source address of the first communication module is the source address of any one of the first channels or the source address of other first communication modules;
[0089] The high-speed routing module is used to dynamically configure the configuration value of the register of the first channel according to the second configuration instruction, establish a connection relationship between the first channel and any one or more second channels, so that the connection relationship between each communication module can be dynamically changed.
[0090] More specifically, different first communication modules can exchange data one-to-one through a high-speed routing channel; the first communication module can send data to one or more second communication modules through a broadcast channel; wherein, the first channel and the corresponding one or more second channels constitute the broadcast channel; the second communication module can send data to the corresponding first communication module through the broadcast channel.
[0091] In an embodiment of the present invention, the connection relationship between modules is not fixed. A dynamic configuration method is adopted to dynamically change the connection relationship between modules. Different first communication modules can exchange data one-to-one through a high-speed routing channel, which can conveniently realize rapid data exchange between any two modules; the first communication module can send data to one or more second communication modules through a broadcast channel. One first communication module can send data to multiple second communication modules, supporting the broadcast mode, so that the data transmission efficiency can be improved in certain scenarios.
[0092] Example 3:
[0093] Based on the bus-based communication method provided in the above embodiment 1, the present invention also provides a high-speed routing module, such as Figure 9FIG2 is a schematic diagram of the device architecture of an embodiment of the present invention. The device of this embodiment includes one or more processors 21 and a memory 22. Figure 9 A processor 21 is taken as an example.
[0094] The processor 21 and the memory 22 may be connected via a bus or other means. Figure 9 The bus connection is taken as an example.
[0095] The memory 22, as a non-volatile computer-readable storage medium for a bus-based communication method, can be used to store non-volatile software programs, non-volatile computer executable programs, and modules, such as the bus-based communication method in Example 1. The processor 21 executes the non-volatile software programs, instructions, and modules stored in the memory 22 to execute various functional applications and data processing of the device, thereby implementing the bus-based communication method of the embodiment.
[0096] The memory 22 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 22 may optionally include a memory remotely located relative to the processor 21, and such remote memory may be connected to the processor 21 via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0097] The program instructions / modules are stored in the memory 22 and, when executed by the one or more processors 21 , perform the bus-based communication method in the above embodiment.
[0098] Those skilled in the art will understand that all or part of the steps in the various methods of the embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a disk or an optical disk, etc.
[0099] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A bus-based communication method, characterized in that: A plurality of first communication modules are mounted under a first bus of a high-speed routing module; at least one first channel is configured on the first bus side, at least one second channel is configured on the second bus side of the high-speed routing module, and a second communication module is mounted under the second channel; The bus-based communication method includes: Dynamically configuring a data request source address of the first communication module so that the data request source address of the first communication module is a source address of any one of the first channels or a source address of another first communication module; Dynamically configure the configuration value of the register of the first channel, establish a connection relationship between the first channel and any one or more second channels, so that the connection relationship between each communication module can be dynamically changed.
2. The bus-based communication method according to claim 1, wherein: The configuration value of each register has m encoding bits, where m is greater than the total number of the second communication modules; Each of the coding bits corresponds to a second communication module, and if the value of the corresponding coding bit is a first preset value, it represents that the first channel is connected to the corresponding second communication module; If the value of the corresponding coding bit is the second preset value, it means that the first channel is not connected to the corresponding second communication module.
3. The bus-based communication method according to claim 1, wherein: The bus-based communication method further includes: If the communication modules with a connection relationship need to meet strict synchronization performance, the communication mode of the corresponding communication module is configured to blocking mode and the polling cycle is configured; If the communication modules with a connection relationship do not need to meet strict synchronization performance, the communication mode of the corresponding communication module is configured as a non-blocking mode.
4. The bus-based communication method according to claim 3, wherein: The bus-based communication method further includes: Poll each communication module to check whether there is a read request for each communication module; If there is a read request, data is obtained from the corresponding source port according to the data request source address provided by the communication module; if there is no read request, it is skipped.
5. The bus-based communication method according to claim 4, characterized in that: If there is a read request, obtaining data from the corresponding source port according to the data request source address provided by the communication module includes: When the communication mode of the communication module is blocking mode, if the source port is not ready for data, it will continue to wait for the source port to be ready for data within the preset polling period until the data is obtained; if the preset polling period is exceeded and the data is still not obtained, a read failure alarm will be fed back; When the communication mode of the communication module is non-blocking mode, if the source port is not ready for data, a read failure alarm is directly fed back.
6. The bus-based communication method according to claim 3, wherein: When polling the plurality of first communication modules, a two-way polling method is used for the polling operation, and the meeting of the operation pointers represents the end of one polling.
7. The bus-based communication method according to any one of claims 1 to 6, characterized in that: Different first communication modules can exchange data one-to-one through a high-speed routing channel; The first communication module is capable of sending data to one or more second communication modules via a broadcast channel; wherein the first channel and the corresponding one or more second channels constitute the broadcast channel; The second communication module can send data to the corresponding first communication module through a broadcast channel.
8. A bus-based high-speed routing system, characterized in that: include: A host computer, a high-speed routing module, a plurality of first communication modules and a plurality of second communication modules; A plurality of first communication modules are mounted under the first bus of the high-speed routing module; the first bus side is configured with at least one first channel, the second bus side of the high-speed routing module is configured with at least one second channel, and a second communication module is mounted under the second channel; The high-speed routing module is used to receive the first configuration instruction and the second configuration instruction from the host computer; The high-speed routing module is used to dynamically configure the data request source address of the first communication module according to the first configuration instruction, so that the data request source address of the first communication module is the source address of any one of the first channels or the source address of other first communication modules; The high-speed routing module is used to dynamically configure the configuration value of the register of the first channel according to the second configuration instruction, establish a connection relationship between the first channel and any one or more second channels, so that the connection relationship between each communication module can be dynamically changed.
9. A high-speed routing module, characterized in that: The invention comprises at least one processor and a memory, wherein the at least one processor and the memory are connected via a data bus, and the memory stores instructions that can be executed by the at least one processor, and after the instructions are executed by the processor, they are used to complete the bus-based communication method described in any one of claims 1 to 7.
10. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores computer-executable instructions, which are executed by one or more processors to implement the bus-based communication method according to any one of claims 1 to 7.
Citation Information
Patent Citations
SpaceFibre routing IP with multiple ports
CN112383474A
Module address allocation method and device and data interaction system
CN112988639A