Control system and expansion method of external bus thereof

By using the programmable logic device FPGA in the processor to forward messages from a high-speed communication interface to multiple low-speed communication interfaces, the problem of insufficient peripheral interfaces of domestic processors is solved and the real-time communication and efficiency of industrial control systems are improved. , suitable for industrial control scenarios with multiple control nodes.

CN118567276APending Publication Date: 2024-08-30NANJING SCIYON AUTOMATION GRP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410659651.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The number and functions of peripheral interfaces of domestic processors in industrial control are insufficient and cannot meet the needs of industrial sites, especially in the case of high real-time communication and multiple control nodes.

Method used

The programmable logic device FPGA is used to realize message forwarding from a high-speed communication interface to multiple low-speed communication interfaces. The loop scheduler and FIFO module are used for speed matching and message exchange. The external bus interface of the processor is expanded to support full-duplex and Half-duplex communication improves communication real-time and efficiency.

Benefits of technology

It effectively expands the number and types of peripheral interfaces of the processor, improves the real-time performance and efficiency of communication, reduces the control cycle, enhances the applicability and reliability of the system, and is suitable for industrial control scenarios with multiple control nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567276A
    Figure CN118567276A
Patent Text Reader

Abstract

The invention provides a control system and an expansion method of an external bus thereof. The control system comprises a processor providing a high-speed communication interface and a plurality of expanded low-speed communication interfaces, and the low-speed communication interfaces are connected with field equipment. According to the invention, interfaces of a plurality of relatively low-speed field devices can be expanded through the high-speed communication interface, and the communication of the high-speed communication interface and the low-speed communication interface realizes message forwarding through a high-speed serial message exchange kernel constructed by the FPGA. The rate matching problem of the high-speed communication interface and the industrial control field low-speed communication interface is solved, meanwhile, the multiple low-speed communication interfaces can communicate with the high-speed communication interface at the same time, the communication efficiency is improved, and the communication period is shortened. The high-speed communication interface comprises a gigabit Ethernet interface, a 100M Ethernet interface, an SPI interface, a QSPI interface and the like, and the low-speed communication interface comprises a UART interface and a CAN interface, so that the method has high applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a control system and an expansion method of an external bus thereof. Background Art

[0002] Due to historical reasons, domestic processors have been used in industrial control for a short time and have not experienced a long period of product iteration. As a result, the number and function of the peripherals required for industrial control cannot meet the needs of industrial sites. The industrial automation field does not require high communication speeds for peripheral interfaces, but has high requirements for the number of interfaces and communication reliability. Therefore, for the industrial automation field, domestic processors currently have excess performance, insufficient functions, and insufficient quantity, and cannot provide a rich variety of peripherals to meet the needs of different application sites. The number, function, and type of interfaces are the main bottlenecks limiting industrial control applications.

[0003] At present, domestic chip manufacturers first solve the problem of survival, so they mainly focus on the consumer market, and have little in-depth understanding of the needs of the industrial control market. In order to solve the problem of processor function mismatch found in the localization process, the existing domestic processor ports are effectively expanded, and the high-speed communication interface of the existing processor is used to expand a large number of low-speed communication interfaces that meet industrial field applications, thereby improving the versatility of the processor.

[0004] Secondly, with the improvement of automation level, the number of control nodes in the control system is gradually increasing, while the control cycle is required to be lower, so a communication method with higher real-time performance is needed. Summary of the invention

[0005] Purpose of the invention: The purpose of the present invention is to provide a method for expanding the external bus of a control system in order to solve the problems of insufficient number of processor peripheral interfaces, limited interface types, and insufficient performance and functions. The core of the present invention is to use programmable logic devices to implement a message exchange logic, and to implement message forwarding from a high-speed communication interface to multiple low-speed communication interfaces. By increasing the exchange speed of the message exchange core, the line-speed forwarding of messages made by the low-speed communication interface and the high-speed communication interface can be guaranteed, all low-speed communication interfaces can be considered to be communicating with the high-speed communication interface alone, and multiple low-speed communication interfaces can be considered to be communicating with the high-speed communication interface at the same time, which improves the real-time performance of the communication and can effectively reduce the control cycle of the control system.

[0006] The present invention provides a control system, including a controller and a plurality of external low-speed interfaces, wherein the controller can simultaneously transmit and receive data with the plurality of external low-speed interfaces;

[0007] The controller includes a processor and a programmable logic device FPGA, the processor includes a high-speed interface, the processor and the programmable logic device FPGA communicate with each other through the high-speed interface, the programmable logic device FPGA includes a loop scheduler, the communication speed of the loop scheduler is not lower than the sum of the speeds of all external low-speed interfaces, and the speed matching of the high-speed interface and all low-speed interfaces is achieved, and the loop scheduler is also used to achieve the matching of half-duplex communication and full-duplex communication;

[0008] The controller comprises two or more low-speed interfaces, and the low-speed interfaces perform data transmission with field devices.

[0009] The low-speed interface supports full-duplex and half-duplex communication modes, including a UART interface, a CAN interface and a CANFD interface.

[0010] The communication bandwidth of the high-speed interface is higher than the sum of the bandwidths of all the low-speed communication interfaces.

[0011] The high-speed interface supports full-duplex communication, including 100M and 1000M Ethernet interfaces, SPI interfaces and QSPI interfaces.

[0012] The programmable logic device FPGA includes a high-speed interface module, a message exchange module, an address table module, a FIFO (First Input First Output) module and a low-speed interface module;

[0013] The high-speed interface module is used to implement the message receiving and sending logic of the high-speed communication interface with the processor, receive the serial data message sent by the processor, and send the serial receiving message to the processor.

[0014] The FIFO module includes a sending FIFO and a receiving FIFO, wherein the sending FIFO implements the cache of the data message sent by the processor; the receiving FIFO implements the cache of the data message received by the low-speed interface; the size of the FIFO is set to the maximum number of bytes of the communication data message, and the FIFO contains empty and full flags; a complete frame of data received by the low-speed interface is cached in the receiving FIFO and a full flag is set, and the cyclic scheduler is notified to read the data; the data sent by the high-speed interface is queried to the corresponding sending FIFO through the address table, and a complete frame of data is written into the sending FIFO and a full flag is set, and the low-speed interface is notified to read the data;

[0015] The FIFO module serves as a message buffer for the high-speed interface and the low-speed interface to solve the speed matching of different ports;

[0016] Each low-speed interface corresponds to a transmit FIFO and a receive FIFO.

[0017] The circular scheduler checks the full flags of all receive FIFOs and the transmit flags of the high-speed interface at a fixed period. The circular scheduler sends the data of the receive FIFO with the full flag to the high-speed interface, and sends the data of the high-speed interface to the corresponding transmit FIFO.

[0018] The programmable logic device FPGA also includes an address table, which is written into the programmable logic device FPGA by the processor to solve the correspondence between the message and the low-speed interface; the destination address of the message is included in the communication message, and the destination sending FIFO is queried using the destination address and the address table.

[0019] The speed of message exchange in the message exchange module is determined by the clock frequency f of the message exchange module and the data width n of the message exchange module. The message exchange speed of the message exchange module is f*n, and f*n is greater than or equal to the sum of the speeds of all high-speed interfaces and low-speed interfaces, ensuring that the processor communicates data with all low-speed interfaces at the same time.

[0020] The present invention also provides a method for expanding the external bus of the control system, comprising: expanding more than two low-speed interfaces through the controller to connect field devices, and each field device communicates with the controller at the same time.

[0021] The speed of the message switching module in the present invention can be achieved by setting the clock frequency and bit width of the message switching module. At a clock frequency of 25 MHz and a data width of 8 bits, the bandwidth of the message switching module can reach 200 Mbps.

[0022] To solve the problem of insufficient low-speed communication interfaces of the processor itself, this solution can expand multiple low-speed communication interfaces through a high-speed communication interface provided by the processor. Based on the message forwarding mode of the message switching core, when the sum of the bandwidths of all low-speed communication interfaces is not higher than that of the high-speed communication interface, each low-speed communication interface can be considered to communicate with the high-speed communication interface independently, so that all low-speed communication interfaces can communicate with the high-speed communication interface at the same time.

[0023] To solve the problem that the DMA function of the low-speed communication interface of the processor is imperfect and the communication efficiency is low, the method converts multiple low-speed communication interfaces that communicate with the processor separately into a high-speed communication interface that communicates with the processor independently, and the communication method is simpler and more reliable. Through the message exchange module of the programmable logic device FPGA, the message of each low-speed communication interface is forwarded to the high-speed communication interface, and the single high-speed communication interface sends the message to the processor uniformly, and the communication efficiency is high.

[0024] The present invention provides a method for expanding an external bus of a control system, wherein a high-speed communication interface of a controller can expand multiple low-speed communication interfaces to connect field devices, wherein each low-speed communication interface includes a port address, and the message of the message exchange module is automatically forwarded to the corresponding low-speed communication interface according to the destination address and the port address. The beneficial effects produced thereby are:

[0025] 1) Strong scalability: multiple low-speed communication interfaces can be expanded through a common high-speed communication interface.

[0026] 2) High applicability: This method reduces the difficulty of processor selection and selects a high-speed communication interface supported by most processors, thereby improving the applicability of this method to different processors.

[0027] 3) Fast communication speed, short control cycle, and high real-time performance. All low-speed communication interfaces communicate in parallel with the high-speed communication interface to improve communication efficiency and reduce the control cycle. Moreover, when the number of low-speed communication interfaces increases and the bandwidth of all low-speed communication interfaces does not exceed that of the high-speed communication interface, the controller cycle will not increase and the control cycle jitter will be small.

[0028] 4) High reliability. This solution combines the communication principle of Ethernet switches, simplifies the functions of the switches, and retains the necessary message forwarding functions, making the solution simple and highly reliable. In addition, a communication mode with CRC check is constructed to further enhance communication reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.

[0030] Figure 1 The figure is an overall block diagram of the method for expanding the external bus of the control system of the present invention.

[0031] Figure 2 This is a block diagram of the message exchange module in the extended method of the present invention.

[0032] Figure 3 It is a schematic diagram of multiple low-speed communication interface input waveforms and high-speed communication interface output waveforms in the expansion method of the present invention.

[0033] Figure 4 This is the message format in the extended method of the present invention. DETAILED DESCRIPTION

[0034] There are two main solutions for multiple external buses in current control systems. One is to use multiple processors, which cooperate with each other to solve the problem of a large number of external buses. In this way, the complexity and reliability of the design will be significantly reduced. The other is to use a complex processor that contains a large number of external bus interfaces. This solution has many restrictions on the selection of processors. At the same time, multiple low-speed external bus interfaces do not match the speed of the processor, which reduces the communication efficiency of the entire system.

[0035] The invention provides a method for extending an external bus of a control system, which is mainly used in the case where there are dozens of control buses in an industrial control field, and a large number of field devices are serially connected to each field bus. A large number of field buses access the processor, which has high requirements on the types and quantities of the processor's peripherals, and the real-time performance of the communication is an important guarantee for the stable operation of the field equipment. This solution uses a programmable logic device (FPGA) to extend multiple low-speed communication interfaces through a high-speed communication interface, thereby reducing the requirements for processor selection; the parallel processing of multiple low-speed communication interfaces is converted into serial communication of a single high-speed communication interface, which can improve the reliability of the system; through an efficient message exchange kernel, it can ensure that all low-speed communication interfaces are simultaneously connected to the high-speed communication interface, which can greatly reduce the communication cycle of multiple low-speed communication interfaces.

[0036] like Figure 1 The present invention first provides a control system, including a controller 1 and a plurality of external low-speed communication interfaces 2, wherein the controller 1 extends a plurality of low-speed communication interfaces 2 to connect and control field devices, and each field device communicates with the controller 1 simultaneously. The low-speed communication interface supports full-duplex communication mode, and can support access to interfaces such as UART interface, CAN interface, and CANFD interface.

[0037] like Figure 4 , the message format forwarded in the high-speed communication interface 13 and the low-speed communication interface 2, the message contains an 8-bit destination address, which determines which port the message is forwarded to, and the address contains a special address FF, which is defined as a broadcast address. When the destination address is FF, the message will be forwarded to all other ports except this port; it contains an 8-bit source address, indicating which port the message comes from; it contains n-bit data bits; it contains a 16-bit check bit, which ensures the reliable forwarding of the message.

[0038] The controller 1 includes a processor 11, a programmable logic device (FPGA) 12, and a high-speed communication interface 13 for communication between the processor and the programmable logic device (FPGA).

[0039] The processor 11 provides a high-speed communication interface 13. The communication interface 13 performs data transmission with the processor 11, and the communication bandwidth of the communication interface 13 is higher than the sum of the bandwidths of all the low-speed communication interfaces 2. Figure 3 As shown, the message data of all low-speed communication interfaces enter the controller 1 in parallel, and the processor 11 quickly reads the data of all low-speed communication interfaces 2 in serial through the high-speed communication interface 13, so that all low-speed communication interfaces 2 can be guaranteed to forward data at line speed. From the perspective of the on-site equipment, all devices are exchanging data with the processor 11 at the same time. The communication interface 13 supports full-duplex communication mode, and can support 100M and 1000M Ethernet interfaces, SPI interfaces, and QSPI interfaces. The support of different interface types can improve the applicability of the method and reduce the option requirements for the processor 11.

[0040] The programmable logic device FPGA12 includes a high-speed communication interface module 121 , a message exchange module 122 , an address table module 123 , a FIFO module 124 and a plurality of low-speed communication interfaces 125 .

[0041] A high-speed communication interface module 121, which implements the message receiving and sending logic of the high-speed communication interface, receives serial data messages sent by the processor, and sends serial data messages to the processor;

[0042] The message switching module 122 mainly includes the message loop scheduling logic and address table lookup logic. The loop scheduler mainly determines which port can forward data based on the receiving status of each message buffer (FIFO) and the high-speed communication interface. The message switching module 122 reads the receiving FIFO of the forwarding port; then the message switching module 122 parses the destination address and source address of the message, and uses the destination address and the determined address table to determine which port's receiving FIFO the message will be forwarded to or directly forwarded to the sending module of the high-speed communication interface;

[0043] The address table module 123 stores the correspondence between the port number and the port address. The address table is a fixed address correspondence, and provides the destination port number for message exchange. After the message exchange module 122 parses the destination address of the received message, it searches the correspondence between the port number and the port address in the address table module 123 to obtain the sending port number of the message;

[0044] The FIFO module 124 has a sending FIFO and a receiving FIFO corresponding to each low-speed communication interface, which serves as a message buffer area for the high-speed communication interface and multiple low-speed communication interfaces to solve the speed matching of different ports.

[0045] The low-speed receiving module 125 implements the message receiving and sending logic of the low-speed communication interface. The serial message of the low-speed communication interface is converted into parallel data and written into the message buffer (FIFO). After a frame of message is written, the FIFO non-empty flag is set, and the circular scheduler of the message exchange module 122 can forward the data in the FIFO; the module also converts the message to be sent in the message buffer (FIFO) 124 into serial data and sends it to the field device.

[0046] The present invention provides a control system and an expansion method of its external bus. There are many methods and ways to implement the technical solution. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be considered as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.

Claims

1. A control system, characterized in that: It includes a controller and a plurality of external low-speed interfaces, and the controller can simultaneously transmit and receive data with the plurality of external low-speed interfaces; The controller includes a processor and a programmable logic device FPGA, the processor includes a high-speed interface, the processor and the programmable logic device FPGA communicate with each other through the high-speed interface, the programmable logic device FPGA includes a loop scheduler, the communication speed of the loop scheduler is not lower than the sum of the speeds of all external low-speed interfaces, and the speed matching of the high-speed interface and all low-speed interfaces is achieved, and the loop scheduler is also used to achieve the matching of half-duplex communication and full-duplex communication; The controller comprises two or more low-speed interfaces, and the low-speed interfaces perform data transmission with field devices.

2. The system according to claim 1, characterized in that The low-speed interface supports full-duplex and half-duplex communication modes, including a UART interface, a CAN interface and a CANFD interface.

3. The system according to claim 2, characterized in that The communication bandwidth of the high-speed interface is higher than the sum of the bandwidths of all the low-speed communication interfaces.

4. The system according to claim 3, characterized in that The high-speed interface supports full-duplex communication, including 100M and 1000M Ethernet interfaces, SPI interfaces and QSPI interfaces.

5. The system according to claim 4, characterized in that The programmable logic device FPGA includes a high-speed interface module, a message exchange module, an address table module, a FIFO module and a low-speed interface module; The high-speed interface module is used to implement the message receiving and sending logic of the high-speed communication interface with the processor, receive the serial data message sent by the processor, and send the serial receiving message to the processor.

6. The system according to claim 5, characterized in that The FIFO module includes a sending FIFO and a receiving FIFO, wherein the sending FIFO implements the cache of the data message sent by the processor; the receiving FIFO implements the cache of the data message received by the low-speed interface; the size of the FIFO is set to the maximum number of bytes of the communication data message, and the FIFO contains empty and full flags; a complete frame of data received by the low-speed interface is cached in the receiving FIFO and the full flag is set, and the cyclic scheduler is notified to read the data; the data sent by the high-speed interface is queried to the corresponding sending FIFO through the address table, and a complete frame of data is written into the sending FIFO and the full flag is set, and the low-speed interface is notified to read the data; The FIFO module serves as a message buffer for the high-speed interface and the low-speed interface to solve the speed matching of different ports; Each low-speed interface corresponds to a transmit FIFO and a receive FIFO.

7. The system according to claim 6, characterized in that The cyclic scheduler checks the full flags of all receive FIFOs and the send flags of the high-speed interface at a fixed period. The cyclic scheduler sends the data of the receive FIFO with the full flag to the high-speed interface, and sends the data of the high-speed interface to the corresponding send FIFO.

8. The system according to claim 7, characterized in that The programmable logic device FPGA also includes an address table, which is written into the programmable logic device FPGA by the processor to solve the correspondence between the message and the low-speed interface; the destination address of the message is included in the communication message, and the destination sending FIFO is queried using the destination address and the address table.

9. The system according to claim 8, characterized in that The speed of message exchange in the message exchange module is determined by the clock frequency f of the message exchange module and the data width n of the message exchange module. The message exchange speed of the message exchange module is f*n, and f*n is greater than or equal to the sum of the speeds of all high-speed interfaces and low-speed interfaces, ensuring that the processor communicates data with all low-speed interfaces at the same time.

10. A method for expanding an external bus of a control system according to any one of claims 1 to 9, characterized in that: include: More than two low-speed interfaces are extended through the controller to connect field devices, and each field device communicates with the controller at the same time.

Citation Information

Cited By

  • Switch and system for data transmission based on MCU and data transmission method

    CN119094447A