JP2023533599A - FPGA based industrial protocol mapping structure and method - Google Patents
FPGA based industrial protocol mapping structure and method Download PDFInfo
- Publication number
- JP2023533599A JP2023533599A JP2023508609A JP2023508609A JP2023533599A JP 2023533599 A JP2023533599 A JP 2023533599A JP 2023508609 A JP2023508609 A JP 2023508609A JP 2023508609 A JP2023508609 A JP 2023508609A JP 2023533599 A JP2023533599 A JP 2023533599A
- Authority
- JP
- Japan
- Prior art keywords
- module
- mapping
- register
- data
- fpga
- 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.)
- Pending
Links
- 238000013507 mapping Methods 0.000 title claims abstract description 92
- 238000000034 method Methods 0.000 title claims abstract description 13
- 238000009432 framing Methods 0.000 claims abstract description 19
- 238000012545 processing Methods 0.000 claims abstract description 7
- 238000006243 chemical reaction Methods 0.000 claims description 17
- 239000000284 extract Substances 0.000 claims description 3
- 238000012546 transfer Methods 0.000 claims description 2
- 230000005540 biological transmission Effects 0.000 abstract description 14
- 230000006855 networking Effects 0.000 abstract description 2
- 230000006854 communication Effects 0.000 description 14
- 238000004891 communication Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 2
- 238000012937 correction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
- G05B19/0423—Input/output
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/25—Pc structure of the system
- G05B2219/25257—Microcontroller
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Communication Control (AREA)
Abstract
【課題】本発明はRS-232及びRS-485インターフェースを用い、工業制御システムの大規模のネットワーキングを実現することができるとともに、異なるメーカーのPLC及び計器の相互通信を実現することができ、FPGAチップを用いて、データ伝送の正確度、リアルタイム性及び信頼性を確保できる。【解決手段】本発明は制御分野に関し、具体的にはFPGAに基づく工業プロトコルマッピング構造及び方法に関し、構造は接続される中央演算装置CPU及びFPGAチップを含み、前記FPGAチップにはマッピングモジュール、マッピングフォームモジュール、フレーミングモジュール及びクロックリセットモジュールが設けられ、前記クロックリセットモジュールはマッピングモジュール、マッピングフォームモジュール、フレーミングモジュールをそれぞれ接続して制御し、前記フレーミングモジュールはシリアルポートからのデータを受信し、且つシリアルポートからフレームバイトデータを受信することで、プロトコルのフレーミングを完成し、メッセージフレームをマッピングモジュールに出力し、前記マッピングモジュールはマッピングフォームモジュールに接続される。【選択図】図1Kind Code: A1 The present invention uses RS-232 and RS-485 interfaces to realize large-scale networking of industrial control systems, and enables intercommunication between PLCs and instruments of different manufacturers, and enables FPGA The chip can be used to ensure accuracy, real-time and reliability of data transmission. The present invention relates to the field of control, specifically to an FPGA-based industrial protocol mapping structure and method, the structure includes a central processing unit CPU and an FPGA chip connected, said FPGA chip includes a mapping module, a mapping A form module, a framing module and a clock reset module are provided, the clock reset module connecting and controlling the mapping module, the mapping form module and the framing module respectively, the framing module receiving data from the serial port and Receiving frame byte data from the port completes protocol framing and outputs message frames to a mapping module, which is connected to a mapping form module. [Selection drawing] Fig. 1
Description
本発明は制御分野に関し、具体にはFPGAに基づく工業プロトコルマッピング構造及び方法に関する。 The present invention relates to the field of control, and more particularly to FPGA-based industrial protocol mapping structures and methods.
FPGA(Field Programmable Gate Array、フィールドプログラマブルゲートアレイ)はPAL、GAL、CPLD等のプログラマブルデバイスに基づいてさらに発展するものである。それは特定用途向け集積回路(ASIC)の分野におけるセミカスタム回路の一種として登場しており、カスタム回路の欠点を解決するとともに、元のプログラマブルデバイスゲート回路の数が限られる欠点を解消する。 FPGA (Field Programmable Gate Array) is a further development based on programmable devices such as PAL, GAL and CPLD. It has emerged as a kind of semi-custom circuit in the field of application specific integrated circuits (ASIC), solving the shortcomings of custom circuits and the limited number of original programmable device gate circuits.
通信プロトコルは通信規程とも呼ばれ、通信の両方によるデータ伝送制御についての約定である。約定にはデータフォーマット、同期方式、伝送速度、伝送ステップ、エラー検出訂正方式及び制御文字定義等の問題を一概に規定し通信の両方が同時に遵守しなければならないものを含む。各計器はその独自の固有の通信プロトコルを有し、一般的にはmodbus通信プロトコル、RS-232通信プロトコル、RS-485通信プロトコル、PPI通信プロトコル、mewtocol通信プロトコル等がある。 A communication protocol, also called a communication policy, is a contract for data transmission control over both communications. The conventions generally define issues such as data formats, synchronization methods, transmission speeds, transmission steps, error detection and correction methods, and control character definitions, and include those that both communications must comply with at the same time. Each instrument has its own unique communication protocol, commonly modbus communication protocol, RS-232 communication protocol, RS-485 communication protocol, PPI communication protocol, mewtocol communication protocol, and the like.
現在の工業プロトコルでは主にシリアルポート及びフィールドバスを介して相互接続され、伝送距離に限定性があり、工業シーンでは異なる計器を使用する必要があり、プロトコルが異なるため、計器間の通信が限られており、生産過程における制御情報の実行精度への要求が高まっており、データ伝送の正確度及びリアルタイム性についての精度要求もマイクロ秒レベルに達している。 Current industrial protocols are mainly interconnected through serial ports and fieldbuses, with limited transmission distances, different instruments must be used in industrial scenes, and different protocols limit inter-instrument communication. Demands for the execution accuracy of control information in the production process are increasing, and the precision requirements for the accuracy and real-time performance of data transmission have reached the microsecond level.
既存の工業プロトコル伝送における伝送距離が短く、伝送プロトコルが異なるため限定性がある問題に対して、本発明はFPGAに基づく工業プロトコルマッピング構造及び方法を提供し、該工業プロトコルマッピング方法はデータの大規模及び長距離伝送のニーズを実現し、データ伝送の正確度、通用性及び信頼性を確保することができ、その具体的な技術案は以下のとおりである。 Aiming at the problem of short transmission distance and limited transmission protocol in the existing industrial protocol transmission, the present invention provides an FPGA-based industrial protocol mapping structure and method, which is capable of large data size. It can meet the needs of scale and long-distance transmission, and ensure the accuracy, compatibility and reliability of data transmission.The specific technical solutions are as follows.
FPGAに基づく工業プロトコルマッピング構造であって、接続される中央演算装置(CPU)及びFPGAチップを含み、前記FPGAチップにはマッピングモジュール、マッピングフォームモジュール、フレーミングモジュール及びクロックリセットモジュールが設けられ、前記クロックリセットモジュールはマッピングモジュール、マッピングフォームモジュール、フレーミングモジュールをそれぞれ接続して制御し、前記フレーミングモジュールはシリアルポートからのデータを受信し、且つシリアルポートからフレームバイトデータを受信することで、プロトコルのフレーミングを完成し、メッセージフレームをマッピングモジュールに出力し、前記マッピングモジュールはマッピングフォームモジュールに接続される。 An FPGA-based industrial protocol mapping structure comprising a connected central processing unit (CPU) and an FPGA chip, the FPGA chip being provided with a mapping module, a mapping form module, a framing module and a clock reset module, wherein the clock The reset module connects and controls the mapping module, the mapping form module and the framing module respectively, the framing module receives data from the serial port and receives frame byte data from the serial port to perform protocol framing. Completed, it outputs the message frame to a mapping module, which is connected to a mapping form module.
更に、前記マッピングフォームモジュールはPLCタイプのマッピングフォームplctypeform及び基本マッピングフォームmapformを含み、前記基本マッピングフォームmapformはアドレス、レジスタタイプ、命令のフレームにおける位置を指示することに用いられ、該基本マッピングフォームmapformはRAMの形式で存在し、合計16個のエントリーを有し、深さが16であり、幅が24であり、前記PLCタイプのマッピングフォームplctypeformは合計256個のエントリーを有し、サブネット内のPLCを分類することに用いられ、前記サブネットは最大で256個のPLCのアクセスをサポートし、0~3の合計4つのタイプのマッピング方式を有し、該PLCタイプのマッピングフォームplctypeformはRAMの形式で存在し、深さが256であり、幅が3である。 Further, said mapping form module includes a PLC type mapping form plctypeform and a basic mapping form mapform, said basic mapping form mapform being used to indicate addresses, register types, locations in frames of instructions, said basic mapping form mapform exists in the form of RAM, has a total of 16 entries, is 16 deep and 24 wide, said PLC type mapping form plctypeform has a total of 256 entries, Used to classify PLCs, the subnet supports access of up to 256 PLCs, has a total of 4 types of mapping methods from 0 to 3, and the PLC type mapping form plctypeform is the form of RAM , with a depth of 256 and a width of 3.
更に、前記マッピングモジュールはプロトコルタイプレジスタ、port番号レジスタ、roleレジスタ、cmd命令レジスタ、edgeエッジ算出レジスタ及びデータ変換レジスタを含み、前記プロトコルタイプレジスタはプロトコルタイプを設定することに用いられ、前記port番号レジスタは4bitであり、現在のportポートのport番号を設定することに用いられ、前記roleレジスタは2bitであり、現在のportポートの役割を設定することに用いられ、前記cmd命令レジスタは64bitであり、命令レジスタを設定することに用いられ、上位の32bitが書き込みを表し、下位の32bitが読み取りを表し、前記edgeエッジ算出レジスタは32bitであり、エッジ算出データを記憶することに用いられ、前記データ変換レジスタは2bitであり、データ変換を設定することに用いられる。 Further, the mapping module includes a protocol type register, a port number register, a role register, a cmd command register, an edge edge calculation register and a data conversion register, wherein the protocol type register is used to set the protocol type, the port number The register is 4 bits and is used to set the port number of the current port port, the role register is 2 bits and is used to set the role of the current port port, and the cmd command register is 64 bits. , used to set the command register, the upper 32 bits represent writing, the lower 32 bits represent reading, the edge edge calculation register is 32 bits, used to store the edge calculation data, the The data conversion register has 2 bits and is used to set data conversion.
更に、前記メッセージフレームは完全なメッセージフレームであり、フレーミングモジュールとマッピングモジュールとの間のデータインターフェースは8bitである。 Moreover, the message frame is a complete message frame, and the data interface between the framing module and the mapping module is 8bits.
更に、前記クロックリセットモジュールはクロックモジュール及びリセットモジュールを含み、前記クロックモジュールは、バックプレーンの50Mクロックを使用してPLL周波数逓倍器により125Mhzのクロックを生成し、システム全体を125Mhzの統一的なクロックフィールドに位置させ、前記リセットモジュールは、システムをハイレベルリセットとし、クロックモジュールが1つの安定した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 the PLL frequency multiplier, and the whole system is a unified clock of 125Mhz. located in the field, the reset module causes the system to be reset at high level, pulls up the locked signal of the clock module when the clock module generates a stable 125Mhz clock signal, and raises the locked signal of the clock module. It is used to count, and when it counts to 3F, the system performs a high level reset.
FPGAに基づく工業プロトコルマッピング方法であって、
CPUは初期化する際に、ユーザーのカスタムコンテンツに基づいて基本マッピングフォームmapformを設定し、該基本マッピングフォームmapformのタイプはソースプロトコル位置、ソースプロトコルが占めるバイト数を含み、エントリーは構成マッピング命令、レジスタタイプ、データ、宛先アドレスを含み、該基本マッピングフォームmapformの深さが16であり、幅が24であり、前記基本マッピングフォームmapformの初期化を完成した後、シリアルポートから抽出されたメッセージフレーム中の対応するデータを取り出し、且つ後のエッジ算出、データ変換のためにデータタイプをマーキングするステップS1と、
次に基本マッピングフォームmapformに基づきPLCのSLAVE IDを抽出し、その後PLCのSLAVE IDに基づきPLCタイプのマッピングフォームplctypeformを検索し現在のPLCタイプを取得し、PLCタイプに基づき、エッジ算出のフォームを検索し、且つフォーム中のCPUに設定されたedge_regデータと比較し、満足しない場合にパケットロスを行い、満足する場合に後段のバス交換モジュールに転送するステップS2と、
エッジ算出の対応するデータを取り出してエッジ算出モジュールに転送するステップS3と、
最後に、mapformのRAMからデータブロックを抽出するステップS4とを含む。
An FPGA-based industrial protocol mapping method comprising:
When the CPU initializes, it sets a basic mapping form mapform based on the user's custom content, the type of the basic mapping form mapform includes the source protocol location, the number of bytes occupied by the source protocol, and the entries are configuration mapping instructions, A message frame containing register type, data, destination address, the depth of said basic mapping form mapform is 16 and the width is 24, extracted from the serial port after completing the initialization of said basic mapping form mapform. step S1 of retrieving the corresponding data in and marking the data type for later edge calculation, data conversion;
Next, extract the PLC SLAVE ID based on the basic mapping form mapform, then search the PLC type mapping form plctypeform based on the PLC SLAVE ID to get the current PLC type, and based on the PLC type, create the edge calculation form. a step S2 of searching and comparing with the edge_reg data set in the CPU in the form, performing packet loss if not satisfied, and transferring to the subsequent bus switching module if satisfied;
a step S3 of retrieving and transferring data corresponding to the edge calculation to the edge calculation module;
Finally, it includes a step S4 of extracting the data block from the mapform's RAM.
本発明はRS-232及びRS-485インターフェースを用い、工業制御システムの大規模のネットワーキングを実現することができるとともに、異なるメーカーのPLC及び計器の相互通信を実現することができ、FPGAチップを用いて、データ伝送の正確度、リアルタイム性及び信頼性を確保できる。 The present invention uses RS-232 and RS-485 interfaces, can realize large-scale networking of industrial control systems, and can realize mutual communication between PLCs and instruments of different manufacturers, and uses FPGA chips. Therefore, the accuracy, real-timeness and reliability of data transmission can be ensured.
本発明の目的、技術案及び技術的効果をより明確にするために、以下に図面を参照しながら本発明を更に詳しく説明する。 In order to make the purpose, technical solution and technical effect of the present invention clearer, the present invention will be described in more detail below with reference to the drawings.
図1に示すように、FPGAに基づく工業プロトコルマッピング構造は接続される中央演算装置CPU及びFPGAチップを含む。前記中央演算装置CPUはデータ交換及びレジスタ構成を実現し、通信、ロジック制御及びデータ処理を実現するためのものである。前記FPGAチップはシリアルポートデータの受信、解析及びマッピングに対して統一的な外部シリアルポートを提供し、従来の工業計器とPLCデバイスとを兼ねるためのものである。 As shown in FIG. 1, an FPGA-based industrial protocol mapping structure includes a central processing unit CPU and an FPGA chip connected. The central processing unit CPU implements data exchange and register configuration, and implements communication, logic control and data processing. The FPGA chip provides a unified external serial port for receiving, parsing and mapping serial port data, and is intended to double as a conventional industrial instrument and a PLC device.
前記FPGAチップには、マッピングモジュール2、マッピングフォームモジュール1、フレーミングモジュール4及びクロックリセットモジュール3が設けられる。
前記マッピングフォームモジュール1はPLCタイプのマッピングフォーム(plctypeform)及び基本マッピングフォーム(mapform)を含む。
The FPGA chip is provided with a
The
前記基本マッピングフォーム(mapform)はアドレス、レジスタタイプ、命令などのフレームにおける位置を指示することに用いられ、該フォームはRAMの形式で存在し、合計16個のエントリーを有し、深さが16であり、幅が24である。 The basic mapping form (mapform) is used to indicate the location in the frame of addresses, register types, instructions, etc. The form exists in the form of RAM, has a total of 16 entries, and is 16 deep. and has a width of 24.
前記PLCタイプのマッピングフォーム(plctypeform)は合計256個のエントリーを有し、サブネット内のPLCを分類することに用いられ、サブネットは最大で256個のPLCのアクセスをサポートし、合計0~3の4つのタイプのマッピング方式を有し、該フォームはRAMの形式で存在し、深さが256であり、幅が3である。 The PLC type mapping form (plctypeform) has a total of 256 entries and is used to classify PLCs within a subnet, and a subnet supports access of up to 256 PLCs, with a total of 0-3 entries. It has 4 types of mapping schemes, the form exists in the form of RAM, is 256 deep and 3 wide.
中央演算装置CPUは前記基本マッピングフォーム及びPLCタイプのマッピングフォームを設定することにより、フレーム内の相関データを抽出する。 The central processing unit CPU extracts the correlation data in the frame by setting the basic mapping form and the PLC type mapping form.
前記マッピングモジュール2はmodbus RTU、modbus ASCII、MEWTOCOL、hostlink及びPPI等のプロトコルをサポートする。
The
マッピングモジュール2はプロトコルタイプレジスタ、port番号レジスタ、roleレジスタ、cmd命令レジスタ、edgeエッジ算出レジスタ、datacoversionデータ変換レジスタを含む。
The
プロトコルタイプレジスタframing_modeはプロトコルタイプを設定するためのものである。 The protocol type register framing_mode is for setting the protocol type.
port番号レジスタport_numは4bitであり、現在のportポートのport番号を設定するためのものである。 The port number register port_num is 4 bits and is used to set the port number of the current port port.
roleレジスタは2bitで、現在のportポートの役割を設定することに用いられ、例えば、00がslaveを表し、01がmaster1を表し、02がmaster2を表し、11がmaster3を表す。 The role register is 2 bits and is used to set the role of the current port port. For example, 00 represents slave, 01 represents master1, 02 represents master2, and 11 represents master3.
cmd命令レジスタcmd_regは64bitで、命令レジスタを設定することに用いられ、上位の32bitが書き込みを表し、下位の32bitが読み取りを表す。 The cmd command register cmd_reg is 64 bits and is used to set the command register, with the upper 32 bits representing write and the lower 32 bits representing read.
edgeエッジ算出レジスタedge_regは32bitで、エッジ算出レジスタである。 The edge edge calculation register edge_reg is a 32-bit edge calculation register.
datacoversionデータ変換レジスタは2bitで、データ変換を設定することに用いられ、例えば、00及び11はデータ変換が不要であることを表し、01はバイナリからASCIIコードへの変換を表し、10はASCIIからバイナリへの変換を表す。 The data conversion data conversion register is 2 bits and is used to set the data conversion, for example, 00 and 11 indicate that no data conversion is required, 01 indicates conversion from binary to ASCII code, 10 indicates conversion from ASCII code. Represents a conversion to binary.
前記フレーミングモジュール4はシリアルポートからのデータを受信し、シリアルポートコントローラからフレームバイトデータを受信することに基づき、Profibus、PPI、Mewtocol(ASCII)、Modbus ASCII、Hostlink+FINS、Modbus RTU等のプロトコルのフレーミング機能を完成する。フレーミングモジュールからのものは完全なメッセージフレームであり、データインターフェースは8bitである。
The
図3に示すように、前記クロックリセットモジュール3はクロックモジュール及びリセットモジュールを含み、プロトコルマッピングに安定し且つ統一的なクロックソースを提供し、確定的データ伝送に基準ソースを提供し、プロトコルマッピングモジュールの正常実行に電源オン・オフシーケンス要件を提供する。
As shown in FIG. 3, the
ここで、前記クロックモジュールは、システム全体が125Mhzクロックフィールドにあり、バックプレーンの50Mクロックを使用してPLL周波数逓倍器により125Mhzのクロックを生成する。 Here, the clock module, the whole system is in the 125Mhz clock field and uses the 50M clock on the backplane to generate the 125Mhz clock by the PLL frequency multiplier.
リセットモジュールは、システム全体がハイレベルリセットを行い、クロックモジュールが1つの安定した125Mhzのクロック信号を生成する場合、locked信号がプルアップされ、且つクロックモジュールのlock信号を利用してカウントを行い、3Fまでカウントした場合、システム全体がハイレベルリセットを行う。 the reset module pulls up the locked signal when the entire system performs a high-level reset and the clock module generates a stable 125Mhz clock signal, and counts using the lock signal of the clock module; When counting to 3F, the entire system performs a high level reset.
図2に示すように、FPGAに基づく工業プロトコルマッピング方法であって、以下のステップS1~ステップS4を含み、
ステップS1では、mapformに基づきSLAVE IDを抽出し、具体的には、CPUは初期化する際に、先に基本マッピングフォーム(mapform)を設定し、該フォームのタイプはソースプロトコル位置、ソースプロトコルが占めるバイト数を含み、エントリーは構成マッピング命令、レジスタタイプ、データ、宛先アドレス等を含み、具体的なフォームの内容がユーザーにより定義され得、該マッピングフォームの深さが16であり、幅が24であり、前記フォームの初期化を完成した後、シリアルポートから抽出されたメッセージフレーム中の対応するデータを取り出し、且つ後のエッジ算出、データ変換のためにデータタイプをマーキングし、
ステップS2では、plctypeformに基づきSLAVE IDに対応するPLCタイプを検索し、次に基本マッピングフォーム(mapform)に基づきPLCのSLAVE IDを検索し、その後PLCのSLAVE IDに基づきPLCタイプのマッピングフォーム(plctypeform)を検索し現在のPLCタイプを取得し、PLCタイプに基づき、エッジ算出のフォームを検索し、且つフォーム中のCPUに設定されたedge_regデータと比較し、満足しない場合にパケットロスを行い、満足する場合に後段のバス交換モジュールに転送し、
ステップS3では、edge_regに基づきエッジ算出データを抽出し、具体的には、エッジ算出の対応するデータを取り出してエッジ算出モジュールに転送し、
ステップS4では、最後に、mapformのRAMからデータブロックを抽出する。
As shown in FIG. 2, an FPGA-based industrial protocol mapping method comprising the following steps S1 to S4,
In step S1, the SLAVE ID is extracted based on the mapform. Specifically, when the CPU is initialized, it first sets a basic mapping form (mapform), the type of the form is source protocol location, and the source protocol is Including the number of bytes occupied, entries include configuration mapping instructions, register types, data, destination addresses, etc. The content of the specific form can be defined by the user, the mapping form being 16 deep and 24 wide. after completing the initialization of the form, retrieve the corresponding data in the message frame extracted from the serial port, and mark the data type for later edge calculation and data conversion;
In step S2, retrieve the PLC type corresponding to the SLAVE ID based on the plctypeform, then retrieve the PLC SLAVE ID based on the basic mapping form (mapform), and then retrieve the PLC type mapping form (plctypeform) based on the PLC SLAVE ID. ) to obtain the current PLC type, search the form of edge calculation based on the PLC type, and compare with the edge_reg data set in the CPU in the form, perform packet loss if not satisfied, and satisfy transfer to the subsequent bus exchange module,
In step S3, edge calculation data is extracted based on edge_reg, specifically, the data corresponding to the edge calculation is extracted and transferred to the edge calculation module,
Finally, in step S4, data blocks are extracted from the mapform RAM.
本発明はデータ通信過程においてデータの重要性によって階層伝送することができ、高優先度のデータのリアルタイム性、信頼性及び正確度を確保する。 The present invention enables hierarchical transmission according to the importance of data in the data communication process, and ensures real-time, reliability and accuracy of high-priority data.
当業者であれば理解されるように、以上の説明は単に発明の好適な実例であり、発明を制限するためのものではなく、上記実例を参照して発明を詳しく説明したが、当業者であれば、依然として上記各実例に記載の技術案を修正し、又はその一部の技術的特徴を均等置換することができる。発明の主旨及び原則内に行われる修正、均等置換などはいずれも発明の保護範囲内に含まれるべきである。 It will be appreciated by those skilled in the art that the above description is merely a preferred illustration of the invention and is not intended to limit the invention, and that the invention has been described in detail with reference to the above examples. If so, the technical solutions described in the above examples can still be modified, or some of their technical features can be replaced by equivalents. Any modifications, equivalent substitutions, etc. made within the spirit and principle of the invention shall fall within the protection scope of the invention.
1 マッピングフォームモジュール
2 マッピングモジュール
3 クロックリセットモジュール
4 フレーミングモジュール
1
Claims (6)
前記FPGAチップには、マッピングモジュール(2)、マッピングフォームモジュール(1)、フレーミングモジュール(4)及びクロックリセットモジュール(3)が設けられ、前記クロックリセットモジュール(3)はマッピングモジュール(2)、マッピングフォームモジュール(1)、フレーミングモジュール(4)をそれぞれ接続して制御し、前記フレーミングモジュール(4)はシリアルポートからのデータを受信し、且つシリアルポートからフレームバイトデータを受信することで、プロトコルのフレーミングを完成し、メッセージフレームをマッピングモジュール(2)に出力し、前記マッピングモジュール(2)はマッピングフォームモジュール(1)に接続される
ことを特徴とするFPGAに基づく工業プロトコルマッピング構造。 In an FPGA-based industrial protocol mapping structure comprising a central processing unit (CPU) and an FPGA chip connected,
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), wherein the clock reset module (3) comprises a mapping module (2), a mapping The form module (1) and the framing module (4) are respectively connected and controlled, and the framing module (4) receives data from the serial port and receives frame byte data from the serial port to implement the protocol. An FPGA-based industrial protocol mapping structure, characterized in that it completes framing and outputs message frames to a mapping module (2), said mapping module (2) being connected to a mapping form module (1).
ことを特徴とする請求項1に記載のFPGAに基づく工業プロトコルマッピング構造。 Said mapping form module (1) comprises a PLC type mapping form plctypeform and a basic mapping form mapform, said basic mapping form mapform being used to indicate an address, a register type, a position in a frame of an instruction, said basic mapping form The mapform exists in the form of RAM, has a total of 16 entries, is 16 deep and 24 wide, said PLC type mapping form plctypeform has a total of 256 entries, The subnet supports access of up to 256 PLCs, and has a total of 4 types of mapping methods from 0 to 3. The PLC type mapping form plctypeform is the RAM 2. The FPGA-based industrial protocol mapping structure of claim 1, which exists in the form of a depth of 256 and a width of 3.
ことを特徴とする請求項1に記載のFPGAに基づく工業プロトコルマッピング構造。 The mapping module (2) includes a protocol type register, a port number register, a role register, a cmd command register, an edge edge calculation register and a data conversion register, wherein the protocol type register is used to set the protocol type, the port The number register is 4 bits and is used to set the port number of the current port port, the role register is 2 bits and is used to set the role of the current port port, and the cmd command register is 64 bits. is used to set the command register, the upper 32 bits represent writing and the lower 32 bits represent reading, the edge edge calculation register is 32 bits, and is used to store edge calculation data; The FPGA-based industrial protocol mapping structure as recited in claim 1, wherein the data conversion register is 2-bit and is used to set data conversion.
ことを特徴とする請求項1に記載のFPGAに基づく工業プロトコルマッピング構造。 The FPGA-based industrial protocol mapping structure according to claim 1, characterized in that said message frame is a complete message frame and the data interface between the framing module (4) and the mapping module (2) is 8bit. .
ことを特徴とする請求項1に記載のFPGAに基づく工業プロトコルマッピング構造。 The clock reset module (3) includes a clock module and a reset module, the clock module uses the 50M clock of the backplane to generate a 125Mhz clock through the PLL frequency multiplier, and the whole system Located in the clock field, the reset module causes the system to high-level reset, pulls up the locked signal of the clock module when the clock module generates a stable 125Mhz clock signal, and the lock signal of the clock module. The FPGA-based industrial protocol mapping structure of claim 1, wherein the counting is performed using , and the system performs a high-level reset when counting to 3F.
前記ステップS1では、CPUは初期化する際に、ユーザーのカスタムコンテンツに基づいて基本マッピングフォームmapformを設定し、該基本マッピングフォームmapformのタイプはソースプロトコル位置、ソースプロトコルが占めるバイト数を含み、エントリーは構成マッピング命令、レジスタタイプ、データ、宛先アドレスを含み、該基本マッピングフォームmapformの深さが16であり、幅が24であり、前記基本マッピングフォームmapformの初期化を完成した後、シリアルポートから抽出されたメッセージフレーム中の対応するデータを取り出し、且つ後のエッジ算出、データ変換のためにデータタイプをマーキングし、
前記ステップS2では、次に基本マッピングフォームmapformに基づきPLCのSLAVE IDを抽出し、その後、PLCのSLAVE IDに基づきPLCタイプのマッピングフォームplctypeformを検索し、現在のPLCタイプを取得し、PLCタイプに基づき、エッジ算出のフォームを検索し、且つフォーム中のCPUに設定されたedge_regデータと比較し、満足しない場合にパケットロスを行い、満足する場合に後段のバス交換モジュールに転送し、
前記ステップS3では、エッジ算出の対応するデータを取り出してエッジ算出モジュールに転送し、
前記ステップS4では、最後に、mapformのRAMからデータブロックを抽出する
ことを特徴とするFPGAに基づく工業プロトコルマッピング方法。 An FPGA-based industrial protocol mapping method, comprising the following steps S1 to S4,
In step S1, when the CPU initializes, it sets a basic mapping form mapform according to the user's custom content, the type of the basic mapping form mapform includes the source protocol location, the number of bytes occupied by the source protocol, and the entry contains the configuration mapping instruction, register type, data, destination address, the depth of said basic mapping form mapform is 16 and the width is 24, and after completing the initialization of said basic mapping form mapform, from the serial port retrieving the corresponding data in the extracted message frame and marking the data type for later edge calculation, data conversion;
In the step S2, next extract the SLAVE ID of the PLC based on the basic mapping form mapform, then search the PLC type mapping form plctypeform based on the SLAVE ID of the PLC, obtain the current PLC type, Based on this, search the edge calculation form and compare it with the edge_reg data set in the CPU in the form, perform packet loss if not satisfied, transfer to the subsequent bus switching module if satisfied,
In step S3, the data corresponding to the edge calculation is taken out and transferred to the edge calculation module;
The FPGA-based industrial protocol mapping method, wherein, in said step S4, finally, extracting data blocks from RAM of mapform.
Applications Claiming Priority (3)
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 | ||
PCT/CN2021/111767 WO2022247019A1 (en) | 2021-05-27 | 2021-08-10 | Industrial protocol mapping structure and method based on fpga |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2023533599A true JP2023533599A (en) | 2023-08-03 |
Family
ID=76455816
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2023508609A Pending JP2023533599A (en) | 2021-05-27 | 2021-08-10 | FPGA based industrial protocol mapping structure and method |
Country Status (3)
Country | Link |
---|---|
JP (1) | JP2023533599A (en) |
CN (1) | CN113031496B (en) |
WO (1) | WO2022247019A1 (en) |
Families Citing this family (1)
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)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006510332A (en) * | 2002-12-13 | 2006-03-23 | ザイリンクス インコーポレイテッド | Reconfiguring programmable logic in integrated circuits. |
CN103685292A (en) * | 2013-12-20 | 2014-03-26 | 哈尔滨工业大学 | Universal device and method for protocol conversion |
WO2018042767A1 (en) * | 2016-08-31 | 2018-03-08 | 株式会社ソシオネクスト | Bus control circuit, semiconductor integrated circuit, circuit substrate, information processing device, and bus control method |
CN108090005A (en) * | 2017-11-30 | 2018-05-29 | 安徽康海时代科技股份有限公司 | Four serial servers |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2527970C (en) * | 2003-06-18 | 2014-07-29 | Ambric, Inc | Integrated circuit development system |
CN102932613B (en) * | 2012-12-03 | 2015-09-02 | 广东威创视讯科技股份有限公司 | Based on analog video ADC automatic adjusting method and the device of FPGA |
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 |
EP3537627A1 (en) * | 2018-03-06 | 2019-09-11 | Eutelsat S.A. | Method for adaptive demodulation and system implementing such a method |
CN111556051A (en) * | 2020-04-26 | 2020-08-18 | 上海航天测控通信研究所 | High-speed space network data protocol conversion and multiplexing device based on FPGA |
CN113031496B (en) * | 2021-05-27 | 2021-09-21 | 之江实验室 | Industrial protocol mapping structure and method based on FPGA |
-
2021
- 2021-05-27 CN CN202110582550.9A patent/CN113031496B/en active Active
- 2021-08-10 JP JP2023508609A patent/JP2023533599A/en active Pending
- 2021-08-10 WO PCT/CN2021/111767 patent/WO2022247019A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006510332A (en) * | 2002-12-13 | 2006-03-23 | ザイリンクス インコーポレイテッド | Reconfiguring programmable logic in integrated circuits. |
CN103685292A (en) * | 2013-12-20 | 2014-03-26 | 哈尔滨工业大学 | Universal device and method for protocol conversion |
WO2018042767A1 (en) * | 2016-08-31 | 2018-03-08 | 株式会社ソシオネクスト | Bus control circuit, semiconductor integrated circuit, circuit substrate, information processing device, and bus control method |
CN108090005A (en) * | 2017-11-30 | 2018-05-29 | 安徽康海时代科技股份有限公司 | Four serial servers |
Also Published As
Publication number | Publication date |
---|---|
WO2022247019A1 (en) | 2022-12-01 |
CN113031496A (en) | 2021-06-25 |
CN113031496B (en) | 2021-09-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104641360B (en) | Bi-casting PCIe inbounds write-in to memory and peer device | |
US9025495B1 (en) | Flexible routing engine for a PCI express switch and method of use | |
CN101917316B (en) | Communication method and device for high-speed real-time industrial Ethernet | |
US8065455B2 (en) | Method for data communication of bus users in an open automation system | |
CN104636301B (en) | A kind of extensive PLC High speed rear panels bus system based on PCI E interfaces | |
CN204392269U (en) | A kind of full SDN High_speed NIC able to programme | |
CN111585862A (en) | Method and device for realizing network intercommunication between EtherCAT and TSN | |
CN104954198A (en) | Intelligent substation process layer exchanger state monitoring device and method | |
CN101963808A (en) | System supporting various field master protocols and implementation method thereof | |
JP2023533599A (en) | FPGA based industrial protocol mapping structure and method | |
CN108683536A (en) | The configurable double mode converged communication mechanism and its interface of asynchronous network-on-chip | |
CN100486224C (en) | Method and device for controlling ATM network flow based on FPGA | |
CN111510363A (en) | Slave station conversion device based on MODBUS protocol and control method thereof | |
CN103997448A (en) | Method and system for carrying out automatic configuration of transmission modes on basis of physical layer chip | |
CN106657115B (en) | Frequency converter control system and protocol conversion card thereof | |
CN101895462B (en) | Serial communication gateway | |
CN106168933A (en) | A kind of method realizing virtual dual-port shared drive based on high-speed serial communication | |
CN106980587A (en) | A kind of universal input output timing processor and sequential input and output control method | |
CN108415874B (en) | Interface expansion device and method based on EIM bus | |
CN101415027A (en) | Communication module based on HDLC protocol, and control method for data real time forwarding and storage | |
CN114721317B (en) | Network communication control system and method based on SPI controller | |
CN112698614B (en) | User side logic controller for reading and writing any byte | |
TW202215829A (en) | Aggregation of data for frames or disaggregation of data from frames | |
YunxiaJiang et al. | Design and implementation of CAN-bus experimental system | |
CN109408444A (en) | A kind of dedicated serial interface suitable for MEMS sensor signal processing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230207 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20230220 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230911 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20231207 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20240306 |