WO2022247019A1 - Industrial protocol mapping structure and method based on fpga - Google Patents

Industrial protocol mapping structure and method based on fpga Download PDF

Info

Publication number
WO2022247019A1
WO2022247019A1 PCT/CN2021/111767 CN2021111767W WO2022247019A1 WO 2022247019 A1 WO2022247019 A1 WO 2022247019A1 CN 2021111767 W CN2021111767 W CN 2021111767W WO 2022247019 A1 WO2022247019 A1 WO 2022247019A1
Authority
WO
WIPO (PCT)
Prior art keywords
module
mapping
register
data
clock
Prior art date
Application number
PCT/CN2021/111767
Other languages
French (fr)
Chinese (zh)
Inventor
牛广
李顺斌
王利强
张兴明
Original Assignee
之江实验室
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 之江实验室 filed Critical 之江实验室
Priority to JP2023508609A priority Critical patent/JP2023533599A/en
Publication of WO2022247019A1 publication Critical patent/WO2022247019A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25257Microcontroller

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Communication Control (AREA)

Abstract

The present invention relates to the field of control, and in particular to an industrial protocol mapping structure and method based on an FPGA. The structure comprises a central processing unit (CPU) and an FPGA chip, which are connected to each other. The FPGA chip is provided with a mapping module, a mapping form module, a framing module and a clock reset module, wherein the clock reset module controls and is connected to the mapping module, the mapping form module and the framing module, respectively; the framing module receives data from a serial port, completes framing of a protocol according to frame byte data that is received from the serial port, and outputs a message frame to the mapping module; and the mapping module is connected to the mapping form module. By means of the present invention, RS-232 and the RS-485 interfaces are used, such that large-scale networking for an industrial control system can be realized, and mutual communication between PLCs and instruments of different manufacturers can be realized; and an FPGA chip is used, thereby ensuring the accuracy, real-time performance and reliability of data transmission.

Description

一种基于FPGA的工业协议映射结构和方法An FPGA-based industrial protocol mapping structure and method 技术领域technical field
本发明涉及控制领域,具体涉及一种基于FPGA的工业协议映射结构和方法。The invention relates to the field of control, in particular to an FPGA-based industrial protocol mapping structure and method.
背景技术Background technique
FPGA(Field Programmable Gate Array,现场可编程门阵列)它是在PAL、GAL、CPLD等可编程器件的基础上进一步发展的产物。它是作为专用集成电路(ASIC)领域中的一种半定制电路而出现的,既解决了定制电路的不足,又克服了原有可编辑器件门电路数有限的缺点。FPGA (Field Programmable Gate Array, Field Programmable Gate Array) is a product of further development on the basis of programmable devices such as PAL, GAL, and CPLD. It emerged as a semi-custom circuit in the field of application-specific integrated circuits (ASIC), which not only solves the shortcomings of custom circuits, but also overcomes the shortcomings of the limited number of original editable device gates.
通讯协议又称为通信规程,是指通讯双方对数据传送控制的一种约定。约定中包括对数据格式,同步方式,传送速度,传送步骤,检纠错方式以及控制字符定义等问题做出统一规定通信双方必须同时遵守。每个仪表都有自己独特的通讯协议,常见的有modbus通讯协议、RS-232通讯协议、RS-485通讯协议、PPI通讯协议、mewtocol通讯协议等。A communication protocol, also known as a communication protocol, refers to an agreement between the communication parties to control data transmission. The agreement includes unified regulations on issues such as data format, synchronization method, transmission speed, transmission steps, error detection and correction methods, and control character definitions, which must be followed by both parties at the same time. Each instrument has its own unique communication protocol, the common ones are modbus communication protocol, RS-232 communication protocol, RS-485 communication protocol, PPI communication protocol, mewtocol communication protocol, etc.
目前的工业协议主要通过串口和现场总线进行互连的,传输距离存在局限性;在工业场景中需要使用不同的仪表,由于协议不同,仪表之间通信存在限制;生产过程中的控制信息的执行精度要求越来越高,数据传输的准确性和实时性达到微秒级别的精度要求。The current industrial protocols are mainly interconnected through serial ports and field buses, and the transmission distance is limited; in industrial scenarios, different instruments need to be used, and due to different protocols, there are limitations in the communication between instruments; the execution of control information in the production process The accuracy requirements are getting higher and higher, and the accuracy and real-time performance of data transmission can reach the accuracy requirements of microsecond level.
发明内容Contents of the invention
针对现有的工业协议传输存在传输距离短和传输协议不同存在限制的问题,本发明提出一种基于FPGA的工业协议映射结构和方法,该工业协议映射方法能够实现数据大规模远距离的传输需求,保证数据传输的准确性、通用性和可靠性,其具体技术方案如下:Aiming at the problems of short transmission distance and limitations of different transmission protocols in the existing industrial protocol transmission, the present invention proposes an FPGA-based industrial protocol mapping structure and method, which can realize large-scale and long-distance data transmission requirements , to ensure the accuracy, versatility and reliability of data transmission, the specific technical solutions are as follows:
一种基于FPGA的工业协议映射结构,包括:相连的中央处理器CPU和FPGA芯片,所述FPGA芯片设有映射模块、映射表单模块、组帧模块和时钟复位模块,所述时钟复位模块分别控制连接映射模块、映射表单模块、组帧模块,所述组帧模块接收来自串口的数据,并根据从串口接收帧字节数据完成协议的组帧,输出报文帧至映射模块,所述映射模块与映射表单模块相连接。A kind of industrial protocol mapping structure based on FPGA, comprising: connected central processing unit CPU and FPGA chip, described FPGA chip is provided with mapping module, mapping table module, framing module and clock reset module, and described clock reset module controls respectively Connect the mapping module, the mapping form module, and the framing module. The framing module receives data from the serial port, and completes the framing of the protocol according to the frame byte data received from the serial port, and outputs the message frame to the mapping module. The mapping module Links with the Mapping Forms module.
进一步的,所述映射表单模块,包括:PLC类型映射表单plctypeform和基础映射表单mapform,所述基础映射表单mapform用于指示地址、寄存器类型、命令在帧中的位置,该表单以RAM的形式存在,共16个条目,深度为16,宽度为24;所述PLC类型映射表单plctypeform共256个条目,用于给子网中PLC进行分类,所述子网最大支持256个PLC接入,共4种类型映射方式,类型为0~3,该表单以RAM的形式存在,深度为256,宽度为3。Further, the mapping form module includes: PLC type mapping form plctypeform and basic mapping form mapform, the basic mapping form mapform is used to indicate address, register type, position in the frame of the order, and the form exists in the form of RAM , a total of 16 entries, a depth of 16, and a width of 24; the PLC type mapping form plctypeform has a total of 256 entries, which are used to classify PLCs in the subnet. The subnet supports a maximum of 256 PLC accesses, a total of 4 A type mapping method, the type is 0 to 3, the form exists in the form of RAM, the depth is 256, and the width is 3.
进一步的,所述映射模块,包括:协议类型寄存器、port号寄存器、role寄存器、cmd命令寄存器、edge边缘计算寄存器、数据转换寄存器;所述协议类型寄存器:用于配置协议类型;所述port号寄存器:4bit,用于配置当前port口的port号;所述role寄存器:2bit,用于配置当前port口的角色;所述cmd命令寄存器:64bit,用于配置命令寄存器,前32bit代表写,后32bit代表读;所述edge边缘计算寄存器:32bit,用于存储边缘计算数据;所述数据转换寄存器:2bit,用于配置数据转换。Further, the mapping module includes: protocol type register, port number register, role register, cmd command register, edge computing register, data conversion register; the protocol type register: used to configure the protocol type; the port number Register: 4bit, used to configure the port number of the current port port; the role register: 2bit, used to configure the role of the current port port; the cmd command register: 64bit, used to configure the command register, the first 32bit represents writing, and the latter 32bit represents read; the edge computing register: 32bit, used to store edge computing data; the data conversion register: 2bit, used to configure data conversion.
进一步的,所述报文帧为完整的报文帧,组帧模块与映射模块之间的数据接口为8bit。Further, the message frame is a complete message frame, and the data interface between the framing module and the mapping module is 8 bits.
进一步的,所述时钟复位模块,包括:时钟模块和复位模块;所述时钟模块使用底板的50M时钟通过PLL倍频产生125Mhz的时钟,使得整体系统处于125Mhz的统一时钟域下;所述复位模块,使系统为高复位,当时钟模块产生一个稳定的125Mhz的时钟信号时,时钟模块的locked信号拉高,并利用时钟模块的lock信号进行计数,当计数到3F时,则系统高复位。Further, the clock reset module includes: a clock module and a reset module; the clock module uses the 50M clock of the backplane to generate a 125Mhz clock through PLL frequency multiplication, so that the overall system is in a unified clock domain of 125Mhz; the reset module , make the system high reset, when the clock module generates a stable 125Mhz clock signal, the locked signal of the clock module is pulled high, and use the lock signal of the clock module to count, when the count reaches 3F, the system high reset.
一种基于FPGA的工业协议映射方法,包括如下步骤:A method for mapping industrial protocols based on FPGA, comprising the steps of:
S1、CPU在初始化时,根据用户自定义内容,对基础映射表单mapform进行配置,该表单的类型包括源协议位置、源协议所占字节数,条目包括配置映射命令、寄存器类型、数据、目的地址,该映射表单的深度为16,宽度为24;将所述表单初始化完成后,将从串口提取的报文帧中对应的数据取出,并对数据类型打上标记供以后边缘计算、数据转换使用;S1. When the CPU is initialized, configure the basic mapping form mapform according to the user-defined content. The type of the form includes the location of the source protocol, the number of bytes occupied by the source protocol, and the entries include configuration mapping commands, register types, data, and purpose. address, the depth of the mapping form is 16, and the width is 24; after the form is initialized, the corresponding data in the message frame extracted from the serial port is taken out, and the data type is marked for future edge computing and data conversion. ;
S2、再根据基础映射表单mapform提取得到PLC的SLAVE ID,之后根据PLC的SLAVE ID查询PLC类型映射表单plctypeform得到当前的PLC类型,根据PLC类型,查询边缘计算的表单,并与表单中CPU配置的edge_reg数据进行 比较,不满足则进行丢包,满足则传递给下一级总线交换模块;S2. Extract the SLAVE ID of the PLC according to the basic mapping form mapform, and then query the PLC type mapping form plctypeform according to the SLAVE ID of the PLC to obtain the current PLC type. According to the PLC type, query the form of edge computing, and compare it with the CPU configuration in the form. Edge_reg data is compared, if it is not satisfied, the packet will be lost, and if it is satisfied, it will be passed to the next-level bus switching module;
S3、将边缘计算的相应数据取出并传递给边缘计算模块;S3. Take out the corresponding data of the edge computing and pass it to the edge computing module;
S4、最后从mapform的RAM中将数据块提取出来。S4. Finally, the data block is extracted from the RAM of the mapform.
本发明的优点:Advantages of the present invention:
本发明采用RS-232和RS-485接口能够实现工业控制系统的大规模组网,并能够实现不同厂商的PLC及仪表的互相通讯;采用FPGA芯片,保证数据传输的准确性、实时性和可靠性。The present invention adopts RS-232 and RS-485 interfaces to realize large-scale networking of industrial control systems, and realizes mutual communication between PLCs and instruments of different manufacturers; adopts FPGA chips to ensure the accuracy, real-time and reliability of data transmission sex.
附图说明Description of drawings
图1为本发明的硬件框架结构示意图;Fig. 1 is a schematic diagram of a hardware frame structure of the present invention;
图2为本发明的映射方法流程示意图;Fig. 2 is a schematic flow chart of the mapping method of the present invention;
图3为本发明的时钟复位模块原理图;Fig. 3 is a schematic diagram of the clock reset module of the present invention;
其中,1映射表单模块,2映射模块,3时钟复位模块,4组帧模块。Among them, 1 is a mapping form module, 2 is a mapping module, 3 is a clock reset module, and 4 is a frame module.
具体实施方式Detailed ways
为了使本发明的目的、技术方案和技术效果更加清楚明白,以下结合说明书附图,对本发明作进一步详细说明。In order to make the purpose, technical solution and technical effect of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings.
如图1所示,一种基于FPGA的工业协议映射结构包括:相连的中央处理器CPU和FPGA芯片。所述的中央处理器CPU用于实现数据交互和寄存器的配置,实现通信、逻辑控制和数据处理。所述的FPGA芯片用于对串口数据的接收、解析和映射,提供统一的对外串口,兼容传统的工业仪表以及PLC器件。As shown in Figure 1, an FPGA-based industrial protocol mapping structure includes: a connected central processing unit CPU and an FPGA chip. The central processing unit CPU is used to realize data interaction and configuration of registers, and realize communication, logic control and data processing. The FPGA chip is used for receiving, analyzing and mapping serial port data, provides a unified external serial port, and is compatible with traditional industrial instruments and PLC devices.
所述FPGA芯片设有映射模块2、映射表单模块1、组帧模块4和时钟复位模块3。The FPGA chip is provided with a mapping module 2, a mapping form module 1, a framing module 4 and a clock reset module 3.
所述映射表单模块1,包括:PLC类型映射表单plctypeform和基础映射表单mapform。The mapping form module 1 includes: PLC type mapping form plctypeform and basic mapping form mapform.
所述基础映射表单mapform用于指示地址、寄存器类型、命令等在帧中的位置,该表单以RAM的形式存在,共16个条目,深度为16,宽度为24。The basic mapping form mapform is used to indicate the positions of addresses, register types, commands, etc. in the frame, and the form exists in the form of RAM, with a total of 16 entries, a depth of 16, and a width of 24.
所述PLC类型映射表单plctypeform共256个条目,用于给子网中PLC进行分类,子网最大支持256个PLC接入,共4种类型映射方式,类型为0~3,该表单以RAM的形式存在,深度为256,宽度为3。The PLC type mapping form plctypeform has a total of 256 entries, which are used to classify the PLCs in the subnet. The subnet supports a maximum of 256 PLC accesses. There are 4 types of mapping methods, and the types are 0 to 3. The form uses RAM The form exists with a depth of 256 and a width of 3.
中央处理器CPU通过对所述基础映射表单和PLC类型映射表单进行配置, 来对帧中的相关数据进行提取。The central processing unit CPU extracts relevant data in the frame by configuring the basic mapping form and the PLC type mapping form.
所述映射模块2支持modbus RTU、modbus ASCII、MEWTOCOL、hostlink和PPI等协议。The mapping module 2 supports protocols such as modbus RTU, modbus ASCII, MEWTOCOL, hostlink and PPI.
映射模块2包含:协议类型寄存器、port号寄存器、role寄存器、cmd命令寄存器、edge边缘计算寄存器、datacoversion数据转换寄存器。 Mapping module 2 includes: protocol type register, port number register, role register, cmd command register, edge computing register, datacoversion data conversion register.
协议类型寄存器framing_mode:用于配置协议类型。Protocol type register framing_mode: used to configure the protocol type.
port号寄存器port_num:4bit,用于配置当前port口的port号。Port number register port_num: 4bit, used to configure the port number of the current port.
role寄存器:2bit,用于配置当前port口的角色,例如:00代表slave,01代表master1,02代表master2,11代表master3。role register: 2bit, used to configure the role of the current port, for example: 00 represents slave, 01 represents master1, 02 represents master2, and 11 represents master3.
cmd命令寄存器cmd_reg:64bit,用于配置命令寄存器,前32bit代表写,后32bit代表读。cmd command register cmd_reg: 64bit, used to configure the command register, the first 32bit represents writing, and the last 32bit represents reading.
edge边缘计算寄存器edge_reg:32bit,边缘计算寄存器。edge edge computing register edge_reg: 32bit, edge computing register.
datacoversion数据转换寄存器:2bit,用于配置数据转换,例如,00和11:代表不需要数据转换,01:二进制转ASCII码,10:ASCII转二进制。datacoversion data conversion register: 2bit, used to configure data conversion, for example, 00 and 11: means no data conversion is required, 01: binary to ASCII code, 10: ASCII to binary.
所述组帧模块4接收来自串口的数据,并根据从串口控制器接收帧字节数据,完成Profibus、PPI、Mewtocol(ASCII)、Modbus ASCII、Hostlink+FINS、Modbus RTU等协议的组帧功能。从组帧模块进来的为完整的报文帧,数据接口为8bit。Described framing module 4 receives the data from serial port, and according to receiving frame byte data from serial port controller, completes the framing functions of protocols such as Profibus, PPI, Mewtocol (ASCII), Modbus ASCII, Hostlink+FINS, Modbus RTU. The input from the framing module is a complete message frame, and the data interface is 8bit.
如图3所示,所述时钟复位模块3,包括:时钟模块和复位模块,用于为协议映射提供稳定和统一的时钟源,为确定性数据的传输提供基准源,为协议映射模块的正常运行提供上下电时序要求。As shown in Figure 3, the clock reset module 3 includes: a clock module and a reset module, which are used to provide a stable and unified clock source for protocol mapping, provide a reference source for the transmission of deterministic data, and provide a reference source for the normal operation of the protocol mapping module. Running provides power-on and power-down sequence requirements.
其中,所述时钟模块:整体系统处于125Mhz时钟域下,使用底板的50M时钟通过PLL倍频去产生一个125Mhz的时钟。Wherein, the clock module: the overall system is in the 125Mhz clock domain, using the 50M clock on the backplane to generate a 125Mhz clock through PLL frequency multiplication.
复位模块:整个系统为高复位,当时钟模块产生一个稳定的125Mhz的时钟信号时,locked信号便会拉高,并利用时钟模块的lock信号进行计数,当计数到3F时,则整体系统高复位。Reset module: The whole system is high reset. When the clock module generates a stable 125Mhz clock signal, the locked signal will be pulled high, and the lock signal of the clock module is used for counting. When the count reaches 3F, the overall system is high reset .
如图2所示,一种基于FPGA的工业协议映射方法,具体包括如下步骤:As shown in Figure 2, an FPGA-based industrial protocol mapping method specifically includes the following steps:
S1、根据mapform提取SLAVE ID:CPU在初始化时,先对基础映射表单mapform进行配置,该表单的类型包括源协议位置、源协议所占字节数,条目包括配置映射命令、寄存器类型、数据、目的地址等,具体表单的内容可供用户进 行定义,该映射表单的深度为16,宽度为24;将所述表单初始化完成后,将从串口提取的报文帧中对应的数据取出,并对数据类型打上标记供以后边缘计算、数据转换使用;S1. Extract the SLAVE ID according to the mapform: when the CPU is initialized, it first configures the basic mapping form mapform. The type of the form includes the location of the source protocol, the number of bytes occupied by the source protocol, and the entries include configuration mapping commands, register types, data, The destination address, etc., the content of the specific form can be defined by the user, the depth of the mapping form is 16, and the width is 24; after the initialization of the form is completed, the corresponding data in the message frame extracted from the serial port is taken out, and the The data type is marked for future use in edge computing and data conversion;
S2、根据plctypeform查询SLAVE ID对应的PLC类型:再根据基础映射表单mapform查询得到PLC的SLAVE ID,之后根据PLC的SLAVE ID查询PLC类型映射表单plctypeform得到当前的PLC类型,根据PLC类型,查询边缘计算的表单,并与表单中CPU配置的edge_reg数据进行比较,不满足则进行丢包,满足则传递给下一级总线交换模块;S2. Query the PLC type corresponding to the SLAVE ID according to the plctypeform: then query the SLAVE ID of the PLC according to the basic mapping form mapform, and then query the PLC type mapping form plctypeform according to the SLAVE ID of the PLC to obtain the current PLC type, and query edge computing according to the PLC type and compare it with the edge_reg data configured by the CPU in the form. If it is not satisfied, the packet will be discarded, and if it is satisfied, it will be passed to the next-level bus switching module;
S3、根据edge_reg提取边缘计算数据:将边缘计算的相应数据取出并传递给边缘计算模块;S3. Extract edge computing data according to edge_reg: take out the corresponding data of edge computing and pass it to the edge computing module;
S4、最后从mapform的RAM中将数据块提取出来。S4. Finally, the data block is extracted from the RAM of the mapform.
本发明在数据通信的过程中能够根据数据的重要性进行分级传输,保证高优先级的数据的实时性、可靠性和准确性。In the process of data communication, the invention can carry out hierarchical transmission according to the importance of data, so as to ensure the real-time performance, reliability and accuracy of high-priority data.
本领域普通技术人员可以理解,以上所述仅为发明的优选实例而已,并不用于限制发明,尽管参照前述实例对发明进行了详细的说明,对于本领域的技术人员来说,其依然可以对前述各实例记载的技术方案进行修改,或者对其中部分技术特征进行等同替换。凡在发明的精神和原则之内,所做的修改、等同替换等均应包含在发明的保护范围之内。Those of ordinary skill in the art can understand that the above description is only a preferred example of the invention, and is not intended to limit the invention. Although the invention has been described in detail with reference to the foregoing examples, for those skilled in the art, it can still be understood. The technical solutions described in the foregoing examples are modified, or some of the technical features are equivalently replaced. All modifications, equivalent replacements, etc. within the spirit and principles of the invention shall be included in the scope of protection of the invention.

Claims (6)

  1. 一种基于FPGA的工业协议映射结构,包括:相连的中央处理器CPU和FPGA芯片,其特征在于,所述FPGA芯片设有映射模块(2)、映射表单模块(1)、组帧模块(4)和时钟复位模块(3),所述时钟复位模块(3)分别控制连接映射模块(2)、映射表单模块(1)、组帧模块(4),所述组帧模块(4)接收来自串口的数据,并根据从串口接收帧字节数据完成协议的组帧,输出报文帧至映射模块(2),所述映射模块(2)与映射表单模块(1)相连接。A kind of industrial protocol mapping structure based on FPGA, comprising: central processing unit CPU and FPGA chip connected, it is characterized in that, described FPGA chip is provided with mapping module (2), mapping table module (1), framing module (4 ) and a clock reset module (3), the clock reset module (3) controls the connection mapping module (2), the mapping form module (1), and the framing module (4) respectively, and the framing module (4) receives from data of the serial port, and complete the framing of the protocol according to receiving the frame byte data from the serial port, and output the message frame to the mapping module (2), and the mapping module (2) is connected with the mapping form module (1).
  2. 如权利要求1所述的一种基于FPGA的工业协议映射结构,其特征在于,所述映射表单模块(1),包括:PLC类型映射表单plctypeform和基础映射表单mapform,所述基础映射表单mapform用于指示地址、寄存器类型、命令在帧中的位置,该表单以RAM的形式存在,共16个条目,深度为16,宽度为24;所述PLC类型映射表单plctypeform共256个条目,用于给子网中PLC进行分类,所述子网最大支持256个PLC接入,共4种类型映射方式,类型为0~3,该表单以RAM的形式存在,深度为256,宽度为3。A kind of FPGA-based industrial protocol mapping structure as claimed in claim 1, is characterized in that, described mapping form module (1), comprises: PLC type mapping form plctypeform and basic mapping form mapform, described basic mapping form mapform uses In order to indicate the position in the frame of address, register type, order, this form exists with the form of RAM, totally 16 entries, and depth is 16, and width is 24; The total 256 entries of described PLC type mapping table plctypeform are used for giving The PLCs in the subnet are classified. The subnet supports a maximum of 256 PLC accesses. There are 4 types of mapping methods, the type is 0-3, and the form exists in the form of RAM with a depth of 256 and a width of 3.
  3. 如权利要求1所述的一种基于FPGA的工业协议映射结构,其特征在于,所述映射模块(2),包括:协议类型寄存器、port号寄存器、role寄存器、cmd命令寄存器、edge边缘计算寄存器、数据转换寄存器;所述协议类型寄存器:用于配置协议类型;所述port号寄存器:4bit,用于配置当前port口的port号;所述role寄存器:2bit,用于配置当前port口的角色;所述cmd命令寄存器:64bit,用于配置命令寄存器,前32bit代表写,后32bit代表读;所述edge边缘计算寄存器:32bit,用于存储边缘计算数据;所述数据转换寄存器:2bit,用于配置数据转换。A kind of FPGA-based industrial protocol mapping structure as claimed in claim 1, is characterized in that, described mapping module (2), comprises: protocol type register, port number register, role register, cmd command register, edge computing register , data conversion register; the protocol type register: used to configure the protocol type; the port number register: 4bit, used to configure the port number of the current port port; the role register: 2bit, used to configure the role of the current port port ; The cmd command register: 64bit, used to configure the command register, the first 32bit represents writing, and the last 32bit represents reading; the edge computing register: 32bit, used to store edge computing data; the data conversion register: 2bit, used for configuration data conversion.
  4. 如权利要求1所述的一种基于FPGA的工业协议映射结构,其特征在于,所述报文帧为完整的报文帧,组帧模块(4)与映射模块(2)之间的数据接口为8bit。A kind of FPGA-based industrial protocol mapping structure as claimed in claim 1, is characterized in that, described message frame is complete message frame, the data interface between framing module (4) and mapping module (2) It is 8bit.
  5. 如权利要求1所述的一种基于FPGA的工业协议映射结构,其特征在于,所述时钟复位模块(3),包括:时钟模块和复位模块;所述时钟模块使用底板的50M时钟通过PLL倍频产生125Mhz的时钟,使得整体系统处于125Mhz的统一时钟域下;所述复位模块,使系统为高复位,当时钟模块产生一个稳定的125Mhz 的时钟信号时,时钟模块的locked信号拉高,并利用时钟模块的lock信号进行计数,当计数到3F时,则系统高复位。A kind of industrial protocol mapping structure based on FPGA as claimed in claim 1, is characterized in that, described clock reset module (3), comprises: clock module and reset module; Described clock module uses the 50M clock of bottom board to pass PLL times Generate a 125Mhz clock at a high frequency, so that the overall system is in a unified clock domain of 125Mhz; the reset module makes the system a high reset, when the clock module generates a stable 125Mhz clock signal, the locked signal of the clock module is pulled high, and Use the lock signal of the clock module to count, when the count reaches 3F, the system resets high.
  6. 一种基于FPGA的工业协议映射方法,其特征在于,包括如下步骤:A kind of FPGA-based industrial protocol mapping method is characterized in that, comprises the steps:
    S1、CPU在初始化时,根据用户自定义内容,对基础映射表单mapform进行配置,该表单的类型包括源协议位置、源协议所占字节数,条目包括配置映射命令、寄存器类型、数据、目的地址,该映射表单的深度为16,宽度为24;将所述表单初始化完成后,将从串口提取的报文帧中对应的数据取出,并对数据类型打上标记供以后边缘计算、数据转换使用;S1. When the CPU is initialized, configure the basic mapping form mapform according to the user-defined content. The type of the form includes the location of the source protocol, the number of bytes occupied by the source protocol, and the entries include configuration mapping commands, register types, data, and purpose. address, the depth of the mapping form is 16, and the width is 24; after the form is initialized, the corresponding data in the message frame extracted from the serial port is taken out, and the data type is marked for future edge computing and data conversion. ;
    S2、再根据基础映射表单mapform提取得到PLC的SLAVE ID,之后根据PLC的SLAVE ID查询PLC类型映射表单plctypeform得到当前的PLC类型,根据PLC类型,查询边缘计算的表单,并与表单中CPU配置的edge_reg数据进行比较,不满足则进行丢包,满足则传递给下一级总线交换模块;S2. Extract the SLAVE ID of the PLC according to the basic mapping form mapform, and then query the PLC type mapping form plctypeform according to the SLAVE ID of the PLC to obtain the current PLC type. According to the PLC type, query the form of edge computing, and compare it with the CPU configuration in the form. Edge_reg data is compared, if it is not satisfied, the packet will be lost, and if it is satisfied, it will be passed to the next-level bus switching module;
    S3、将边缘计算的相应数据取出并传递给边缘计算模块;S3. Take out the corresponding data of the edge computing and pass it to the edge computing module;
    S4、最后从mapform的RAM中将数据块提取出来。S4. Finally, the data block is extracted from the RAM of the mapform.
PCT/CN2021/111767 2021-05-27 2021-08-10 Industrial protocol mapping structure and method based on fpga WO2022247019A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023508609A JP2023533599A (en) 2021-05-27 2021-08-10 FPGA based industrial protocol mapping structure and method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110582550.9A CN113031496B (en) 2021-05-27 2021-05-27 Industrial protocol mapping structure and method based on FPGA
CN202110582550.9 2021-05-27

Publications (1)

Publication Number Publication Date
WO2022247019A1 true WO2022247019A1 (en) 2022-12-01

Family

ID=76455816

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/111767 WO2022247019A1 (en) 2021-05-27 2021-08-10 Industrial protocol mapping structure and method based on fpga

Country Status (3)

Country Link
JP (1) JP2023533599A (en)
CN (1) CN113031496B (en)
WO (1) WO2022247019A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113031496B (en) * 2021-05-27 2021-09-21 之江实验室 Industrial protocol mapping structure and method based on FPGA

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932613A (en) * 2012-12-03 2013-02-13 广东威创视讯科技股份有限公司 FPGA (field programmable gate array)-based analog video ADC (analog to digital converter) automatic adjustment method and device
CN103685292A (en) * 2013-12-20 2014-03-26 哈尔滨工业大学 Universal device and method for protocol conversion
US20190280762A1 (en) * 2018-03-06 2019-09-12 Eutelsat S A Method for adaptive demodulation and system implementing such a method
CN113031496A (en) * 2021-05-27 2021-06-25 之江实验室 Industrial protocol mapping structure and method based on FPGA

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7139985B2 (en) * 2003-06-18 2006-11-21 Ambric, Inc. Development system for an integrated circuit having standardized hardware objects
CN205092880U (en) * 2015-11-02 2016-03-16 日立永济电气设备(西安)有限公司 HDLC protocol controller based on FPGA chip
CN107426246B (en) * 2017-08-31 2020-09-08 北京计算机技术及应用研究所 FPGA-based high-speed data exchange system between gigabit Ethernet and RapidIO protocol
CN111556051A (en) * 2020-04-26 2020-08-18 上海航天测控通信研究所 High-speed space network data protocol conversion and multiplexing device based on FPGA

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932613A (en) * 2012-12-03 2013-02-13 广东威创视讯科技股份有限公司 FPGA (field programmable gate array)-based analog video ADC (analog to digital converter) automatic adjustment method and device
CN103685292A (en) * 2013-12-20 2014-03-26 哈尔滨工业大学 Universal device and method for protocol conversion
US20190280762A1 (en) * 2018-03-06 2019-09-12 Eutelsat S A Method for adaptive demodulation and system implementing such a method
CN113031496A (en) * 2021-05-27 2021-06-25 之江实验室 Industrial protocol mapping structure and method based on FPGA

Also Published As

Publication number Publication date
CN113031496A (en) 2021-06-25
JP2023533599A (en) 2023-08-03
CN113031496B (en) 2021-09-21

Similar Documents

Publication Publication Date Title
CN103259735B (en) A kind of communication means of the programmable virtual router based on NetFPGA
KR101831550B1 (en) Control messaging in multislot link layer flit
CN103916252A (en) High-bandwidth Ethernet IP core based on FPGA
CN110493147B (en) Parallel redundant Ethernet communication controller and control method thereof
WO2022247019A1 (en) Industrial protocol mapping structure and method based on fpga
CN108683536B (en) Configurable dual-mode converged communication method of asynchronous network on chip and interface thereof
WO2016173428A1 (en) Data transmission method and apparatus
CN204392269U (en) A kind of full SDN High_speed NIC able to programme
CN104636301A (en) Large-scale PLC (programmable logic controller) high-speed backplane bus system on basis of PCI-E (peripheral component interconnect-express) interface
CN104714907A (en) Design method for converting PCI bus into ISA bus or APB bus
CN111193573A (en) FPGA asynchronous serial port communication device and method with adjustable speed
CN108173817B (en) Self-conversion method based on Modbus-TCP protocol
CN106168933A (en) A kind of method realizing virtual dual-port shared drive based on high-speed serial communication
WO2022198880A1 (en) Arbitrary byte read-write user-side logic controller
CN113839903A (en) Protocol conversion device based on HART technology
CN114721317B (en) Network communication control system and method based on SPI controller
CN114238193B (en) Device for data interaction between PROFIBUS-DP bus and BLVDS bus
CN108536636B (en) Master-slave negotiation sequence machine based on PECI bus
CN110445569B (en) Integrated system with timing and instruction synchronization function
Guochen et al. Design of intelligent transmitter based on HART protocol
WO2024044976A1 (en) Data acquisition apparatus, method and system, electronic device, and storage medium
Zhang et al. A high-speed serial transport platform based on SRIO for high-resolution image
CN207801940U (en) The multichannel optical module information Acquisition Circuit realized based on FPGA
CN112087358A (en) CPCI-based multi-channel CAN bus communication universal module implementation method
CN105512066B (en) Soft starter communication protocol conversion device and method based on profibus

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2023508609

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE