CN113193967B - Multimode communication method, device, network module and computer readable storage medium - Google Patents
Multimode communication method, device, network module and computer readable storage medium Download PDFInfo
- Publication number
- CN113193967B CN113193967B CN202110309151.5A CN202110309151A CN113193967B CN 113193967 B CN113193967 B CN 113193967B CN 202110309151 A CN202110309151 A CN 202110309151A CN 113193967 B CN113193967 B CN 113193967B
- Authority
- CN
- China
- Prior art keywords
- network module
- interface
- communication mode
- communication
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0682—Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The application relates to a multimode communication method, a device, a network module and a computer readable storage medium. The method is applied to a network module, the network module comprises an MAC chip, a first interface and a second interface, and the method comprises the following steps: acquiring ID information of a PHY chip in the network module to obtain an acquisition result; determining a communication mode of the network module according to the acquisition result, and carrying out communication according to the communication mode; wherein the communication mode includes a first communication mode for implementing PHY-to-PHY communication by the network module through the first interface, or a second communication mode for implementing MAC-to-MAC communication by the network module through the second interface. By adopting the method, the multi-mode communication of the network module can be realized, not only can the first communication mode from PHY to PHY be carried out, but also the second communication mode from MAC to MAC be carried out, and further the application range of the network module is expanded.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a multimode communication method, apparatus, network module, and computer-readable storage medium.
Background
Network cards commonly used in daily life include two layers in the Open System Interconnection (OSI) model, namely a Physical Layer (PHY) and a data link Layer (MAC). The physical layer defines the electrical and optical signals, line states, clock references, data coding and circuitry, etc. required for data transmission and reception and provides a standard interface to the data link layer devices. The data link layer provides functions such as addressing mechanisms, framing of data frames, data error checking, transport control, and providing a standard data interface to the network layer.
In the traditional technology, a network module controls an MAC chip to communicate with a PHY chip through a CPU, the PHY chip communicates with the PHY chip of an opposite-end network module through an external interface, and then the PHY chip of the opposite-end network module transmits communication data to the CPU of the opposite-end network module through the MAC chip, so that the communication between the network module and the opposite-end network module is realized.
However, the communication mode between the network modules in the conventional technology is single, and the application range is small.
Disclosure of Invention
In view of the above, it is necessary to provide a multimode communication method, apparatus, network module and computer readable storage medium for solving the above technical problems.
A multimode communication method is applied to a network module, the network module comprises an MAC chip, a first interface and a second interface, and the method comprises the following steps:
acquiring ID information of a PHY chip in a network module to obtain an acquisition result;
determining a communication mode of the network module according to the acquisition result, and carrying out communication according to the communication mode; the communication mode includes a first communication mode in which the network module performs PHY-to-PHY communication through the first interface, or a second communication mode in which the network module performs MAC-to-MAC communication through the second interface.
In one embodiment, determining the communication mode of the network module according to the obtained result includes:
if the obtained result is that the ID information exists in the network module, determining whether the ID information is the target ID information supported by the network module; if yes, the communication mode is determined to be the first communication mode.
In one embodiment, determining whether the ID information is target ID information supported by the network module includes:
judging whether ID information exists in a preset legal PHY ID set or not; if yes, the ID information is determined to be the target ID information supported by the network module.
In one embodiment, determining the communication mode of the network module according to the obtained result further includes:
and if the obtained result is that the ID information does not exist in the network module, determining that the communication mode is the second communication mode.
In one embodiment, if the communication mode is the first communication mode, performing communication according to the communication mode includes:
acquiring an initial timestamp carried by a PHY chip when the PHY chip sends a data packet through a first interface; correcting the initial timestamp by adopting a preset time correction parameter to obtain a corrected timestamp; and controlling the PHY chip to transmit the data packet carrying the correction timestamp through the first interface.
In one embodiment, the modifying the initial timestamp with the preset time modification parameter to obtain a modified timestamp includes:
and subtracting the preset time correction parameter from the initial timestamp to obtain a corrected timestamp.
In one embodiment, the first interface is an MDIO interface and the second interface is an RGMII interface.
A multimode communication device for use in a network module including a MAC chip, a first interface, and a second interface, the device comprising:
the ID acquisition module is used for acquiring the ID information of the PHY chip in the network module to obtain an acquisition result;
the mode determining module is used for determining the communication mode of the network module according to the acquisition result and carrying out communication according to the communication mode; the communication mode includes a first communication mode in which the network module performs PHY-to-PHY communication through the first interface, or a second communication mode in which the network module performs MAC-to-MAC communication through the second interface.
A network module comprising a MAC chip, a first interface, a second interface, a memory, and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring ID information of a PHY chip in a network module to obtain an acquisition result;
determining a communication mode of the network module according to the acquisition result, and carrying out communication according to the communication mode; the communication mode comprises a first communication mode for realizing PHY-to-PHY communication of the network module through a first interface, or a second communication mode for realizing MAC-to-MAC communication of the network module through a second interface.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring ID information of a PHY chip in a network module to obtain an acquisition result;
determining a communication mode of the network module according to the acquisition result, and carrying out communication according to the communication mode; the communication mode comprises a first communication mode for realizing PHY-to-PHY communication of the network module through a first interface, or a second communication mode for realizing MAC-to-MAC communication of the network module through a second interface.
The network module comprises an MAC chip, a first interface and a second interface, the network module acquires ID information of a PHY chip in the network module, and autonomously selects whether a first communication mode for realizing PHY-to-PHY communication through the first interface is communicated with an opposite-end network module or a second communication mode for realizing MAC-to-MAC communication through the second interface is communicated with the opposite-end network module according to the ID information acquisition result to realize multi-mode communication of the network module.
Drawings
FIG. 1 is a diagram of an exemplary embodiment of a multimodal communication method;
FIG. 2 is a flow diagram illustrating a multimodal communication method in one embodiment;
FIG. 3 is a flow diagram illustrating the determination of a communication mode in one embodiment;
FIG. 4 is a flow diagram illustrating a network module communicating according to a first communication mode, according to one embodiment;
FIG. 5 is a block diagram of a multimode communication device in one embodiment;
fig. 6 is an internal structural diagram of a network module in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The multimode communication method provided by the application can be applied to the application environment shown in fig. 1. Wherein, the network module 102 communicates with the peer device 104 through a network. The network module 102 includes an MAC chip, a first interface, and a second interface, and the network module 102 acquires ID information of a PHY chip in the network module 102 to obtain an acquisition result, and determines a communication mode of the network module 102 according to the acquisition result, so as to communicate with the peer device 104 according to the determined communication mode. The communication mode includes a first communication mode in which the network module 102 and the peer device 104 perform PHY-to-PHY communication through a first interface, or a second communication mode in which the network module 102 and the peer device 104 perform MAC-to-MAC communication through a second interface. The network module 102 may be, but not limited to, a communication component, such as a network card, for implementing network communication, applied to various communication devices, such as a personal computer, a notebook computer, a smart phone, a tablet computer, and a portable wearable device, and the opposite-end device 104 may be another network module, and may also be a communication device, such as a personal computer, a notebook computer, a smart phone, a tablet computer, and a portable wearable device, including a network module.
In one embodiment, as shown in fig. 2, a multimode communication method is provided, which is described by taking the method as an example applied to the network module in fig. 1, and includes the following steps:
s210, obtaining the ID information of the PHY chip in the network module to obtain an obtaining result.
The ID information of the PHY chip is the model or number of the PHY chip, and may uniquely characterize the PHY chip and be stored in a PHY Identifier (extended register) in the network device.
Optionally, the network module reads the ID information of the PHY chip in the PHY Identifier with the address number of 3 through the IEEE802.3 protocol, and accordingly obtains an acquisition result of whether to read the ID information of the PHY chip. If the acquisition result is that the ID information is not read, that is, the ID information of the PHY chip does not exist in the network module, the characterization network module does not include the PHY chip. The network module can also read the ID information of the PHY chip in the PHY Identifier with the address number of 3 through an IEEE802.3 protocol, and correspondingly obtain the acquisition result of the ID information representing different types of the PHY chips.
Optionally, if the network module does not read the ID information of the PHY chip in the PHY Identifier, the network module may perform multiple times of reading in the PHY Identifier, and if the ID information of the PHY chip is not read after multiple times of reading, it is determined that the obtained result is the read ID information.
And S220, determining the communication mode of the network module according to the acquisition result, and carrying out communication according to the communication mode.
The communication mode comprises a first communication mode for realizing PHY-to-PHY communication of the network module through a first interface, or a second communication mode for realizing MAC-to-MAC communication of the network module through a second interface.
Optionally, different obtaining results correspond to different communication modes. If the obtained result comprises ID information of a PHY chip in the network module and ID information of a PHY chip in the network module, the corresponding communication modes comprise a first communication mode for realizing communication from the PHY chip to the PHY chip between the network module and an opposite-end network module through a first interface and a second communication mode for realizing communication from the MAC chip to the MAC chip between the network module and the opposite-end network module through a second interface, and the network module can select to adopt the first interface to carry out communication in the first communication mode with the opposite-end network module or select to adopt the second interface to carry out communication in the second communication mode with the opposite-end network module according to whether the obtained result of the ID information of the PHY chip is read or not.
If the obtained result includes ID information of a PHY chip existing in the network module, and the corresponding communication mode also includes the first communication mode and the second communication mode, the network module may select to use the first interface to perform communication in the first communication mode with the peer network module when the ID information in the obtained result is ID information of a certain specified PHY chip, and select to use the second interface to perform communication in the second communication mode with the peer network module when the ID information in the obtained result is not ID information of the specified PHY chip.
In this embodiment, the network module includes an MAC chip, a first interface, and a second interface, and the network module obtains ID information of a PHY chip in the network module, and autonomously selects, according to an obtaining result of the ID information, whether a network model implements communication between a first communication mode of PHY-to-PHY communication and an opposite-end network module through the first interface or a second communication mode of MAC-to-MAC communication and an opposite-end network module through the second interface, so as to implement multi-mode communication of the network module.
In an embodiment, to accurately determine the communication mode of the network module, as shown in fig. 3, the determining the communication mode of the network module according to the obtained result in S220 includes:
s310, if the obtained result is that the ID information exists in the network module, determining whether the ID information is the target ID information supported by the network module.
The types of PHY chips supported by different network modules are different. Optionally, in a case that the obtained result is that the ID information exists in the network module, that is, the network module includes a PHY chip, it is further determined whether the PHY chip corresponding to the ID information is a PHY chip supported by the network module, that is, it is determined whether the ID information is target ID information supported by the network module.
In an optional embodiment, determining whether the ID information is target ID information supported by the network module includes:
judging whether ID information exists in a preset legal PHY ID set or not;
if so, determining that the ID information is target ID information supported by the network module.
Specifically, the network module obtains a preset legal PHY ID to form a legal PHY ID set, where the legal PHY ID is ID information of a PHY chip supported by the network module, and the network module further determines whether the preset legal PHY ID set includes ID information of the PHY chip read from the PHY Identifier, and if so, the network module determines that the read ID information is target ID information supported by the network module. If the ID information does not exist, the network module determines that the read ID information is not the target ID information supported by the network module.
And S320, if yes, determining that the communication mode is the first communication mode.
Specifically, if the network module determines that the read ID information is the target ID information supported by the network module, the communication mode of the network module is determined to be the first communication mode, that is, the network module performs PHY-to-PHY communication with the peer network module through the first interface. In addition, if the network module determines that the read ID information is not the target ID information supported by the network module, and the network module cannot communicate with the peer network module, the communication is terminated.
In an optional embodiment, if the obtained result indicates that no ID information exists in the network module and the PHY chip does not exist in the network module, it is determined that the communication mode of the network module is the second communication mode, that is, the network module performs MAC-to-MAC communication with the peer network module through the second interface. Therefore, the direct communication from the MAC chip in the network module to the MAC chip in the opposite-end network module is realized.
In an optional embodiment, the first Interface is an MDIO (Management Data Input/Output) Interface, and the second Interface is an RGMII (Reduced Gigabit Media Independent Interface) Interface. Namely, the first communication mode is that the network module carries out PHY-to-PHY communication with the opposite-end network module through the MDIO interface, and the second communication mode is that the network module carries out MAC-to-MAC communication with the opposite-end network module through the RGMII interface.
In this embodiment, if the network module obtains that ID information exists in the network module, the network module further determines whether the ID information is target ID information supported by the network module, and if the ID information is target ID information supported by the network module, determines that the network module performs PHY-to-PHY communication with the peer network module using a first communication mode performed through a first interface, and if the ID information does not exist in the network module, determines that the network module performs MAC-to-MAC communication with the peer network module using a second communication mode performed through a second interface, and when the network module is compatible with multiple communication modes, the network module performs selection control of the multiple communication modes according to its own conditions, so that the network module is suitable for performing PHY-to-PHY communication with the peer network module when the network module includes a PHY chip, and also suitable for performing MAC-to-MAC communication with the peer network module when the network module does not include a PHY chip, thereby improving the application range of the network module.
In an embodiment, in order to improve the accuracy of the communication in the first communication mode when the communication mode is the first communication mode, as shown in fig. 4, the performing communication according to the communication mode in S220 includes:
s410, acquiring an initial timestamp when the PHY chip sends the data packet through the first interface.
When the network module performs PHY-to-PHT communication with the peer network module in the first communication mode via the first interface, that is, when the PHY chip in the network module performs PHY-to-PHT communication with the PHY chip in the peer network module via the first interface, a time t1 at which the CPU in the network module controls data transmission is caused due to a complex connection relationship of the PHY chip in the network module, and a transmission delay exists between the time t2 at which the data packet passes through the PHY chip and is output by the first interface, that is, t2 is later than t1, so that the data packet output by the first interface needs to be corrected for the time delay, so as to ensure accuracy of communication time.
Specifically, when the network module sends a data packet through the first interface, the network module obtains the current time and uses the current time as the initial timestamp of the data packet.
And S420, correcting the initial timestamp by adopting a preset time correction parameter to obtain a corrected timestamp.
In the process of communication between the network module and the opposite terminal network module, there is transmission of data packets. Optionally, the preset time correction parameter is a delay time caused by transmission of the data packet through the PHY chip, and may be specifically determined according to a connection relationship of the PHY chip in the network module and stored in the network module in advance, and when it is determined that the communication mode of the network module is the first communication mode, the network module obtains the preset time correction parameter, and corrects the initial timestamp by using the preset time correction parameter, so as to obtain the corrected timestamp.
In an optional embodiment, the modifying the initial timestamp by using the preset time modification parameter to obtain a modified timestamp includes: and subtracting the preset time correction parameter from the initial timestamp to obtain a corrected timestamp.
Specifically, the preset time correction parameter is Δ T, the initial timestamp obtained when the network module sends the data packet through the first interface is T1, and the corrected correction timestamp is T2 ═ T1- Δ T.
And S430, controlling the PHY chip to send the data packet carrying the correction timestamp through the first interface.
Specifically, after the network module completes the correction of the initial timestamp of the data packet, the PHY chip is controlled to send the data packet carrying the corrected timestamp to the peer network module through the first interface.
In this embodiment, when it is determined that the communication mode of the network module is the first communication mode in which PHY is performed to PYH communication through the first interface, the network module obtains an initial timestamp when the PHY chip sends a data packet through the first interface, and corrects the initial timestamp by using a preset time correction parameter to obtain a corrected timestamp, so as to control the PHY chip to send the data packet carrying the corrected timestamp to the peer end through the first interface, thereby eliminating/reducing transmission delay caused by the PHY chip, and improving the communication accuracy of the first communication mode.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 5, there is provided a multimode communication device applied to a network module including a MAC chip, a first interface, and a second interface, the device including: an ID acquisition module 501 and a mode determination module 502, wherein:
the ID obtaining module 501 is configured to obtain ID information of a PHY chip in the network module to obtain an obtaining result; the mode determining module 502 is configured to determine a communication mode of the network module according to the obtained result, and perform communication according to the communication mode; the communication mode comprises a first communication mode for realizing PHY-to-PHY communication of the network module through a first interface, or a second communication mode for realizing MAC-to-MAC communication of the network module through a second interface.
In one embodiment, the mode determining module 502 is specifically configured to:
if the obtained result is that the ID information exists in the network module, determining whether the ID information is the target ID information supported by the network module; and if so, determining that the communication mode is the first communication mode.
In one embodiment, the mode determining module 502 is specifically configured to:
judging whether ID information exists in a preset legal PHY ID set or not; if so, determining that the ID information is target ID information supported by the network module.
In one embodiment, the mode determination module 502 is further configured to:
and if the obtained result is that the ID information does not exist in the network module, determining that the communication mode is the second communication mode.
In one embodiment, if the communication mode is the first communication mode, the mode determining module 502 is specifically configured to:
acquiring an initial timestamp carried by a PHY chip when the PHY chip sends a data packet through a first interface; correcting the initial timestamp by adopting a preset time correction parameter to obtain a corrected timestamp; and controlling the PHY chip to transmit the data packet carrying the correction timestamp through the first interface.
In one embodiment, the mode determination module 502 is further configured to:
and subtracting the preset time correction parameter from the initial timestamp to obtain a corrected timestamp.
In one embodiment, the first interface is an MDIO interface and the second interface is an RGMII interface.
For specific limitations of the multimode communication device, reference may be made to the above limitations on the multimode communication method, which are not described in detail herein. The various modules in the multimode communication device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a network module is provided, which may be a network card, and the internal structure thereof may be as shown in fig. 6. The network module includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the network module is configured to provide computing and control capabilities. The memory of the network module comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the network module is used for storing communication data. The network interface of the network module is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a multimodal communication method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the network modules to which the subject application applies, and that a particular network module may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
In one embodiment, a network module is provided, comprising a MAC chip, a first interface, a second interface, a memory and a processor, the memory having stored therein a computer program, the processor implementing the following steps when executing the computer program:
acquiring ID information of a PHY chip in the network module to obtain an acquisition result; determining a communication mode of the network module according to the acquisition result, and carrying out communication according to the communication mode; the communication mode comprises a first communication mode for realizing PHY-to-PHY communication of the network module through a first interface, or a second communication mode for realizing MAC-to-MAC communication of the network module through a second interface.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
if the obtained result is that the ID information exists in the network module, determining whether the ID information is the target ID information supported by the network module; if yes, the communication mode is determined to be the first communication mode.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
judging whether ID information exists in a preset legal PHY ID set or not; if so, determining that the ID information is target ID information supported by the network module.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and if the obtained result is that the ID information does not exist in the network module, determining that the communication mode is the second communication mode.
In one embodiment, if the communication mode is the first communication mode, the processor executes the computer program to further perform the following steps:
acquiring an initial timestamp carried by a PHY chip when the PHY chip sends a data packet through a first interface; correcting the initial timestamp by adopting a preset time correction parameter to obtain a corrected timestamp; and controlling the PHY chip to send the data packet carrying the correction timestamp through the first interface.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and subtracting the preset time correction parameter from the initial timestamp to obtain a corrected timestamp.
In one embodiment, the first interface is an MDIO interface and the second interface is an RGMII interface.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring ID information of a PHY chip in a network module to obtain an acquisition result; determining a communication mode of the network module according to the acquisition result, and carrying out communication according to the communication mode; the communication mode comprises a first communication mode for realizing PHY-to-PHY communication of the network module through a first interface, or a second communication mode for realizing MAC-to-MAC communication of the network module through a second interface.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the obtained result is that the ID information exists in the network module, determining whether the ID information is the target ID information supported by the network module; and if so, determining that the communication mode is the first communication mode.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging whether ID information exists in a preset legal PHY ID set or not; if so, determining that the ID information is target ID information supported by the network module.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and if the obtained result is that the ID information does not exist in the network module, determining that the communication mode is the second communication mode.
In one embodiment, if the communication mode is the first communication mode, the processor executes the computer program to further perform the following steps:
acquiring an initial timestamp carried by a PHY chip when the PHY chip sends a data packet through a first interface; correcting the initial timestamp by adopting a preset time correction parameter to obtain a corrected timestamp; and controlling the PHY chip to transmit the data packet carrying the correction timestamp through the first interface.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and subtracting the preset time correction parameter from the initial timestamp to obtain a corrected timestamp.
In one embodiment, the first interface is an MDIO interface and the second interface is an RGMII interface.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.
Claims (10)
1. A multimode communication method is applied to a network module, wherein the network module comprises a MAC (media Access control) chip, a first interface and a second interface, and the method comprises the following steps:
acquiring ID information of a PHY (physical layer) chip in the network module to obtain an acquisition result;
if the obtained result is that the ID information exists in the network module, determining whether the ID information is target ID information supported by the network module;
if so, determining that the communication mode is the first communication mode, and carrying out communication according to the communication mode; the communication mode includes a first communication mode in which the network module performs PHY chip to PHY chip communication through the first interface, or a second communication mode in which the network module performs MAC chip to MAC chip communication through the second interface.
2. The method of claim 1, wherein the determining whether the ID information is target ID information supported by the network module comprises:
judging whether the ID information exists in an ID set of a preset legal PHY chip;
if so, determining that the ID information is target ID information supported by the network module.
3. The method of claim 1, further comprising:
and if the obtained result is that the ID information does not exist in the network module, determining that the communication mode is the second communication mode.
4. The method of claim 1, wherein if the communication mode is the first communication mode, the performing communication according to the communication mode comprises:
acquiring an initial timestamp of the PHY chip when the PHY chip sends a data packet through the first interface;
correcting the initial timestamp by adopting a preset time correction parameter to obtain a corrected timestamp;
and controlling the PHY chip to send the data packet carrying the correction timestamp through the first interface.
5. The method of claim 4, wherein the modifying the initial timestamp with the preset time modification parameter to obtain a modified timestamp comprises:
and subtracting the preset time correction parameter from the initial timestamp to obtain the corrected timestamp.
6. The method according to any one of claims 1 to 5,
the first interface is an MDIO interface, and the second interface is an RGMII interface.
7. A multimode communication device, applied to a network module including a mac (media Access control) chip, a first interface and a second interface, the device comprising:
an ID acquisition module, configured to acquire ID information of a PHY (physical layer) chip in the network module, and obtain an acquisition result;
a mode determination module, configured to determine whether the ID information is target ID information supported by the network module when the acquisition result indicates that the ID information exists in the network module; if yes, determining that the communication mode is the first communication mode, and carrying out communication according to the communication mode; the communication mode includes a first communication mode in which the network module performs PHY chip to PHY chip communication through the first interface, or a second communication mode in which the network module performs MAC chip to MAC chip communication through the second interface.
8. The apparatus of claim 7, wherein the mode determination module is specifically configured to:
judging whether the ID information exists in an ID set of a preset legal PHY chip;
if so, determining that the ID information is target ID information supported by the network module.
9. A network module comprising a mac (media Access control) chip, a first interface, a second interface, a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110309151.5A CN113193967B (en) | 2021-03-23 | 2021-03-23 | Multimode communication method, device, network module and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110309151.5A CN113193967B (en) | 2021-03-23 | 2021-03-23 | Multimode communication method, device, network module and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113193967A CN113193967A (en) | 2021-07-30 |
CN113193967B true CN113193967B (en) | 2022-09-06 |
Family
ID=76973674
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110309151.5A Active CN113193967B (en) | 2021-03-23 | 2021-03-23 | Multimode communication method, device, network module and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113193967B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105262789A (en) * | 2015-09-08 | 2016-01-20 | 天津光电聚能专用通信设备有限公司 | FPGA (Field Programmable Gate Array)-based MAC (Media Access Control) layer to MAC layer communication system and control method |
CN106571903A (en) * | 2015-10-08 | 2017-04-19 | 深圳市中兴微电子技术有限公司 | Communication method and system between chips |
CN109120475A (en) * | 2018-08-14 | 2019-01-01 | 华东计算技术研究所(中国电子科技集团公司第三十二研究所) | Debugging network system and method for high-density module |
CN110460646A (en) * | 2019-07-22 | 2019-11-15 | 天津市英贝特航天科技有限公司 | A kind of imperfect network protocol communications board and working method based on FPGA |
WO2019235684A1 (en) * | 2018-06-04 | 2019-12-12 | 주식회사 위더스플래닛 | Wifi network system for high density network environments |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8725202B2 (en) * | 2012-05-29 | 2014-05-13 | Newport Media, Inc. | Single transceiver for wireless peer-to-peer connections |
CN103823668A (en) * | 2012-11-16 | 2014-05-28 | 芯迪半导体科技(上海)有限公司 | Method for building network bridge among multiple network interfaces |
CN106375401B (en) * | 2016-08-30 | 2021-12-03 | 全球能源互联网研究院 | Communication method of electric power multimode heterogeneous fusion device supporting multi-stream convergence |
WO2018063998A1 (en) * | 2016-09-30 | 2018-04-05 | Intel Corporation | Systems, methods and devices for a mac-phy split interface |
-
2021
- 2021-03-23 CN CN202110309151.5A patent/CN113193967B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105262789A (en) * | 2015-09-08 | 2016-01-20 | 天津光电聚能专用通信设备有限公司 | FPGA (Field Programmable Gate Array)-based MAC (Media Access Control) layer to MAC layer communication system and control method |
CN106571903A (en) * | 2015-10-08 | 2017-04-19 | 深圳市中兴微电子技术有限公司 | Communication method and system between chips |
WO2019235684A1 (en) * | 2018-06-04 | 2019-12-12 | 주식회사 위더스플래닛 | Wifi network system for high density network environments |
CN109120475A (en) * | 2018-08-14 | 2019-01-01 | 华东计算技术研究所(中国电子科技集团公司第三十二研究所) | Debugging network system and method for high-density module |
CN110460646A (en) * | 2019-07-22 | 2019-11-15 | 天津市英贝特航天科技有限公司 | A kind of imperfect network protocol communications board and working method based on FPGA |
Also Published As
Publication number | Publication date |
---|---|
CN113193967A (en) | 2021-07-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101343646B1 (en) | Semiconductor device and host apparatus | |
WO2019010686A1 (en) | Data processing method and data processing apparatus | |
WO2019134706A1 (en) | Vehicle diagnostic method, device, apparatus, and system, and connection diagnostic apparatus | |
CN102196041A (en) | Wireless intelligent transducer and method for implementing plug and play of transducer | |
CN106878184A (en) | A kind of data message transmission method and device | |
US20220225352A1 (en) | System and method for physical downlink control channel monitoring | |
WO2020135413A1 (en) | Sim card registration method and apparatus, computer device, and storage medium | |
US20220382920A1 (en) | Terminal and communication method | |
CN113259264B (en) | Data transmission method and device, computer equipment and storage medium | |
CN113193967B (en) | Multimode communication method, device, network module and computer readable storage medium | |
CN113014510A (en) | Data caching method and device in distributed test of inertial navigation system | |
US11626949B2 (en) | System and method for providing channel state information reference signal power determination in unlicensed spectrum | |
US20080075102A1 (en) | Interface | |
WO2024113571A1 (en) | Polarity inversion method and apparatus, and storage medium and electronic apparatus | |
EP1484889A2 (en) | Supplicant and authenticator intercommunication mechanism independent of underlying data link and physical layer protocols | |
CN108388943B (en) | Pooling device and method suitable for neural network | |
CN111464395B (en) | Method and device for creating blockchain and readable storage medium | |
US11863475B2 (en) | Method and apparatus for designing rate matching pattern for partial demodulation reference signal (DMRS) transmission | |
US20060135126A1 (en) | Data synchronization control method between a user equipment and a user authentication card and a corresponding user authentication card | |
TW202203611A (en) | Network device and method for cross carrier scheduling | |
CN113868070A (en) | Debugging method, system, storage medium and equipment for SD card controller | |
JP2015072531A (en) | Test support method, test support device, and program | |
CN113408845B (en) | Processing method and device of production flow, computer equipment and storage medium | |
CN116055350B (en) | Json-based data communication quality detection method | |
CN112367249B (en) | Communication method of LoRa device, loRaWAN system, electronic apparatus, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |