CN106685735B - EPA on-chip system, EPA communication system and communication method - Google Patents

EPA on-chip system, EPA communication system and communication method Download PDF

Info

Publication number
CN106685735B
CN106685735B CN201710066480.5A CN201710066480A CN106685735B CN 106685735 B CN106685735 B CN 106685735B CN 201710066480 A CN201710066480 A CN 201710066480A CN 106685735 B CN106685735 B CN 106685735B
Authority
CN
China
Prior art keywords
epa
message
communication
configuration
rte
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
Application number
CN201710066480.5A
Other languages
Chinese (zh)
Other versions
CN106685735A (en
Inventor
童庆
潘再生
杨大胜
周海敏
唐艳丽
朱冬冬
沈天扬
赵锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Jay core technology Co., Ltd.
Original Assignee
Zhejiang Jay Core Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhejiang Jay Core Technology Co Ltd filed Critical Zhejiang Jay Core Technology Co Ltd
Priority to CN201710066480.5A priority Critical patent/CN106685735B/en
Publication of CN106685735A publication Critical patent/CN106685735A/en
Application granted granted Critical
Publication of CN106685735B publication Critical patent/CN106685735B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • H04L41/0809Plug-and-play configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0846Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction
    • H04L49/109Integrated on microchip, e.g. switch-on-chip
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies

Abstract

The invention aims to solve the technical problem of providing an EPA on-chip system, an EPA communication system and a communication method, wherein EPA data communication is additionally provided with a third non-real-time stage on the basis of the conventional periodic and non-periodic communication, and can support compatible transceiving processing of non-EPA messages besides EPA periodic messages and non-periodic messages, so that the on-chip system can support configuration of upper computer EPA configuration software and also can support configuration through common Ethernet message transceiving, and the limitation of the EPA configuration software is broken; meanwhile, the main control system on chip can determine parameters such as macrocycle, module communication time slot, cycle time and the like according to the scale of the whole network and the data volume condition, and a user does not need to independently distribute each EPA module.

Description

EPA on-chip system, EPA communication system and communication method
Technical Field
The invention relates to an EPA communication technology, in particular to an EPA on-chip system, an EPA communication system and a communication method.
Background
the Ethernet for Plant Automation (EPA) standard in the industrial Automation industry is a mainstream technology in the field of communications of commercial computers such as Ethernet, TCP/IP, etc. that is directly applied to communications between industrial control field devices, and on this basis, an open network communication platform is established that is applied to communications between industrial field devices. The EPA communication module takes an EPA core as a core and forms a system with the microprocessor, the MAC module, the storage module and the like. The existing EPA system on chip also takes an EPA protocol stack as a core and is formed by a microprocessor, a storage module and a bus on chip, but the existing EPA system on chip has the following defects:
1. When one device in the network has a fault and needs to be replaced, the whole network must be stopped to replace the device so as to continue communication, and online plug and play cannot be realized.
2. The configuration is also usually carried out based on EPA configuration software, the configuration mode is single, a user needs to learn the use of the configuration software before using the configuration software, the sending and receiving communication of EPA messages can be supported only during the networking communication, and if other types of messages occur, the EPA scheduling communication is disordered and goes wrong.
3. In a bus architecture, the EPA core and the CPU are connected to the same on-chip bus, the bus can be occupied by the EPA core when the EPA communication data volume is large, and at the moment, if the CPU needs to read data from the MEM or write data into the MEM, the CPU is in a waiting state all the time, so that the real-time performance is influenced.
4. When configuring the EPA system, the user needs to calculate and allocate parameters such as communication time slots and cycle times to each module, which is cumbersome and prone to errors.
Disclosure of Invention
The invention aims to provide an EPA on-chip system, an EPA communication system and a communication method, which can realize mixed communication.
In order to solve the above problems, the present invention provides an EPA system on chip, comprising an EPA module, a CPU module, a storage module, and an AHB bus; the EPA module, the CPU module and the storage module are connected with the AHB bus;
The storage module is used for storing messages and providing read-write access;
the CPU module is used for acquiring a configuration message when the system on chip is selected as a master control system on chip and transmitting the configuration message to a slave system on chip in a network, or receiving the configuration message transmitted by the master control system on chip when the system on chip is selected as the slave system on chip; determining configuration information of the EPA module according to the network capacity, the network topology and the equipment ID in the configuration message, wherein the configuration information comprises a macro cycle, a link relation and communication slot time lengths between the EPA modules under each link relation of the EPA module, and the macro cycle is divided into an RTE cycle phase, an RTE non-cycle phase and a non-RTE communication phase;
The EPA module is used for carrying out configuration according to the configuration information of the CPU module, is used for EPA message data communication between the EPA modules in a link relation with the EPA module in the RTE period stage and the RTE non-period stage, is used for receiving or sending the EPA message or the common Ethernet message in the non-RTE communication stage, analyzes the message, and transmits the message to the storage module for the CPU module to read and process.
according to an embodiment of the invention, in the non-RTE communication stage, the EPA module scans the entire network by sending a scan message, receives and analyzes a normal ethernet message responded in the network, and forms a configuration message for storage, and the CPU module sends the configuration message to a newly accessed slave system on chip for configuration, so as to implement plug and play of the new EPA module without affecting RTE communication.
According to an embodiment of the present invention, the configuration message is formed by parsing an EPA message issued by an upper computer or a normal ethernet message, or is formed by parsing a normal ethernet message received by the EPA module in a non-RTE communication stage.
According to an embodiment of the invention, the device further comprises an AHB-LITE, the EPA module realizes data transmission with the storage module through the AHB-LITE, and the CPU module can realize data transmission with the storage module through an AHB bus at the same time.
According to one embodiment of the invention, the EPA module comprises: EPA core unit, MAC unit, AHB interface unit, network topology management unit and communication interface unit;
The communication interface unit is used for accessing a network;
The MAC unit is connected with the communication interface and is used for transmitting an EPA message or a common Ethernet message to realize EPA communication or Ethernet communication;
The AHB interface unit is connected with an AHB bus and used for receiving the configuration information of the CPU module;
the EPA core unit is used for carrying out configuration according to the configuration information, gating the EPA message or the common Ethernet message transmitted by the MAC unit at different period stages, and carrying out message analysis and writing the message to a storage module through AHB-LITE.
According to an embodiment of the present invention, the EPA module is further configured to receive a configuration message of the EPA module of the active system on chip to perform corresponding configuration when the system on chip is selected as a slave system on chip, perform EPA message data communication according to respective communication slot time lengths between the EPA module and the EPA module in a link relationship in an RTE period phase and an RTE non-period phase, and send or receive an EPA message or a general ethernet message in the non-RTE communication phase.
the present invention also provides an EPA communication system comprising: the EPA master control end and the EPA slave end are connected through a network;
The EPA main control terminal is used for acquiring a configuration message, determining an RTE periodic stage, an RTE non-periodic stage, a non-RTE communication stage and a communication slot time length according to the network capacity, the network topology and the equipment ID in the configuration message, and performing configuration according to the equipment ID distribution link relation; the configuration message is issued to an EPA driven end in the network, EPA message data communication is carried out between the EPA driven end in the RTE period stage and the RTE non-period stage and under the link relation according to the time length of each communication slot, and the EPA message or the common Ethernet message of the EPA driven end is received or sent in the non-RTE communication stage; analyzing the received message;
The EPA slave end is used for receiving the configuration message of the EPA main control end to carry out corresponding configuration, carrying out EPA message data communication with the EPA main control end or the EPA slave end under the link relation in an RTE period stage and an RTE non-period stage according to the time length of each communication slot, and sending or receiving the EPA message or the common Ethernet message in the non-RTE communication stage.
According to one embodiment of the invention, the system further comprises a new EPA slave end, wherein the new EPA slave end is inserted into the network in the network communication process; in the non-RTE communication stage, the EPA master control end scans the whole network in a mode of sending a scanning message, receives common Ethernet messages responded by all the EPA slave ends in the network, forms configuration messages according to information in the responded common Ethernet messages and configuration information of the currently-operated network, and configures the configuration between the EPA master control end and a new EPA slave end of the new EPA slave end according to the newly-obtained configuration messages, so that plug-and-play of the new EPA slave end is realized under the condition of not influencing RTE communication.
According to an embodiment of the present invention, the system further includes an upper computer, and issues a configuration message to the EPA main control terminal through a network for configuration.
The invention also provides an EPA communication method, which comprises the following steps:
S1: the upper computer sends a configuration message to the EPA main control terminal through a network;
S2: the EPA main control terminal acquires a configuration message, determines an RTE periodic stage, an RTE non-periodic stage, a non-RTE communication stage and a communication slot time length according to the network capacity, the network topology and the equipment ID in the configuration message, allocates a link relation according to the equipment ID, performs configuration, and issues configuration information to an EPA driven terminal in a network through the configuration message;
S3: the EPA slave end carries out configuration according to the configuration message;
S4: after the configuration is completed, entering a communication state, performing EPA message data communication between the EPA master control end and the EPA slave end or between the EPA slave end and the EPA slave end according to the link relation in an RTE period stage and an RTE non-period stage according to respective communication slot time length, and receiving or sending the EPA message or the common Ethernet message of each EPA slave end by the EPA master control end in the non-RTE communication stage.
according to an embodiment of the present invention, in the step S4, in a non-RTE communication phase, the EPA master sends a scan message to scan the entire network, receives a normal ethernet message from each EPA slave in the network, and forms a configuration message according to information in the normal ethernet message and configuration information of the currently operating network.
According to an embodiment of the present invention, the method further includes step S5: and if a new EPA driven end is inserted, the EPA main control end configures the new EPA driven end of the new EPA driven end according to the newly obtained configuration message, and configures the link relation of the new EPA driven end into master-slave communication.
According to an embodiment of the present invention, in the step S5, when the EPA master obtains the configuration message newly, it is determined whether to allow the new EPA slave to access the network according to the existing network capacity, and if the network capacity is not full, the new EPA slave is configured with the IP, and the new EPA slave is configured.
According to one embodiment of the invention, when the EPA main control end closes the EPA communication mode, the normal Ethernet communication mode is switched to.
according to one embodiment of the invention, when a network fails, an EPA main control terminal judges according to a cycle message received by an RTE cycle stage, positions the fault type, and reports the fault in a real-time reporting or timing reporting mode; the real-time report is reported immediately by an event message and an interruption mode once the condition occurs; the timing report is reporting by adding state data in a periodic FRT message in an appointed period.
after the technical scheme is adopted, compared with the prior art, the invention has the following beneficial effects:
The EPA data communication adds a third non-real-time stage on the basis of the prior periodic and non-periodic communication, can support compatible transceiving processing of non-EPA messages besides EPA periodic messages and non-periodic messages, so that the system on chip can support configuration of upper computer EPA configuration software and also can support configuration through common Ethernet message transceiving, and the limitation of the EPA configuration software is broken; meanwhile, the main control system on chip can determine parameters such as macrocycle, module communication time slot, cycle time and the like according to the scale of the whole network and the data volume condition, and a user does not need to independently distribute each EPA module;
The EPA module is compatible with the function of common Ethernet MAC, can serve as the common Ethernet MAC when the EPA message is not transmitted and received, can support the mixed communication of the EPA message and the common Ethernet message under the networking state, and breaks the singleness and limitation of the conventional EPA communication;
The method comprises the steps that configuration is carried out through common Ethernet message receiving and sending, so that EPA communication supports a plug-and-play function, a main control system-on-chip regularly scans whether a new EPA module is added to a network, IP allocation and configuration are carried out on new equipment after the new module is scanned, in order to avoid influencing communication of other modules, the link relation of the new module is only master-slave communication, namely, the new module only carries out communication data interaction with the main control system-on-chip, and the equipment can be communicated without stopping the whole network and replacing the equipment;
the CPU module can access the storage module and the EPA module through the AHB bus, and the EPA module reads and writes communication data through the AHB-LITE, so that the CPU module and the EPA module can read and write data simultaneously, bus conflict cannot occur, and the real-time performance of EPA communication is improved.
drawings
FIG. 1 is a diagram illustrating macro-cycle partitioning and data transmission according to an embodiment of the present invention;
FIG. 2 is a block diagram of an EPA system-on-chip according to an embodiment of the present invention;
FIG. 3 is a block diagram of an EPA module according to an embodiment of the present invention;
Fig. 4 is a flowchart illustrating an EPA communication method according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather construed as limited to the embodiments set forth herein.
referring to FIG. 2, in one embodiment, an EPA system-on-a-chip includes an EPA module, a CPU module, a storage module, and an AHB bus. The EPA module, the CPU module and the storage module are connected with the AHB bus, and data transmission is realized through the AHB bus. The system-on-chip is divided into a master clock and a slave clock, and in the network, one system-on-chip can be selected as a master system-on-chip, and the rest are selected as slave systems-on-chips.
The storage module comprises an on-chip FLASH and an on-chip SRAM. The system on chip CAN also integrate various communication interfaces, such as CAN, I2C, SPI, UART, GPIO and other interfaces, and system resources such as a timer, a watchdog, an interrupt controller and the like, and is connected to the AHB bus through the bridging device.
AHB: an Advanced High-performance Bus (Advanced High-performance Bus) is part of the AMBA Bus architecture. AMBA: the Advanced Microcontroller Bus Architecture (Advanced Microcontroller Bus Architecture) is a popular industry standard on-chip Bus standard introduced by the ARM corporation.
The storage module is used for storing messages and providing read-write access. The EPA module and the CPU module can access the storage module through the AHB bus to read or write messages. The messages stored in the storage module may be, for example, configuration messages, messages received and transmitted in a macrocycle, and the like, may be pre-stored or received and transmitted in a communication process, and may be stored in the storage module.
The CPU module is used for acquiring a configuration message when the system on chip is selected as a master control system on chip and transmitting the configuration message to a slave system on chip in a network, or receiving the configuration message transmitted by the master control system on chip when the system on chip is selected as the slave system on chip; the configuration message can be issued by EPA configuration software of the upper computer, and can also be obtained by calculation according to information obtained by analyzing the common Ethernet message and the configuration information of the currently running network.
The CPU module determines configuration information of the EPA module according to the network capacity, the network topology and the equipment ID in the configuration message, can intelligently calculate parameters such as a macrocycle, the time length of a communication slot between modules, the cycle time and the like according to the scale of the whole network and the data volume, and distributes a link relation according to the equipment ID.
The configuration information comprises a macrocycle and a link relation of the EPA modules and the time length of a communication slot between the EPA modules under each link relation, wherein the macrocycle is divided into an RTE (real-time) cycle phase, an RTE non-cycle phase and a non-RTE communication phase. The link relation is the data transmission relation of the EPA modules in the network, data link exists between the two EPA modules with data transmission, the link relation can be distributed according to the equipment ID, and a user can send a message through the upper computer software to prestore the communication link relation between the modules in the EPA module of the main control system-on-chip. The communication slot time length is the time for transmitting data once between two EPA modules, and one period is divided into a plurality of communication slots.
in one embodiment, the configuration information may include switch information of the EPA function, master clock slave clock information, macrocycles, RTE cycle times, RTE aperiodic times, non-RTE communication times, memory addresses, and the like. The EPA function of the system on chip can be started or closed according to the switch information of the EPA function, when the EPA function is started, the EPA configuration communication mode is entered, and when the EPA function is closed, the EPA module can be used as a common Ethernet MAC to support the receiving and sending of common Ethernet messages. The slave clock information may be used to achieve clock synchronization based on the master clock.
The main control system-on-chip becomes an EPA main control end, wherein the EPA module carries out configuration according to the configuration information of the CPU module, and transmits the configuration information to the slave system-on-chip in the network through the configuration message, thereby completing the configuration process of EPA communication. In the communication process after the configuration is completed, the communication module is used for EPA message data communication between EPA modules in a link relation with the communication module in an RTE periodic stage and an RTE non-periodic stage, and is used for receiving or sending the EPA message or a common Ethernet message in a non-RTE communication stage, analyzing the message and transmitting the message to a storage module for a CPU module to read and process. The specific message parsing process is not limited.
the on-chip EPA module provides a series of configuration registers (AHB interface modules), and the CPU module can configure the EPA module by means of the configuration registers. The CPU module as an embedded processor typically employs a general purpose 32-bit ARM core, but other available microprocessors may be employed.
The slave system-on-chip receives the configuration message of the master system-on-chip, the CPU performs corresponding configuration on the EPA module according to the received configuration message, performs EPA message data communication with the EPA module in a link relation between the EPA module and the slave system-on-chip in an RTE period stage and an RTE non-period stage according to the time length of each communication slot, and is used for sending the EPA message or a common Ethernet message in the non-RTE communication stage.
The EPA data communication adds a third stage on the basis of the prior periodic and non-periodic communication, and can support compatible transceiving processing of non-EPA messages besides EPA periodic messages and non-periodic messages; meanwhile, the main control system on chip can determine parameters such as macrocycle, module communication time slot, cycle time and the like according to the scale of the whole network and the data volume condition, and a user does not need to independently distribute each EPA module.
The EPA module is compatible with the function of common Ethernet MAC, can serve as the common Ethernet MAC when the EPA message is not transmitted and received, can support the mixed communication of the EPA message and the common Ethernet message under the networking state, and breaks the singleness and limitation of the conventional EPA communication.
The macrocycle for the transmission of EPA communication data is divided into three phases, as shown in figure 1,
Stage one: in an RTE periodic data transmission period (RTE period stage), a periodic data scheduling method based on role equality is adopted, each device sends periodic messages in a fixed time and a fixed quantity aiming at periodically sent data, the messages carry real-time data or non-real-time data, and the devices apply for the priority of the non-periodic messages in the periodic messages;
and a second stage: in an RTE non-periodic data transmission period (RTE non-periodic stage), a non-periodic data transmission technology based on priority preemptive scheduling is adopted, and the certainty of data transmission in an EPA control network is ensured through the technology; the main device judges according to the priority applied by all the devices, and appoints the device with the highest priority to send the non-periodic message, and each non-periodic data transmission time only allows one device to send the non-periodic message;
And a third stage: in a non-RTE data transmission stage (non-RTE communication stage), the EPA supports common Ethernet messages besides messages with an EPA format, and in the non-RTE communication stage time, each device can send non-real-time data of the common Ethernet without the limitation of an EPA scheduling mechanism, so that the EPA can better combine deterministic scheduling and the common Ethernet to realize mixed communication.
And sending the periodic message according to the configured RTE periodic stage and the time length of the communication slot. The synchronous message is used as an aperiodic message for clock synchronization between EPA modules, and a clock synchronization algorithm follows an IEEE1588 protocol. The non-RTE communication stage is used for receiving and transmitting non-real-time messages such as scanning messages and event messages, and the messages can be common Ethernet messages.
In one embodiment, in a non-RTE communication stage, the EPA module scans the entire network by sending a scan message, receives a normal ethernet message responded in the network and analyzes the normal ethernet message as a configuration message for storage, and the CPU module sends the configuration message to a newly accessed slave system on chip, so as to implement configuration of the slave system on chip, thereby implementing plug and play of a new EPA module without affecting RTE communication.
The main control system-on-chip can scan the slave system-on-chip in the network at regular time, the EPA module of the slave system-on-chip returns a response after receiving the scanning message, and the response message contains information such as a source MAC address, an equipment ID number, a communication data volume and the like. The EPA module of the master control system-on-chip collects information of the EPA module of each slave system-on-chip, dynamically allocates IP, automatically calculates parameters such as macrocycle and sending offset time of each device according to the number of the devices and data quantity, and sends the parameters to the EPA module of each slave system-on-chip in the form of configuration messages, and the EPA module of the slave system-on-chip analyzes and configures the register after receiving the configuration messages.
The configuration is carried out by receiving and transmitting common Ethernet messages, so that the EPA communication supports the plug-and-play function, the main control system-on-chip regularly scans whether a new EPA module is added into the network, after the new module is scanned, IP allocation and configuration are carried out on new equipment, in order to avoid influencing the communication of other modules, the link relation of the new module is only master-slave communication, namely, the new module only carries out communication data interaction with the main control system-on-chip, and the problem that the whole network is not required to be stopped to replace the equipment to carry out communication is solved.
the configuration message is issued by an upper computer, or is formed according to the information in the common Ethernet message and the configuration information of the current running network by the common Ethernet message received by the EPA module in the non-RTE communication stage. The system on chip can support configuration of the EPA configuration software of the upper computer and also can support configuration through common Ethernet message receiving and sending, and the limitation of the EPA configuration software is broken.
In one embodiment, the EPA system on chip further includes an AHB-LITE (simple AHB bus), and the EPA module implements data transmission with the storage module through the AHB-LITE, so as to ensure that the CPU module can implement data transmission with the storage module through the AHB bus at the same time.
Referring to fig. 2, the CPU module, the EPA module, the FLASH, the SRAM, and the like are connected to an AHB bus, and an AHB-LITE is provided between the EPA module and the SRAM. The CPU module can access the storage module and the EPA module through the AHB bus, and the EPA module reads and writes communication data through the AHB-LITE, so that the CPU module and the EPA module can read and write data simultaneously, bus conflict cannot occur, and the real-time performance of EPA communication is improved.
referring to fig. 3, the EPA module includes: EPA core unit, MAC unit, AHB interface unit, network topology management unit and communication interface unit. The communication interface unit is used for accessing a network, and the network topology relation of the interface connection can be managed through the network topology management unit. The MAC unit is connected with the communication interface, can be connected with the network topology management unit to be indirectly connected with the communication interface, and is used for transmitting the EPA message or the common Ethernet message to realize the EPA communication or the Ethernet communication. The AHB interface unit is connected with the AHB bus and used for receiving the configuration information of the CPU module, and the AHB interface unit can be a series of registers and can store the configuration information. And the EPA core unit is used for carrying out configuration according to the configuration information, gating the EPA message or the common Ethernet message transmitted by the MAC unit at different periods, and carrying out message analysis and writing the message to the SRAM through AHB-LITE.
The EPA module comprises a MAC unit and a communication interface unit and can support star, linear and ring networks. The communication interface unit is provided with at least two groups of MII or RMII interfaces, can support star type, linear type, ring type, independent double star type, redundant double star type and other network topological structures, can realize link redundancy, and the EPA module supports the judgment and the abandonment of redundant messages under a redundant link mode. The EPA equipment redundancy interface is not limited to the Ethernet MII/RMII interface, and other available data communication interfaces may be used. The MII interface module is not limited to expanding two sets of MII/RMII interfaces, and the interfaces can be increased or decreased according to needs.
The redundant communication links include: double star and ring types. Wherein the dual star type can support common Ethernet and EPA network, and the ring type only supports EPA network. When in sending: the EPA module sends the same message to A, B ports at the same time, and the redundant message is marked by the source MAC (or source IP) + message serial number. And (3) during receiving: the FRT message and the SYNC message are specially processed by hardware, wherein the SYNC message needs to receive double data to perform circuit delay calculation of different paths, the FRT also needs to perform two-path calculation when calculating the circuit deviation, the circuit delay A or B is judged and selected when calculating, and one part of data is sent to the SRAM; and the rest non-periodic messages are respectively sent to the CPU module from the port A, B to be judged and discarded, and the hardware is used for CRC judgment processing.
function introduction of related sub-modules of EPA protocol stack
1. Periodic communication
And the EPA equipment in the network carries out periodic communication scheduling according to the configured macro-period time and the period offset time.
For the master clock device, after the device configuration is completed, the communication scheduling is started.
For the slave clock equipment, after the equipment line delay calculation is completed, the communication scheduling is started, and the communication and clock deviation calculation can be carried out between the equipment through an FRT message. In the operation process, the slave clock equipment needs to detect the condition of receiving the FRT message of the master clock equipment, and if the FRT message of the master clock equipment is not received for 10 continuous periods, the FRT message is stopped being sent. At this time, the clock synchronization precision of the device cannot be guaranteed. And after the equipment receives the FRT message of the main clock equipment again and recovers the clock synchronization, continuously sending the FRT message.
the FRT message adopts a time-sharing scheduling method, is sent periodically and isochronously, and the data carried in the message can be real-time data or non-real-time data.
the FRT uses multicast communication, and one message contains data to be sent to a plurality of devices, so that the devices extract the data to be sent to the local devices from the message by storing the message in a local link relationship after receiving the message.
2. clock synchronization
The clock synchronization is divided into two parts, the line delay is calculated and the clock deviation is calculated. The line delay is based on SYNC message, and the clock deviation is based on FRT message. Both line delay and clock skew are initiated by the master and calculated by the slave.
1) line delay
For the master device, after the configuration of the online slave device is completed, the master device starts to send a synchronization request message SYNC _ REQ to the slave device. The synchronous request message adopts a polling transmission mechanism. The CPU configures a polling initial node number and a polling range in advance, and the main device starts polling from the initial node number. When the slave device completes synchronization or 10 cycles do not respond, the next device is polled until all slave devices within range are polled. After the polling is completed once, the master device will perform a new round of polling, and the synchronized slave devices will not respond to the synchronization request message after the synchronization is completed.
For the slave device, under the condition that the EPA function is turned on, the SYNC _ REQ message sent by the master device is received, then the SYNC _ RSP message is replied, the transceiving time of the SYNC _ REQ and SYNC _ RSP messages is recorded, the calculation of the line delay and the adjustment of the PTP time are performed, and the line delay calculation result is put into the SYNC _ RSP message to notify the master device.
The EPA has two a/B ports and different line delays need to be calculated for different ports.
2) clock skew
The main equipment sends an FRT message in each macro cycle, and the message carries the sending time of the previous FRT message. And after receiving the FRT message, the slave equipment records the receiving time of the current FRT message. And the slave equipment calculates the clock deviation and compensates the internal PTP clock according to the line delay and the receiving and transmitting time of the FRT.
for different network ports, corresponding line delay is selected according to the receiving and transmitting network port of the FRT to calculate clock deviation and compensate.
the present invention also provides an EPA communication system comprising: the EPA master control end and the EPA slave end are connected through a network. The EPA master may be implemented by the system on master chip in the foregoing embodiment, and the EPA slave may be implemented by the system on slave chip in the foregoing embodiment, and accordingly, the description of the EPA system on chip in the foregoing embodiment is applicable in the EPA communication system, and thus is not described herein again.
The method comprises the steps that an EPA main control end obtains a configuration message, determines an RTE period stage, an RTE non-period stage, a non-RTE communication stage and a communication slot time length according to the network capacity, the network topological structure and the link relation in the configuration message, performs configuration, issues the configuration message to an EPA driven end in a network, performs EPA message data communication between the EPA driven end in the RTE period stage, the RTE non-period stage and the link relation according to the respective communication slot time length, and is used for receiving or sending the EPA message or the common Ethernet message of the EPA driven end in the non-RTE communication stage; analyzing the received message;
The EPA slave end is used for receiving the configuration message of the EPA main control end to carry out corresponding configuration, carrying out EPA message data communication with the EPA main control end or the EPA slave end under the link relation in an RTE period stage and an RTE non-period stage according to the time length of each communication slot, and sending or receiving the EPA message or the common Ethernet message in the non-RTE communication stage.
In one embodiment, the EPA communication system further comprises a new EPA slave, the new EPA slave, which is inserted into the network during network communication; in the non-RTE communication stage, the EPA master control end scans the whole network in a mode of sending a scanning message, receives common Ethernet messages responded by all the EPA slave ends in the network, forms configuration messages according to information in the responded common Ethernet messages and configuration information of the currently-operated network, and configures the configuration between the EPA master control end and the new EPA slave end of the new EPA slave end according to the newly-obtained configuration messages so as to realize the plug-and-play of the new EPA slave end without influencing RTE communication.
The EPA master control end scans whether a new EPA driven end joins the network or not at regular time, after the new EPA driven end is scanned, IP allocation and configuration are carried out on the new EPA driven end, in order to not influence the communication of other ends, the link relation of the new EPA driven end is only master-slave communication, namely the new EPA driven end only carries out communication data interaction with the EPA master control end, and the whole network does not need to be stopped to replace equipment to carry out communication.
The EPA communication system also comprises an upper computer which is also accessed in the network and transmits a configuration message to the EPA main control terminal for configuration through the network, EPA configuration software is arranged in the upper computer and can be used for initial configuration, certainly, the EPA configuration software can be used for configuration again after the subsequent network stops, but the configuration can be carried out through a common Ethernet message instead of the upper computer during the subsequent configuration.
referring to fig. 1, the present invention also provides an EPA communication method comprising the steps of:
S1: the upper computer sends a configuration message to the EPA main control terminal through a network;
s2: the EPA main control terminal acquires a configuration message, determines an RTE periodic stage, an RTE non-periodic stage, a non-RTE communication stage and a communication slot time length according to the network capacity, the network topology and the equipment ID in the configuration message, allocates a link relation according to the equipment ID, performs configuration, and issues configuration information to an EPA driven terminal in a network through the configuration message;
S3: the EPA slave end carries out configuration according to the configuration message;
S4: after the configuration is completed, entering a communication state, performing EPA message data communication between the EPA main control end and the EPA driven end or between the EPA driven end and the EPA driven end according to the link relation in an RTE period stage and an RTE non-period stage according to respective communication slot time length, and receiving or sending the EPA message or the common Ethernet message of each EPA driven end by the EPA main control end in the non-RTE communication stage to analyze and process the received message.
similarly, the EPA master may be implemented by the master soc in the foregoing embodiment, and the EPA slave may be implemented by the slave soc in the foregoing embodiment, and accordingly, the description of the EPA soc in the foregoing embodiment is applicable in the EPA communication system. The EPA communication method of the present embodiment can also be implemented using the EPA communication system of the foregoing embodiment.
In an embodiment, in step S4, in the non-RTE communication phase, the EPA master sends a scan message to scan the entire network, and receives the ordinary ethernet messages responded by each EPA slave in the network, and forms a configuration message according to the information in the ordinary ethernet messages responded and the configuration information of the currently operating network, which may also be used for other functions.
in one embodiment, the EPA communication method further comprises step S5: and if a new EPA driven end is inserted, the EPA main control end carries out configuration on the new EPA driven end according to the newly obtained configuration message, and the link relation of the new EPA driven end is configured into master-slave communication.
in step S5, when the EPA master obtains the configuration message, it determines whether to allow the new EPA slave to access the network according to the existing network capacity, and configures the IP for the new EPA slave and performs configuration for the new EPA slave when the network capacity is not full.
When the EPA communication mode is closed, the EPA main control end is switched to be in normal Ethernet communication, and normal Ethernet communication is carried out between the EPA main control end and other equipment supporting the Ethernet communication.
When the network has a fault, if the ring network has a section of line disconnected or a module is disconnected, the main control module can judge according to the received periodic message, locate the fault type and report the fault through a network state reporting mechanism. The EPA main control terminal judges according to the cycle message received by the RTE cycle stage, locates the fault type and reports the fault in a real-time reporting or timing reporting mode; the real-time report is reported immediately by an event message and an interruption mode once the condition occurs; the timing report is reporting by adding state data in a periodic FRT message in an appointed period.
This is described further below.
And the user sends an EPA message or a common Ethernet message through the upper computer software to send information such as the link relation between the EPA, the network capacity, the network topological structure and the like to the EPA main control end.
The CPU module in the EPA main control end analyzes the data, when the EPA function of the EPA main control end is started, the EPA main control end starts to scan the whole network by sending a scanning message, when the EPA slave end receives the scanning message, a response message is returned to the EPA main control end, and the response message contains information such as communication data volume, equipment ID and the like. The EPA main control end counts the number of modules in the network and the communication data quantity of each module according to the received response message, calculates the required time of each of the cycle time, the non-real-time communication time and the communication slot time length of each module, distributes a link relation according to the equipment ID, and sends the parameters to the slave module in the form of a configuration message to configure the slave module. The link relation can be pre-stored in the EPA main control terminal through an upper computer.
and after the configuration is completed, entering a communication state. And sending the periodic message according to the configured macrocycle time and the sending time slot. The EPA module of each end obtains the data of the periodic message from the sending SRAM through the AHB-LITE, adds the message header, the message type, the CRC and other information, and sends the information to the network through the MII/RMII interface. Sending periodic data in the SRAM is periodically updated by the on-chip CPU module; in the same macro cycle, the EPA module also receives periodic data sent by other EPA modules according to the link relation, the EPA module unpacks, judges and extracts the periodic data from the message, and then transmits the periodic data to a receiving SRAM through AHB-LITE for a CPU module to obtain and further process. The processing of the EPA module is applicable to each EPA system on chip in the network.
The invention realizes the functions of dynamic configuration, plug and play, supporting the receiving and transmitting of the common Ethernet and the like, thereby being widely applied to various industrial occasions. The protocol of the EPA kernel in the invention is not limited to be based on the current EPA protocol, and the optimized, modified and expanded EPA protocol and related sub-protocols are all in the scope covered by the invention.
Although the present invention has been described with reference to the preferred embodiments, it is not intended to limit the scope of the claims, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention.

Claims (14)

1. An EPA system on chip is characterized by comprising an EPA module, a CPU module, a storage module and an AHB bus; the EPA module, the CPU module and the storage module are connected with the AHB bus;
The storage module is used for storing messages and providing read-write access;
The CPU module is used for acquiring a configuration message when the system on chip is selected as a master control system on chip and transmitting the configuration message to a slave system on chip in a network, or receiving the configuration message transmitted by the master control system on chip when the system on chip is selected as the slave system on chip; determining configuration information of the EPA module according to the network capacity, the network topology and the equipment ID in the configuration message, wherein the configuration information comprises a macro cycle, a link relation and communication slot time lengths between the EPA modules under each link relation of the EPA module, and the macro cycle is divided into an RTE cycle phase, an RTE non-cycle phase and a non-RTE communication phase;
The EPA module is used for carrying out configuration according to configuration information of the EPA module, is used for EPA message data communication between the EPA modules in a link relation with the EPA module in the RTE period stage and the RTE non-period stage, is used for receiving or sending the EPA message or the common Ethernet message in the non-RTE communication stage, analyzes the message, and transmits the message to the storage module for the CPU module to read and process.
2. The EPA SOC of claim 1, wherein in the non-RTE communication stage, the EPA module scans the whole network by sending a scanning message, receives and analyzes a normal Ethernet message responded in the network to form a configuration message for storage, and the CPU module sends the configuration message to a newly accessed slave SOC for configuration so as to realize plug and play of a new EPA module without affecting RTE communication.
3. The EPA soc of claim 1 or 2, wherein the configuration message is formed by parsing an EPA message sent by an upper computer or according to a normal Ethernet message, or formed by parsing a normal Ethernet message received by the EPA module in a non-RTE communication phase.
4. The EPA system-on-a-chip of claim 1, further comprising an AHB-LITE simple high performance bus through which the EPA module enables data transfer with the storage module, ensuring that the CPU module is simultaneously enabled to enable data transfer with the storage module through the AHB bus.
5. the EPA system on a chip of claim 1, wherein the EPA module comprises: EPA core unit, MAC unit, AHB interface unit, network topology management unit and communication interface unit;
The communication interface unit is used for accessing a network;
The MAC unit is connected with the communication interface and is used for transmitting an EPA message or a common Ethernet message to realize EPA communication or Ethernet communication;
The AHB interface unit is connected with an AHB bus and used for receiving the configuration information of the CPU module;
The EPA core unit is used for carrying out configuration according to the configuration information, gating the EPA message or the common Ethernet message transmitted by the MAC unit at different period stages, and carrying out message analysis and writing the message to a storage module through AHB-LITE.
6. an EPA communication system, comprising: the EPA master control end and the EPA slave end are connected through a network;
The EPA main control terminal is used for acquiring a configuration message, determining an RTE periodic stage, an RTE non-periodic stage, a non-RTE communication stage and a communication slot time length according to the network capacity, the network topology and the equipment ID in the configuration message, and performing configuration according to the equipment ID distribution link relation; the configuration message is issued to an EPA driven end in the network, EPA message data communication is carried out between the EPA driven end in the RTE period stage and the RTE non-period stage and under the link relation according to the time length of each communication slot, and the EPA message or the common Ethernet message of the EPA driven end is received or sent in the non-RTE communication stage; analyzing the received message;
The EPA slave end is used for receiving the configuration message of the EPA main control end to carry out corresponding configuration, carrying out EPA message data communication with the EPA main control end or the EPA slave end under the link relation in an RTE period stage and an RTE non-period stage according to the time length of each communication slot, and sending or receiving the EPA message or the common Ethernet message in the non-RTE communication stage.
7. the EPA communication system of claim 6 further comprising a new EPA slave inserted into the network during network communication; in the non-RTE communication stage, the EPA master control end scans the whole network in a mode of sending a scanning message, receives common Ethernet messages responded by all the EPA slave ends in the network, forms configuration messages according to information in the responded common Ethernet messages and configuration information of the currently-operated network, and configures the EPA master control end and the new EPA slave end according to the newly-obtained configuration messages so as to realize plug-and-play of the new EPA slave end without influencing RTE communication.
8. the EPA communication system of claim 6, further comprising an upper computer that issues a configuration message to the EPA main control end for configuration via a network.
9. An EPA communication method, comprising the steps of:
S1: the upper computer sends a configuration message to the EPA main control terminal through a network;
S2: the EPA main control terminal acquires a configuration message, determines an RTE periodic stage, an RTE non-periodic stage, a non-RTE communication stage and a communication slot time length according to the network capacity, the network topology and the equipment ID in the configuration message, allocates a link relation according to the equipment ID, performs configuration, and issues configuration information to an EPA driven terminal in a network through the configuration message;
s3: the EPA slave end carries out configuration according to the configuration message;
S4: after configuration is completed, entering a communication state, performing EPA message data communication between the EPA master control end and the EPA slave end or between the EPA slave end and the EPA slave end according to the link relation in an RTE period stage and an RTE non-period stage according to respective communication slot time length, and receiving or sending the EPA message or the common Ethernet message of each EPA slave end by the EPA master control end in the non-RTE communication stage.
10. The EPA communication method of claim 9, wherein in step S4, in the non-RTE communication phase, the EPA master scans the entire network by sending a scan message, receives a normal ethernet message from each EPA slave in the network, and forms a configuration message according to information in the normal ethernet message and configuration information of the currently operating network.
11. The EPA communicating method as claimed in claim 10, further comprising step S5: and if a new EPA driven end is inserted, the EPA main control end configures the new EPA driven end of the new EPA driven end according to the newly obtained configuration message, and configures the link relation of the new EPA driven end into master-slave communication.
12. the EPA communication method of claim 11, wherein in step S5, when the EPA master obtains a configuration message, the EPA master determines whether to allow the new EPA slave to access the network according to the existing network capacity, and configures the new EPA slave with an IP if the network capacity is not full.
13. The EPA communication method of claim 9 wherein switching to normal ethernet communication mode occurs when the EPA master control turns off the EPA communication mode.
14. The EPA communication method of claim 9, wherein when a network fails, the EPA master determines, according to a periodic message received in an RTE period phase, a type of the failure, and reports the failure in a real-time notification or a timed notification manner; the real-time report is reported immediately by an event message and an interruption mode once the condition occurs; the timing report is reporting by adding state data in a periodic FRT message in an appointed period.
CN201710066480.5A 2017-02-06 2017-02-06 EPA on-chip system, EPA communication system and communication method Active CN106685735B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710066480.5A CN106685735B (en) 2017-02-06 2017-02-06 EPA on-chip system, EPA communication system and communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710066480.5A CN106685735B (en) 2017-02-06 2017-02-06 EPA on-chip system, EPA communication system and communication method

Publications (2)

Publication Number Publication Date
CN106685735A CN106685735A (en) 2017-05-17
CN106685735B true CN106685735B (en) 2019-12-10

Family

ID=58860403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710066480.5A Active CN106685735B (en) 2017-02-06 2017-02-06 EPA on-chip system, EPA communication system and communication method

Country Status (1)

Country Link
CN (1) CN106685735B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111682994B (en) * 2020-04-29 2022-03-29 浙江杰芯科技有限公司 Annular or linear network system based on EPA protocol and transmission method of non-real-time data
CN113271239B (en) * 2021-07-20 2021-09-28 浙江国利信安科技有限公司 Node self-detection method and node equipment for time division multiplexing system
CN113364638B (en) * 2021-08-11 2021-11-02 浙江国利信安科技有限公司 Method, electronic device and storage medium for EPA networking
CN113422724B (en) * 2021-08-11 2021-11-19 浙江国利信安科技有限公司 Method, device, communication system and storage medium for EPA configuration switching
CN113612674B (en) * 2021-09-30 2022-01-04 浙江国利信安科技有限公司 Time division multiplexing communication method for EPA system, EPA device and medium
CN116723249B (en) * 2023-08-11 2023-11-10 浙江国利信安科技有限公司 Customized EPA device
CN117478501A (en) * 2023-12-25 2024-01-30 浙江国利信安科技有限公司 Method, control device and storage medium for configuration of EPA network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101572702A (en) * 2009-05-27 2009-11-04 大连理工计算机控制工程有限公司 Method for scheduling high-speed bus master and slave network communication
CN104135410A (en) * 2014-06-20 2014-11-05 浙江中控研究院有限公司 EPA (Ethernet for Plant Automation) communication IP (Intellectual Property) core and system on chip (SOC) based on AMBA (Advanced Microcontroller Bus Architecture) bus structure
CN204721371U (en) * 2015-06-18 2015-10-21 山东万博科技股份有限公司 A kind of things-internet gateway device being applied to Industry Control

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10634686B2 (en) * 2013-09-23 2020-04-28 University of Pittsburgh—of the Commonwealth System of Higher Education Biomarkers related to organ function

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101572702A (en) * 2009-05-27 2009-11-04 大连理工计算机控制工程有限公司 Method for scheduling high-speed bus master and slave network communication
CN104135410A (en) * 2014-06-20 2014-11-05 浙江中控研究院有限公司 EPA (Ethernet for Plant Automation) communication IP (Intellectual Property) core and system on chip (SOC) based on AMBA (Advanced Microcontroller Bus Architecture) bus structure
CN204721371U (en) * 2015-06-18 2015-10-21 山东万博科技股份有限公司 A kind of things-internet gateway device being applied to Industry Control

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《EtherCAT从站的设计与实现》;左振领;《中国优秀硕士学位论文全文数据库(电子期刊)》;20161115;全文 *

Also Published As

Publication number Publication date
CN106685735A (en) 2017-05-17

Similar Documents

Publication Publication Date Title
CN106685735B (en) EPA on-chip system, EPA communication system and communication method
US8725893B2 (en) Method and system for configuring a plurality of network interfaces that share a physical interface
US10476697B2 (en) Network-on-chip, data transmission method, and first switching node
CN110554943B (en) Multi-node server CMC management system and method based on I3C
CN105743757B (en) The method of the free networking of RS485 communicating terminals
US9288112B2 (en) Automatic network discovery in precision time protocol networks
CN109194547A (en) Message transmitting method, device, local device and readable storage medium storing program for executing
CN104899170A (en) Distributed intelligent platform management bus (IPMB) connection method and ATCA (Advanced Telecom Computing Architecture) machine frame
KR20070039580A (en) Message administrator and method for controlling access to data of the message memory of a communications component
US9019959B2 (en) Node, switch, and system
CN102843259A (en) Middleware self-management hot backup method and middleware self-management hot backup system in cluster
WO2022040847A1 (en) Communication data processing method and apparatus
JP2008509463A (en) Method for storing messages in message memory and message memory
CN104410527A (en) Topological detection method, exchanger and heat stacking system
CN114285695B (en) Communication method, device, apparatus, system and storage medium
JP2014183386A (en) Communication control device and communication system
CN114095901A (en) Communication data processing method and device
JP6118464B2 (en) Port status synchronization method, related device, and system
CN214627023U (en) Switching equipment compatible with definable deterministic communication Ethernet
CN214480655U (en) Embedded equipment compatible with definable deterministic communication Ethernet
CN210780847U (en) EtherCAT bus clock distribution system
CN113346983B (en) EPA equipment with mirror redundancy and EPA system
CN214627000U (en) Network card equipment compatible with definable deterministic communication Ethernet
JP6745106B2 (en) Gateway device and sensor network system
Ferreira et al. Components to enforce fail-silent behavior in dynamic master-slave systems

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
TA01 Transfer of patent application right

Effective date of registration: 20180212

Address after: 310053 Binjiang District, Hangzhou, Hangzhou, Zhejiang Province, No. six and No. 309 F16

Applicant after: Zhejiang Jay core technology Co., Ltd.

Address before: 310053 Hangzhou Province, Binjiang District Province, No. six and No. 309 Road, the center of science and Technology Park (high tech Zone) ()

Applicant before: Zhejiang Supcon Research Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant