A bus buffer and a multi-bus data transfer system

CN116541318BActive Publication Date: 2026-10-27SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310544613.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-12
Publication Date
2026-10-27
Estimated Expiration
2043-05-12

AI Technical Summary

Technical Problem

[0004]本发明的目的是提供一种总线缓冲器及多总线数据传输系统,以通过硬件方式解决不同总线协议和总线延迟带来的传输顺序错误的问题,减少软件代码的复杂度,提升数据传输的效率

Benefits of technology

[0020]本发明所提供的一种总线缓冲器,主机设备通过总线缓冲器与从机设备连接,总线缓冲器,包括:解析器,用于对主机设备通过各总线发送的传输数据进行解析,获取待转发数据和传输命令信息;其中,主机设备通过各总线与解析器连接,传输命令信息包括目标地址信息和发送时间戳,发送时间戳为主机设备发送传输数据的时间对应的时间戳;判决器,用于根据发送时间戳,确定各待转发数据的发送顺序;根据目标地址信息,按照发送顺序将存储寄存器中存储的待转发数据转发到相应的从机设备;存储寄存器,用于存储待转发数据;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116541318B_ABST
    Figure CN116541318B_ABST
Patent Text Reader

Abstract

The application discloses a bus buffer and a multi-bus data transmission system, and relates to the technical field of data transmission. A host device is connected with a slave device through the bus buffer. The bus buffer comprises a parser, which is used for parsing transmission data sent by the host device through each bus, and obtaining to-be-transferred data and transmission command information. The transmission command information comprises target address information and a sending timestamp. A determinator is used for determining the sending sequence of each to-be-transferred data according to the sending timestamp, and transferring the to-be-transferred data stored in a storage register to the corresponding slave device according to the target address information and the sending sequence. According to the application, the transmission data on different buses is transferred to the corresponding slave device according to the sending sequence according to the sending time of the transmission data on different buses, the problem of incorrect transmission sequence can be solved in a hardware mode, the complexity of software code is reduced, and the efficiency of data transmission is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data transmission technology, and in particular to a bus buffer and a multi-bus data transmission system. Background Technology

[0002] In a single-chip system, there are typically several master devices (i.e., host devices) and several slave devices (i.e., slave devices). The master and slave devices are connected via a bus using a specific protocol to transmit data. Normally, master and slave devices are connected via only one bus. However, when multiple buses with different protocols are connected between the master and slave devices, a multi-bus data transmission problem arises. That is, when the master device sends multiple data transmissions to the slave device, these transmissions may be completed through different buses. Due to differences in transmission speed between different buses, the slave device may receive the data in a different order than in the order it was sent by the master device.

[0003] Currently, to address the issue of errors in data reception by slave devices due to differences in bus transmission speeds, a software-based solution is generally used. For example, assuming two buses transmit data A and B respectively, driver code is written so that after the master transmits data A, it does not immediately transmit data B, but first confirms that data A has been received by the slave device before transmitting data B. However, this software-based solution for multi-bus data synchronization not only increases the complexity of the software code but also reduces data transmission efficiency. Therefore, how to solve the problem of transmission sequence errors caused by different bus protocols and bus delays in hardware, while reducing software code complexity and improving data transmission efficiency, is an urgent problem to be solved. Summary of the Invention

[0004] The purpose of this invention is to provide a bus buffer and a multi-bus data transmission system to solve the problem of transmission sequence errors caused by different bus protocols and bus delays through hardware, reduce the complexity of software code, and improve the efficiency of data transmission.

[0005] To address the aforementioned technical problems, the present invention provides a bus buffer, through which a host device connects to a slave device. The bus buffer includes:

[0006] A parser is used to parse the transmission data sent by the host device through each bus to obtain the data to be forwarded and transmission command information; wherein, the host device is connected to the parser through each of the buses, and the transmission command information includes target address information and a sending timestamp, wherein the sending timestamp is the timestamp corresponding to the time when the host device sends the transmission data;

[0007] The decision unit is used to determine the transmission order of each piece of data to be forwarded based on the transmission timestamp; and to forward the data to be forwarded stored in the storage register to the corresponding slave device according to the transmission order based on the target address information.

[0008] A storage register is used to store the data to be forwarded.

[0009] In some embodiments, the storage register is a first-in-first-out (FIFO) register; the decision unit is specifically used to store the data to be forwarded in the storage register according to the transmission order; and to forward the data to be forwarded stored in the storage register to the corresponding slave device according to the target address information.

[0010] In some embodiments, the decision maker is specifically used to determine the transmission order of each of the data to be forwarded based on the transmission timestamp and the target timestamp corresponding to the current transmission data; wherein, the target timestamp includes the transmission timestamp corresponding to the transmission data received within a preset time period after the current transmission data is received, and the current transmission data is any of the transmission data.

[0011] In some embodiments, the transmission command information includes data transmission order information; the decision maker is specifically used to determine the transmission order of each piece of data to be forwarded based on the transmission timestamp and the data transmission order information.

[0012] In some embodiments, the decision maker includes:

[0013] The address register is used to store the target address information.

[0014] In some embodiments, each of the parsers is connected to the host device through its corresponding bus, the number of buses is greater than or equal to 2, and the number of parsers is greater than or equal to the number of buses; each of the address registers is used to store its corresponding target address information, and the number of address registers is greater than or equal to the number of buses.

[0015] In some embodiments, the decision unit is further configured to receive transmission error feedback information sent by the slave device; generate retransmission information based on the transmission error feedback information; and send the retransmission information to the master device via an alarm bus to request the master device to retransmit the transmission data corresponding to the transmission error feedback information; wherein the alarm bus is the fastest bus among the buses.

[0016] The present invention also provides a multi-bus data transmission system, comprising: a bus buffer, a master device, and a slave device as described above; wherein the master device is connected to the slave device through the bus buffer;

[0017] The host device is connected to the bus buffer via a bus and is used to send transmission data to the bus buffer via each bus, so as to use the bus buffer to forward the data to be forwarded corresponding to the transmission data to the corresponding slave device.

[0018] In some embodiments, the host device is further configured to: acquire currently pending data; determine whether the currently pending data is greater than a packet splitting threshold; if it is greater than the packet splitting threshold, perform packet splitting on the currently pending data to acquire the packet splitting data corresponding to the currently pending data; generate a transmission timestamp corresponding to each packet splitting data according to the data order of the currently pending data; generate transmission data corresponding to each packet splitting data according to the transmission timestamp corresponding to each packet splitting data; if it is not greater than the packet splitting threshold, generate a transmission timestamp corresponding to the currently pending data; generate transmission data corresponding to the currently pending data according to the transmission timestamp corresponding to the currently pending data; wherein, the currently pending data is any pending data, and the pending data is the data that needs to be sent to the corresponding slave device.

[0019] In some embodiments, the host device is specifically used to acquire bus status information of each of the buses; determine the target bus corresponding to the currently transmitted data based on the bus status information; and send the currently transmitted data to the bus buffer through the target bus; wherein the currently transmitted data is any of the transmitted data, and the bus status information includes fault information and / or transmission speed information.

[0020] This invention provides a bus buffer, through which a master device connects to a slave device. The bus buffer includes: a parser, used to parse the transmission data sent by the master device through each bus to obtain the data to be forwarded and transmission command information; wherein the master device is connected to the parser through each bus, and the transmission command information includes target address information and a transmission timestamp, the transmission timestamp being the timestamp corresponding to the time when the master device sent the transmission data; a decision unit, used to determine the transmission order of each data to be forwarded based on the transmission timestamp; and to forward the data to be forwarded stored in a storage register to the corresponding slave device according to the transmission order based on the target address information; the storage register is used to store the data to be forwarded.

[0021] As can be seen, this invention, by setting up a bus buffer between the master and slave devices, utilizes the bus buffer to forward data transmitted on different buses to the corresponding slave devices in the order of transmission based on the transmission time of the data on different buses. This solves the problem of transmission order errors caused by different bus protocols and bus delays in hardware, reduces the complexity of software code, and improves data transmission efficiency. Furthermore, this invention also provides a multi-bus data transmission system, which also has the above-mentioned beneficial effects. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of the structure of a bus buffer provided in an embodiment of the present invention;

[0024] Figure 2 This is a diagram illustrating the connection relationship between a bus buffer and a host device and a slave device, provided in an embodiment of the present invention.

[0025] Figure 3 A schematic diagram of the internal frame of another bus buffer provided in an embodiment of the present invention;

[0026] Figure 4 This is a schematic diagram of the structure of a multi-bus data transmission system provided in an embodiment of the present invention;

[0027] Figure 5 This is a schematic diagram of the data transmission process of a multi-bus data transmission system provided in an embodiment of the present invention. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments 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.

[0029] Please refer to Figure 1 , Figure 1 This is a schematic diagram of a bus buffer provided in an embodiment of the present invention. A host device is connected to a slave device through the bus buffer, which may include:

[0030] Parser 10 is used to parse the transmission data sent by the host device through each bus to obtain the data to be forwarded and transmission command information; wherein, the host device is connected to parser 10 through each bus, and the transmission command information includes target address information and transmission timestamp, the transmission timestamp being the timestamp corresponding to the time when the host device sends the transmission data;

[0031] The decision unit 20 is used to determine the transmission order of each piece of data to be forwarded based on the transmission timestamp; and to forward the data to be forwarded stored in the storage register 30 to the corresponding slave device according to the transmission order based on the target address information.

[0032] Storage register 30 is used to store data to be forwarded.

[0033] It is understood that the bus buffer provided in this embodiment can be a buffer set between the master device and the slave device; that is, the access command issued by the master device through any bus must be forwarded through the bus buffer before it can reach the slave device; the feedback information of the slave device must also be forwarded through the bus buffer before it can reach the master device.

[0034] Correspondingly, the specific connection relationships between the bus buffer and the host and slave devices in this embodiment can be set by the designer according to the usage scenario and user needs. For example, the number of host devices connected to the bus buffer via the bus can be 1, meaning the bus buffer can be connected to one host device through a preset number of buses, and the preset number can be greater than or equal to 2; Figure 2 As shown, a bus buffer (buffer) can be connected to a host device (host) via three buses. The number of host devices connected to the bus buffer via the bus can also be greater than one. The number of slave devices connected to the bus buffer via the bus can also be one; for example, the bus buffer can be connected to one slave device via a preset number of buses. Figure 2 As shown, the bus buffer can be connected to slave devices (slave devices) via three buses. The number of slave devices connected to the bus buffer via the bus can also be greater than one, such as the bus buffer being connected to multiple slave devices via the bus. This embodiment does not impose any restrictions on this.

[0035] The parser 10 in the bus buffer can receive the transmission data sent by the host device through each bus; it can parse the transmission data transmitted by each bus to obtain the data to be forwarded and the transmission command information. For example, the parser 10 can parse the data to be forwarded and the transmission command information corresponding to each transmission data according to the bus protocol of each bus.

[0036] Correspondingly, the data to be forwarded can be data that the host device needs to send to the corresponding slave device via the bus, i.e., data that the bus buffer needs to forward. The transmission command information can be control command information related to the forwarding transmission of the data to be forwarded. The specific content of the transmission command information can be set by the designer according to the usage scenario and user requirements. For example, the transmission command information can include target address information (such as target address value), i.e., the information of the target address that the host device wants to access, such as the address information of the corresponding slave device, such as the specific number of the storage unit on the slave device. The transmission command information can also include a sending timestamp, which can be the timestamp corresponding to the time when the host device sends the transmission data, such as the time when the host device starts sending the transmission data to the bus buffer via the bus. The transmission command information can also include transmission start information, used to identify the start of a new transmission, so that the parser 10 can determine the start bit of the current transmission data based on the transmission start information. This embodiment does not impose any limitations on this.

[0037] It should be noted that the specific number of parsers 10 in the bus buffer in this embodiment can be set by the designer according to the practical scenario and user requirements. For example, in this embodiment, if each parser 10 is connected to the host device through its corresponding bus, the number of parsers 10 in this embodiment can be greater than or equal to the number of buses connected to the host device. In this embodiment, the number of buses connected to the host device can be greater than or equal to 2, and the number of buses connected to the host device can also be greater than or equal to 3. For example, the number of parsers 10 and the number of buses connected to the host device can both be 3, that is, 3 parsers 10 can be connected to the host device through 3 buses.

[0038] In this embodiment, the decision unit 20 in the bus buffer can determine the transmission order of each data to be forwarded based on the transmission timestamp corresponding to each data to be forwarded; thereby, based on the target address information corresponding to each data to be forwarded, the data to be forwarded stored in the storage register 30 is forwarded to the corresponding slave device in the transmission order, so as to forward the data transmitted on different buses to the corresponding slave device in the transmission order, thus solving the problem of transmission order errors caused by different bus protocols and bus delays.

[0039] Correspondingly, the decision unit 20 in this embodiment may include an address register and a time decision unit; the address register may be used to store target address information; the time decision unit may be used to determine the transmission order of each data to be forwarded according to the transmission timestamp; and according to the target address information in the address register, the data to be forwarded stored in the storage register 30 may be forwarded to the corresponding slave device in the transmission order.

[0040] Accordingly, the specific number of address registers in the decision unit 20 in this embodiment can be set by the designer according to the practical scenario and user needs. For example, in this embodiment, each address register can store its own corresponding target address information. The number of address registers in this embodiment can be greater than or equal to the number of buses connected to the bus buffer and the host device. For example, the number of address registers and the number of buses connected to the bus buffer and the host device can both be 3.

[0041] It should be noted that the above-mentioned transmission order can be the order in which the host device starts sending transmission data through each bus. Regarding the specific method by which the decision-maker 20 determines the transmission order of each piece of data to be forwarded based on the transmission timestamp in this embodiment—that is, the specific method by which the time decision-maker determines the transmission order of each piece of data to be forwarded based on the transmission timestamp—this can be set by the designer according to the practical scenario and user requirements. For example, the decision-maker 20 (such as the time decision-maker) can determine the transmission order of each piece of data to be forwarded based on the transmission timestamp corresponding to the current transmission data and the target timestamp; wherein, the target timestamp includes the transmission timestamp corresponding to the transmission data received within a preset time period after the current transmission data is received, and the current transmission data is any transmission data; that is, after the current transmission data is received, the decision-maker 20 can determine the transmission order corresponding to these transmission data based on the transmission timestamps (i.e., the target timestamps) parsed from the transmission data received within the subsequent preset time period and the transmission timestamps parsed from the current transmission data, thereby enabling the determined transmission order to send the data to be forwarded from these transmission data to the corresponding slave devices.

[0042] Correspondingly, when the transmission command information includes data transmission order information, the decision maker 20 (such as a time decision maker) can also determine the transmission order of each data to be forwarded based on the transmission timestamp corresponding to each transmitted data and the data transmission order information. The data transmission order information can be information related to the order of transmitted data already sent by the host device, such as the transmission timestamp of already sent transmitted data or the identifier of already sent transmitted data sorted by transmission time. This allows the decision maker 20 to determine the transmission order of each data to be forwarded based on the transmission timestamp corresponding to each transmitted data and the data transmission order information. For example, when the transmission order information of each data to be forwarded can be the transmission timestamp of already sent transmitted data, the decision maker 20 can determine the transmission order of the data to be forwarded corresponding to the received transmitted data based on the transmission timestamp corresponding to each data to be forwarded and the transmission timestamp in the data transmission order information. This embodiment does not impose any restrictions on the decision maker 20's ability to determine the transmission order of each data to be forwarded based on the transmission timestamp.

[0043] It should be noted that the specific method by which the decision maker 20 forwards the data to be forwarded stored in the storage register 30 to the corresponding slave device according to the target address information and the sending order, i.e., the specific method by which the time decision maker forwards the data to be forwarded stored in the storage register 30 to the corresponding slave device according to the target address information in the address register and the sending order, can be set by the designer according to the practical scenario and user requirements. For example, if the storage register 30 in the bus buffer in this embodiment can be a first-in-first-out register, the decision maker 20 can store the data to be forwarded in the storage register 30 according to the sending order; and forward the data to be forwarded stored in the storage register 30 to the corresponding slave device according to the target address information.

[0044] For example, such as Figure 2 As shown, the host device is connected to the bus buffer via three buses (bus 0, bus 1, and bus 2). Assume the host device first sends data 'a' via bus 0, then data 'b' via bus 1, and finally data 'c' via bus 2. Due to different bus protocols and transmission delays, the order in which data 'a', 'b', and 'c' arrive at the bus buffer is uncertain, and several possibilities exist:

[0045] (1) Detecting the correct state: If data a is transmitted on bus 0 and arrives at the bus buffer first, the time decision device can determine that the start time of data a is the earliest by sending the timestamp and data transmission order information. The time decision device considers the transmission order to be correct and writes the corresponding data to be forwarded into the storage register 30. After that, data b is transmitted on bus 1 and arrives at the bus buffer. The time decision device again determines that the start time of data b on bus 1 is the earliest. The time decision device considers the transmission order to be correct and writes the corresponding data to be forwarded into the storage register 30. After that, data c is transmitted on bus 2 and arrives at the bus buffer. At this time, the decision device 20 again considers that the start time of data c is the earliest. The corresponding data is written into the storage register 30 and the sending timestamp of data c is cleared.

[0046] (2) Error Detection: Taking the arrival order as c, b, a as an example, if transmission c on bus 2 arrives at the bus buffer first, the time decision device determines, by judging the transmission timestamp and data transmission order information, that the start time of the unarrived transmission data a on bus 0 is the earliest. The time decision device considers this transmission order incorrect, and decision device 20 will perform scheduling. Transmission c on bus 2 will wait for a spin operation. If transmission b on bus 1 arrives at the bus buffer first, the time decision device determines, by judging the transmission timestamp and data transmission order information, that the start time of the unarrived transmission data a on bus 0 is the earliest. The time decision device considers this transmission order incorrect, and decision device 20 will perform scheduling. Transmission b on bus 1 will wait for a spin operation. The process begins with a spin operation. Afterward, data 'a' on bus 0 is transmitted to the bus buffer. The time decision maker determines that data 'a' on bus 0 started earliest, so decision maker 20 considers the transmission order correct, writes the data to storage register 30, and clears the timestamp of data 'a' on bus 0. Meanwhile, data 'b' on the spinning bus 1 started earliest, so the time decision maker considers it's data 'b's turn to be transmitted, writes the data to storage register 30, and clears the timestamp of data 'b' on bus 1. Then, data 'c' on the spinning bus 2 started earliest, so the time decision maker considers the transmission order correct, writes the data to storage register 30, and clears the timestamp of data 'c' on bus 2. Therefore, the transmission order can be a, b, and c.

[0047] Furthermore, in this embodiment, the decision unit 20 (such as a time decision unit) can also be used to receive transmission error feedback information sent by the slave device; generate retransmission information based on the transmission error feedback information; and send the retransmission information to the master device via the alarm bus to request the master device to retransmit the transmission data corresponding to the transmission error feedback information. The alarm bus is the fastest bus among the buses connected to the master device. For example, in this embodiment, an error check code can be preset in the decision unit 20. If the feedback information returned by the slave device (such as...) Figure 3 The slave response signal indicates that there is an error in the transmission (i.e., transmission error feedback information). The transmission can be interrupted (e.g., clear the corresponding data to be forwarded in the storage register 30), and the error check code (i.e. retransmission information) is transmitted to the master device using the fastest bus 2 channel. This allows the master device to immediately retransmit the corresponding transmission data upon receiving the error check code, thus realizing a fast error check mechanism.

[0048] Furthermore, the specific method by which the decision-maker 20 forwards each piece of data to be forwarded to the corresponding slave device in this embodiment can be set by the designer according to the practical scenario and user requirements. For example, the decision-maker 20 can select the corresponding bus connected to the slave device (i.e., the slave bus) according to the bus that transmits the data to be forwarded, and send the data to be forwarded to the corresponding slave device; or the decision-maker 20 can send the data to be forwarded to the corresponding slave device through the slave bus corresponding to the bus type of the bus to be forwarded. The decision-maker 20 can also determine the target slave bus corresponding to the current data to be forwarded based on the bus status information of each slave bus; and send the current data to be forwarded to the corresponding slave device through the target slave bus; wherein, the current data to be forwarded is any data to be forwarded, and the bus status information includes fault information and / or transmission speed information. For example, the target slave bus can be the bus with the fastest transmission speed among the buses connected to the slave device (i.e., the slave bus) that has not experienced a fault and is occupied, so as to realize the bus selection and judgment mechanism of the slave bus.

[0049] In this embodiment, the present invention uses a bus buffer between the host device and the slave device to forward the transmitted data on different buses to the corresponding slave devices in the order of transmission based on the transmission time of the transmitted data on different buses. This solves the problem of transmission order errors caused by different bus protocols and bus delays in hardware, reduces the complexity of software code, and improves the efficiency of data transmission.

[0050] Corresponding to the bus buffer embodiment above, this embodiment of the invention also provides a multi-bus data transmission system. The multi-bus data transmission system described below can be referred to in correspondence with the bus buffer described above.

[0051] Please refer to Figure 4 , Figure 4 This is a schematic diagram of a multi-bus data transmission system provided in an embodiment of the present invention. The multi-bus data transmission system may include: a bus buffer 200 as provided in the above embodiment, a master device 100, and a slave device 300; wherein the master device 100 is connected to the slave device 300 through the bus buffer 200.

[0052] The host device 100 is connected to the bus buffer 200 via a bus and is used to send transmission data to the bus buffer 200 via each bus so that the bus buffer 200 can forward the corresponding data to be forwarded to the corresponding slave device 300.

[0053] It should be noted that the bus buffer 200 may include:

[0054] The parser is used to parse the transmission data sent by the host device 100 through each bus to obtain the data to be forwarded and the transmission command information. The host device 100 is connected to the parser through each bus. The transmission command information includes the target address information and the sending timestamp. The sending timestamp is the timestamp corresponding to the time when the host device 100 sends the transmission data.

[0055] The decision unit is used to determine the transmission order of each piece of data to be forwarded based on the transmission timestamp; and to forward the data to be forwarded stored in the storage register to the corresponding slave device 300 according to the transmission order based on the target address information.

[0056] Storage registers are used to store data to be forwarded.

[0057] In some embodiments, the storage register is a first-in-first-out (FIFO) register; the decision unit is specifically used to store the data to be forwarded in the storage register according to the transmission order; and to forward the data to be forwarded stored in the storage register to the corresponding slave device 300 according to the target address information.

[0058] In some embodiments, the decision maker is specifically used to determine the transmission order of each piece of data to be forwarded based on the transmission timestamp and the target timestamp corresponding to the current transmission data; wherein, the target timestamp includes the transmission timestamp corresponding to the transmission data received within a preset time period after the current transmission data is received, and the current transmission data is any transmission data.

[0059] In some embodiments, the transmission command information includes data transmission order information; the decision maker is specifically used to determine the transmission order of each piece of data to be forwarded based on the transmission timestamp and the data transmission order information.

[0060] In some embodiments, the decision maker includes:

[0061] The address register is used to store target address information.

[0062] In some embodiments, each parser is connected to the host device 100 through its corresponding bus, the number of buses is greater than or equal to 2, and the number of parsers is greater than or equal to the number of buses; each address register is used to store its corresponding target address information, and the number of address registers is greater than or equal to the number of buses.

[0063] In some embodiments, the decision maker is further configured to receive transmission error feedback information sent by the slave device 300; generate retransmission information based on the transmission error feedback information; and send the retransmission information to the master device 100 via the alarm bus to request the master device 100 to retransmit the transmission data corresponding to the transmission error feedback information; wherein the alarm bus is the fastest bus among the buses.

[0064] It is understood that the multi-bus data transmission system provided in this embodiment can be specifically a single-chip system. The specific connection relationships between the bus buffer 200 and the host device 100 and slave device 300 in this embodiment can be set by the designer according to the usage scenario and user requirements. For example, the number of host devices 100 connected to the bus buffer 200 via the bus can be 1, meaning the bus buffer 200 can be connected to one host device 100 through a preset number of buses; the preset number can be greater than or equal to 2. Figure 2 As shown, the bus buffer 200 (buffer) can be connected to the host device 100 (host) via three buses. The number of host devices 100 connected to the bus buffer 200 via the bus can also be greater than one. The number of slave devices 300 connected to the bus buffer 200 via the bus can also be one; for example, the bus buffer 200 can be connected to one slave device 300 via a preset number of buses. Figure 2 As shown, the bus buffer 200 can be connected to the slave device 300 (slave) via three buses. The number of slave devices 300 connected to the bus buffer 200 via the bus can also be greater than one, such as the bus buffer 200 being connected to multiple slave devices 300 via the bus. This embodiment does not impose any restrictions on this.

[0065] It should be noted that, in this embodiment, the host device 100 can also be used to obtain the currently to-be-sent data; determine whether the currently to-be-sent data is greater than the unpacking threshold; if it is greater than the unpacking threshold, then unpack the currently to-be-sent data to obtain the unpacked data corresponding to the currently to-be-sent data; generate the sending timestamp corresponding to each unpacked data according to the data order of the currently to-be-sent data; generate the transmission data corresponding to each unpacked data according to the sending timestamp corresponding to each unpacked data; if it is not greater than the unpacking threshold, then generate the sending timestamp corresponding to the currently to-be-sent data; generate the transmission data corresponding to the currently to-be-sent data according to the sending timestamp corresponding to the currently to-be-sent data; wherein, the currently to-be-sent data is any data to be sent, and the data to be sent is the data that needs to be sent to the corresponding slave device 300.

[0066] In other words, this embodiment can introduce a depacketizing mechanism, enabling the host device 100 to split large data packets into multiple smaller data packets for simultaneous transmission via multiple buses, further improving transmission efficiency. Correspondingly, if the data packets to be transmitted are small and do not require depacketizing, the host device directly timestamps the data to be transmitted (i.e., sends a data stamp) to obtain the transmitted data sent via the bus; if the data to be transmitted has already been depacketized, the smaller depacketized data packets are timestamped according to the data order before depacketizing.

[0067] Furthermore, the specific process by which the host device 100 sends transmission data to the bus buffer 200 through each bus in this embodiment can be set by the designer according to the practical scenario and user requirements. For example, the host device 100 may specifically obtain the bus status information of each bus; determine the target bus corresponding to the current transmission data based on the bus status information; and send the current transmission data to the bus buffer 200 through the target bus. Here, the current transmission data is any transmission data, and the bus status information includes fault information and / or transmission speed information.

[0068] In other words, a bus selection determination mechanism can be introduced in this embodiment; such as Figure 5 As shown, the host device 100 can determine the status of all buses. If a bus channel fails and becomes unavailable, it will immediately use other buses for transmission. Each bus is selectable. First, the faster bus 2 is selected for transmission. If bus 2 is occupied, the slower bus 1 can be selected for transmission. If bus 1 is also occupied, the slowest bus 0 is selected for transmission.

[0069] Correspondingly, the bus status information can include fault information, transmission speed information, and occupancy information. The target bus can be the bus with no fault information, no occupancy information, and the fastest transmission speed. That is, the host device 100 can select the bus with no fault, no occupancy, and the fastest transmission speed from all buses connected to the bus buffer 200 as the target bus to send the current transmission data.

[0070] Furthermore, in this embodiment, the host device 100 can also be used to send the transmission data corresponding to the retransmission information sent by the bus buffer 200 to the bus buffer 200 via the bus. That is, in this embodiment, the decision unit can receive the transmission error feedback information sent by the slave device 300; generate retransmission information based on the transmission error feedback information; send the retransmission information to the host device 100 via the alarm bus; and correspondingly, the host device 100 can retransmit the transmission data corresponding to the transmission error feedback information via the bus.

[0071] In this embodiment, the present invention uses a bus buffer 200 between the host device 100 and the slave device 300 to forward the transmitted data on different buses to the corresponding slave devices 300 in the order of transmission based on the transmission time of the transmitted data on different buses. This solves the problem of transmission order errors caused by different bus protocols and bus delays in hardware, reduces the complexity of software code, and improves the efficiency of data transmission.

[0072] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the bus buffers disclosed in the embodiments, the description is relatively simple; relevant parts can be found in the method section.

[0073] The above provides a detailed description of a bus buffer and multi-bus data transmission system provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims

1. A bus buffer, characterized in that, The host device is connected to the slave device through the bus buffer, the bus buffer comprising: A parser is used to parse the transmission data sent by the host device through each bus to obtain the data to be forwarded and transmission command information; wherein, the host device is connected to the parser through each of the buses, and the transmission command information includes target address information and a sending timestamp, wherein the sending timestamp is the timestamp corresponding to the time when the host device sends the transmission data; The decision unit is used to determine the transmission order of each piece of data to be forwarded based on the transmission timestamp; and to forward the data to be forwarded stored in the storage register to the corresponding slave device according to the transmission order based on the target address information. A storage register is used to store the data to be forwarded; The storage register is a first-in-first-out (FIFO) register; the decision unit is specifically used to store the data to be forwarded in the storage register according to the sending order; and to forward the data to be forwarded stored in the storage register to the corresponding slave device according to the target address information. The decision unit is also used to receive transmission error feedback information sent by the slave device; generate retransmission information based on the transmission error feedback information; and send the retransmission information to the master device through the alarm bus to request the master device to retransmit the transmission data corresponding to the transmission error feedback information; wherein, the alarm bus is the fastest bus among the buses; The retransmission information is a preset error check code in the decision-maker. Specifically, the decision-maker is used to interrupt the transmission when the slave device returns transmission error feedback information, and to transmit the error check code to the host device using the fastest bus channel, so that the host device can immediately retransmit the corresponding transmission data upon receiving the error check code, thereby realizing a fast error check mechanism.

2. The bus buffer according to claim 1, characterized in that, The decision-maker is specifically used to determine the transmission order of each of the data to be forwarded based on the transmission timestamp and the target timestamp corresponding to the current transmission data; wherein, the target timestamp includes the transmission timestamp corresponding to the transmission data received within a preset time period after the current transmission data is received, and the current transmission data is any of the transmission data.

3. The bus buffer according to claim 1, characterized in that, The transmission command information includes data transmission order information; the decision-maker is specifically used to determine the transmission order of each piece of data to be forwarded based on the transmission timestamp and the data transmission order information.

4. The bus buffer according to claim 1, characterized in that, The decision-making device includes: The address register is used to store the target address information.

5. The bus buffer according to claim 4, characterized in that, Each of the parsers is connected to the host device through its corresponding bus, the number of buses is greater than or equal to 2, and the number of parsers is greater than or equal to the number of buses; each of the address registers is used to store its corresponding target address information, and the number of address registers is greater than or equal to the number of buses.

6. A multi-bus data transmission system, characterized in that, include: The bus buffer, master device, and slave device as described in any one of claims 1 to 5; wherein the master device is connected to the slave device through the bus buffer; The host device is connected to the bus buffer via a bus and is used to send transmission data to the bus buffer via each bus, so as to use the bus buffer to forward the data to be forwarded corresponding to the transmission data to the corresponding slave device.

7. The multi-bus data transmission system according to claim 6, characterized in that, The host device is also used to acquire the current data to be sent; determine whether the current data to be sent is greater than the unpacking threshold; if it is greater than the unpacking threshold, perform unpacking processing on the current data to be sent to acquire the unpacked data corresponding to the current data to be sent; and generate a sending timestamp corresponding to each of the unpacked data according to the data order of the current data to be sent. Based on the sending timestamp corresponding to each of the unpacked data, generate transmission data corresponding to each of the unpacked data; if it is not greater than the unpacking threshold, generate the sending timestamp corresponding to the current data to be sent; generate transmission data corresponding to the current data to be sent based on the sending timestamp corresponding to the current data to be sent; wherein, the current data to be sent is any data to be sent, and the data to be sent is the data that needs to be sent to the corresponding slave device.

8. The multi-bus data transmission system according to claim 6, characterized in that, The host device is specifically used to acquire bus status information of each of the buses; determine the target bus corresponding to the currently transmitted data based on the bus status information; and send the currently transmitted data to the bus buffer through the target bus; wherein the currently transmitted data is any of the transmitted data, and the bus status information includes fault information and / or transmission speed information.

Citation Information

Patent Citations

  • Circuitry capable of transmitting multi-channel data streams through single bus interface

    CN101982817A

  • IC bus communication device with FIFO caching and verification functions

    CN112380157A