Method of communication for EPA network, electronic device and program product
By using the EPA main clock device in the EPA network to send priority and cyclical packets to multiple EPA devices to dispatch non -cyclical packets, solve the traditional EPA network bus bandwidth and real -time problems, realize efficient and real -time real -time real -time, real -time real -time Data communication.
Patent Information
- Application Number
- CN202411991276.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Due to the bus arbitration mechanism of the master nodes in turn, traditional EPA networks have low effective bandwidth and data communication efficiency, and cannot guarantee the real-time nature of data communication.
Through the EPA main clock equipment, send priority to multiple EPA devices and cyclical packets occupied by length, and dispatch the non -periodic packets sent by multiple EPA devices to avoid the name node one by one, improve the bus bandwidth and ensure real -time nature.
The effective bandwidth of the bus network of the EPA network has been improved, and the real -time nature of data communication is guaranteed to meet the needs of high -bandwidth and low -delay communication.
Smart Images

Figure CN119383031A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention generally relate to the field of communications, and more particularly to a method, electronic device, and program product for communications in an EPA network. Background Art
[0002] The Ethernet for Plant Automation (EPA) bus is a real-time Ethernet bus designed based on the network communication requirements of industrial control systems and implemented based on the Ethernet physical layer. In an EPA network, each network node needs to be connected together using a network cable. There are various restrictions on the wiring rules. Once the connection is wrong, it will cause message collisions, and then cause abnormal conditions such as bit errors and packet loss. To solve this problem, the traditional method implements the bus arbitration mechanism by implementing a master-slave protocol stack on the bus to avoid bus data collisions. However, this traditional method requires the master node to call out in turn to communicate with the slave nodes one by one, resulting in a decrease in the effective bandwidth of the bus. In addition, due to the polling cycle of the master node, the real-time nature of data communication cannot be guaranteed.
[0003] In summary, the shortcomings of the traditional EPA network are: due to the bus arbitration mechanism in which the master nodes are called in turn, the effective bandwidth of the bus and the efficiency of data communication are low. Summary of the invention
[0004] In view of the above problems, the present invention provides a method, electronic device and program product for communication on an EPA network. In the method, an EPA master clock device can send priorities and occupied lengths to multiple EPA devices through periodic messages, thereby scheduling the sending of non-periodic messages by multiple EPA devices, realizing communication between multiple EPA devices and the EPA master clock device, avoiding the EPA master clock device from calling the roll of multiple EPA devices one by one, and ensuring the real-time performance of data communication while improving the effective bandwidth of the bus.
[0005] According to a first aspect of the present invention, a method for communication in an EPA network is provided, which is used for an EPA master clock device in the EPA network, comprising: generating multiple first messages for multiple EPA devices, wherein the first message includes the priority and occupied length of a second message to be sent by the EPA device, and the multiple EPA devices are respectively connected via a bus in the EPA network; sending the generated multiple first messages to the multiple EPA devices via the bus; and receiving multiple second messages from the multiple EPA devices via the bus, wherein the second messages are sent to the bus by the EPA devices according to the priority and occupied length in the first message.
[0006] In some embodiments, the EPA network is based on macrocycle communication, the first message includes a periodic message, and sending the generated multiple first messages to multiple EPA devices through a bus includes: determining the sending time of multiple periodic messages of the multiple EPA devices, wherein the sending time of the multiple periodic messages is within the cycle time of the macrocycle; and sending multiple periodic messages to the multiple EPA devices according to the determined sending time of the multiple periodic messages.
[0007] In some embodiments, the second message includes a non-periodic message received by the EPA master clock device within the non-periodic time of the macro cycle, and generating multiple first messages for multiple EPA devices includes: determining the priority and occupied length of the multiple non-periodic messages according to the types of the multiple non-periodic messages to be sent by the multiple EPA devices; and generating multiple periodic messages for the multiple EPA devices according to the determined priority and occupied length of the multiple non-periodic messages.
[0008] In some embodiments, determining the priorities and occupied lengths of multiple non-periodic messages based on the types of multiple non-periodic messages to be sent by multiple EPA devices includes: determining the priorities of multiple non-periodic messages based on the types of multiple non-periodic messages to be sent by multiple EPA devices; determining whether there is a collision between the priorities of multiple non-periodic messages; in response to a collision between the priorities of multiple non-periodic messages, obtaining the addresses of EPA devices corresponding to the non-periodic messages with the collision; and adjusting the priorities of the non-periodic messages with the collision based on the obtained addresses of the EPA devices.
[0009] In some embodiments, sending the generated multiple first messages to multiple EPA devices via a bus includes: obtaining a first message for sending to the EPA device from an EPA protocol stack in the EPA master clock device via a link layer interface in the EPA master clock device, wherein the first message is generated by the EPA protocol stack based on the priority and occupied length of a second message to be sent by the EPA device; obtaining a first timestamp from a timer in the EPA master clock device; generating an encoding of the first message and the first timestamp via an encoder in the EPA master clock device, wherein the encoding of the first message and the first timestamp is in a multi-bit wide format; converting the encoding of the generated first message and the first timestamp into a serial format via a serializer in the EPA master clock device to generate a scheduling frame; and sending the generated scheduling frame to the EPA device via a physical layer interface in the EPA master clock device connected to the bus.
[0010] In some embodiments, receiving multiple second messages from multiple EPA devices via a bus includes: receiving an EPA data frame from the EPA device via a physical layer interface in an EPA master clock device connected to the bus, wherein the EPA data frame includes a clock recovery code, a frame start code, a data code, a frame end code, and an idle state code; determining a second message of the EPA device based on the received EPA data frame; and obtaining the determined second message by the EPA protocol stack in the EPA master clock device via a link layer interface.
[0011] In some embodiments, determining a second message of an EPA device based on a received EPA data frame includes: sampling the EPA data frame by a clock in an EPA master clock device based on a clock recovery code in the received EPA data frame to obtain an EPA data frame in a digital format; converting a data code in the sampled EPA data frame into a multi-bit width format by a deserializer in the EPA master clock device based on a frame start code and a frame end code in the sampled EPA data frame, wherein the data code converted into the multi-bit width format is aligned by a frame start code; determining the second message of the EPA device by a decoder in the EPA master clock device based on the converted data code; and obtaining the determined second message of the EPA device from the decoder by the EPA protocol stack in the EPA master clock device through a link layer interface.
[0012] In some embodiments, the data code of the EPA data frame includes encoding of a second message and a first timestamp, and the method further includes: obtaining the first timestamp based on the converted data code by a decoder in the EPA master clock device; determining a first delay for the EPA master clock device to process data and a second delay for the EPA device to process data; and updating the first timestamp in the timer based on the determined first delay and second delay.
[0013] In some embodiments, sampling the EPA data frame to obtain a digitally formatted EPA data frame based on a clock recovery code in a received EPA data frame by a clock in an EPA master clock device includes: detecting a signal of an EPA data frame sent by an EPA device through multiple clocks in the EPA master clock device; in response to a first clock among the multiple clocks first detecting a signal, determining a second clock corresponding to the first clock among the multiple clocks based on a preset phase difference; and sampling the EPA data frame to obtain a digitally formatted EPA data frame based on a clock recovery code in the received EPA data frame by the determined second clock.
[0014] In some embodiments, sampling the EPA data frame by the determined second clock based on the clock recovery code in the received EPA data frame to obtain the EPA data frame in a digital format includes: determining the sampling period of the second clock, the first jitter time and the second jitter time of the clock in the EPA device; determining the oversampling multiple of the second clock based on the determined sampling period, the first jitter time and the second jitter time; and sampling the EPA data frame by the second clock based on the clock recovery code in the received EPA data frame and the determined oversampling multiple of the second clock to obtain the EPA data frame in a digital format.
[0015] According to a second aspect of the present invention, an electronic device is provided, which includes: at least one processing unit; and at least one memory, which is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the electronic device performs the steps of the method according to the first aspect of the present invention.
[0016] According to a third aspect of the present invention, there is provided a machine program product, the machine program product comprising a machine program, which, when executed by a machine, performs the steps of the method according to the first aspect of the present invention.
[0017] According to a fourth aspect of the present invention, there is provided a machine-readable storage medium having machine program code stored thereon, which, when executed, executes the steps of the method according to the first aspect of the present invention.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The present invention will be better understood and other objects, details, features and advantages of the present invention will become more apparent through the following description of specific embodiments of the present invention given with reference to the accompanying drawings.
[0020] Figure 1 A schematic diagram of an EPA network is shown in accordance with some embodiments of the present invention.
[0021] Figure 2 A flow chart illustrating a method of communication for an EPA network according to some embodiments of the present invention.
[0022] Figure 3A A schematic diagram showing the connection relationship between multiple EPA devices in a bus according to some embodiments of the present invention.
[0023] Figure 3BA schematic diagram showing another connection relationship between multiple EPA devices in a bus according to some embodiments of the present invention.
[0024] Figure 4 A schematic diagram showing a macrocycle in a communication process according to some embodiments of the present invention.
[0025] Figure 5 A schematic diagram illustrating the process of EPA network communication according to some embodiments of the present invention.
[0026] Figure 6 A schematic diagram showing an EPA data frame in the communication process of some embodiments of the present invention.
[0027] Figure 7 A schematic diagram showing clock time during a communication process according to some embodiments of the present invention.
[0028] Figure 8 A block diagram of an electronic device for implementing some embodiments of the present invention is shown.
[0029] In the various drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0030] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0031] In the following description, certain specific details are set forth for the purpose of illustrating various embodiments of the invention to provide a thorough understanding of the various embodiments of the invention. However, those skilled in the relevant art will recognize that the embodiments may be practiced without one or more of these specific details. In other cases, well-known devices, structures, and techniques associated with the present application may not be shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.
[0032] Unless the context requires otherwise, throughout the specification and claims, the word "comprise" and variations such as "include" and "have" should be construed in an open, inclusive sense, ie, should be interpreted as "including, but not limited to."
[0033] References throughout the specification to "one embodiment" or "some embodiments" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearance of "in one embodiment" or "some embodiments" in various places throughout the specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any manner in one or more embodiments.
[0034] In addition, the terms "first", "second", etc. used in the specification and claims are only used to distinguish each object for the sake of clarity of description, and do not limit the size or other order of the objects described.
[0035] As mentioned above, EPA networks generally achieve data communication through the physical layer based on physical layer chips or network cables. Since network cables are needed to connect each network node in the EPA network, and there are many restrictions on the connection rules, once the connection is wrong, it is easy to cause message collisions, resulting in abnormal conditions such as bit errors and packet loss. Since the application scenarios of EPA networks are mostly industrial sites, their network architecture is often a bus structure such as CAN. If the traditional industrial control bus is replaced with an EPA network based on network cables, its cost will increase significantly compared to before, the product form will also change significantly, and the network cable is also easily damaged in the industrial site. Based on the above situation, the EPA network based on physical layer chips and network cables is not suitable for complex industrial sites.
[0036] In order to solve the problems of complex wiring rules, easy packet loss, high cost and easy damage of EPA network, the traditional method is to implement the bus arbitration mechanism by implementing the master-slave protocol stack on buses such as MLVDS (Multipoint-Low-Voltage Differential Signaling), so as to avoid bus data collision. Although this traditional method is easy to implement, it has the following defects that do not meet the requirements of high-performance bus controllers. First, the form of calling the master node in turn will reduce the effective bandwidth of the bus; second, since the upload cycle of the slave node data depends on the polling cycle of the master node, rather than the upload demand of the slave node, the real-time data communication between the master and slave nodes cannot be guaranteed. In the above situation, if the upload frequency of the EPA network is increased, the bandwidth utilization of the bus will be reduced, and if the upload frequency is reduced, the real-time performance of the data will be affected. Based on this, the method based on buses such as MLVDS will not have high bandwidth and communication real-time performance at the same time, and cannot meet the high-bandwidth and low-latency communication requirements of current bus controllers.
[0037] Furthermore, in the conventional technology, multiple pairs of MLVDS buses are used to realize data communication between master and slave nodes. Multiple pairs of MLVDS buses often include a pair of synchronous clock buses, a pair of communication clock buses, a pair of control buses, and at least one pair of data buses. The master node synchronizes the clocks of the slave nodes through the synchronous clock bus, and each slave node simultaneously publishes the communication clock signal, control signal, and data signal through the communication clock bus, control bus, and data bus. However, in the conventional technology, adding multiple pairs of MLVDS buses to the backplane will increase the number of drivers and the number of connector pins by multiples, and the node size will inevitably increase, thereby increasing the communication cost, which does not meet the low-cost requirements of the current bus controller.
[0038] In order to at least partially solve one or more of the above problems and other potential problems, the present invention provides a method for communication in an EPA network. In this method, an EPA master clock device in an EPA network is connected to multiple EPA devices through a bus. During the communication process, the EPA master clock device can first generate a periodic message according to the priority and occupied length of the non-periodic messages to be sent by multiple EPA devices. Then, the EPA master clock device sends the periodic message to multiple EPA devices through the bus in the EPA network. Further, multiple EPA devices send non-periodic messages to the EPA master clock device according to the scheduling of the EPA master clock device based on the received periodic messages. In this way, the EPA master clock device can send the priority and occupied length to multiple EPA devices through the periodic message, thereby scheduling the sending of non-periodic messages by multiple EPA devices, realizing the communication between multiple EPA devices and the EPA master clock device, avoiding the EPA master clock device from calling the names of multiple EPA devices one by one, and ensuring the real-time performance of data communication while improving the effective bandwidth of the bus.
[0039] Figure 1 Schematic diagram of EPA network 100 of some embodiments of the present invention is shown. In some embodiments, EPA network 100 includes EPA master clock device 102 and multiple EPA devices, and EPA master clock device 102 and multiple EPA devices are connected via bus 104. The multiple EPA devices may include EPA device 106, EPA device 108, and EPA device 110, for example. It should be understood that Figure 1 The EPA devices listed in the figure are only used as examples and are not intended to limit the present invention. The EPA master clock device may be any one of a plurality of EPA devices. In some embodiments, the bus 104 includes, but is not limited to, field buses such as MLVDS, BLVDS, CAN, RS485, and RS422, for implementing communication between the EPA master clock device 102 and a plurality of EPA devices.
[0040] In some embodiments, the EPA master clock device 102 may be implemented using an MCU (Micro Controller Unit), a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-purpose Computing on Graphics Processing Units), an FPGA (Field Programmable Gate Array) or other programmable logic devices, an ASIC (Application Specific Integrated Circuit), discrete gates or transistor logic devices, discrete hardware components, etc. The computing device 102 may have one or more processing units, including dedicated processing units such as GPUs, FPGAs, and ASICs, and general processing units such as CPUs. It should be understood that the EPA master clock device may be any EPA device in the EPA network 100, for example, the EPA device 106, the EPA device 108, or the EPA device 110 may all serve as the EPA master clock device.
[0041] In some embodiments, the EPA master clock device 102 includes a periodic message generating unit 112, a periodic message sending unit 114, and a non-periodic message receiving unit 116. The periodic message generating unit 112 is used to generate multiple periodic messages (which may be referred to as first messages) for the EPA device 106, the EPA device 108, and the EPA device 110. Taking the periodic message sent by the EPA device 106 as an example, the periodic message includes the priority and occupied length of the non-periodic message (which may be referred to as the second message) that the EPA device 106 will send to the EPA master clock device 102 next. The periodic message sending unit 114 is used to send periodic messages to the EPA device 106, the EPA device 108, and the EPA device 110 through the bus 104 in the EPA network 100.
[0042] Regarding the non-periodic message receiving unit 116, it is used to receive multiple non-periodic messages from the EPA device 106, the EPA device 108, and the EPA device 110 through the bus 104 in the EPA network, wherein the multiple non-periodic messages are sent by the EPA device 106, the EPA device 108, and the EPA device 110 to the EPA master clock device 102 according to the priority and the occupied length sent by the EPA master clock device 102. It should be understood that the above-mentioned periodic messages and non-periodic messages are transmitted between the EPA master clock device 102 and the EPA devices 106, 108, and 110 through the bus 104.
[0043] In an embodiment of the present invention, the EPA master clock device 102 in the EPA network 100 is connected to multiple EPA devices through a bus 104. During the communication process, the EPA master clock device 102 can first generate a periodic message according to the priority and occupied length of the non-periodic messages to be sent by the multiple EPA devices. Then, the EPA master clock device 102 sends the periodic message to the multiple EPA devices through the bus in the EPA network. Further, the multiple EPA devices send non-periodic messages to the EPA master clock device 102 according to the scheduling of the EPA master clock device 102 based on the received periodic messages. In this way, the EPA master clock device 102 can send the priority and occupied length to multiple EPA devices through periodic messages, thereby scheduling the sending of non-periodic messages by multiple EPA devices, realizing the communication between multiple EPA devices and the EPA master clock device 102, avoiding the EPA master clock device 102 to call the names of multiple EPA devices one by one, and ensuring the real-time performance of data communication while improving the effective bandwidth of the bus 104.
[0044] The following will be combined Figure 2 A method for communication for an EPA network according to an embodiment of the present invention is described. Figure 2 1 is a flow chart showing a method 200 for communication with an EPA network according to some embodiments of the present invention. It should be understood that the method 200 may be implemented, for example, in Figure 1 It should be understood that the method 200 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present invention is not limited in this respect.
[0045] At step 202, a plurality of first messages for a plurality of EPA devices are generated, wherein the first messages include the priority and occupied length of the second message to be sent by the EPA device, and the plurality of EPA devices are connected respectively via a bus in the EPA network. In some embodiments, in the EPA network 100, the EPA master clock device 102 is connected to the EPA device 106, the EPA device 108, and the EPA device 110 (which may be collectively referred to as a plurality of EPA devices) via the bus 104. The EPA master clock device 102 determines the priority and occupied length of the non-periodic message (which may be referred to as the second message) to be sent by the EPA device 106, the EPA device 108, and the EPA device 110, and generates a periodic message (which may be referred to as the first message) according to the priority and occupied length. Among them, the priority indicates the order in which the plurality of EPA devices send the non-periodic message, and the occupied length indicates the time length or field length that the EPA device needs to occupy to send the non-periodic message within the communication macrocycle.
[0046] Regarding the second message, it includes, for example, a non-periodic message received by the EPA master clock device within the non-periodic time of the macro cycle, and regarding the method of generating multiple first messages for multiple EPA devices, it includes, for example: determining the priority and occupied length of the multiple non-periodic messages according to the types of the multiple non-periodic messages to be sent by the multiple EPA devices; and generating multiple periodic messages for the multiple EPA devices according to the determined priority and occupied length of the multiple non-periodic messages.
[0047] A method for determining the priorities and occupied lengths of multiple non-periodic messages based on the types of multiple non-periodic messages to be sent by multiple EPA devices, for example, includes: determining the priorities of multiple non-periodic messages based on the types of multiple non-periodic messages to be sent by multiple EPA devices; determining whether there is a collision between the priorities of multiple non-periodic messages; in response to a collision between the priorities of multiple non-periodic messages, obtaining the addresses of EPA devices corresponding to the non-periodic messages with the collision; and adjusting the priorities of the non-periodic messages with the collision based on the obtained addresses of the EPA devices.
[0048] At step 204, the generated multiple first messages are sent to the multiple EPA devices via the bus. In some embodiments, after generating multiple periodic messages for the multiple EPA devices, the EPA master clock device 102 can send the generated multiple periodic messages to the EPA device 106, the EPA device 108, and the EPA device 110 via the bus 104 in the EPA network.
[0049] Regarding the EPA network, it can be based on macro-cycle communication, the first message includes a periodic message, and regarding the method of sending the generated multiple first messages to multiple EPA devices through a bus, it for example includes: determining the sending time of multiple periodic messages of multiple EPA devices, wherein the sending time of the multiple periodic messages is within the cycle time of the macro cycle; and sending multiple periodic messages to multiple EPA devices according to the determined sending time of the multiple periodic messages.
[0050] A method for sending multiple generated first messages to multiple EPA devices via a bus, for example, includes: obtaining a first message for sending to an EPA device from an EPA protocol stack in the EPA master clock device via a link layer interface in the EPA master clock device, wherein the first message is generated by the EPA protocol stack based on the priority and occupied length of a second message to be sent by the EPA device; obtaining a first timestamp from a timer in the EPA master clock device; generating an encoding of the first message and the first timestamp via an encoder in the EPA master clock device, wherein the encoding of the first message and the first timestamp is in a multi-bit wide format; converting the encoding of the generated first message and the first timestamp into a serial format via a serializer in the EPA master clock device to generate a scheduling frame; and sending the generated scheduling frame to the EPA device via a physical layer interface in the EPA master clock device connected to the bus.
[0051] At step 206, multiple second messages are received from multiple EPA devices via the bus, wherein the second messages are sent to the bus by the EPA devices according to the priority and occupied length in the first message. In some embodiments, EPA device 106, EPA device 108, and EPA device 110 receive periodic messages from EPA master clock device 102, and send non-periodic messages to EPA master clock device 102 respectively according to the scheduling of the three EPA devices in the periodic message (i.e., priority and occupied length). EPA master clock device 102 receives non-periodic messages from EPA device 106, EPA device 108, and EPA device 110 respectively via bus 104.
[0052] A method for receiving multiple second messages from multiple EPA devices via a bus, for example, includes: receiving an EPA data frame from an EPA device via a physical layer interface in an EPA master clock device connected to the bus, wherein the EPA data frame includes a clock recovery code, a frame start code, a data code, a frame end code, and an idle state code; determining a second message of the EPA device based on the received EPA data frame; and obtaining the determined second message by an EPA protocol stack in the EPA master clock device via a link layer interface.
[0053] A method for determining a second message of an EPA device based on a received EPA data frame, for example, includes: a clock in an EPA master clock device samples the EPA data frame based on a clock recovery code in the received EPA data frame to obtain an EPA data frame in a digital format; a deserializer in the EPA master clock device converts a data code in the sampled EPA data frame into a multi-bit width format based on a frame start code and a frame end code in the sampled EPA data frame, wherein the data code converted into the multi-bit width format is aligned by a frame start code; a decoder in the EPA master clock device determines the second message of the EPA device based on the converted data code; and an EPA protocol stack in the EPA master clock device obtains the determined second message of the EPA device from the decoder through a link layer interface.
[0054] A method for sampling an EPA data frame to obtain an EPA data frame in a digital format by using a clock in an EPA master clock device based on a clock recovery code in a received EPA data frame, for example, includes: detecting a signal of an EPA data frame sent by an EPA device through multiple clocks in the EPA master clock device; in response to a first clock among multiple clocks first detecting a signal, determining a second clock corresponding to the first clock among multiple clocks based on a preset phase difference; and sampling the EPA data frame to obtain an EPA data frame in a digital format by using the determined second clock based on a clock recovery code in the received EPA data frame.
[0055] A method for sampling an EPA data frame to obtain an EPA data frame in a digital format by using a determined second clock based on a clock recovery code in a received EPA data frame, for example, includes: determining a sampling period of the second clock, a first jitter time, and a second jitter time of a clock in an EPA device; determining an oversampling multiple of the second clock based on the determined sampling period, the first jitter time, and the second jitter time; and sampling the EPA data frame to obtain an EPA data frame in a digital format by using the second clock based on the clock recovery code in the received EPA data frame and the determined oversampling multiple of the second clock.
[0056] Regarding the data code of the EPA data frame, it includes, for example, encoding of a second message and a first timestamp, and method 200 also includes, for example: a decoder in the EPA master clock device obtains the first timestamp based on the converted data code; determines a first delay for the EPA master clock device to process data and a second delay for the EPA device to process data; and updates the first timestamp in the timer based on the determined first delay and second delay.
[0057] In an embodiment of the present invention, an EPA master clock device in an EPA network is connected to a plurality of EPA devices via a bus. During the communication process, the EPA master clock device can first generate a periodic message according to the priority and occupied length of the non-periodic messages to be sent by the plurality of EPA devices. Then, the EPA master clock device sends the periodic message to the plurality of EPA devices via the bus in the EPA network. Further, the plurality of EPA devices send non-periodic messages to the EPA master clock device according to the scheduling of the EPA master clock device based on the received periodic messages. In this way, the EPA master clock device can send the priority and occupied length to the plurality of EPA devices via the periodic message, thereby scheduling the sending of non-periodic messages by the plurality of EPA devices, realizing the communication between the plurality of EPA devices and the EPA master clock device, avoiding the EPA master clock device from calling the roll of the plurality of EPA devices one by one, and ensuring the real-time performance of data communication while improving the effective bandwidth of the bus.
[0058] Figure 3A , Figure 3B Schematic diagrams 300A and 300B respectively show the connection relationship of multiple EPA devices in a bus in some embodiments of the present invention. Figure 3A ,exist Figure 1 In the EPA network 100 shown in FIG. 1 , the bus 104 can support dual-path redundancy, including line 1041 and line 1042. The A ends of the EPA devices 106, 108, and 110 are all connected to line 1041, and the B ends are all connected to line 1042. In other embodiments, the reference Figure 3B , the B port of EPA device 106, the A port of EPA device 108 and the A port of EPA device 110 are connected to line 1041, and the A port of EPA device 106, the B port of EPA device 108 and the B port of EPA device 110 are connected to line 1042. It should be understood that the connection relationship 300A and the connection relationship 300B are only examples of the connection relationship between EPA devices of the EPA network of the present invention. The A end or the B end of each EAP device in the present invention can be arbitrarily connected to line 1041 or line 1042 without considering its wiring method, thereby reducing the wiring difficulty.
[0059] It should be understood that for traditional EPA networks based on physical layer chips or network cables, the requirements Figure 3A or Figure 3BThe A-end and B-end connection between the EAP devices shown in the figure, for example, the A-end of the EPA device 108 must be connected to the B-end of the EPA device 106, and the situation where the A-end of the EPA device 108 is connected to the A-end of the EPA device 106 is not allowed, and the order of the EPA devices cannot be changed at will. Therefore, the traditional EPA network based on physical layer chips or network cables has a complex wiring method. In this way, the wiring rules of the EPA network can be simplified in this embodiment, and any ports between EPA devices can be interconnected, and the order of EPA devices can be changed at will, thereby reducing the wiring difficulty of technicians and avoiding the situation of overlong network cables when the number of EPA devices is too large.
[0060] Figure 4 Schematic diagram of a macrocycle 400 in a communication process of some embodiments of the present invention is shown. In some embodiments, Figure 1 In the EPA network 100 shown in FIG, all EPA devices communicate according to a certain cycle, and the time required for the EPA network 100 to complete a complete communication cycle is the macrocycle of the communication. In a macrocycle, there is a cycle time for transmitting a periodic message (which may be called a first message) and a non-periodic time for transmitting a non-periodic message (which may be called a second message). The bus arbitration mechanism in the EPA network 100 can thus be divided into a bus arbitration mechanism within the cycle time and a bus arbitration mechanism within the non-periodic time. The following will describe in detail the way in which the EPA network 100 performs message scheduling and communication in a macrocycle.
[0061] In some embodiments, the EPA master clock device 102 may determine the time for each EPA device to send a periodic message within the periodic time. Figure 4 , EPA device 1, EPA device 2, EPA device 3, EPA device 4, EPA device 5, ..., EPA device n (because each EPA device has a corresponding EPA protocol stack, Figure 4 The vertical axis in the figure can represent either the EPA device or the protocol stack. The transmission times of the periodic messages assigned to the devices are time 1, time 3, time 2, time 4, time 5, ..., time m. Then, the EPA master clock device 102 sends the periodic messages to the n EPA devices according to the transmission time assigned to each EPA device. In this way, the EPA master clock device 102 implements the bus arbitration mechanism for the n EPA devices within the cycle time, ensuring that the transmission times of the periodic messages sent to the n EPA devices within the cycle time are staggered, thereby avoiding collision of the periodic messages within the cycle time.
[0062] In some embodiments, the periodic message sent by the EPA master clock device 102 within the periodic time may include the scheduling of the non-periodic message to be sent by the EPA device within the non-periodic time, that is, the declaration field of the priority and the occupied length. For example, the periodic message sent by the EPA master clock device 102 to the EPA device 1 may include a declaration field with a priority of 2 and an occupied length of 2 (2 unit time periods), the periodic message sent by the EPA master clock device 102 to the EPA device 2 may include a declaration field with a priority of 15 and an occupied length of 4, the periodic message sent by the EPA master clock device 102 to the EPA device 3 may include a declaration field with a priority of 15 and an occupied length of 1, the periodic message sent by the EPA master clock device 102 to the EPA device 4 may include a declaration field with no non-periodic data, the periodic message sent by the EPA master clock device 102 to the EPA device 5 may include a declaration field with a priority of 1 and an occupied length of 1, and so on. In some embodiments, the priority and the occupied length may be determined by the EPA master clock device 102 based on the type of the non-periodic message.
[0063] After receiving the periodic message sent by the EPA master clock device 102, each EPA device can determine the sending time of the non-periodic message within the non-periodic time according to the declaration field of the priority and occupied length of the non-periodic message in the periodic message. In this way, the EPA network 100 implements the bus arbitration mechanism within the non-periodic time. In this way, the non-periodic time segment scheduling of the non-periodic message and the high-priority data transmission can be realized based on the periodic message sent by the EPA master clock device 102, thereby realizing the timing of the non-periodic message sent by each EPA device, avoiding the collision of the non-periodic message and effectively utilizing the bandwidth of the bus 104.
[0064] In some embodiments, due to the fact that the types of non-periodic messages may be the same, there may be conflicts between the priorities of non-periodic messages. For example, the priorities of the periodic messages sent by the EPA master clock device 102 to the EPA device 2 and the EPA device 3 are both 15. Therefore, when generating periodic messages, the EPA master clock device 102 needs to further process the EPA devices with conflicting priorities. For example, the EPA master clock device 102 can further determine the priority of the EPA device in sending the non-periodic message in combination with the address of the EPA device.
[0065] In some embodiments, if there is a conflict in the priorities determined by the EPA master clock device 102 according to the type of the non-periodic message, the address of the EPA device with the conflicting priorities can be further obtained, and the corresponding priority can be adjusted according to the address of the EPA device. For example, if there is a conflict in the priorities of the non-periodic messages sent by EPA device 2 and EPA device 3, the EPA master clock device 102 can determine that the priority of EPA device 2 is higher than the priority of EPA device 3 according to the order of addresses. In this way, the EPA master clock device 102 can realize the scheduling of multiple EPA devices when there is a conflict in the priorities of the non-periodic messages.
[0066] refer to Figure 4 Based on the above embodiment, since EPA device 5 has the highest priority (priority is 1), the non-periodic message of EPA device 5 is sent at time a, and its occupied length is 1. EPA device 1 has the next highest priority (priority is 2), so the non-periodic message of EPA device 1 is sent at time b, and its occupied length is 2. Then, since the priorities of EPA device 2 and EPA device 3 are both 15, based on the priority sending method of EPA devices with earlier addresses, the non-periodic message of EPA device 2 is sent at time c, and its occupied length is 4, and the non-periodic message of EPA device 3 is sent at time d, and its occupied length is 1. Since EPA device 4 declares that there is no non-periodic message, EPA device 4 does not send a non-periodic message during the non-periodic time. The bus arbitration mechanism of the above embodiment can achieve accurate bus arbitration without affecting the bus bandwidth.
[0067] Figure 5 A schematic diagram of a process 500 of EPA network communication in accordance with some embodiments of the present invention is shown. Figure 1 In the EPA network 100 shown in FIG. 1 , the EPA master clock device 102 includes a bus driver 1021 and an EPA protocol stack 1022. It should be understood that the process 500 may be executed in the bus driver 1021 and the EPA protocol stack 1022, for example. It should be understood that the process 500 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present invention is not limited in this respect.
[0068] In some embodiments, the EPA protocol stack 1022 generates a periodic message according to the priority and occupancy length of multiple EPA devices. Then, the bus driver 1021 obtains the periodic message from the EPA protocol stack 1022 through the link layer interface 512. Among them, the link layer interface 512 can implement a variety of link layer interfaces, including but not limited to RGMII, GMII, SGMII, MII, RMII and other data interfaces, to achieve data format conversion. Then, the bus driver 1021 obtains the timestamp of the current record (which can be called the first timestamp) from the timer 510, and adds the timestamp to the periodic message.
[0069] Further, the bus driver 1021 encodes the periodic message with the timestamp added through the encoder 514, thereby combining the data and the clock signal, and the generated code can be a multi-bit wide format. After passing through the encoder 514, the generated code is converted into a serial format through the serializer 516, so that the periodic message is converted into a scheduling frame for bus communication, and the scheduling frame is used to carry the periodic message. Finally, the bus driver 1021 sends the data frame to the bus 104 through the physical layer interface 502, and transmits it to multiple EPA devices through the bus 104. Among them, the encoder 514 can support multiple encoding standards, including but not limited to 4B / 5B, 8B / 10B, NRZI, NRZ, etc. The physical layer interface 502 can implement a variety of bus physical layer interfaces, including but not limited to MLVDS, BLVDS, CAN, RS485, RS422 and other physical layer interfaces. In this way, the bus driver 1021 can quickly send periodic messages to multiple EPA devices, thereby improving the efficiency of scheduling multiple EPA devices.
[0070] In some embodiments, after receiving the periodic message through the bus 104, the EPA device sends a non-periodic message to the bus driver 1021 according to the schedule in the periodic message. The non-periodic message is sent by the EPA device to the bus driver 1021 in the form of an EPA data frame, and the bus driver 1021 receives the EPA data frame from the bus 104 through the physical layer interface 502. The EPA data frame may include a clock recovery code, a frame start code, a data code, a frame end code, and an idle state code. Figure 6 To further describe the structure of the EPA data frame.
[0071] After the bus driver 1021 obtains the EPA data frame, it can parse the non-periodic message according to the EPA data frame and send it to the EPA protocol stack 1022 through the link layer interface 512. In some embodiments, the EPA protocol stack 1022 can read the format of the non-periodic message and determine whether to accept the non-periodic message and perform further analysis based on the IP address or physical address of the EPA device contained in the non-periodic message. The following embodiment will describe in detail the process of the bus driver 1021 parsing the EPA data frame to obtain the non-periodic message.
[0072] In some embodiments, the bus driver 1021 digitally samples the EPA data frame based on the clock recovery code in the EPA data frame through the clock 504, thereby obtaining the EPA data frame in digital format, and the multiple EPA data frames in digital format are in serial format. Then, the bus driver 1022 determines the field of the data code in each EPA data frame based on the frame start code and the frame end code in the EPA data frame through the deserializer 506, thereby converting the data code in the serial format into a multi-bit width format, and the data code is aligned by the frame start code. Further, the bus driver 1021 decodes the data code converted into the multi-bit width format through the decoder 508, thereby obtaining the non-periodic message sent by the EPA device. In this way, the efficiency of parsing the EPA data frame can be improved, thereby improving the communication efficiency of the EPA network 100.
[0073] In some embodiments, the bus driver 1021 may include multiple clocks, and the bus driver 1021 may detect the upper edge or lower edge of the signal of the EPA data frame received from the physical layer interface 502 through the multiple clocks. Then, after a clock (which may be called the first clock) first detects the upper edge or lower edge of the signal, another clock (which may be called the second clock, i.e., clock 504) corresponding to the clock is selected according to a certain phase difference, and the other clock may sample the center position of the upper edge or lower edge of the signal. Further, the bus driver 1021 samples the signal through the other clock to obtain the EPA data frame in digital format. In this way, the accuracy of the clock used to sample the EPA data frame can be guaranteed, thereby improving the accuracy of sampling the EPA data frame and the non-periodic message.
[0074] In some embodiments, the oversampling ratio (or the number of clock phases) n of the clock 504 can be determined in the following manner: First, the bus driver 1021 determines the sampling period of the clock 504 , the jitter time of the clock 504 (may be called the first jitter time) and the jitter time of the clock in the EPA device (It can be called the second jitter time). Then, the bus driver 1021 is based on the sampling period of the clock 504. , the jitter time of the clock 504 and the jitter time of the clock in the EPA device , to determine the oversampling multiple n of the clock 504, the specific calculation formula is as follows.
[0075]
[0076]
[0077] For example, if the rate of bus 104 is 200 Mbps, the sampling period of clock 504 is , the jitter time of clock 504 , the jitter time of the clock in the EPA device Thus, it can be obtained that the oversampling multiple n>2.3. At this time, the oversampling multiple n can be determined according to the range. In this way, the oversampling multiple of the clock 504 can be quickly determined, thereby improving the sampling efficiency of the EPA data frame.
[0078] Figure 6 A schematic diagram of an EPA data frame 600 in the communication process of some embodiments of the present invention is shown. In some embodiments, taking the Nth frame as an example, the frame structure of the EPA data frame 600 is composed of a control code and a data code, wherein the control code can be divided into a clock recovery code, a frame start code, a frame end code, and an idle state code (used to separate the Nth frame and the N+1th frame) according to the function. The clock recovery code is used to restore the data and the clock to obtain the correct bus data. The frame start code is used for frame synchronization to achieve field alignment after deserialization. The frame end code is used to determine the end of the bus message. The idle state code is used to reset the bus driver to ensure that the bus driver continues to work. The data code is generated after the non-periodic message is encoded, including the EPA message header and application data.
[0079] Figure 7 A schematic diagram of clock time 700 in the communication process of some embodiments of the present invention is shown. In some embodiments, the master clock time T1 is the clock time in the EPA master clock device 102, and the slave clock time T2 is the clock time in the EPA device. It should be understood that since the present invention communicates through the bus 104, its line delay is almost 0, so the line delay time can be ignored. From the master clock time T1 to the slave clock time T2, the time experienced includes the delay 1 (which can be called the first delay) of the EPA master clock device 102 processing data and the delay 2 (which can be called the second delay) of the EPA device processing data.
[0080] In some embodiments, the data code of the EPA data frame includes not only the code of the non-periodic message, but also the code of the timestamp (which may be referred to as the first timestamp). The timestamp is sent by the bus driver 1021 when sending the periodic message to the EPA device, and the EPA device encapsulates the non-periodic message and the timestamp into a data code before sending the EPA data frame. After the bus driver 1021 decodes the data code through the decoder 508, the non-periodic message and the timestamp can be obtained. Then, the bus driver 1021 calculates the current timestamp based on the determined delay 1 of the EPA master clock device 102 processing the data and the delay 2 of the EPA device processing the data, and updates the timestamp previously recorded in the timer 510 to the current timestamp.
[0081] In this way, the bus driver 1021 can achieve full network time synchronization of the EPA network 100. Since the bus driver 1021 adds a timestamp through the encoder 514 when sending a periodic message, and obtains the timestamp at the decoder 508 when receiving a non-periodic message, and the EPA network 100 is a bus type (no line delay), the timestamp is processed in the communication process and no dwell time is generated. In this way, the timestamp can be accurately updated only through the processing delay of the master and slave nodes, and its synchronization accuracy is higher than the method of timestamping at the physical layer and obtaining the timestamp by the EPA master clock device 102. In addition, the accuracy will not deteriorate with the increase in the number of slave nodes, and the process of updating the timestamp is more simplified.
[0082] Figure 8 The block diagram of an electronic device 800 suitable for implementing an embodiment of the present invention is schematically shown. The electronic device 800 can be used to implement the EPA master clock device 102. The electronic device 800 can be used to implement the execution Figure 2 The method 200 is shown in the apparatus. Figure 8 As shown, the electronic device 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 802 or computer program instructions loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0083] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, an output unit 807, and a storage unit 808. The central processing unit 801 performs the various methods and processes described above, such as executing method 200. For example, in some embodiments, the various processes or operations described above can be implemented as computer software programs, which are stored in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the CPU 801, the various methods and processes described above can be executed, such as executing one or more operations of the method 200. Alternatively, in other embodiments, the CPU 801 can be configured to execute the various methods and processes described above, such as executing one or more actions of the method 200, by any other appropriate means (e.g., by means of firmware).
[0084] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0085] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of the computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present invention.
[0086] These computer-readable program instructions can be provided to a processor in a voice interaction device, a general-purpose computer, a special-purpose computer, or a processing unit of other programmable data processing devices, thereby producing a machine, so that when these instructions are executed by the processing unit of a computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other device to work in a specific manner.
[0087] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
[0088] The above are only optional embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for communication in an EPA network, for use in an EPA master clock device in an EPA network, characterized in that: include: Generate a plurality of first messages for a plurality of EPA devices, wherein the first messages include the priority and occupied length of a second message to be sent by the EPA device, and the plurality of EPA devices are respectively connected via buses in the EPA network; Sending the generated multiple first messages to multiple EPA devices via a bus; as well as A plurality of second messages are received from a plurality of EPA devices via the bus, wherein the second messages are sent to the bus by the EPA devices according to the priority and occupied length in the first messages.
2. The method according to claim 1, characterized in that The EPA network is based on macrocycle communication, the first message includes a periodic message, and the multiple first messages generated and sent to the multiple EPA devices through the bus include: Determining a transmission time of a plurality of periodic messages of a plurality of EPA devices, wherein the transmission time of the plurality of periodic messages is within a periodic time of a macrocycle; and According to the determined sending times of the multiple periodic messages, multiple periodic messages are sent to multiple EPA devices.
3. The method according to claim 2, characterized in that The second message includes a non-periodic message received by the EPA master clock device during the non-periodic time of the macro cycle, and generating a plurality of first messages for a plurality of EPA devices includes: determining priorities and occupied lengths of the multiple non-periodic messages according to types of the multiple non-periodic messages to be sent by the multiple EPA devices; and According to the determined priorities and occupied lengths of the multiple non-periodic messages, multiple periodic messages for the multiple EPA devices are generated.
4. The method according to claim 3, characterized in that According to the types of the multiple non-periodic messages to be sent by the multiple EPA devices, the priorities and occupied lengths of the multiple non-periodic messages are determined including: Determine priorities of the multiple non-periodic messages according to types of the multiple non-periodic messages to be sent by the multiple EPA devices; Determine whether there is a conflict between the priorities of multiple non-periodic messages; In response to a collision between priorities of the plurality of non-periodic messages, acquiring addresses of EPA devices corresponding to the non-periodic messages having the collision; and Based on the acquired address of the EPA device, the priority of the non-periodic message with collision is adjusted.
5. The method according to claim 1, characterized in that Sending the generated multiple first messages to the multiple EPA devices through the bus includes: Obtaining, through a link layer interface in the EPA master clock device, from an EPA protocol stack in the EPA master clock device a first message for sending to the EPA device, wherein the first message is generated by the EPA protocol stack based on a priority and an occupied length of a second message to be sent by the EPA device; Obtaining a first timestamp from a timer in an EPA master clock device; Generate, by an encoder in the EPA master clock device, an encoding of the first message and the first timestamp, wherein the encoding of the first message and the first timestamp is in a multi-bit wide format; Converting the generated first message and the encoding of the first timestamp into a serial format through a serializer in the EPA master clock device to generate a scheduling frame; The generated scheduling frame is sent to the EPA device through a physical layer interface connected to the bus in the EPA master clock device.
6. The method according to claim 5, characterized in that Receiving a plurality of second messages from a plurality of EPA devices via the bus comprises: Receive an EPA data frame from the EPA device through a physical layer interface connected to the bus in the EPA master clock device, wherein the EPA data frame includes a clock recovery code, a frame start code, a data code, a frame end code, and an idle state code; Determining a second message of the EPA device based on the received EPA data frame; and The EPA protocol stack in the EPA master clock device obtains the determined second message through the link layer interface.
7. The method according to claim 6, characterized in that Based on the received EPA data frame, determining the second message of the EPA device includes: The clock in the EPA master clock device samples the EPA data frame based on the clock recovery code in the received EPA data frame to obtain the EPA data frame in a digital format; The deserializer in the EPA master clock device converts the data code in the sampled EPA data frame into a multi-bit width format based on the frame start code and the frame end code in the sampled EPA data frame, wherein the data code converted into the multi-bit width format is aligned by the frame start code; Determining, by a decoder in the EPA master clock device, a second message of the EPA device based on the converted data code; and The EPA protocol stack in the EPA master clock device obtains the second message of the determined EPA device from the decoder through the link layer interface.
8. The method according to claim 7, characterized in that The data code of the EPA data frame includes the encoding of the second message and the first timestamp, and the method further includes: The decoder in the EPA master clock device obtains a first time stamp based on the converted data code; determining a first delay for the EPA master clock device to process the data and a second delay for the EPA device to process the data; and Based on the determined first delay and the second delay, a first timestamp in the timer is updated.
9. The method according to claim 7, characterized in that: The clock in the EPA master clock device recovers the clock code in the received EPA data frame based on the clock, and samples the EPA data frame to obtain the EPA data frame in digital format, including: Detecting the signal of the EPA data frame sent by the EPA device through multiple clocks in the EPA master clock device; In response to a first clock among the plurality of clocks detecting a signal first, determining a second clock among the plurality of clocks corresponding to the first clock based on a preset phase difference; and The EPA data frame is sampled based on the clock recovery code in the received EPA data frame by the determined second clock to obtain the EPA data frame in a digital format.
10. The method according to claim 9, characterized in that The method of recovering the clock in the received EPA data frame based on the determined second clock and sampling the EPA data frame to obtain the EPA data frame in a digital format comprises: Determine a sampling period of a second clock, a first jitter time, and a second jitter time of a clock in an EPA device; Determining an oversampling multiple of the second clock based on the determined sampling period, the first jitter time, and the second jitter time; and The EPA data frame is sampled by the second clock based on the clock recovery code in the received EPA data frame and the determined oversampling multiple of the second clock to obtain the EPA data frame in a digital format.
11. An electronic device, characterized in that: include: at least one processing unit; At least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the electronic device performs the steps of the method according to any one of claims 1 to claim 10.
12. A machine program product, characterized in that The method comprises a machine program, which, when executed by a machine, performs the steps of the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
EPA (ethemet for plant automation) on-chip system, EPA communication system and EPA communication method
CN106685735A
EPA industrial bus and time sensitive network adaptation system and method
CN110943899A
Distributed control aperiodic communication method
CN112764407A
EPA system test method, EPA system test equipment and medium
CN113282520A
Clock synchronization method, slave clock equipment, master clock equipment and system
CN113411157A