CN108845537A - The communication means of CPU and digital logic module in PLC system based on SOC FPGA - Google Patents
The communication means of CPU and digital logic module in PLC system based on SOC FPGA Download PDFInfo
- Publication number
- CN108845537A CN108845537A CN201810585378.0A CN201810585378A CN108845537A CN 108845537 A CN108845537 A CN 108845537A CN 201810585378 A CN201810585378 A CN 201810585378A CN 108845537 A CN108845537 A CN 108845537A
- Authority
- CN
- China
- Prior art keywords
- data
- fpga
- cpu
- digital logic
- communication means
- 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
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/05—Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
- G05B19/054—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/10—Plc systems
- G05B2219/11—Plc I-O input output
- G05B2219/1103—Special, intelligent I-O processor, also plc can only access via processor
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Multi Processors (AREA)
Abstract
The present invention provides the communication means of CPU and digital logic module in a kind of PLC system based on SOC FPGA, it is related to field of communication technology, it is processor bus from equipment that FPGA digital logic, which is arranged, in the present invention, and building controls register and data storage area wherein, CPU is written and read these registers and memory block by data/address bus according to particular order, to realize the reliable communication with fpga logic, the control to PLC I/O device is then completed.
Description
Technical field
The present invention relates to CPU in field of communication technology more particularly to a kind of PLC system based on SOC FPGA and Digital Logic mould
The communication means of block.
Background technique
Programmable logic controller (PLC)(PLC)It is a kind of general automatic control dress developed exclusively for industry automatic control
It sets.It has the characteristics that simple, easy to use high reliablity, programming, perfect in shape and function, versatility are good, and has online modification function
Can, the demand in current industrial field is met well.
CPU and PLC chip are mostly discrete device in existing PLC system, and communication mode depends on device itself and mentions
The interface of confession, therefore data transmission format is relatively fixed, to cause on communication efficiency and flexibility that there are some problems.Base
Data processing is carried out using stone CPU part in the PLC system of SOC FPGA, and is carried out data transmission using FPGA, by setting
The communication mode between CPU and fpga logic is set, system configuration scalability with higher can be made, and have high efficiency, Gao Ke concurrently
The advantages of by property, the problem that task switching is complicated in traditional PLC structure that can forgo, file storage and network transmission are cumbersome.
But the distinctive flexible and changeable feature of SOC FPGA can be brought to the communication process between CPU and FPGA digital logic
Unstable risk, existing communication plan is although varied, but specific aim is not strong, is not well positioned to meet PLC system
Demand, therefore need a set of efficient and rational scheme and solve the problems, such as this.
Summary of the invention
In order to solve the above technical problems, the invention proposes CPU in a kind of PLC system based on SOC FPGA and number
The communication means of logic module, to solve the reliability and flexibility that occur when CPU passes through bus communication with FPGA digital logic
Problem.
The technical scheme is that:
The communication means of CPU and digital logic module in a kind of PLC system based on SOC FPGA,
Slave equipment of the FPGA digital logic as processor data bus is set, and construct inside it one group of control register and
Data storage area, wherein the I/O device of the corresponding PLC work station in each data storage area.
CPU as bus main equipment control FPGA digital logic, when CPU wish by FPGA digital logic module to
When some I/O device sends data, the control register that can be inquired in FPGA is confirmed whether that data transmit-receive can be carried out.
If not can be carried out, inquired again after waiting for a period of time.
If can carry out, by bus, into FPGA digital logic, data to be sent are written in corresponding data storage area,
After the completion of the write-in of all data, the control register being reconfigured in FPGA issues the data;When fpga logic receives certain IO
When the data of equipment, it is deposited into corresponding data storage area, after the completion of all data transmit-receives, then relevant control is modified and posts
Storage states sign off.
When CPU inquires the data transfer ends of register discovery FPGA, i.e., the data are read.
By the above process, the integrality that ensure that data transmit-receive realizes the reliable of CPU and FPGA digital logic part
Transmission, then realizes the stabilized communication with I/O device.
Detailed description of the invention
Fig. 1 is PLC word station hardware structure chart;
Fig. 2 is bus system explanatory diagram.
Specific embodiment
More detailed elaboration is carried out to the contents of the present invention below:
This method constructs enough data storage areas in FPGA digital logic and control is arranged according to the quantity of external I/O device
Register, CPU is realized by reading and writing the data of memory block and register according to particular order described below and fpga logic
The communication with I/O device is then realized in partial communication.
The structure of PLC system is as shown in Figure 1,1 PLC word station hardware system includes that 1 control equipment and N number of IO are set
It is standby, equipment is controlled using SOC FPGA as core, and control register and data storage area are constructed in FPGA digital logic, wherein
The corresponding I/O module in each data storage area, CPU pass through bus marco FPGA number as shown in Figure 2 as main control device
Logic, FPGA digital logic receive CPU control as bus peripheral hardware, and the data forwarding that CPU is issued is to each I/O module, together
When collect the data of I/O module and be uploaded to CPU.
The specific transmitting-receiving process of data is as follows:
CPU inquires " working condition register ", and whether confirmation FPGA digital logic can receive the control command sum number of CPU
According to indicating to receive if FPGA is in idle condition, step can be carried out, otherwise wait for FPGA and enter idle state;
Data to be sent are written to corresponding " data storage area " by CPU;
CPU is to " sending buffer status register " write state flag data, to indicate depositing in which " data storage area "
In valid data;
Enabled instruction is written to " work starting register " in CPU;
FPGA digital logic resets " work starting register ", " finishing receiving register " first and " receives buffer status at this time
Register ", while determining there are data to be sent in which data storage area according to " sending buffer status register ", then open
The valid data sent in corresponding data memory block are originated, juxtaposition " working condition register " is busy state, and data are transmitted across
The operational order and data that CPU is issued no longer are responded in journey.It, will " hair when the data of a certain " data storage area " are sent completely
Send buffer status register " correspond to bit clearings.
After data when a certain " data storage area " issue, before receiving the reply of I/O device, FPGA digital logic mould
Block will always be in replying wait state, not retransmit the data in next " data storage area ".When receiving reply data
Afterwards, it is 1 that FPGA digital logic, which will set in " receive buffer status register " bit corresponding with the memory block, and is started next
The transmitting-receiving process of a " data storage area ".After waiting time-out(Timeout requirements are 1ms), " reception is slow for FPGA digital logic setting
Deposit status register " in bit corresponding with the memory block be 0, and the transmitting-receiving of next " data storage area " will be made a forcible entry into
Journey.
After all " data storage area " poll transmitting-receiving processes, FPGA digital logic sets " finishing receiving register "
It is 1, indicates to complete data transmit-receive, juxtaposition " working condition register " is idle state, and waiting for CPU is read;
It, can root after the completion of CPU poll " working condition register " and " finishing receiving register " confirmation data transmit-receive process
Data mode is confirmed according to the instruction of " receiving buffer status register " and reads the content of needs;
CPU " will finish receiving register " after the completion of reading and reset.
Claims (7)
1. the communication means of CPU and digital logic module in the PLC system based on SOC FPGA, which is characterized in that
In SOC system, slave equipment of the FPGA digital logic as processor data bus is set, and construct wherein one group it is special
Control register and data storage area;CPU controls FPGA digital logic as the main equipment of bus, in sequence by total
Line Read-write Catrol register and data storage area realize the reliable communication with FPGA digital logic, then complete to set PLC IO
Standby control.
2. communication means according to claim 1, which is characterized in that
Main equipment of the CPU as processor data bus in SOC FPGA, FPGA digital logic is as bus slave, the two
It is communicated by bus.
3. communication means according to claim 1, it is characterized in that be,
Building controls register so that CPU is controlled in FPGA digital logic, and the sky of 4Byte is assigned with for each register
Between.
4. communication means according to claim 1, which is characterized in that
Data storage area is constructed in FPGA digital logic to cache the data from CPU and I/O device;It is every on PLC work station
The data space of the corresponding 512KB of one I/O device, the data that CPU write enters the space can be forwarded to corresponding equipment,
Data from the equipment can be stored to this space for CPU reading.
5. communication means according to claim 1, which is characterized in that when CPU wish by FPGA digital logic module to
When some I/O device sends data, the control register in FPGA is first inquired, is confirmed whether to be able to carry out data transmission;If cannot
Data transmission is carried out, then is inquired again after waiting;If being able to carry out data transmission, FPGA number is written by bus in data
Corresponding data storage area in logic, the control register being reconfigured in FPGA issue the data.
6. communication means according to claim 1, which is characterized in that when the control register in CPU configuration FPGA should
After data issue, the data in data storage area can be sent to corresponding I/O device and write the return information of the I/O device by FPGA
Go back to respective storage areas.
7. communication means according to claim 1, which is characterized in that after fpga logic completes all data transmit-receives, repair
Change relevant control register to inquire for CPU;When the data transmit-receive that CPU inquires register confirmation FPGA is completed, which is read
Out.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810585378.0A CN108845537A (en) | 2018-06-08 | 2018-06-08 | The communication means of CPU and digital logic module in PLC system based on SOC FPGA |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810585378.0A CN108845537A (en) | 2018-06-08 | 2018-06-08 | The communication means of CPU and digital logic module in PLC system based on SOC FPGA |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108845537A true CN108845537A (en) | 2018-11-20 |
Family
ID=64210309
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810585378.0A Pending CN108845537A (en) | 2018-06-08 | 2018-06-08 | The communication means of CPU and digital logic module in PLC system based on SOC FPGA |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108845537A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110427634A (en) * | 2019-05-17 | 2019-11-08 | 西南交通大学 | The communication system and its construction method of reaction system are realized based on FPGA |
CN111831330A (en) * | 2020-07-10 | 2020-10-27 | 深圳致星科技有限公司 | Heterogeneous computing system device interaction scheme for federated learning |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1316153A (en) * | 1999-05-19 | 2001-10-03 | 索尼公司 | Communication method, communication device, communication system and providing medium |
CN103823447A (en) * | 2014-03-04 | 2014-05-28 | 北京七星华创电子股份有限公司 | Communication method and communication system of upper and lower computers of semiconductor equipment |
CN105117319A (en) * | 2015-08-25 | 2015-12-02 | 烽火通信科技股份有限公司 | Method for realizing real-time monitoring of multi-channel MDIO (Management Data Input Output) devices based on FPGA |
CN105137903A (en) * | 2015-06-29 | 2015-12-09 | 山东超越数控电子有限公司 | Method for realizing PLC operation environment in SocFPGA |
CN107783926A (en) * | 2016-08-28 | 2018-03-09 | 南京理工大学 | The communication means of FPGA and PC based on PowerPC and network interface |
-
2018
- 2018-06-08 CN CN201810585378.0A patent/CN108845537A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1316153A (en) * | 1999-05-19 | 2001-10-03 | 索尼公司 | Communication method, communication device, communication system and providing medium |
CN103823447A (en) * | 2014-03-04 | 2014-05-28 | 北京七星华创电子股份有限公司 | Communication method and communication system of upper and lower computers of semiconductor equipment |
CN105137903A (en) * | 2015-06-29 | 2015-12-09 | 山东超越数控电子有限公司 | Method for realizing PLC operation environment in SocFPGA |
CN105117319A (en) * | 2015-08-25 | 2015-12-02 | 烽火通信科技股份有限公司 | Method for realizing real-time monitoring of multi-channel MDIO (Management Data Input Output) devices based on FPGA |
CN107783926A (en) * | 2016-08-28 | 2018-03-09 | 南京理工大学 | The communication means of FPGA and PC based on PowerPC and network interface |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110427634A (en) * | 2019-05-17 | 2019-11-08 | 西南交通大学 | The communication system and its construction method of reaction system are realized based on FPGA |
CN110427634B (en) * | 2019-05-17 | 2022-08-02 | 西南交通大学 | Communication system for realizing reaction system based on FPGA and construction method thereof |
CN111831330A (en) * | 2020-07-10 | 2020-10-27 | 深圳致星科技有限公司 | Heterogeneous computing system device interaction scheme for federated learning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100541412C (en) | Memory storage | |
CN103198043B (en) | A kind of improved AHB to APB bus bridge and control method thereof | |
CN102141971B (en) | 1553B hardware timed communication module with high-capacity storage function | |
CN203705861U (en) | Multi-serial port parallel processing framework based on FPGA | |
CN100407185C (en) | Host apparatus, apparatus unit, communication system and method for data transmitting/receiving | |
CN102446158A (en) | Multi-core processor and multi-core processor set | |
CN103218337A (en) | SoC (System on Chip) and method for realizing communication between master modules and between slave modules based on wishbone bus | |
CN108845537A (en) | The communication means of CPU and digital logic module in PLC system based on SOC FPGA | |
CN109656851B (en) | System with time determination and comprising multiple high-speed bus channels and shared interface | |
CN109308283A (en) | A kind of SoC system on chip and its peripheral bus switching method | |
CN101452430B (en) | Communication method between multi-processors and communication device comprising multi-processors | |
CN102263698A (en) | Method for establishing virtual channel, method of data transmission and line card | |
CN102065568A (en) | Data descriptor-based medium access control (MAC) software and hardware interaction method and hardware realization device | |
CN102567278A (en) | On-chip multi-core data transmission method and device | |
CN102981801A (en) | Conversion method and device of local bus data bit wide | |
CN101656658B (en) | Method and device for improving dequeuing efficiency in queue management | |
CN201673402U (en) | Controller of decentralized control system | |
CN101901199A (en) | Method and system for data transparent transmission | |
CN101251831B (en) | Mobile memory supporting master-salve equipment interchange and method of master-salve equipment interchange | |
CN207182023U (en) | The network control board and modular instrument for being controlled and being communicated based on network | |
CN102622319B (en) | Data exchange system of high-speed storage interface IP (Internet Protocol) core based on MPMC (Multi-Port Memory Controller) | |
CN103106177A (en) | Chip interconnection structure and chip interconnection method of multi-core network processor | |
KR100736902B1 (en) | Method and apparatus for sharing memory by a plurality of processors | |
CN109491949A (en) | Dynamic reconfigurable frame and method based on Zynq | |
CN1662007B (en) | System for controlling household digital equipment based on wireless |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181120 |
|
RJ01 | Rejection of invention patent application after publication |