Data exchange system and method
By introducing a central switching module and a communication bus between the circuit boards, providing clock signals and frame start signals, analyzing transmission instructions to complete the connection between the circuit boards, solving the problems of slow information transmission speed and poor flexibility between the circuit boards, achieving more efficient message transmission.
Patent Information
- Application Number
- CN202011036220.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-27
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2040-09-27
AI Technical Summary
The existing inter-circuit board information transmission speed is slow, has poor flexibility and is costly, making it difficult to meet the flexibility requirements in the case of multiple masters and multiple slaves.
Design a data exchange system, including a central switching module and multiple circuit boards connected through a communication bus, the central switching module provides clock signals and frame start signals, synchronizes the circuit board clocks, and parses transmission instructions during the transmission cycle to complete the circuit board The communication connection between the two circuit boards allows any two circuit boards to act as both the command sender and the command receiver, improving the flexibility and speed of message transmission.
It realizes the flexibility and speed of message transmission between circuit boards, the communication connection between circuit boards is more flexible, and the request results during the transmission cycle are returned in a timely manner, avoiding waiting and improving the overall message transmission efficiency.
Smart Images

Figure CN114281739B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data exchange system and method. Background Art
[0002] There are many ways to transmit control information and status information between circuit boards in the existing host, and the common ones are parallel bus type and serial bus type. However, the parallel bus type occupies more transmission resources, has poor anti-interference performance, and has poor flexibility in the case of multiple masters and multiple slaves. The serial bus type is divided into low-speed serial and high-speed serial; the common serializer / deserializer (Serdes) of high-speed serial, for example, a high-speed serial computer expansion bus standard (peripheral component interconnect express, referred to as PCIE), 10G Ethernet (10Gigabit Ethernet, referred to as 10GB), etc., its high bandwidth has obvious advantages in transmitting large amounts of information, but its cost is relatively high; low-speed serial bus, for example, two-wire serial bus (Inter-Integrated Circuit, referred to as I2C bus), universal asynchronous receiver / transmitter (UART), serial peripheral interface (Serial Peripheral Interface, referred to as SPI), integrated circuit built-in audio bus (Inter-IC Sound, referred to as IIS bus), etc., have a slow transmission speed when transmitting large amounts of information.
[0003] Therefore, the existing problems of slow information transmission speed, poor flexibility and high cost between circuit boards need to be solved urgently. Summary of the invention
[0004] The present application provides a data exchange system and method, which are used to solve the problems of slow information transmission speed and poor flexibility between existing circuit boards.
[0005] In a first aspect, the present application provides a data exchange system, the system comprising:
[0006] A central switching module, a plurality of circuit boards and a communication bus, wherein each of the circuit boards is connected to the central switching module via the communication bus;
[0007] The central switching module is used to provide the same clock signal and frame start signal to the multiple circuit boards, so that the clock of each circuit board and the central switching module are synchronized;
[0008] The first circuit board is used to send a first transmission instruction to the central switching module through the communication bus within a transmission cycle;
[0009] The central switching module is further used to obtain and parse the first transmission instruction within the transmission cycle, obtain the first address information of the second circuit board carried by the first transmission instruction, and complete the communication connection between the first circuit board and the second circuit board according to the first address information;
[0010] The second circuit board is used to obtain the first transmission instruction within the transmission period, and transmit a first response signal to the first circuit board through the communication bus;
[0011] The first circuit board and the second circuit board are any two of the multiple circuit boards.
[0012] Optionally, the transmission period is determined by a rising edge of the frame start signal, and one transmission period includes the time between at least two adjacent rising edges; or,
[0013] The transmission period is determined by the falling edge of the frame start signal, and one transmission period includes the time between at least two adjacent falling edges.
[0014] Optionally, the first transfer instruction includes a first request tag, first address information, a second request tag and the number of valid data bits of the first transfer instruction.
[0015] Optionally, the last byte of the first transmission instruction includes second address information of the first circuit board.
[0016] Optionally, the first circuit board and the second circuit board respectively sample and update data at two adjacent rising edges of the clock signal, and the central switching module samples and updates data at a falling edge between the two rising edges; or,
[0017] The first circuit board and the second circuit board respectively sample and update data at two adjacent falling edges of the clock signal, and the central switching module samples and updates data at a rising edge between the two falling edges.
[0018] Optionally, the last bit of the last byte of the first response signal is empty.
[0019] Optionally, the first response signal includes: an interrupt message;
[0020] The central switching module is further used to issue an early warning according to the interruption message.
[0021] Optionally, the system further comprises: a third circuit board, a fourth circuit board, a peripheral interface circuit board and a data transmission interface;
[0022] The third circuit board is used to send a second transmission instruction to the central switching module through the communication bus during the transmission period;
[0023] The central switching module is further used to obtain and parse the second transmission instruction, obtain the third address information of the fourth circuit board carried by the second transmission instruction, and complete the communication connection between the third circuit board and the fourth circuit board according to the third address information;
[0024] The fourth circuit board is used to obtain the second transmission instruction within the transmission period, generate a second response signal, and send the second response signal to the peripheral interface circuit board through the data transmission interface;
[0025] The peripheral interface circuit board is used to obtain the data result corresponding to the second response signal, and send the data result to the fourth circuit board;
[0026] The fourth circuit board is also used to transmit the data result to the third circuit board through the communication bus.
[0027] Optionally, the first circuit board is further used to send an idle instruction to the central switching module when the first circuit board is in an idle state, and the ath bit of the jth byte of the idle instruction is a high level;
[0028] The first circuit board is further used to send a work instruction to the central switching module when the first circuit board is in a state of preparing to send a request, wherein the ath bit of the jth byte of the work instruction is at a low level;
[0029] The first circuit board is also used to send a waiting instruction to the central switching module when the first circuit board is in a waiting state for receiving a request, wherein the ath bit of the jth byte of the waiting instruction is a high level, and the bth bit of the jth byte is a low level.
[0030] In a second aspect, the present application provides a data exchange method, which is applied to the data exchange system described in the first aspect, comprising:
[0031] Provide the same clock signal and frame start signal for multiple circuit boards;
[0032] receiving a first transmission instruction sent by the first circuit board through the communication bus within a transmission cycle;
[0033] During the transmission cycle, acquiring and parsing the first transmission instruction, obtaining the first address information of the second circuit board carried by the first transmission instruction, and completing the communication connection between the first circuit board and the second circuit board according to the first address information;
[0034] In the transmission cycle, the second circuit board acquires the first transmission instruction and transmits a first response signal to the first circuit board through the communication bus;
[0035] The first circuit board and the second circuit board are any two of the multiple circuit boards.
[0036] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art: the data exchange system provided by the embodiment of the present application includes: a central switching module, multiple circuit boards and a communication bus, the central switching module is used to provide the same clock signal and frame start signal for multiple circuit boards, so that each circuit board can be synchronized with the clock of the central switching module, the central switching module is also used to obtain and parse the first transmission instruction sent by the first circuit board within the transmission cycle, obtain the first address information of the second circuit board carried by the first transmission instruction, and complete the communication connection between the first circuit board and the second circuit board according to the first address information, wherein the first circuit board and the second circuit board are any two of the multiple circuit boards that are not the first circuit board. It can be seen that the circuit boards in this system can be both instruction sending circuit boards and instruction receiving circuit boards in different transmission cycles, making the message transmission between the circuit boards more flexible, and the second circuit board returns the request result to the first circuit board within the transmission cycle, so that the request does not need to wait, thereby improving the transmission speed of the message. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] Figure 1 This is a first structural diagram of a data exchange system in an embodiment of the present application;
[0040] Figure 2 This is a schematic diagram of the transmission cycle in the embodiment of the present application;
[0041] Figure 3 This is a schematic diagram of sending and receiving of the first circuit board in an embodiment of the present application;
[0042] Figure 4 This is a schematic diagram of the first circuit board response in the embodiment of the present application;
[0043] Figure 5 This is a schematic diagram of data interaction between the first circuit board and the second circuit board in an embodiment of the present application;
[0044] Figure 6 This is a schematic diagram of the second address information of the first circuit board in an embodiment of the present application;
[0045] Figure 7 This is a schematic diagram of the isolation zone in the embodiment of the present application;
[0046] Figure 8 This is a second structural diagram of the data exchange system in an embodiment of the present application;
[0047] Fig. 9 This is a schematic diagram of data interaction between the third circuit board and the fourth circuit board in the embodiment of the present application;
[0048] Fig.10 This is a schematic diagram of sending an idle instruction in an embodiment of the present application;
[0049] Fig.11 This is a schematic diagram of the receiving timing of the first circuit board and the second circuit board in the embodiment of the present application;
[0050] Fig.12 This is a schematic diagram of the working process of the first circuit board in the embodiment of the present application;
[0051] Fig.13 This is a schematic diagram of the working process of the second circuit board in the embodiment of the present application;
[0052] Fig.14 This is a schematic diagram of the interaction process between the third circuit board and the fourth circuit board in the embodiment of the present application;
[0053] Fig.15 This is a schematic diagram of the working process of the switch board in the embodiment of the present application;
[0054] Fig.16 This is a flow chart of the data exchange method in the embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0056] First of all, an explanation is given in advance of the terms mentioned in the embodiments of the present application: in the embodiments of the present application, the first circuit board is used as the circuit board that actively sends data packets (called "Master" or "sending board" or "active board"), that is, the request initiator, and the second circuit board is used as the circuit board that receives data packets (called "Slave" or "target board" or "receiving board"), that is, the request receiver.
[0057] Among them, Master_TX is: the sending board sends the signal; Master_RX is: the sending board receives the signal; Slave_TX is: the receiving board sends the signal; Slave_RX is: the receiving board receives the signal; SPI_MOSI is: the receiving signal; SPI_MISO is: the sending signal.
[0058] The present application embodiment provides a data exchange system, which can be applied to a complete machine equipped with a circuit board, such as Figure 1 As shown, the system includes: a central switching module 101, a plurality of circuit boards 102 and a communication bus 103, and each circuit board 102 is connected to the central switching module 101 via the communication bus 103. Figure 1 Five circuit boards 102 are taken as an example for illustration, but it should be noted that the number 5 here is only an example and is not used to limit the number of circuit boards 102 .
[0059] The central switching module 101 is used to provide the same clock signal and frame start signal to multiple circuit boards 102, so that the clock of each circuit board 102 and the central switching module 101 are synchronized;
[0060] The first circuit board is used to send a first transmission instruction to the central switching module 101 through the communication bus 103 within a transmission cycle;
[0061] The central switching module 101 is further used to obtain and parse the first transmission instruction sent by the first circuit board during the transmission cycle, obtain the first address information of the second circuit board carried by the first transmission instruction, and complete the communication connection between the first circuit board and the second circuit board according to the first address information;
[0062] The second circuit board is used to obtain the first transmission instruction within the transmission period and transmit the first response signal to the first circuit board through the communication bus 103;
[0063] The first circuit board and the second circuit board are any two of the multiple circuit boards 102 .
[0064] Specifically, the second circuit board is used to obtain the first transmission instruction within the transmission cycle, and send the first response signal to the central switching module 101 through the communication bus 103. The central switching module 101 then sends the first response signal to the first circuit board through the communication bus 103. At this time, the first circuit board and the second circuit board are interconnected.
[0065] Specifically, the central switching module 101 and the circuit board 102 each include four network interfaces, namely, a serial clock interface, a frame start interface, a data output interface, and a data input interface. All circuit boards 102 are connected to the central switching module 101 through these four interfaces to form a switching network, and the switching network is a star structure. Among them, the central switching module 101 can be a switching board. The switching board provides the same clock signal and frame start signal for the entire switching network, so that the switching network is a synchronous network, and the clocks of all circuit boards 102 connected to the switching board are synchronized. Among them, single-ended signal mode is used for data transmission between each circuit board 102. Of course, in order to improve anti-interference performance, differential mode can also be used for data transmission.
[0066] The details are shown in Table 1:
[0067] Table 1
[0068]
[0069] In a specific embodiment, the transmission period is determined by the rising edge of the frame start signal, and one transmission period includes the time between at least two adjacent rising edges; or, the transmission period is determined by the falling edge of the frame start signal, and one transmission period includes the time between at least two adjacent falling edges. In this application, the example of one transmission period including the time between two adjacent rising edges is used for explanation, but it should be noted that the time between two adjacent rising edges as one transmission period is only an example and is not used to limit the protection range of the transmission period.
[0070] Specifically, first, let's introduce the idle level. When the single-ended signal is left floating at the input, half of the time it will get a high level (a weak pull-up resistor can also be added). When the differential input side of the differential signal driver is open / suspended, the output is a high level. In order to avoid misoperation, the logic side will define the high level as idle, and at the same time define 0xFF and 0x00 as abnormal in the control byte. There is no card slot with circuit board 102 installed, and the data monitored by the switch board is a full-high idle level.
[0071] Specifically, through Figure 2 The clock synchronization and transmission cycle are described, taking the transmission cycle of 64 CLK as an example, but it should be noted that: Figure 2 This is just an example and does not limit the protection scope of the transmission cycle of this application.
[0072] The transmission cycle lengths of all circuit boards 102 of the present invention are the same. If a clock source transmits one bit, the number of bits that can be transmitted in one transmission cycle of a communication bus 103 is equal to the number of clock signals. When the valid data to be transmitted is less than the transmission capacity of a packet, the idle level is used for padding. When the valid data to be transmitted is greater than the transmission capacity of a packet, it can be split into multiple data packets for transmission. When designing, the number of bits transmitted in one transmission cycle needs to be comprehensively considered. In principle, the fewer the better the real-time performance, but too few will cause most of the data packets to be split, and too many will require more invalid padding, resulting in reduced transmission efficiency.
[0073] The following example uses a transmission cycle that contains 64 CLK clocks. WS changes at the falling edge of the clock and changes once every 32 clock cycles. The period between two WS rising edges is a transmission cycle. A transmission cycle contains 64 clock cycles and 8 bytes.
[0074] The first circuit board starts sending data at the first CLK rising edge after the WS rising edge. The switch board samples data at the falling edge of the clock. One transmission cycle contains 8 bytes. The first byte is the routing byte, and the switch board needs to parse the data content. The subsequent bytes can be ignored by the switch board.
[0075] In a specific embodiment, the first circuit board and the second circuit board sample and update data at two adjacent rising edges of the clock signal, respectively, and the central switching module 101 samples and updates data at the falling edge between the two rising edges; or, the first circuit board and the second circuit board sample and update data at two adjacent falling edges of the clock signal, respectively, and the central switching module 101 samples and updates data at the rising edge between the two falling edges.
[0076] In a specific embodiment, the first transfer instruction includes, in sequence: a first request tag, first address information, a second request tag, and the number of valid data bits of the first transfer instruction.
[0077] Specifically, the first transfer instruction includes 8 bytes, the first bit of the first byte represents the first request mark, the second to fourth bits of the first byte represent the first address information, the fifth bit of the first byte represents the second request mark, and the sixth to eighth bits represent the number of valid data bits of the first transfer instruction.
[0078] Specifically, the following Figure 3 , Figure 4 as well as Figure 5 The data interaction between the first circuit board and the second circuit board is specifically described, wherein: Figure 5 for Figure 3 and Figure 4 The combination of Figure 5The slashes in the string are used to indicate the bit positions of the bytes that are valid for transmitting data:
[0079] First, the packet switching interface is divided into a master interface and a slave interface. The packet switching master interface can actively initiate a valid transmission, and the packet switching slave interface can only passively wait for a valid transmission to arrive. When a circuit board 102 needs to actively access other circuit boards, it acts as the master, and other circuit boards act as slaves. Therefore, the circuit board 102 has both the master and slave roles.
[0080] Next, through Figure 3 , take the request sending and receiving of the first circuit board as an example: the first circuit board actively initiates a valid transmission, the first circuit board initiates the first transmission instruction, the first bit of the first byte carries the first request mark, the second to fourth bits of the first byte carry the first address information of the second circuit board, the fifth bit of the first byte carries the second request mark, the sixth to eighth bits represent the number of valid data bits of the first transmission instruction, the first circuit board sends the first transmission instruction to the switching board, the switching board parses the first transmission instruction, finds the address information of the second circuit board, and sends it to the second circuit board, at this time, the first circuit board receives the response information of the second circuit board, and the interconnection between the first circuit board and the second circuit board is completed.
[0081] Next, through Figure 4 , take the second circuit board receiving the first transmission instruction and sending a response message as an example: the second circuit board samples data at the rising edge of CLK, updates data at the rising edge of CLK, and uses the first bit data at the second CLK rising edge after the WS rising edge, and sends a response message.
[0082] Specifically, the first four bits received by the receiving board in each transmission cycle are always fixed to high, that is, B1111.
[0083] If the fifth bit received by the receiving board in a transmission cycle is 1, it means that the bus transmission cycle is idle and the subsequent data of this transmission cycle can be ignored.
[0084] If the 5th bit received by the receiving board in a certain transmission cycle is 0, it means that this bus transmission cycle is valid. The 6th to 8th bits received in this transmission cycle define the number of valid data bits in this transmission cycle. When the complex programmable logic device (CPLD) converts the communication bus 103 into an SPI master interface, it will generate valid bytes based on this valid data bit number. The definition of the valid data bit length is as follows:
[0085] Length=000: Illegal, the logic ignores this transmission cycle;
[0086] Length = 001: the effective transmission period is the corresponding 1 byte;
[0087] Length = 010: The effective transmission period is the corresponding 2 bytes;
[0088] Length = 011: The effective transmission period is the corresponding 3 bytes;
[0089] Length = 100: the effective transmission period is the corresponding 4 bytes;
[0090] Length = 101: the effective transmission period is the corresponding 5 bytes;
[0091] Length = 110: the effective transmission period is the corresponding 6 bytes;
[0092] Length=111: Reserved for extension. Devices that do not support the extension function treat it as 000 and treat it as illegal.
[0093] In a specific embodiment, the last byte of the first transmission instruction includes the second address information of the first circuit board, that is, the slot number of the first circuit board, which can be used to assist debugging. Figure 6 As shown, the second circuit board samples and obtains the slot number of the first circuit board, and sends its own slot number.
[0094] Specifically, when the second circuit board sends the response information, the first four bits of each transmission cycle are always fixedly sent at a high level, that is, B1111.
[0095] When the bus transmission cycle is valid, the fifth bit of each transmission cycle when the second circuit board sends a signal is always fixed to send a low level as the second valid mark. When the bus transmission cycle is idle, the fifth bit of each transmission cycle when the second circuit board sends a signal is always fixed to send a high level.
[0096] When the second circuit board sends a signal, the sixth to eighth bits of each transmission cycle are fixed to send the slot number of the second circuit board.
[0097] When the second circuit board sends a signal, the 2nd to 7th bytes of data in each transmission cycle come from the SPI internal bus.
[0098] The last 7 bits of each transmission cycle when the second circuit board sends a signal are defined as shown in Table 2, and are detected by the CPLD of the switch board and reported as an interrupt to the CPU of the switch board for processing.
[0099] Table 2
[0100]
[0101] In a specific embodiment, the last bit of the last byte of the response information is empty. Specifically, the last bit of the last byte of the response information can be defined as an isolation zone. Figure 7 As shown:
[0102] Since the second circuit board sends data one clock cycle later than the first circuit board, in order to support circuit board 102 to dynamically switch the roles of request initiator and request receiver, each transmission cycle of the request receiver consists of a one-bit isolation band plus 63 bits of valid transmission. When the second circuit board replies to the response information, the last byte is set to empty.
[0103] Specifically, the sending and receiving timings of the actively sending circuit board and the passively receiving circuit board are different. Specifically, based on the rising edge of WS, the "sending board" sends data one CLK clock earlier than the "target board"; based on the rising edge of WS, the "sending board" sends data one CLK clock later than the "target board".
[0104] In the ultra-short wave detection project, the role of the circuit board 102 is generally fixed as an active "sending board" or a passive receiving "target board". However, it does not mean that its role cannot be changed dynamically. Since "the sending and receiving timings of the active sending circuit board and the passive receiving circuit board are different", in order to smoothly exchange roles, a "shield" will be reserved in the transmission cycle of the passive receiving "target board".
[0105] Based on the rising edge of WS, the "sending board" sends data one CLK clock earlier than the "target board", but their transmission cycles end at the same CLK clock. It can be considered that a transmission cycle of the active "sending board" consists of 64 CLKs, and a transmission cycle of the passive "target board" consists of one isolation CLK clock cycle + 63 CLKs, so that the roles of active sending and passive receiving can be switched dynamically.
[0106] In a specific embodiment, the request result includes: an interruption message, and the central switching module 101 is further used to issue an early warning according to the interruption message.
[0107] Specifically, at the end of each 64-bit transmission cycle, three bits are used to transmit interrupt information. Regardless of whether this is a valid transmission or an idle transmission cycle, the circuit board 102 needs to report these interrupt messages, so the interrupt information will be refreshed once every WS cycle. If CLK is 6.4M and WS is 100K, the interrupt message will be refreshed 100K times per second. Among them, the interrupt message is sampled by the CPLD of the switch board and reported to the CPU of the switch board for processing.
[0108] For example, the circuit board 102 will send an interrupt message each time data is transmitted. If the temperature of the entire machine exceeds a preset temperature, the CPU will control the operation of the fan to increase the temperature of the entire machine according to the interrupt message.
[0109] In a specific embodiment, Figure 8 As shown, the system further includes: a third circuit board 801, a fourth circuit board 802, an external interface circuit board 803 and a data transmission interface 804. The third circuit board 801 is used to send a second transmission instruction to the central switching module 101 through the communication bus 103 during the transmission cycle; the central switching module 101 is also used to obtain and parse the second transmission instruction, obtain the third address information of the fourth circuit board 802 carried by the second transmission instruction according to the parsing result, and complete the communication connection between the third circuit board and the fourth circuit board according to the third address information; the fourth circuit board 802 is used to obtain the second transmission instruction during the transmission cycle, generate a second response signal, and send the second response signal to the external interface circuit board 803 through the data transmission interface 804; the external interface circuit board 803 is used to obtain the data result corresponding to the second response signal, and send the data result to the fourth circuit board 802, and the fourth circuit board 802 is also used to transmit the data result to the third circuit board 801 through the communication bus 103.
[0110] The third circuit board 801 is any circuit board 102 , and the fourth circuit board 802 is any circuit board 102 other than the third circuit board 801 .
[0111] Specifically, the peripheral interface circuit board 803 can be an external SPI interface chip, a data transmission interface. The data transmission interface 804 includes a bus master output / slave input (MOSI for short) and / or a bus master output / slave input (MISO).
[0112] Specifically, Fig. 9 As shown, the data packet Bit of the third circuit board is sent on the rising edge of CLK, and the switching board samples it and transmits it to the fourth circuit board on the falling edge of the CLK clock. If the internal register of the CPLD is accessed, the CPLD of the fourth circuit board samples the data on the rising edge of Clk. If the SPI interface chip outside the CPLD is accessed, the fourth circuit board transmits this data to the MOSI of the chip, and the chip samples the data on the rising edge of CLK. If it is a read operation, the SPI interface chip outside the CPLD of the fourth circuit board updates the MISO data on the falling edge of the CLK clock, and the CPLD samples the MISO data on the rising edge of CLK and sends it to the third circuit board through the switching board.
[0113] In a specific embodiment, the first circuit board is further used to send an idle instruction to the central switching module 101 when the first circuit board is in an idle state, and the ath bit of the jth byte of the idle instruction is high. The first circuit board is further used to send a work instruction to the central switching module 101 when the first circuit board is in a state of preparing to send a request, and the ath bit of the jth byte of the work instruction is low. The first circuit board is further used to send a wait instruction to the central switching module when the first circuit board is in a state of waiting to receive a request, and the ath bit of the jth byte of the wait instruction is high, and the bth bit of the jth byte is low.
[0114] Specifically, the first circuit board is also used to send an idle instruction to the central switching module 101 when the first circuit board is in an idle state, and the first bit of the first byte of the idle instruction is a high level. The first circuit board is also used to send a work instruction to the central switching module 101 when the first circuit board is in a ready-to-send request state, and the first bit of the first byte of the work instruction is a low level. The first circuit board is also used to send a wait instruction to the central switching module when the first circuit board is in a wait-to-receive request state, and the first bit of the first byte of the wait instruction is a high level, and the fifth bit of the first byte is a low level. Wherein, the wait-to-receive request state is a wait-to-receive request state within a transmission cycle.
[0115] Specifically, the circuit board 102 starts to send data at the first CLK rising edge after the WS rising edge. When the circuit board 102 has no data to send, the first bit sent when idle is high level, such as Fig.10 When the circuit board 102 has no data to send, the first bit sent is low level, and the fifth bit is low level. The definition of routing information is: the first four bits of each transmission cycle of the sending board.
[0116] When the switch board samples the first bit as a low level on the falling edge, it forwards subsequent data according to the address information. Therefore, "the first bit is low level" notifies the logic of the switch board that "circuit board 102 has a data packet to send." When the circuit board 102 corresponding to the address information is idle, the subsequent data of the data packet will be routed to the corresponding business board. When the switch board receives the first four bits, the destination address is not clear, so the first four bits cannot reach the destination circuit board. The receiving board cannot receive the "first bit low level", but can receive the "fifth bit low level." When the target board is idle, it knows that the current transmission cycle is valid based on the reception of the "fifth bit low level", and needs to parse and process subsequent data. The target board receives the "fifth bit low level" and needs to send a low level as a response (ACK Bit).
[0117] At this time, after the circuit board that actively sends the packet receives the response, if the ACK Bit is low, it indicates that the transmission is successful. If the ACK Bit is high, it indicates that the transmission fails. The sending board can try to send the data packet again in the next transmission cycle.
[0118] Since the passive receiving "target board" has only 63 CLKs valid transmission in one transmission cycle, the last bit uniformly sends its own slot number.
[0119] The Master and Slave receiving timing at the end of a transmission cycle is as follows Fig.11 shown.
[0120] The last 7 bits of each transmission cycle of Slave_TX are defined as shown in Table 3, and are detected by the CPLD of the switch board and reported as an interrupt to the CPU of the switch board for processing.
[0121] Table 3
[0122]
[0123] Next, through Fig.12 The working process of the first circuit board is described as follows:
[0124] Step 1201, system power-on is completed.
[0125] Step 1202, determine whether the first circuit board receives a frame start signal, if so, execute step 1203, otherwise, continue to execute step 1202.
[0126] Step 1203: The first circuit board sends a service request instruction and first address information of the second circuit board.
[0127] Step 1204 , determining whether the first circuit board has received a response instruction from the second circuit board, if so, executing step 1205 , otherwise, executing step 1209 .
[0128] Step 1205: The first circuit board sends a first transmission instruction to the second circuit board.
[0129] Step 1206: The first circuit board obtains the request result returned from the second circuit board.
[0130] Step 1207: The first circuit board sends its own address information and interrupt information.
[0131] Step 1208, this request ends.
[0132] Step 1209: The first circuit board sends its own address information and interrupt information.
[0133] Step 1210, this request ends.
[0134] Next, through Fig.13 The working process of the second circuit board is described as follows:
[0135] Step 1301: System power-on is completed.
[0136] Step 1302, determine whether the second circuit board receives the frame start signal, if so, execute step 1303, otherwise, continue to execute step 1302.
[0137] Step 1303 , determine whether the service request sent by the first circuit board is valid, if so, execute step 1304 , otherwise, execute step 1309 .
[0138] Step 1304: The second circuit board sends a response instruction.
[0139] Step 1305: The second circuit board receives the first transmission instruction sent by the first circuit board.
[0140] Step 1306: The second circuit board sends the request result to the first circuit board.
[0141] Step 1307: The second circuit board sends its own address information and interrupt information.
[0142] Step 1308, this request ends.
[0143] Step 1309: The second circuit board sends its own address information and interrupt information.
[0144] Step 1310, this request ends.
[0145] Next, through Fig.14 The interaction process between the first circuit board and the second circuit board is described as follows:
[0146] Step 1401, system power-on is completed.
[0147] Step 1402, determine whether the first circuit board needs to access the second circuit board, if so, execute step 1403, otherwise, execute step 1405.
[0148] Step 1403, proceed according to the workflow of the first circuit board.
[0149] Step 1404, this application ends.
[0150] Step 1405, proceed according to the workflow of the second circuit board.
[0151] Step 1406, this application ends.
[0152] Next, through Fig.15The following describes the working process of the switch board:
[0153] Step 1501, system power-on is completed.
[0154] Step 1502 , the switch board monitors in real time whether the service request instructions of each circuit board are valid. If so, execute step 1503 , otherwise, execute step 1509 .
[0155] Step 1503: Receive address information of the second circuit board sent by the first circuit board.
[0156] Step 1504 , determine whether the second circuit board is used as the target board, if so, execute step 1505 , otherwise, execute step 1507 .
[0157] Step 1505: The second circuit board sends a response instruction.
[0158] Step 1506, the switching board completes the interconnection between the first circuit board and the second circuit board until this application is completed.
[0159] Step 1507: The second circuit board sends a failure response instruction.
[0160] Step 1508, this request ends.
[0161] Step 1509, proceed according to the workflow of the second circuit board.
[0162] Step 1510, this application ends.
[0163] The data exchange system provided in the embodiment of the present application includes: a central switching module, multiple circuit boards and a communication bus, wherein the central switching module is used to provide the same clock signal and frame start signal to the multiple circuit boards so that each circuit board can be synchronized with the clock of the central switching module, and the central switching module is also used to obtain and parse the first transmission instruction sent by the first circuit board within the transmission cycle, obtain the first address information of the second circuit board carried by the first transmission instruction, and complete the communication connection between the first circuit board and the second circuit board according to the first address information, wherein the first circuit board and the second circuit board are any two of the multiple circuit boards. It can be seen that the circuit boards in the present system can be both instruction sending circuit boards and instruction receiving circuit boards within different transmission cycles, so that the message transmission between the circuit boards is more flexible, and the second circuit board returns the request result to the first circuit board within the transmission cycle, so that the request does not need to wait, thereby improving the transmission speed of the message.
[0164] The present application also provides a data exchange method. The specific implementation of the method can be found in the description of the system embodiment part, and the repeated parts will not be repeated. Fig.16 As shown, the specific implementation of this method is as follows:
[0165] Step 1601, providing the same clock signal and frame start signal to multiple circuit boards.
[0166] Step 1602: Receive a first transmission instruction sent by the first circuit board via the communication bus within a transmission cycle.
[0167] Step 1603, within the transmission cycle, obtain and parse the first transmission instruction, obtain the first address information of the second circuit board carried by the first transmission instruction, and complete the communication connection between the first circuit board and the second circuit board according to the first address information.
[0168] Step 1604: within the transmission cycle, enable the second circuit board to obtain the first transmission instruction, and transmit the first response signal to the first circuit board through the communication bus.
[0169] The first circuit board and the second circuit board are any two of the multiple circuit boards.
[0170] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0171] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A data exchange system, characterized in that: The system comprises: A central switching module, a plurality of circuit boards and a communication bus, wherein each of the circuit boards is connected to the central switching module via the communication bus; The central switching module is used to provide the same clock signal and frame start signal to the multiple circuit boards, so that the clock of each circuit board and the central switching module are synchronized; A first circuit board, used for sending a first transmission instruction to the central switching module via the communication bus within a transmission cycle; The central switching module is further used to obtain and parse the first transmission instruction within the transmission cycle, obtain the first address information of the second circuit board carried by the first transmission instruction, and complete the communication connection between the first circuit board and the second circuit board according to the first address information; The second circuit board is used to obtain the first transmission instruction within the transmission period, and transmit a first response signal to the first circuit board through the communication bus; Wherein, the first circuit board and the second circuit board are any two of the plurality of circuit boards; The last byte of the first transmission instruction includes second address information of the first circuit board.
2. The data exchange system according to claim 1, characterized in that: The transmission period is determined by the rising edge of the frame start signal, and one transmission period includes the time between at least two adjacent rising edges; or, The transmission period is determined by the falling edge of the frame start signal, and one transmission period includes the time between at least two adjacent falling edges.
3. The data exchange system according to claim 1 or 2, characterized in that: The first transfer instruction includes a first request tag, first address information, a second request tag and the number of valid data bits of the first transfer instruction.
4. The data exchange system according to claim 3, characterized in that: The first circuit board and the second circuit board respectively sample and update data at two adjacent rising edges of the clock signal, and the central switching module samples and updates data at a falling edge between the two rising edges; or, The first circuit board and the second circuit board respectively sample and update data at two adjacent falling edges of the clock signal, and the central switching module samples and updates data at a rising edge between the two falling edges.
5. The data exchange system according to claim 4, characterized in that: The last bit of the last byte of the first response signal is empty.
6. The data exchange system according to claim 5, characterized in that: The first response signal includes: an interrupt message; The central switching module is further used to issue an early warning according to the interruption message.
7. The data exchange system according to claim 6, characterized in that: The system further comprises: a third circuit board, a fourth circuit board, a peripheral interface circuit board and a data transmission interface; The third circuit board is used to send a second transmission instruction to the central switching module through the communication bus during the transmission period; The central switching module is further used to acquire and parse the second transmission instruction, obtain the third address information of the fourth circuit board carried by the second transmission instruction, and complete the communication connection between the third circuit board and the fourth circuit board according to the third address information; The fourth circuit board is used to obtain the second transmission instruction within the transmission period, generate a second response signal, and send the second response signal to the peripheral interface circuit board through the data transmission interface; The peripheral interface circuit board is used to obtain the data result corresponding to the second response signal, and send the data result to the fourth circuit board; The fourth circuit board is also used to transmit the data result to the third circuit board through the communication bus.
8. The data exchange system according to claim 7, characterized in that: The first circuit board is further used to send an idle instruction to the central switching module when the first circuit board is in an idle state, and the ath bit of the jth byte of the idle instruction is a high level; The first circuit board is further used to send a work instruction to the central switching module when the first circuit board is in a state of preparing to send a request, wherein the ath bit of the jth byte of the work instruction is at a low level; The first circuit board is also used to send a waiting instruction to the central switching module when the first circuit board is in a waiting state for receiving a request, wherein the ath bit of the jth byte of the waiting instruction is a high level and the bth bit of the jth byte is a low level.
9. A data exchange method, characterized in that: The data exchange system according to any one of claims 1 to 8 comprises: Provide the same clock signal and frame start signal for multiple circuit boards; receiving a first transmission instruction sent by the first circuit board through the communication bus within a transmission cycle; During the transmission cycle, acquiring and parsing the first transmission instruction, obtaining the first address information of the second circuit board carried by the first transmission instruction, and completing the communication connection between the first circuit board and the second circuit board according to the first address information; In the transmission cycle, the second circuit board acquires the first transmission instruction and transmits a first response signal to the first circuit board through the communication bus; Wherein, the first circuit board and the second circuit board are any two of the plurality of circuit boards; The last byte of the first transmission instruction includes second address information of the first circuit board.
