A chip module, communication system, and port allocation method

By using a switchable chip module port allocation method in the communication system between CPU and memory, dynamically adjusting the ratio and number of read and write ports, the problem of unreasonable signal crosstalk and resource allocation in parallel bus transmission is solved, and the problem of unreasonable signal crosstalk and resource allocation in parallel bus transmission is improved. The read and write bandwidth and signal rate of the communication system are obtained.

CN113868168BActive Publication Date: 2024-11-15HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110734849.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-06-30
Filing Date
2021-06-30
Publication Date
2024-11-15
Estimated Expiration
2041-06-30

AI Technical Summary

Technical Problem

In existing computer systems and communication systems, parallel bus transmission between CPU and memory leads to large signal crosstalk, limiting the increase in bus signal speed, and thus hindering the improvement of read and write bandwidth. In addition, the traditional SerDes fixed one-way transmission method and memory The read and write directions are not matched, resulting in unreasonable allocation of IO port resources.

Method used

Provide a port allocation method for chip modules and communication systems, and realizes flexible read and write bandwidth adjustment through multiple switchable ports, and switches between reading and writing using select ports, dynamically according to the transmission and reception requirements of chip modules. Adjust the port ratio and number, use high-response switching switches to avoid the influence of idle circuits, and improve the signal transmission rate.

Benefits of technology

It improves the read and write bandwidth and port flexibility of the communication system, enhances the signal transmission rate, reduces the occupation of IO ports and wiring complexity, and improves the working effect of chip modules and communication systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113868168B_ABST
    Figure CN113868168B_ABST
Patent Text Reader

Abstract

The present application provides a chip module, a communication system, and a port allocation method. The chip module has multiple first ports, at least some or all of which are first selection ports, and each first selection port can be used as a write port or a read port. In the above technical solution, by setting the first selection port to be selectable as a read port or a write port, it can be switched according to the working state of the chip module, thereby improving the read and write bandwidth of the chip module.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the priority of the Chinese patent application filed with the China Patent Office on June 30, 2020, with application number 202010622485.3 and application name “A chip module, communication system, and port allocation method”, and all of its contents are incorporated by reference into this application; this application claims the priority of the Chinese patent application filed with the China Patent Office on August 9, 2020, with application number 202010792434.5 and application name “A chip module, communication system, and port allocation method”, and all of its contents are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of communication technology, and in particular to a chip module, a communication system, and a port allocation method. Background Art

[0004] In common computer systems and communication systems, the CPU and memory are quickly read and written through a parallel bus. On the one hand, this method requires nearly half of the CPU's IO ports and a considerable printed circuit board wiring area. On the other hand, the parallel transmission causes large crosstalk between signals, which limits the improvement of the bus signal rate, and thus seriously hinders the improvement of the read and write bandwidth between the printed circuit board and the memory.

[0005] Therefore, serial high-speed signal transmission for memory reading and writing has also been proposed as a new type of CPU-memory bus method. SerDes (short for SERializer serializer / DESerializer deserializer) differential signal can better resist the impact of crosstalk and greatly increase the signal transmission rate, but the traditional SerDes fixed unidirectional transmission method and IO resource allocation with equal sending and receiving bandwidth do not match the random allocation method of memory reading and writing directions. Summary of the invention

[0006] The present application provides a chip module, a communication system, and a port allocation method, which improve the flexibility of ports during communication in the communication system.

[0007] In a first aspect, a chip module is provided, which can be used in a communication system, and the chip module is used for the transmission of read and write data, more precisely, for the transmission of multi-channel serial read and write data. The chip module has a plurality of first ports, each of which is capable of single-channel serial data transmission. Among the plurality of first ports, at least one first port is a first selection port, and the first selection port has a switching function for working as a write port or a read port. In the above technical solution, the first selection port can be selected as a read port or a write port, so that it can be switched according to the working state of the chip module, thereby improving the read and write bandwidth of the chip module.

[0008] In an optional implementation, the chip module further includes a first control module, which controls the first selection port to switch between a read port and a write port according to the transceiver requirements of the chip module, and matches the transceiver requirements of the chip module. The working state of the first selection port is controlled by the first control module, and the number of the read port and the write port of the chip module is flexibly adjusted.

[0009] In an optional embodiment, among the plurality of first ports, each first port is a first selection port. All ports can be switched to write ports, or all ports can be switched to read ports.

[0010] In an optional embodiment, among the plurality of first ports, some are fixed read ports, some are fixed write ports, and the rest are first selection ports. Only a few first selection ports need to be switched as ports with adjustable ratio of read ports to write ports, which is convenient for switching.

[0011] In an optional implementation, the first control module is also used to obtain the required ratio of write ports and read ports as a target ratio according to the transceiver requirements of the chip module; and confirm the current ratio of write ports and read ports in the chip module; when the current ratio is different from the target ratio, the first control module is used to control the first selection port to switch to a read port or a write port according to the comparison result between the target ratio and the current ratio, until the ratio of the read port and the write port of the chip module is consistent with the target ratio. The effect of the chip module transceiver requirements corresponding to the port is achieved, and the degree of freedom of matching is improved.

[0012] In an optional scheme, the first control module is also used to obtain the number and positions of the required write ports and read ports according to the receiving and transmitting requirements of the chip module; compare the number and positions of the required write ports and read ports with the number and positions of the current write ports and read ports to determine the first selection port that needs to be switched.

[0013] In an optional implementation, the first control module is further configured to determine a first selected port to be switched, and switch the determined first selected port according to the transceiver requirements of the chip module, and adjust the transceiver state of the corresponding first selected port according to the transceiver requirements of the chip module.

[0014] In an optional embodiment, the first control module is further used to control at least part of the first selection ports used as read ports to switch to write ports when the current ratio is less than the target ratio;

[0015] When the current ratio is greater than the target ratio, at least part of the first selected ports serving as write ports are controlled to switch to read ports, thereby adjusting the number of write ports and read ports.

[0016] In an optional implementation, each first selection port includes: a first connection port, a first receiving circuit, a first sending circuit, and a first selection switch; wherein, the first connection port is selectively connected to one of the first receiving circuit or the first sending circuit through the first selection switch, and the other circuit is disconnected from the first connection port; when the first receiving circuit is connected to the first connection port, the first selection port serves as the write port; when the first sending circuit is connected to the first connection port, the first selection port serves as the read port. When the first selection port serves as a read port, the receiving circuit is completely disconnected from the first connection port; similarly, when the first selection port serves as a write port, the sending circuit is completely disconnected from the first connection port. This avoids the influence of idle circuits on the first selection port, and improves the working effect of the chip module.

[0017] In an optional implementation, the first control module is further used to send a switching instruction message to a counterpart chip module paired with the chip module, and to receive a message fed back by the counterpart chip module indicating that the switching is completed, thereby realizing information interaction between the two chip modules.

[0018] In an optional embodiment, the first selection switch is a switching switch with a ns-level response, which has a relatively high response.

[0019] In an optional embodiment, the first selection switch is a single-pole double-throw switch, which implements the switching of the second selection port between the write port and the read port.

[0020] In an optional embodiment, the first selection switch is a metal oxide semiconductor field effect transistor.

[0021] In a second aspect, a chip module is provided, the chip module comprising: a plurality of second ports and a second control module, at least some of the second ports being second selection ports; the second control module controlling the second selection port to switch between a read port and a write port according to the transceiver requirements of a peer chip module paired with the chip module. In the above technical solution, the second selection port can be selected as a read port or a write port, so that it can be switched according to the working state of the chip module, thereby improving the read and write bandwidth of the chip module.

[0022] In an optional embodiment, among the plurality of second ports, each second port is a second selection port. All the ports can be switched to write ports, or all the ports can be switched to read ports.

[0023] In an optional embodiment, some of the plurality of second ports are fixed read ports, some are fixed write ports, and the rest are second selection ports. Only a few second selection ports need to be switched as ports with an adjustable ratio of read ports to write ports, which facilitates switching.

[0024] In an optional implementation, the second control module is used to control the corresponding second selection port to switch to a read port or a write port after receiving the switching indication message sent by the opposite chip module; after the switching is completed, the second control module is also used to send a message indicating the completion of the switching to the first control module, so as to realize information exchange between the two chip modules.

[0025] In an optional embodiment, each second selection port includes: a second connection port, a second receiving circuit, a second sending circuit and a second selection switch; wherein, the second connection port is selectively connected to one of the second receiving circuit or the second sending circuit through the second selection switch, and the other circuit is disconnected from the second connection port; when the second receiving circuit is connected to the second connection port, the second selection port serves as a write port; when the second sending circuit is connected to the second connection port, the second selection port serves as a read port. In addition, when the second selection port serves as a read port, the receiving circuit is completely disconnected from the second connection port; similarly, when the second selection port serves as a write port, the sending circuit is completely disconnected from the second connection port. This avoids the influence of idle circuits on the second selection port, and improves the working effect of the chip module.

[0026] In an optional embodiment, the second selection switch is a switching switch with a ns-level response, which has a relatively high response.

[0027] In an optional embodiment, the second selection switch is a single-pole double-throw switch, which implements the switching of the second selection port between the write port and the read port.

[0028] In an optional embodiment, the second selection switch is a metal oxide semiconductor field effect transistor.

[0029] In the third aspect, a communication system is provided, which includes a first chip module and a second chip module, wherein the first chip module is any of the chip modules described above; wherein the first port of the first chip module and the second port of the second chip module are connected one-to-one. In the above technical scheme, the first selection port can be selected as a read port or a write port, so that it can be switched according to the working state of the first chip module, thereby improving the read and write bandwidth of the communication system. In addition, when the selection port is used as a read port, the receiving circuit is completely disconnected from the connection port; similarly, when the first selection port is used as a write port, the sending circuit is completely disconnected from the connection port, thereby avoiding the influence of idle circuits on the selection port and improving the working effect of the communication system.

[0030] In an optional embodiment, the second chip module is any one of the chip modules described above. The read and write bandwidth of the communication system is improved.

[0031] In a fourth aspect, a communication system is provided, comprising a first chip module and a second chip module, wherein the second chip module is a chip module as described in any one of the above items; wherein the first port of the first chip module and the second port of the second chip module are connected in a one-to-one correspondence. In the above technical scheme, the first selection port can be selected as a read port or a write port, so that it can be switched according to the working state of the second chip module, thereby improving the read and write bandwidth of the communication system. In addition, when the selection port is used as a read port, the receiving circuit is completely disconnected from the connection port; similarly, when the first selection port is used as a write port, the sending circuit is completely disconnected from the connection port, thereby avoiding the influence of idle circuits on the selection port and improving the working effect of the communication system.

[0032] In a fifth aspect, a port allocation method is provided, the allocation method comprising the following steps: obtaining the transceiver requirements of the chip module; switching the first selection port of the chip module between a read port and a write port according to the transceiver requirements of the chip module obtained. In the above technical solution, the first selection port can be selected as a read port or a write port, so that it can be switched according to the working state of the chip module to improve the read and write bandwidth of the chip module. In addition, the working state of the first selection port is controlled by the first control module, and the number of read ports and write ports of the chip module is flexibly adjusted.

[0033] In an optional solution, switching the first selection port between the read port and the write port according to the acquired transceiver requirement of the chip module is specifically:

[0034] According to the transceiver requirements of the chip module, a required ratio of the write port to the read port is obtained as a target ratio;

[0035] Determine the current ratio of the write port to the read port in the chip module;

[0036] When the current ratio is different from the target ratio, the first selection port is controlled to switch to a read port or a write port according to the comparison result between the target ratio and the current ratio, until the ratio of the read port to the write port of the chip module is consistent with the target ratio. This achieves the effect of the chip module transceiver requirements corresponding to the port, and improves the degree of freedom of matching.

[0037] In an optional solution, the method further includes: determining a first selected port to be switched, and switching the determined first selected port according to the transceiver requirement of the chip module. Adjusting the transceiver state of the corresponding first selected port according to the transceiver requirement of the chip module.

[0038] In an optional solution, the method further includes: sending a switching indication message to a counterpart chip module paired with the chip module; and receiving a message fed back by the counterpart chip module indicating that the switching is completed, thereby realizing information exchange between the two chip modules.

[0039] In a sixth aspect, a port allocation method is provided, the method comprising the following steps: obtaining the transceiver requirements of the opposite chip module; and switching the second selection port of the chip module between a read port and a write port according to the transceiver requirements of the opposite chip module. In the above technical solution, the second selection port can be selected as a read port or a write port, so that it can be switched according to the working state of the chip module, thereby improving the read and write bandwidth of the chip module.

[0040] In an optional solution, the second selection port of the chip module is switched between the read port and the write port according to the transceiver requirements of the opposite chip module: after receiving the switching instruction message sent by the opposite chip module, the corresponding second selection port is controlled to switch to the read port or the write port; after the switching is completed, a message indicating the completion of the switching is sent to the opposite chip module. The switching of the second selection port and the information exchange between the two chip modules are realized.

[0041] In a seventh aspect, a port allocation method is provided, the method comprising the following steps:

[0042] Obtaining the receiving and sending requirements of the first chip module;

[0043] According to the transceiver requirements of the first chip module, the first selection port of the first chip module is switched to a read port or a write port; and

[0044] According to the receiving and transmitting requirements of the first chip module, the second selection port of the paired second chip module is switched to a read port or a write port.

[0045] In the above technical solution, the port can be selected as a read port or a write port, so that it can be switched according to the working state of the first chip module, thereby improving the read and write bandwidth of the communication system. At the same time, by selecting the working state of the port, the number of read ports and write ports of the chip module can be flexibly adjusted, thereby improving the flexibility of the entire communication system.

[0046] In an optional solution, the first selection port is switched to a read port or a write port according to the transceiver requirement of the first chip module, specifically:

[0047] According to the transceiver requirements of the first chip module, a required ratio of the write port to the read port is obtained as a target ratio;

[0048] Determining a current ratio of write ports to read ports in the first chip module;

[0049] When the current ratio is different from the target ratio, the first selection port is controlled to switch to a read port or a write port according to the comparison result between the target ratio and the current ratio, until the ratio of the read port to the write port of the first chip module is consistent with the target ratio. This achieves the effect of the chip module transceiver requirements corresponding to the port, and improves the degree of freedom of matching.

[0050] In an optional solution, the method further includes:

[0051] The first chip module sends a switching instruction message to the second chip module;

[0052] After the second chip module receives the switching instruction message sent by the first chip module, it controls the corresponding second selection port to switch to a read port or a write port; after the switching is completed, it sends a message indicating the completion of the switching to the first chip module; the first chip module receives the message indicating the completion of the switching sent by the second chip module, thereby realizing information interaction between the two chip modules.

[0053] In an eighth aspect, an embodiment of the present application provides a signal processing module, the signal processing module comprising a processor for implementing the method described in the fifth aspect, the sixth aspect or the seventh aspect. The signal processing module may also include a memory for storing instructions and data. The memory is coupled to the processor, and when the processor executes the program instructions stored in the memory, the method described in the fourth aspect may be implemented. The signal processing module may also include a communication interface, and the communication interface is used for the apparatus to communicate with other devices. Exemplarily, the communication interface may be a transceiver, a circuit, a bus, a module or other types of communication interfaces, and other devices may be network devices or terminal devices, etc.

[0054] In a specific implementable scheme, the signal processing module includes: a memory for storing program instructions; a processor for calling the instructions stored in the memory so that the device executes the fifth aspect of the present application and any possible design method in the fifth aspect, or the sixth aspect of the present application and any possible design method in the sixth aspect, or the seventh aspect of the present application and any possible design method in the seventh aspect.

[0055] In the ninth aspect, an embodiment of the present application also provides a computer-readable storage medium, comprising instructions, which, when executed on a computer, enables the computer to execute the method of the fifth aspect of the present application and any possible design of the fifth aspect, or the method of the sixth aspect of the present application and any possible design of the sixth aspect, or the method of the seventh aspect of the present application and any possible design of the seventh aspect.

[0056] In the tenth aspect, a computer program product is also provided in an embodiment of the present application, comprising instructions, which, when executed on a computer, enable the computer to execute the method of the fifth aspect of the present application and any possible design of the fifth aspect, or the method of the sixth aspect of the present application and any possible design of the sixth aspect, or the method of the seventh aspect of the present application and any possible design of the seventh aspect.

[0057] In addition, the technical effects brought about by any possible design method in aspects 8 to 10 can be referred to the effects brought about by different design methods in the method part, and will not be repeated here.

[0058] In the eleventh aspect, a chip module is provided, which includes: a plurality of first ports and a first control module; at least some of the plurality of first ports are selection ports, and the selection ports can work as read ports or write ports; the first control module controls the first selection port to switch between the read port and the write port according to the transceiver requirements of the chip module or according to the received switching instruction, and matches the transceiver requirements of the chip module. In the above technical solution, the first selection port can be selected as a read port or a write port, so that it can be switched according to the working state of the chip module, thereby improving the read and write bandwidth of the chip module. In addition, the working state of the first selection port is controlled by the first control module, and the number of read ports and write ports of the chip module can be flexibly adjusted.

[0059] In an optional solution, the received switching instruction comes from a peer chip module, and the peer chip module controls the chip module to perform port switching.

[0060] In an optional solution, the first control module is used to control the corresponding selected port to switch to a read port or a write port after receiving the switching indication message sent by the opposite chip module; after the switching is completed, the first control module is also used to send a message indicating the switching is completed to the first control module to realize information interaction.

[0061] In an optional scheme, the first control module is also used to obtain the required ratio of write ports and read ports as a target ratio according to the receiving and transmitting requirements of the chip module; and confirm the current ratio of write ports and read ports in the chip module; when the current ratio is different from the target ratio, the first control module is used to control the first selection port to switch to a read port or a write port according to the comparison result of the target ratio and the current ratio, until the ratio of the read port and the write port of the chip module is consistent with the target ratio.

[0062] In an optional scheme, each first selection port includes: a first connection port, a first receiving circuit, a first sending circuit and a first selection switch; wherein, the first connection port is selectively connected to one of the first receiving circuit or the first sending circuit through the first selection switch; when the first receiving circuit is connected to the first connection port, the first selection port serves as the write port; when the first sending circuit is connected to the first connection port, the first selection port serves as the read port.

[0063] In the twelfth aspect, a mobile terminal is provided, which includes the chip module described in any one of the above items and the chip module of the opposite end of the signal connection. In the above technical solution, the first selection port can be selected as a read port or a write port, so that it can be switched according to the working state of the chip module to improve the read and write bandwidth of the communication system. In addition, when the port is selected as a read port, the receiving circuit is completely disconnected from the connection port; similarly, when the first selection port is used as a write port, the sending circuit is completely disconnected from the connection port, avoiding the influence of idle circuits on the selection port and improving the working effect of the communication system. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 A communication block diagram of a first chip module and a second chip module provided in an embodiment of the present application;

[0065] Figure 2 A schematic diagram of CPU-memory communication in the prior art;

[0066] Figure 3 A structural block diagram of a communication system provided in an embodiment of the present application;

[0067] Figure 4 A block diagram of the coordination of the selection ports of the first chip module and the second chip module provided in an embodiment of the present application;

[0068] Figure 5 A structural block diagram of a first chip module provided in an embodiment of the present application;

[0069] Figure 6 A structural block diagram of a second chip module provided in an embodiment of the present application;

[0070] Figure 7 A schematic diagram of a switching process for selecting a port provided in an embodiment of the present application;

[0071] Figure 8 A schematic diagram of another switching process for selecting a port provided in an embodiment of the present application;

[0072] Fig. 9 A schematic diagram of another switching process for selecting a port provided in an embodiment of the present application;

[0073] Fig.10 A schematic diagram of another switching process for selecting a port provided in an embodiment of the present application;

[0074] Fig.11 A structural block diagram of another communication system provided in an embodiment of the present application;

[0075] Fig.12 This is a structural block diagram of the signal processing module provided in an embodiment of the present application. DETAILED DESCRIPTION

[0076] The embodiments of the present application will be further described below in conjunction with the accompanying drawings.

[0077] The chip module provided in the embodiment of the present application is applied to a common computer system or communication system. Figure 1 The communication block diagram of the two chip modules shown in the figure. For the convenience of description, the two chip modules are named as the first chip module and the second chip module, respectively, wherein the second chip module is the opposite chip of the first chip module, and the first chip module is the opposite chip of the second chip module. The first chip module and the second chip module can be different devices. For example, the first chip module is a central processing unit (CPU), and the second chip module is a memory. The CPU and the memory are connected through a parallel bus (Parallel Bus), and the parallel bus is used for fast reading and writing. On the one hand, this method requires nearly half of the CPU's IO (input and output) ports and a considerable wiring area. On the other hand, due to the large crosstalk between signals caused by parallel transmission, the improvement of the parallel bus signal rate is limited, which seriously hinders the improvement of the read and write bandwidth between the CPU and the memory. Therefore, serial high-speed signal transmission for memory reading and writing has also been proposed as a new type of CPU-memory bus method.

[0078] like Figure 2 The CPU-memory bus mode shown in the figure. The CPU and memory use SerDes (short for SERializer / DESerializer) differential signal communication. The SerDes differential signal can better resist the influence of crosstalk and greatly improve the signal transmission rate, but the fixed unidirectional transmission mode of the traditional SerDes differential signal and the IO port resource allocation with equal sending and receiving bandwidths do not match the random behavior of the memory read and write direction. When n Tx (T, Transmit, transmit; x represents the cross symbol) ports and n Rx (R, Receive, receive; x represents the cross symbol) ports are used, when a Tx port and b Rx ports are required between the CPU and the memory, the existing n Tx ports and n Rx ports cannot be matched, where a, b, and n are positive integers, and a and b are not equal to n.

[0079] Therefore, how to reasonably allocate IO ports to adapt to memory read and write behavior has become a major research direction for improving CPU-memory read and write bandwidth or other similar bus bandwidths. To this end, the present application embodiment provides a new communication system and port allocation method.

[0080] The communication system provided by the embodiment of the present invention can determine the transmission and reception operation requirements in the future through the first chip module (such as CPU) and compare it with the current transmission and reception state, mark the IO port position that needs to change the state according to the comparison result, and then initiate the state switching of the IO port specified by itself and the opposite second chip module (such as memory) within a certain period of time through a preset control mechanism to match the actual demand for business data transmission and reception in the next time period and optimize the effective bandwidth of the business. The first chip module and the second chip module in the system are described below in conjunction with the accompanying drawings.

[0081] Figure 3 The schematic diagram of the structure of the system shows that the first chip module 100 and the second chip module 200 respectively have a plurality of IO ports. For the convenience of distinction, the IO port on the first chip module 100 is named as the first port 110 , and the IO port on the second chip module 200 is named as the second port 210 .

[0082] As an optional solution, the plurality of first ports 110 can be divided into fixed ports 112 and selection ports according to their functions. To distinguish the selection port of the first chip module 100 from the port of the second chip module 200, the selection port of the first chip module 100 is named as the first selection port 111. The fixed port 112 is a port that can only realize the read or write function, such as the fixed port 112 can be divided into a read port (a port that can realize the read function) and a write port (a port that can realize the write function). The first selection port 111 is a port that can switch between the read and write functions. The first selection port 111 has two working states, one working state is that the first selection port 111 is used as a write port, and the other working state is that the first selection port 111 is used as a read port.

[0083] As an optional solution, the plurality of second ports 210 can also be divided into fixed ports 212 and selection ports according to their functions. To distinguish it from the first selection port 111, the selection port of the second chip module 200 is named the second selection port 211. The fixed port 212 can be divided into a read port (a port that can realize the read function) and a write port (a port that can realize the write function). The second selection port 211 is a port that can switch between the read and write functions. The second selection port 211 has two working states, one working state is that the second selection port 211 is used as a write port, and the other working state is that the second selection port 211 is used as a read port. In the specific setting, some of the plurality of first ports 110 can be selected as fixed read ports, some as fixed write ports, and the rest as first selection ports 111.

[0084] As an optional solution, the fixed port 112 corresponds to the fixed port 212 and is connected via the parallel bus 300 , and the first selection port 111 and the second selection port 211 also correspond to each other and are connected via the parallel bus 300 .

[0085] The read port and write port of the first chip module 100 and the write port and read port of the second chip module 200 are paired, such as if one of the two ports connected to the same service channel of the parallel bus 300 is a read port, the other port is a write port. Exemplarily, if the first port 110 connected to a service channel is a read port, the second port 210 connected to the service channel is a write port; if the first port 110 connected to a service channel is a write port, the second port 210 connected to the service channel is a read port. In specific settings, some of the multiple second ports 210 can be selected as fixed read ports, some as fixed write ports, and the rest as second selection ports.

[0086] by Figure 3 Taking the system shown as an example, the number of the first ports 110 of the first chip module 100 is N, and the N first ports 110 include K first selection ports 111, L read ports, and M write ports, wherein N, K, L, and M are all positive integers greater than 1, and N=K+L+M. The number of the second ports 210 of the second chip module 200 is N, and the N second ports 210 include K second selection ports 211, L write ports, and M read ports. The number of the first ports 110 of the first chip module 100 and the function of each first port 110 match the number and function of the second ports 210 of the second chip module 200 to achieve data transmission.

[0087] Figure 3The arrow direction of the service channel represents the direction of data transmission. The M write ports and the M read ports are connected through the service channels R Lane 0 to R Lane M-1, and data can be transmitted from the first chip module 100 to the second chip module 200. The L read ports and the L write ports are connected through the service channels W Lane 0 to W Lane L-1, and data can be transmitted from the second chip module 200 to the first chip module 100. The K first selection ports 111 and the K second selection ports are connected through the service channels Lane 0 to Lane K-1, which can realize bidirectional transmission of data between the first chip module 100 and the second chip module 200. The specific transmission direction is realized by the specific functions of the first selection port 111 and the second selection port. Exemplarily, if in the paired first selection port 111 and the second selection port 211, the first selection port 111 is a read port, then the second selection port 211 is a write port, and data can be transmitted from the first chip module 100 to the second chip module 200; if in the paired first selection port 111 and the second selection port 211, the first selection port 111 is a write port, then the second selection port 211 is a read port, and data can be transmitted from the second chip module 200 to the first chip module 100.

[0088] Figure 4 The diagram shows the coordination between the first selection port 111 of the first chip module and the second selection port 211 of the second chip module. The first selection port 111 and the second selection port 211 are connected via a service channel of the parallel bus 300 . Figure 4 The service channel shown in FIG. 1 is a bidirectional service channel, which can realize data transmission from the first chip module 100 to the second chip module 200 , or from the second chip module 200 to the first chip module 100 .

[0089] For reference Figure 5 , Figure 5 Shows Figure 4 The first selection port in the first chip module in the embodiment of the present invention. The first selection port 111 includes: a first connection port 1111, a first receiving circuit 1112, a first sending circuit 1113 and a first selection switch 1114. The first connection port 1111 is used as an external port of the first selection port 111 for connecting to a service channel in a parallel bus. The first receiving circuit 1112 is used to implement the write function of the first selection port 111. When the first receiving circuit 1112 is connected to the first connection port 1111, the first selection port 111 is used as a write port. The first sending circuit 1113 is used to implement the read function of the first selection port 111. When the first sending circuit 1113 is connected to the first connection port 1111, the first selection port 111 is used as a read port.

[0090] The first connection port 1111 is connected to the first receiving circuit 1112 and the first transmitting circuit 1113 through the first selection switch 1114, and can be selectively connected to the first receiving circuit 1112 or the first transmitting circuit 1113 through the first selection switch 1114. The above-mentioned selectively refers to selecting one of the first receiving circuit 1112 and the first transmitting circuit 1113 for connection. For example, the first connection port 1111 is connected to the first receiving circuit 1112 through the first selection switch 1114, or the first connection port 1111 is connected to the first transmitting circuit 1113 through the first selection switch 1114.

[0091] When the first connection port 1111 is selectively connected to one of the first receiving circuit 1112 and the first transmitting circuit 1113, the first connection port 1111 is disconnected from the other circuit. Exemplarily, when the first connection port 1111 is connected to the first receiving circuit 1112, the first transmitting circuit 1113 is disconnected from the first connection port 1111; the first receiving circuit 1112 is in a working state, and the first transmitting circuit 1113 is in a non-working state; when the first connection port 1111 is connected to the first transmitting circuit 1113, the first receiving circuit 1112 is disconnected from the first connection port 1111; the first transmitting circuit 1113 is in a working state, and the first receiving circuit 1112 is in a non-working state. When the above method is adopted, the circuit in the working state is completely isolated from the circuit in the non-working state through the first selection switch 1114, thereby avoiding the circuit in the non-working state from forming a large parasitic capacitance and signal residue and affecting the sending or receiving performance of the working circuit, thereby improving the high-speed signal supporting capability of the first selection port 111, and can increase the signal rate that the first selection port 111 can support to 25Gbp or higher.

[0092] In an optional embodiment, the first selection switch 1114 may be a fast switch with low latency. For example, the first selection switch 1114 may be a ns-level switching switch. The response time of the first selection switch 1114 is between 1ns and 100ns, such as 1ns, 5ns, 10ns, 20ns, 50ns, 100ns, etc. Therefore, the first selection switch 1114 can be used to quickly switch between the first transmitting circuit 1113 and the first receiving circuit 1112, without causing a significant delay effect on the state switching process of the first selection port 111.

[0093] The first selection switch 1114 can use different switches when switching between the first receiving circuit 1112 and the first sending circuit 1113. For example, the first selection switch 1114 is a single-pole double-throw switch, the active end of the first selection switch 1114 is connected to the first connection port 1111, and the two fixed ends are connected to the first sending circuit 1113 and the first receiving circuit 1112 in a one-to-one correspondence. Exemplarily, the first selection switch 1114 can be a metal oxide semiconductor field effect transistor or other switch circuits that can switch the first sending circuit 1113 and the first receiving circuit 1112.

[0094] For reference Figure 6 , Figure 6 Shows Figure 4 The second selection port of the second chip module in the embodiment of the present invention. The second selection port 211 includes: a second connection port 2111, a second receiving circuit 2112, a second sending circuit 2113 and a second selection switch 2114. The second connection port 2111 is used as an external port of the second selection port 211 for connecting to a service channel in the parallel bus. The second receiving circuit 2112 is used to implement the write function of the second selection port 211. When the second receiving circuit 2112 is connected to the second connection port 2111, the second selection port 211 is used as a write port. The second sending circuit 2113 is used to implement the read function of the second selection port 211. When the second sending circuit 2113 is connected to the second connection port 2111, the second selection port 211 is used as a read port.

[0095] The second connection port 2111 is connected to the second receiving circuit 2112 and the second transmitting circuit 2113 through the second selection switch 2114, and can be selectively connected to the second receiving circuit 2112 or the second transmitting circuit 2113 through the second selection switch 2114. The above-mentioned selectively refers to selecting one of the second receiving circuit 2112 and the second transmitting circuit 2113 for connection. For example, the second connection port 2111 is connected to the second receiving circuit 2112 through the second selection switch 2114, or the second connection port 2111 is connected to the second transmitting circuit 2112 through the second selection switch 2114.

[0096] When the second connection port 2111 is selectively connected to one of the second receiving circuit 2112 and the second sending circuit 2113, the second connection port 2111 is disconnected from the other circuit. Exemplarily, when the second connection port 2111 is connected to the second receiving circuit 2112, the second sending circuit 2113 is disconnected from the second connection port 2111; the second receiving circuit 2112 is in a working state, and the second sending circuit 2113 is in a non-working state; the second connection port 2111 is connected to the second sending circuit 2113, and the second receiving circuit 2112 is disconnected from the second connection port 2111; the second sending circuit 2113 is in a working state, and the second receiving circuit 2112 is in a non-working state. When the above method is adopted, the circuit in the working state is completely isolated from the circuit in the non-working state through the second selection switch 2114, thereby avoiding the circuit in the non-working state from forming a large parasitic capacitance and signal residue and affecting the sending or receiving performance of the working circuit, thereby improving the high-speed signal support capability of the second selection port 211, and can increase the signal rate that the second selection port 211 can support to 25Gbp or higher.

[0097] In an optional embodiment, the second selection switch 2114 may be a fast switch with low latency. For example, the second selection switch 2114 may be a ns-level switching switch. The response time of the second selection switch 2114 is between 1ns and 100ns, such as 1ns, 5ns, 10ns, 20ns, 50ns, 100ns, etc. Therefore, the second selection switch 2114 can be used to quickly switch between the second transmitting circuit 2113 and the second receiving circuit 2112, without causing a significant delay effect on the state switching process of the second selection port 211.

[0098] The second selection switch 2114 can use different switches when switching between the second receiving circuit 2112 and the second sending circuit 2113. For example, the second selection switch 2114 is a single-pole double-throw switch, the active end of the second selection switch 2114 is connected to the second connection port 2111, and the two fixed ends are respectively connected to the second sending circuit 2113 and the second receiving circuit 2112 in a one-to-one correspondence. Exemplarily, the second selection switch 2114 can be a metal oxide semiconductor field effect transistor or other different switch circuits that can switch the first sending circuit and the first receiving circuit.

[0099] Combination Figure 4 , Figure 5 and Figure 6The different working states of the first selection port 111 and the second selection port 211 during data transmission are described. When data needs to be transmitted from the first chip module 100 to the second chip module 200, the first selection port 111 is used as a read port and the second selection port 211 is used as a write port. Among them, the first connection port 1111 is connected to the first sending circuit 1113 through the first selection switch 1114, so that the first selection port 111 is used as a read port; the second connection port 2111 is connected to the second receiving circuit 2112 through the second selection switch 2114, so that the second selection port 211 is used as a write port. When data needs to be transmitted from the second chip module 200 to the first chip module 100, the first selection port 111 is used as a write port and the second selection port 211 is used as a read port. The first connection port 1111 is connected to the first receiving circuit 1112 through the first selection switch 1114, so that the first selection port 111 is used as a write port; the second connection port 2111 is connected to the second sending circuit 2113 through the second selection switch 2114, so that the second selection port 211 is used as a read port.

[0100] When switching the above-mentioned first selection port 111 and the second selection port 211, it can be done according to the transceiver requirements of the first chip module. In the embodiment of the present application, the first chip module can also be used to determine the requirements for sending and receiving operations in the future and compare them with the current transceiver state, and mark the IO port position that needs to change the state according to the comparison result, and then initiate the state switching of the IO port specified by itself and the second chip module (such as memory) on the opposite end within a certain period of time through a preset control mechanism to match the actual requirements for business data transceiver in the next time period. Among them, the above-mentioned first chip module can be specifically for the upper chip or software of the communication system where the first chip module is located to determine the requirements for sending and receiving operations in the future. Indicate that the transceiver port of the first chip module does not meet the business requirements and point out the specific adjustment strategy. Or the first chip module itself adjusts according to the mismatch between the business requirements of the current transmission information and the port allocation. For example, when the first chip module finds that data reception has been queued at the port, and the port for sending data is still available, the port of the first chip module is adjusted according to the data received and sent.

[0101] The above-mentioned preset control mechanism refers to obtaining the number and position of the required write ports and read ports according to the transceiver requirements of the first chip module; comparing the number and position of the required write ports and read ports with the number and position of the current write ports and read ports to determine the first selected port that needs to be switched. Take the first chip module with N ports as an example, the N ports are respectively the 0th port to the Nth port. The transceiver requirements of the first chip module determine that the number of write ports and read ports are M and L respectively, where M+L=N; wherein the 0th port to the Mth port are read ports, and the M+1th port to the Nth port are write ports. Among the N ports of the current first chip, the 0th port to the Math port are read ports, and the M-(a+1)th port to the Nth port are write ports. When switching, it is determined that the M-(a+1)th port to the Mth port need to be switched from a write port to a read port. The above-mentioned N, M, L, and a are all positive integers greater than 1.

[0102] When controlling the first selection port, the first chip module further includes a first control module 120, and the first chip module controls the first selection port to switch between the write port and the read port through the first control module 120 to match the transceiver requirements of the first chip module. Specifically, the first control module 120 can control the first selection switch to switch at least part of the first selection port to the write port, or switch at least part of the first selection port to the read port according to the transceiver requirements of the first chip module (the requirements for the transmission and reception operations in the future period of time in the above example).

[0103] When switching specifically, it is necessary to compare the ratio of sending and receiving in the current first port of the first chip module with the transceiver requirement of the first chip module to make targeted adjustments. Therefore, the first control module 120 provided in the embodiment of the present application is also used to obtain the required ratio of write ports and read ports as a target ratio according to the transceiver requirement of the first chip module, and the target ratio is the ratio of the number of write ports to the number of read ports.

[0104] The first control module 120 is also used to confirm the current ratio of the write port and the read port in the current first chip module, which is the ratio of the number of the write ports to the number of the read ports. The number of the write ports currently is the sum of the number of the write ports in the fixed ports and the number of the first selected ports that are part or all of the write ports; the number of the read ports currently is the sum of the number of the read ports in the fixed ports and the number of the first selected ports that are part or all of the read ports.

[0105] When the first control module 120 controls the switching, the following states are included:

[0106] 1) When the current ratio is consistent with the target ratio, the first control module 120 does not control the first selection port to switch the working state. The first selection switch does not operate, and each first selection port still maintains the existing working state.

[0107] 2) When the current ratio is different from the target ratio, the first control module 120 is used to control the first selection switch to switch the first selection port according to the comparison result between the target ratio and the current ratio until the ratio of the read port and the write port of the first chip module is consistent with the target ratio.

[0108] Specifically, it can be divided into two types: a. When the current ratio is less than the target ratio, at least part of the first selected ports used as read ports are controlled to switch to write ports until the ratio of the number of write ports to the number of read ports is equal to the target ratio. b. When the current ratio is greater than the target ratio, at least part of the first selected ports used as write ports are controlled to switch to read ports until the ratio of the number of write ports to the number of read ports is equal to the target ratio.

[0109] When switching, the first control module 120 is used to obtain the number and position of the required write ports and read ports according to the transceiver requirements of the first chip module, compare the number and position of the required write ports and read ports with the number and position of the current write ports and read ports, and determine the first selected port 111 to be switched. And according to the transceiver requirements of the first chip module 100, the determined first selected port 111 is switched. Figure 3 For example, when K first selection ports 111 are arranged, according to the transceiver requirements of the first chip module 100, it is determined which first selection ports 111 need to be switched, and the positions of the first selection ports 111 that need to be switched are determined. For example, when it is determined that the K-1th first selection port 111 needs to be switched, the position of the K-1th first selection port 111 is determined, and after the position is determined, the first K-1th first selection port is controlled to be switched.

[0110] When the first chip module 100 switches, the second selection port 211 of the corresponding second chip module 200 also switches accordingly. During the specific switching, the second control module 220 controls the second selection port 211 to switch between the read port and the write port according to the transceiver requirements of the first chip module 100 to match the transceiver requirements of the first chip module 100.

[0111] When the first chip module and the second chip module are switched, the first chip module and the second chip module need to exchange information. In an optional solution, the first control module 120 is also used to send a switching indication message to the second chip module 200, and to receive a message from the second chip module 200 indicating that the switching is complete. After the second control module 220 receives the switching indication message sent by the first chip module 100, the second control module 220 is also used to control the corresponding second selection port 211 to switch to a read port or a write port; after the switching is completed, the second control module 220 is also used to send a message to the first control module indicating that the switching is complete. The information interaction between the first chip module 100 and the second chip module 200 is realized to ensure that the paired first selection port 111 and the second selection port 211 can be switched accordingly.

[0112] To facilitate understanding of the switching of the write port and the read port in the first port of the first chip module provided in the embodiment of the present application, the following is a detailed description in conjunction with the flowchart shown in the accompanying drawings. In the method flow shown below, the master device is the first chip module and the slave device is the second chip module.

[0113] Figure 7 A method flow for dynamically allocating a first port of a first chip module is described. Assuming that in the current state, the ratio of the first port of the master device for receiving and sending services is a:b (then the ratio of the slave device receiving and sending ports is b:a), that is, there are a*n Rx ports (write ports) and b*n Tx ports (read ports) in the first port of the master device. For the slave device, when the ratio of the first port of the master device for receiving and sending services is a:b, the ratio of the slave device receiving and sending ports is b:a, that is, there are a*n Tx ports and b*n Rx ports in the second port of the slave device. The above port allocation method performs the following steps:

[0114] Step 001: Obtain the sending and receiving requirements of the main device;

[0115] The master device predicts the required receiving bandwidth or sending bandwidth in the future through business demand planning to obtain the required number of write ports and read ports. The above-mentioned master device has the function of judging the sending and receiving operation requirements in the future, so it will not be repeated here.

[0116] Step 002: according to the receiving and sending requirements of the master device, switching the first selected port of the master device to a read port or a write port until the receiving and sending requirements of the master device are matched;

[0117] Specifically, the master device determines whether the actual demand (target ratio) of the transceiver service in the subsequent period is consistent with the current state (current ratio). If they are consistent, the following operations are not performed. If they are inconsistent, the required ratio of the write port and the read port is obtained as the target ratio according to the transceiver demand of the master device. The transceiver state of the current master device is confirmed in detail, and the current ratio of the write port and the read port in the current master device is confirmed to be a:b. The current state of the transceiver service is further compared with the actual demand, and the target ratio of the service channel is adjusted to a':b'. The target ratio of the service channel also corresponds to the target ratio of the write port and the read port in the first port.

[0118] When the current ratio is different from the target ratio, the first selected port is controlled to switch to a read port or a write port according to the comparison result between the target ratio and the current ratio, until the ratio of the read port and the write port of the master device is consistent with the target ratio. If the ratios are different, |a'-a| first selected ports are marked and a state switching process is initiated. At the same time, a state switching process is initiated for the SerDesIO (i.e., the second selected port) of the slave device at the opposite end.

[0119] Before switching, the first selected ports to be switched are determined, and the determined first selected ports are switched according to the transceiver requirements of the chip module. For example, it is determined which first selected ports continue to maintain the current state and which first selected ports need to switch the state. When switching, only the first selected ports determined to be switched are switched.

[0120] During the specific switching, the first control module controls the first selection switch in the first selection port whose state needs to be changed to switch. After the switching process, the master device completes the state switching of its first port and begins to enter the receiving and sending service stage.

[0121] When the first selected port of the master device is switched, the slave device also completes the state switching of its second selected port and begins to enter the receiving and sending service phase. The switching of the second selected port of the slave device matches the switching of the first selected port of the master device.

[0122] After SeDesIO completes the switching, the system reaches the effective bandwidth within the expected time period, that is, the ratio of the number of read and write service channels is a':b'.

[0123] The port switching of the master device and the slave device described above can be determined by a variety of mechanisms. It can be configured in advance to determine which device is the master device and which device is the slave device; it can also be determined by a certain negotiation mechanism between two peer devices within a certain period of time. The switching process described above can be led by the master device, or it can be completed by handshake negotiation between peer devices. The master device can always monitor the actual business needs in the future and make necessary adjustments to the current receiving and sending status in real time. The following is a detailed description of different methods.

[0124] Figure 8 An example is given of a specific process method for a master device and a slave device to switch ports through in-band management. The first selected port of the master device is a read port, and the second selected port of the slave device is a write port. The Tx port in the following text may also be referred to as a transmitter, and the Rx port may also be referred to as a receiver.

[0125] Assume that in a certain service channel (such as a differential link) in the current state, the master device sends data and the slave device at the opposite end receives data, that is, the corresponding first selected port on the master device is the Tx port, and the corresponding second selected port on the slave device at the opposite end is the Rx port.

[0126] When the master device monitors the need to switch the transceiver status and specifies that the service channel needs to be switched to a state where the opposite end (second selected port) sends and the master device (first selected port) receives, when the master device detects the state switching requirement, the Tx port stops sending service data packets (stops data transmission) and switches to sending a special code stream S1 to the slave device requesting the switch of the opposite end's Rx port to the Tx port. The S1 code stream is different from other code streams defined in the current system, has its own specific format, and can be recognized by the slave device. When sending, it is controlled by the first control module to send. At this time, the first control module is also used to send a switching indication message (S1 code stream) to the slave device paired with the master device.

[0127] After sending the switching indication message (S1 code stream), the first selection port of the master device is switched from the Tx port to the Rx port, and is in the receiving waiting state after completion. The above switching is also controlled by the first control module, that is, after the first control module controls the first selection switch to send the S1 code stream, the first control module controls the first selection switch to control the switching of the working state of the first selection port.

[0128] The second selection port of the slave device is originally in the Rx port state. After receiving the S1 code stream sent by the master device, it starts to switch from the Rx port to the Tx port. When the slave device switches, it is controlled by the second control module. After receiving the switching instruction message sent by the master device paired with the slave device, the second control module controls the second selection port to switch between the read port and the write port. Figure 8 In the process shown, the second control module controls the second selection port to switch to the read port.

[0129] After the switching is completed, the slave device starts to send a special code stream S2 for CDR (clock data recovery) locking to the master device. The S2 code stream is different from other code streams defined by the current system. It has a specific format and can be recognized by the master device. The S2 code stream can be used as a message to indicate the completion of the switching. The S2 code stream is also sent through the second control module. After the second selection port completes the switching, the second control module sends the S2 code stream to the master device.

[0130] After the master device receives the S2 code stream sent by the slave device, it starts CDR locking until it is completed. After a period of time T1 (>=0) after the slave device sends the S2 code stream, it starts to send service data to the master device. At this time, the state switching of the first selection port and the second selection port at both ends of the service channel is completed and service communication begins.

[0131] It should be understood that Figure 8 The process example shown is one of the specific ways to implement IO port state switching. In addition to handshaking through in-band code streams, the master device and the slave device can also communicate and confirm through out-band control signals.

[0132] Fig. 9 The flowchart of the master device and the slave device communicating and confirming through out-of-band control signals is shown. Figure 8 The process shown differs in that Fig. 9 In the process shown in , the devices sending the S1 code stream are different. Figure 8 The S1 code stream is sent through the first control module. Fig. 9 In the example, the system sends the S1 code stream through out-of-band control. At this time, in addition to the first control module and the second control module, the system also includes a third control module. The third control module serves as an out-of-band control module and is connected to the first control module of the master device and the second control module of the slave device, respectively. When in use, the third control module is used to send a switching indication message (S1 code stream) to the slave device paired with the master device when the first control module controls the first selection switch of the first selection port to switch, that is, the first control module no longer sends the S1 code stream, but sends the S1 code stream through the third control module. The switching of the master device and the slave device can also be achieved.

[0133] exist Figure 8 and Fig. 9 In the process shown in , the switching states of the first selected port and the second selected port are almost synchronized. However, in the system provided in the embodiment of the present application, the switching states of the first selected port and the second selected port may also be asynchronous, that is, after the state switching of one end is completed and the other end is notified in an in-band or out-of-band manner, the other end starts the state switching.

[0134] Fig.10 A schematic diagram of a process in which the switching states of the first selected port and the second selected port are not synchronized is shown. Fig.10 The initial state of the master and slave devices is the same as Fig. 9 The initial states of the master device and the slave device in the flowchart shown are the same. The master device sends an S1 code stream (a first switching indication message) to the slave device, and the slave device switches to switch the second selection port to a sending port. After switching, the second selection port sends an S1 code stream (a second switching indication message) to the master device, and after receiving the S1 code stream, the master device controls the first selection port to switch to a write port. The waiting time of the slave device after sending the S1 code stream is T2, where T2 (>=0) is the waiting time between the slave device requesting the master device to switch to sending the CDR lock code stream. After waiting for T2 time, the slave device sends an S2 code stream (a message for indicating the completion of the switch), and after a period of time T1 (>=0) after the slave device sends the S2 code stream, it starts to send service data to the master device. At this time, the state switching of the first selection port and the second selection port of the devices at both ends of the service channel is completed and service communication begins.

[0135] for Fig.10 In the system corresponding to the process shown, the S1 code stream can also be sent through the out-of-band control (third control module) set by the system, and the third control module is used to send a first switching instruction message to the second control module, and after receiving the second switching instruction message fed back by the second control module, send a second switching instruction message to the first control module. The first control module is also used to control the switch of the first selection port to switch after receiving the second switching instruction message.

[0136] It can be seen from the above description that the system provided by the embodiment of the present application can dynamically allocate IO ports to send or receive resources. Its master device can monitor the business transceiver requirements in the future and compare them with the current state, mark the IO port position that needs to change the state according to the comparison result, and then initiate the state switching of the IO port specified by itself and the other end slave device at a certain time through a preset control mechanism to match the actual business transceiver requirements of the next time period to maximize the effective bandwidth. In the above process, the master device can continuously monitor the business channel and repeatedly initiate the switching process as needed, thereby realizing the dynamic resource allocation of the IO port, better matching the randomness of business data transceiver, while improving the utilization rate of the chip IO port and reducing the design complexity of the PCB.

[0137] In addition, a fast switch with low latency (several ns) is used in the IO port to switch between the sending and receiving circuits. When the circuit is working in a certain direction, the circuit in the other state will not cause adverse effects of parasitic capacitance and signal stubs on the current working circuit because the switch is disconnected, thereby greatly improving the quality of the sending or receiving signals of the IO port working circuit and increasing the supported high-speed signal rate to 25 Gbps or higher, without causing obvious adverse effects on system latency.

[0138] Combined with the above Figure 7 , Figure 8 , Fig. 9 and Fig.10 , an embodiment of the present application provides a port allocation method for a master device. The allocation method comprises the following steps:

[0139] Step 001: Obtain the sending and receiving requirements of the main device;

[0140] For details, please refer to Figure 7 , Figure 8 , Fig. 9 and Fig.10 Related description in .

[0141] Step 002: According to the acquired transmission and reception requirements of the master device, the first selected port of the master device is switched between a read port and a write port.

[0142] Specifically, according to the receiving and sending requirements of the master device, the required ratio of the write port to the read port is obtained as the target ratio;

[0143] Confirm the current ratio of write ports to read ports in the current master device;

[0144] When the current ratio is different from the target ratio, the first selection port is controlled to switch to a read port or a write port according to the comparison result between the target ratio and the current ratio until the ratio of the read port and the write port of the master device is consistent with the target ratio.

[0145] Before switching, the first selected port to be switched is determined, and the determined first selected port is switched according to the transceiver requirement of the master device. The transceiver state of the corresponding first selected port is adjusted according to the transceiver requirement of the master device.

[0146] During the switching process, a switching indication message is sent to the slave device paired with the master device; and a message fed back by the slave device indicating the completion of the switching is received. It should be understood that the switching indication message can be sent before or after the switching, and is not specifically limited in the embodiments of the present application.

[0147] In the above technical solution, the first selection port can be selected as a read port or a write port, so that it can be switched according to the working state of the master device, thereby improving the read and write bandwidth of the master device. In addition, the working state of the first selection port is controlled by the first control module, and the number of read ports and write ports of the master device is flexibly adjusted.

[0148] Combined with the above Figure 7 , Figure 8 , Fig. 9 and Fig.10 , an embodiment of the present application provides a port allocation method for a slave device. The allocation method comprises the following steps:

[0149] Step 001: Obtain the sending and receiving requirements of the main device;

[0150] For details, please refer to Figure 7 , Figure 8 , Fig. 9 and Fig.10 Related description in .

[0151] Step 002: According to the receiving and transmitting requirements of the master device, the second selection port of the slave device is switched between a read port and a write port.

[0152] Specifically, after receiving the switching instruction message sent by the master device, the corresponding second selected port is controlled to switch to a read port or a write port; after the switching is completed, a message indicating the completion of the switching is sent to the master device. For specific switching and information interaction, please refer to Figure 7 , Figure 8 , Fig. 9 and Fig.10 Related description in .

[0153] Fig.11 Another communication system provided by an embodiment of the present application is shown. Fig.11 The first chip module 100 and the second chip module 200 are shown in FIG. Figure 3 The difference between the first chip module 100 and the second chip module 200 shown is the number of first selection ports. Fig.11 In the embodiment, among the plurality of first ports 110, each first port 110 is a first selection port. All ports can be switched to write ports, or all ports can be switched to read ports. Similarly, among the plurality of second ports 210, each second port 210 is a second selection port. All ports can be switched to write ports, or all ports can be switched to read ports. When switching, sending and receiving can be matched in any proportion. Fig.11 The port switching method of the system shown can refer to the above Figure 2 The switching method of the ports of the system is shown in FIG.

[0154] It can be seen from the above description that the port setting method of the communication system provided in the embodiment of the present application can be that among the multiple first ports 110, at least some or all of the first ports 110 are first selected ports, and at the same time, among the corresponding multiple second ports 210, at least some or all of the second ports 210 are second selected ports. The ports on the first chip module 100 and the second chip module 200 are arranged in such a way. When it is necessary to achieve arbitrary ratio matching of reading and writing, it can be adopted Fig.11 Considering the high design complexity and power consumption of the IO port in the above implementation, the following can also be adopted according to the business conditions of the actual application scenario. Figure 2 The solution shown. The inherent data sending service or receiving service is undertaken through a unidirectional service channel and the value of L or M can be determined according to the actual application scenario. Other service channels with switchable states are used for dynamic allocation to achieve a larger effective bandwidth. Therefore, different IO port types can be adapted for different application scenarios. All ports can support state switching to adapt to random read and write scenarios of all service channels, or bidirectional and unidirectional IO ports can be mixed according to actual conditions to reduce certain design complexity and save power consumption.

[0155] As a deformable example, the communication system may also include only the above-mentioned first chip module, and the second chip module adopts other implementable methods, or the communication system may also include only the above-mentioned second chip module, and the first chip module adopts other implementable methods, as long as the read and write service channels in the communication system can be flexibly adjusted.

[0156] The present application also provides a chip module, which includes: a plurality of first ports and a first control module; at least some of the plurality of first ports are selection ports, and the selection ports can work as read ports or write ports; the first control module controls the first selection port to switch between the read port and the write port according to the transceiver requirements of the chip module or according to the received switching instruction, and matches the transceiver requirements of the chip module. The first port and the first selection port of the chip module can refer to the first port and the first selection port in the first chip module mentioned above, and will not be repeated here.

[0157] When the chip module controls the port to switch, the received switching instruction comes from the opposite chip module. Or it is adjusted according to the chip module's own transceiver requirements. When switching, the first control module is used to control the corresponding selection port to switch to a read port or a write port after receiving the switching instruction message sent by the opposite chip module; after the switching is completed, the first control module is also used to send a message to the first control module to indicate that the switching is completed. The function of the first control module can refer to the specific function of the first control module in the above-mentioned first chip module, which will not be repeated here.

[0158] When switching, the first control module is also used to obtain the required ratio of write ports and read ports as the target ratio according to the transceiver requirements of the chip module; and confirm the current ratio of write ports and read ports in the chip module; when the current ratio is different from the target ratio, the first control module is used to control the first selection port to switch to a read port or a write port according to the comparison result between the target ratio and the current ratio, until the ratio of the read port and the write port of the chip module is consistent with the target ratio. For details, please refer to the process of the first control module of the first chip module specifically controlling the port switching, which will not be repeated here.

[0159] The above-mentioned first selection port is a port with switchable state, wherein each first selection port includes: a first connection port, a first receiving circuit, a first sending circuit and a first selection switch; wherein the first connection port is selectively connected to one of the first receiving circuit or the first sending circuit through the first selection switch; when the first receiving circuit is connected to the first connection port, the first selection port serves as the write port; when the first sending circuit is connected to the first connection port, the first selection port serves as the read port. For details, please refer to the first selection port of the first chip module, which will not be repeated here.

[0160] The embodiment of the present application also provides a mobile terminal, which includes any of the chip modules described above and a signal-connected opposite-end chip module. The first selection port can be selected as a read port or a write port, so that it can be switched according to the working state of the chip module to improve the read and write bandwidth of the communication system. In addition, when the port is selected as a read port, the receiving circuit is completely disconnected from the connection port; similarly, when the first selection port is used as a write port, the sending circuit is completely disconnected from the connection port, avoiding the influence of idle circuits on the selection port and improving the working effect of the communication system.

[0161] like Fig.12 As shown, the embodiment of the present application also provides a signal processing module 1000 for implementing the functions of the above method. The signal processing module 1000 can be a communication device or a device in a communication device. The signal processing module 1000 includes at least one processor 1001, which is used to implement the functions of the device in the above method. For example, the processor 1001 can be used to control the communication interface 1003 (first selection port) to switch the state according to the transceiver requirements of the acquired first chip module. For details, please refer to the detailed description in the method, which will not be described here.

[0162] In some embodiments, the signal processing module 1000 may also include at least one memory 1002 for storing program instructions and / or data. The memory 1002 is coupled to the processor 1001. The coupling in the embodiment of the present application is an interval coupling or communication connection between devices, units or modules, which may be electrical, mechanical or other forms, for information interaction between devices, units or modules. As another implementation, the memory 1002 may also be located outside the signal processing module 1000. The processor 1001 may operate in conjunction with the memory 1002. The processor 1001 may execute program instructions stored in the memory 1002. At least one of the at least one memory may be included in the processor.

[0163] In some embodiments, the signal processing module 1000 includes a communication interface 1003, which is used to communicate with other devices through a transmission medium, so that the device in the signal processing module 1000 can communicate with other devices. Exemplarily, the communication interface 1003 can be a transceiver, circuit, bus, module or other type of communication interface, and the other device can be a network device or other terminal device. The processor 1001 uses the communication interface 1003 to send and receive data and is used to implement the method in the above embodiment. Exemplarily, the communication interface 1003 can be used to transmit signals.

[0164] The embodiment of the present application does not limit the connection medium between the communication interface 1003, the processor 1001 and the memory 1002. Fig.12The memory 1002, the processor 1001 and the communication interface 1003 may be connected via a bus, which may be divided into an address bus, a data bus, a control bus and the like.

[0165] In the embodiments of the present application, the processor may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0166] In the embodiment of the present application, the memory may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., and may also be a volatile memory (volatile memory), such as a random access memory (RAM). The memory is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory in the embodiment of the present application may also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0167] In the method provided in the embodiment of the present application, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, an SSD).

[0168] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A chip module for multi-channel serial data transmission, It is characterized in that The chip module includes a plurality of first ports, each of which performs single-channel serial data transmission, wherein: Among the plurality of first ports, at least one of the first ports is a first selection port, and the first selection port has a switching function to work as a read port or as a write port; Any of the first selection ports can remain or switch to the read port or the write port in response to the transceiver requirements of the chip module; Each first selection port includes: a first connection port, a first receiving circuit, a first sending circuit and a first selection switch; wherein the first connection port is selectively connected to one of the first receiving circuit or the first sending circuit through the first selection switch; When the first receiving circuit is connected to the first connection port, the first selection port serves as the write port; When the first sending circuit is connected to the first connection port, the first selection port serves as the read port; The response to the receiving and sending needs of the chip module can maintain or switch to the read port or the write port specifically: according to the sending and receiving operation needs in a future period of time and compared with the current receiving and sending state, the port position that needs to change the state is marked according to the comparison result, and then the state switch of the designated port is initiated within a certain period of time through a preset control mechanism.

2. The chip module according to claim 1, It is characterized in that The chip module further includes a first control module, which controls the first selection port to remain or switch to the read port or the write port based on the transceiver requirements of the chip module.

3. The chip module according to claim 2, It is characterized in that The number of the first control modules is consistent with the number of the first selection ports, and the first control modules correspond to the first selection ports one by one.

4. The chip module according to any one of claims 1 to 3, It is characterized in that The chip module can send a switching indication message to a paired opposite-end chip module, and is used to receive a message fed back by the opposite-end chip module indicating that the switching is completed.

5. The chip module according to claim 1, It is characterized in that In response to the transceiver requirements of the chip module, the first selection port is configured to include a first number of read ports and a second number of write ports, where the first number and the second number are zero or positive integers.

6. The chip module according to claim 1, It is characterized in that The first port further includes a fixed port, and the fixed port includes a fixed read port and a fixed write port.

7. A chip module, It is characterized in that include: A plurality of second ports and a second control module, At least some of the plurality of second ports are second selected ports; The second control module controls the second selection port to switch between a read port and a write port according to the transceiver requirements of the opposite chip module paired with the chip module; Each second selection port includes: a second connection port, a second receiving circuit, a second sending circuit and a second selection switch; wherein the second connection port is selectively connected to one of the second receiving circuit or the second sending circuit through the second selection switch; When the second receiving circuit is connected to the second connection port, the second selection port serves as a write port; When the second sending circuit is connected to the second connection port, the second selection port serves as a read port; The method controls the second selection port to switch between the read port and the write port according to the transceiver requirements of the opposite chip module paired with the chip module, specifically: according to the sending and receiving operation requirements of the opposite chip module paired with the chip module in the future period of time and comparing with the current transceiver state, marking the port position that needs to change the state according to the comparison result, and then initiating the state switching of the designated port within a certain period of time through a preset control mechanism.

8. The chip module according to claim 7, It is characterized in that The second control module is used to control the corresponding second selection port to switch to a read port or a write port after receiving the switching instruction message sent by the opposite chip module; After the switching is completed, the second control module is further configured to send a message indicating the switching is completed to the first control module.

9. A communication system, It is characterized in that It comprises a first chip module and a second chip module, wherein the first chip module is the chip module according to any one of claims 1 to 6; wherein, The first port of the first chip module and the second port of the second chip module are connected in a one-to-one correspondence.

10. The communication system according to claim 9, It is characterized in that The second chip module is the chip module as claimed in claim 7 or 8.

11. A communication system, It is characterized in that The invention comprises a first chip module and a second chip module, wherein the second chip module is the chip module according to claim 7 or 8; wherein: The first port of the first chip module and the second port of the second chip module are connected in a one-to-one correspondence.

12. A port allocation method, It is characterized in that The following steps are involved: Obtain the chip module's transmission and reception requirements; According to the acquired transceiver requirements of the chip module, switching the first selection port of the chip module between a read port and a write port; According to the acquired chip module's transceiver requirements, the first selection port of the chip module is switched between the read port and the write port. Specifically, according to the transmission and reception operation requirements in a future period of time and compared with the current transmission and reception status, the port position that needs to change the status is marked according to the comparison result, and then the status switching of the designated port is initiated within a certain period of time through a preset control mechanism.

13. The port allocation method according to claim 12, It is characterized in that The switching of the first selection port between the read port and the write port according to the acquired transceiver requirement of the chip module is specifically as follows: According to the transceiver requirements of the chip module, the required number of write ports and read ports is obtained as a target number; Determine the current number of write ports and read ports in the chip module; When the current number is different from the target number, the first selection port is controlled to switch to a read port or a write port according to a comparison result between the target number and the current number until the number of read ports and write ports of the chip module is consistent with the target number.

14. The port allocation method according to claim 13, It is characterized in that The method further includes: A first selected port that needs to be switched is determined, and the determined first selected port is switched according to the transceiver requirement of the chip module.

15. The port allocation method according to claim 14, It is characterized in that The method further includes: Sending a switching instruction message to a peer chip module paired with the chip module; Receive a message fed back by the opposite chip module indicating that the switching is completed.

16. A port allocation method, It is characterized in that The method includes: Obtain the receiving and sending requirements of the peer chip module; According to the receiving and transmitting requirements of the opposite chip module, the second selection port of the chip module is switched between the read port and the write port; The second selection port of the chip module is switched between the read port and the write port according to the transceiver requirements of the opposite chip module, specifically: the requirements of the sending and receiving operations of the opposite chip module paired with the chip module in the future are compared with the current transceiver status, and the port position that needs to change the status is marked according to the comparison result, and then the status switching of the designated port is initiated within a certain period of time through a preset control mechanism.

17. The port allocation method according to claim 16, It is characterized in that The switching of the second selection port of the chip module between the read port and the write port according to the transceiver requirement of the opposite chip module is specifically as follows: After receiving the switching instruction message sent by the opposite chip module, controlling the corresponding second selection port to switch to a read port or a write port; After the switching is completed, a message indicating the switching is completed is sent to the opposite chip module.

18. A port allocation method, It is characterized in that The following steps are involved: Obtaining the receiving and sending requirements of the first chip module; According to the receiving and transmitting requirements of the first chip module, switching the first selection port of the first chip module to a read port or a write port; as well as According to the receiving and transmitting requirements of the first chip module, switching the second selection port of the paired second chip module to a read port or a write port; The first selected port of the first chip module is switched to a read port or a write port according to the transceiver demand of the first chip module, specifically: according to the transmission and reception operation demand of the first chip module in a future period of time and compared with the current transceiver state, the position of the first selected port that needs to change state is marked according to the comparison result, and then the state switching of the first selected port is initiated within a certain period of time through a preset control mechanism; The method switches the second selection port of the paired second chip module to a read port or a write port according to the transceiver requirements of the first chip module. Specifically, the method determines the transmission and reception operation requirements of the first chip module in a future period of time and compares the requirements with the current transmission and reception state, marks the position of the second selection port that needs to change its state according to the comparison result, and then initiates the state switching of the second selection port within a certain period of time through a preset control mechanism.

19. The port allocation method according to claim 18, It is characterized in that The first selection port is switched to a read port or a write port according to the transceiver requirement of the first chip module, specifically: According to the transceiver requirements of the first chip module, the required number of write ports and read ports is obtained as a target number; Confirming the current number of write ports and read ports in the first chip module; When the current number is different from the target number, the first selection port is controlled to switch to a read port or a write port according to the comparison result between the target number and the current number until the number of read ports and write ports of the first chip module is consistent with the target number.

20. The port allocation method according to claim 19, It is characterized in that Also includes: The first chip module sends a switching instruction message to the second chip module; After the second chip module receives the switching instruction message sent by the first chip module, the second chip module controls the corresponding second selection port to switch to a read port or a write port; after the switching is completed, the second chip module sends a message indicating the completion of the switching to the first chip module; The first chip module receives a message sent by the second chip module to indicate that the switching is completed.

21. A chip module, It is characterized in that include: A plurality of first ports and a first control module; At least some of the plurality of first ports are first selection ports, and the first selection ports can work as read ports or as write ports; The first control module controls the first selection port to switch between the read port and the write port according to the transceiver requirement of the chip module or according to the received switching instruction, and matches the transceiver requirement of the chip module; Each first selection port includes: a first connection port, a first receiving circuit, a first sending circuit and a first selection switch; wherein the first connection port is selectively connected to one of the first receiving circuit or the first sending circuit through the first selection switch; When the first receiving circuit is connected to the first connection port, the first selection port serves as the write port; When the first sending circuit is connected to the first connection port, the first selection port serves as the read port; The first control module controls the first selection port to switch between the read port and the write port according to the transceiver requirements of the chip module or according to the received switching instructions, and matches the transceiver requirements of the chip module, specifically: according to the received switching instructions or the sending and receiving operation requirements in the future and comparing with the current transceiver state, marking the port position that needs to change the state according to the comparison result, and then initiating the state switching of its own designated port within a certain period of time through a preset control mechanism.

22. The chip module according to claim 21, It is characterized in that The received switching instruction comes from the opposite chip module.

23. The chip module according to claim 22, It is characterized in that The first control module is used to control the corresponding selection port to switch to a read port or a write port after receiving the switching instruction message sent by the opposite chip module; After the switching is completed, the first control module is further configured to send a message indicating the switching is completed to the first control module.

24. The chip module according to claim 22, It is characterized in that The first control module is further used to obtain the required number of write ports and read ports as the target number according to the transceiver requirements of the chip module; and confirming the current number of write ports and read ports in the current chip module; When the current number is different from the target number, the first control module is used to control the first selection port to switch to a read port or a write port according to the comparison result between the target number and the current number until the number of read ports and write ports of the chip module is consistent with the target number.

25. A mobile terminal, It is characterized in that It comprises the chip module as claimed in any one of claims 21 to 24 and a counterpart chip module connected with a signal.