CN103149909A - Field programmable gate array (FPGA)-based controller area network (CAN) simulation node system - Google Patents
Field programmable gate array (FPGA)-based controller area network (CAN) simulation node system Download PDFInfo
- Publication number
- CN103149909A CN103149909A CN2013100613025A CN201310061302A CN103149909A CN 103149909 A CN103149909 A CN 103149909A CN 2013100613025 A CN2013100613025 A CN 2013100613025A CN 201310061302 A CN201310061302 A CN 201310061302A CN 103149909 A CN103149909 A CN 103149909A
- Authority
- CN
- China
- Prior art keywords
- node
- fpga
- simulation
- data
- module
- 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
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses a field programmable gate array (FPGA)-based controller area network (CAN) simulation node system, which comprises an FPGA node module used for simulating node equipment, a CAN controller which bidirectionally communicates with the FPGA node module, a CAN transceiver which bidirectionally communicates with the CAN controller, node equipment connected with the CAN transceiver through a CAN bus, and an upper computer which communicates with the FPGA node module through RS422. According to the FPGA-based CAN simulation node system, the advantages of FPGA simulation can be utilized, and simulation nodes which are real, high in flexibility and cheap are established according to requirements to simulate each application system. The simulation nodes are constructed through an FPGA, the flexibility is high, software and hardware can be constructed according to different node equipment requirements, and the cost is saved because logical resource in the FPGA is rich, a plurality of nodes can be simulated and the resource utilization rate is improved.
Description
Technical field
The present invention relates to CAN simulation node system, more particularly, relate to a kind of CAN simulation node system based on FPGA.
Background technology
The Controller Area Network of controller local area network is called for short CAN, is by research and development and produces automobile electronics famous German BOSCH companies and developed, and finally become international standard, is one of most widely used fieldbus in the world.In North America and West Europe, the CAN bus protocol has become the STD bus of Computer Controlled System for Vehicle and built-in industrial control area net(CAN), and has the J1939 agreement that aims at high capacity waggon and the design of heavy industry motor vehicles and machines take CAN as underlying protocol.Its dcs that appears as realizes that real-time between each node, data communication reliably provides strong technical support.
Be that field programmable gate array is called for short FPGA, it is the product that further develops on the basis of the programming devices such as PAL, GAL, CPLD.System designer can be as required by editable the connection logical block of FPGA inside being coupled together, just look like that a breadboard has been placed in a chip.The logical block of a finished product FPGA after dispatching from the factory can change according to the deviser with being connected, so FPGA can complete needed logic function.FPGA controls because possess interface, function IP, and therefore the characteristics such as built-in with CPU are had ready conditions and are realized the system product of the high and complete function of state of cure.
The CAN bus network needs each node device and main control equipment are tested before dropping into and using, to determine that each equipment can normally move in network, and can and miscellaneous equipment carry out proper communication, and in time solve the problem that may exist in the CAN use, produce the assessment of peak load, networking hardware performance requirement etc. when requiring to send at one time as several messages.If first all physical devices are connected into network, and with equipment by putting into system, and then test, the problem of generation may be: change different node devices and carry out test job and be inconvenient to carry out; Each node device work of debugging configuration is loaded down with trivial details; If just to the performance of testing main control equipment or one of them node device, testing cost is too high etc.In a word, dumb, also not quick by testing after the access real network, therefore need to carry out emulation testing by building emulation platform.
Build the actual emulation platform of simulation and can further improve dirigibility, also can the simulate true environment.As China Patent No. be " based on the body control system emulation test system of CAN bus " of " 201210154883.2 ", this simulated environment can be easily with body electronics equipment or simulation vehicle body equipment connection to system or repel outside system, reach the purpose of bodywork system testing of equipment.Yet being this analoglike system, shortcoming still needs a large amount of physical devices, if only one or two equipment is carried out network test, high cost.Whole framework is for the vehicle electronics network design, for other industrial control equipment networks and not bery applicable in addition.
In order to adapt to the automatic control system emulation needs of multiple different field, what generally adopt is that ordinary PC is as the emulator of sensor, actuator and man-machine keying and the display interface of various automatic control system, form emulation platform, simulate various different application systems by the emulation PC.Yet the shortcoming of this traditional method is each node, CAN controller, CAN transceiver, microprocessor and four functional modules of emulation PC must be arranged, so not only system cost is larger, and the work such as platform building, configuration is loaded down with trivial details, is not suitable for carrying out effectively rapidly simulation work.In addition, between the needs for the real hardware environmental simulation, some simulation softwares such as CANoe etc. are because more application in the emulation of virtual environment and the whole network that has existed is carried out monitoring work, can't meet the demands.
Summary of the invention
For the defective that exists in prior art, the purpose of this invention is to provide a kind of can be in real time, at a high speed, reliably, the cheap CAN simulation node system based on FPGA.
For achieving the above object, the present invention adopts following technical scheme:
A kind of CAN simulation node system based on FPGA comprises:
The FPGA node module, it is used for analog node equipment;
The CAN controller, itself and described FPGA node module are realized both-way communication;
The CAN transceiver, itself and described CAN controller are realized both-way communication;
Node device, it is connected with described CAN transceiver by the CAN bus;
Host computer, it is communicated by letter with the FPGA node module by RS422.
Described FPGA node module is soft-core processor, described soft-core processor comprises that processing unit, described processing unit realize both-way communication with on-chip memory, CAN interface control unit and UART interface control unit respectively, described UART control module is connected with described host computer, and described CAN interface control unit is connected with described CAN controller.
Described CAN interface control unit comprises:
CAN interface control unit processing module;
The FIFO that is used for the inter-process data, it sends the data processing signals to described CAN interface control unit processing module;
The FIFO that is used for the external echo data receives the external echo data-signal that described CAN interface control unit processing module sends.
The quantity of described node device is in 16.
The work of described CAN simulation node system is mainly configuration section and operation part,
Described configuration section comprises:
1) be configured by described host computer or the FPGA node module chip to CAN controller and CAN transceiver, chip initiation, the mode of operation of CAN controller and CAN transceiver are selected and the processing of transmitting-receiving message;
2) download node device data type, to specify data length, data content type, the transmission Gap response time of the node device data that need storage, afterwards the node device data are stored in the FPGA node module;
Described operation part comprises:
Described FPGA node module constantly detects remote frame on the CAN bus, and in the node device of simulating in pair system, any one carries out the instruction that data send or ask if having, and carries out.
Compared with prior art, adopt a kind of CAN simulation node system based on FPGA of the present invention, can utilize the advantage of FPGA emulation, build as required real, dirigibility is high, and cheap simulation node is simulated each application system again.Utilize FPGA to come the constructive simulation node, not only dirigibility is large, can also require to construct software and hardware according to different node devices, has saved cost, and this is because FPGA internal logic aboundresources can be simulated a plurality of nodes, has improved resource utilization.
Description of drawings
Fig. 1 is the principle schematic of embodiments of the invention;
Fig. 2 is the principle schematic of the FPGA node module in Fig. 1;
Fig. 3 is the principle schematic of the CAN interface control unit in Fig. 2;
Fig. 4 is the system configuration process flow diagram of embodiments of the invention;
Fig. 5 is the working-flow figure of embodiments of the invention.
Embodiment
Further illustrate technical scheme of the present invention below in conjunction with accompanying drawing and embodiment.
Embodiment
See also a kind of CAN simulation node system based on FPGA shown in Figure 1, comprising:
The FPGA node module, it is used for analog node equipment;
The CAN controller, itself and described FPGA node module are realized both-way communication, can adopt the SJA1000 chip of PHILIPS Co.;
The CAN transceiver, itself and described CAN controller are realized both-way communication;
Node device A, B, C, it is connected with described CAN transceiver by the CAN bus;
Host computer, it is communicated by letter with the FPGA node module by the RS422 interface.
The FPGA node module is surveyed data, read/write signal and the look-at-me etc. that CAN transceiver and controller transmit, and extracts the corresponding node address, requires to receive or send instruction and data on described CAN transceiver and controller according to reading or writing.
Shown in Figure 2 again, wherein the FPGA node module is soft-core processor, described soft-core processor comprises that processing unit, described processing unit realize both-way communication with on-chip memory, CAN interface control unit and UART interface control unit respectively, described UART control module is connected with described host computer, and described CAN interface control unit is connected with described CAN controller.
Processing unit is analyzed outside request msg, calls on-chip memory corresponding address data, and sends it to the CAN interface control unit.Processing unit also is responsible for processing host computer by the request msg of RS422 communication interface in addition.
On-chip memory has been stored system program on the one hand, has stored on the other hand the information such as data type, data of simulation node equipment, and with the identifier of address as each node.
The configuration effort of UART interface control unit is mainly Data Update, and the data type of renewal has: data length, data content, transmission Gap response time etc.
The UART interface control unit mainly is responsible for the configuration of RS422, and with the host computer data communication.Wherein configuration effort is mainly Data Update, and the data type of renewal has: data length, data content, transmission Gap response time etc.During configuration, all data types of several nodes are configured.
CAN controller and transceiver obtain on the CAN bus after data, send data to described FPGA node module, obtain data from described FPGA node module simultaneously and are sent on the CAN bus.
In Fig. 1, the CAN transceiver has port CAN-L and port CAN-H, and port CAN-L and port CAN-H can hang on the CAN bus as system's external interface, also can be connected with the miscellaneous equipment with CAN interface.
Shown in Figure 3 again, wherein the CAN interface control unit comprises:
CAN interface control unit processing module;
The FIFO that is used for the inter-process data, it sends the data processing signals to described CAN interface control unit processing module;
The FIFO that is used for the external echo data receives the external echo data-signal that described CAN interface control unit processing module sends.
The work of CAN interface control unit mainly contains SJA1000 chip configuration, interrupt response and data buffer storage.
The action of CAN interface control unit comprises:
CAN SJA1000Controler chip configuration.
Interrupt response, the response time is 50us.
Data buffer storage is realized the storage of external echo data and inter-process data by two FIFO.
Need to prove, the quantity of node device is conducive to the operation of system most like this in 16.
See also again Fig. 4, shown in Figure 5, the operation of CAN simulation node of the present invention system is mainly configuration section and operation part, first CAN SJA1000Controler and CAN transponder chip are configured during configuration, configuration effort comprises the processing of chip initiation, mode of operation selection and transmitting-receiving message etc.Then download the node data type, with the data length of the node data that specify to need storage, data content type, transmission Gap response time etc., afterwards node data is stored in system.Configuration phase or even operation phase can be carried out renewal work to system configuration by host computer, if the config update request is arranged, comprise chip configuration adjustment, node type modification etc., and system all can carry out Reconfigurations and process.
Runtime system constantly detects remote frame on the CAN bus, if any one instruction of carrying out the data transmission or asking of 16 nodes of simulating in pair system is arranged, carries out.From the receiving remote frame to output data frame, need to be arranged the response time, the response time can be regulated at configuration phase, and scope is that 100us is to 1s.Frame period, namely sending 1 frame is also adjustable to the time that sends lower 1 frame, scope is from 100us to 20ms.
The present invention can be more convenient flexibly and fast to main control equipment in the CAN network and the work of other actual node testing equipments, can work in real network environment to guarantee these equipment.Compare with testing after real network by access, saved the time of building network and each equipment of debugging, reduced testing cost; The emulation platform actual with building simulation tested and compared, and the scope of application is more extensive; Compare the simulation hardware better authenticity with testing by the various node devices of ordinary PC software emulation.
In a word, the object of the present invention is to provide a kind of CAN simulation node system based on FPGA, carry out data configuration according to each node device needs.During system works, by continuous detection remote frame, obtain data from the CAN bus, obtain node address and instruction from Frame, send data to after processing on the CAN bus, provide information with other node device or main control equipment on the CAN bus.
Those of ordinary skill in the art will be appreciated that, above embodiment illustrates purpose of the present invention, and be not as limitation of the invention, as long as in essential scope of the present invention, all will drop in the scope of claim of the present invention variation, the modification of the above embodiment.
Claims (5)
1. the CAN simulation node system based on FPGA, is characterized in that, comprising:
The FPGA node module, it is used for analog node equipment;
The CAN controller, itself and described FPGA node module are realized both-way communication;
The CAN transceiver, itself and described CAN controller are realized both-way communication;
Node device, it is connected with described CAN transceiver by the CAN bus;
Host computer, it is communicated by letter with the FPGA node module by RS422.
2. CAN simulation node according to claim 1 system is characterized in that:
Described FPGA node module is soft-core processor, described soft-core processor comprises that processing unit, described processing unit realize both-way communication with on-chip memory, CAN interface control unit and UART interface control unit respectively, described UART control module is connected with described host computer, and described CAN interface control unit is connected with described CAN controller.
3. CAN simulation node according to claim 2 system, is characterized in that, described CAN interface control unit comprises:
CAN interface control unit processing module;
The FIFO that is used for the inter-process data, it sends the data processing signals to described CAN interface control unit processing module;
The FIFO that is used for the external echo data receives the external echo data-signal that described CAN interface control unit processing module sends.
4. CAN simulation node according to claim 1 system is characterized in that:
The quantity of described node device is in 16.
5. the described CAN simulation node of any one system according to claim 1-4 is characterized in that:
The work of described CAN simulation node system is mainly configuration section and operation part,
Described configuration section comprises:
1) be configured by described host computer or the FPGA node module chip to CAN controller and CAN transceiver, chip initiation, the mode of operation of CAN controller and CAN transceiver are selected and the processing of transmitting-receiving message;
2) download node device data type, to specify data length, data content type, the transmission Gap response time of the node device data that need storage, afterwards the node device data are stored in the FPGA node module;
Described operation part comprises:
Described FPGA node module constantly detects remote frame on the CAN bus, if having in the node device of simulation, any one carries out the instruction that data send or ask, carries out.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013100613025A CN103149909A (en) | 2013-02-27 | 2013-02-27 | Field programmable gate array (FPGA)-based controller area network (CAN) simulation node system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013100613025A CN103149909A (en) | 2013-02-27 | 2013-02-27 | Field programmable gate array (FPGA)-based controller area network (CAN) simulation node system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103149909A true CN103149909A (en) | 2013-06-12 |
Family
ID=48548050
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013100613025A Pending CN103149909A (en) | 2013-02-27 | 2013-02-27 | Field programmable gate array (FPGA)-based controller area network (CAN) simulation node system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103149909A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103428050A (en) * | 2013-08-15 | 2013-12-04 | 上海固泰科技有限公司 | Multipath CAN (controller area network) simulation system based on CAN bus |
CN103746865A (en) * | 2013-12-20 | 2014-04-23 | 苏州同元软控信息技术有限公司 | Node application layer equipment simulation testing system in CAN communication system |
CN104954215A (en) * | 2015-07-29 | 2015-09-30 | 天津市英贝特航天科技有限公司 | CAN bus circuit |
CN112865996A (en) * | 2019-11-28 | 2021-05-28 | 北京国电智深控制技术有限公司 | Equipment testing method and system based on simulation card and simulation card |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7424416B1 (en) * | 2004-11-09 | 2008-09-09 | Sun Microsystems, Inc. | Interfacing hardware emulation to distributed simulation environments |
CN101777085A (en) * | 2009-12-30 | 2010-07-14 | 哈尔滨工业大学 | Small satellite signal processing unit work process simulation method, device and work method of logic state machine in device |
-
2013
- 2013-02-27 CN CN2013100613025A patent/CN103149909A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7424416B1 (en) * | 2004-11-09 | 2008-09-09 | Sun Microsystems, Inc. | Interfacing hardware emulation to distributed simulation environments |
CN101777085A (en) * | 2009-12-30 | 2010-07-14 | 哈尔滨工业大学 | Small satellite signal processing unit work process simulation method, device and work method of logic state machine in device |
Non-Patent Citations (1)
Title |
---|
赵光权,等: "小卫星通用模拟器设计", 《仪器仪表学报》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103428050A (en) * | 2013-08-15 | 2013-12-04 | 上海固泰科技有限公司 | Multipath CAN (controller area network) simulation system based on CAN bus |
CN103746865A (en) * | 2013-12-20 | 2014-04-23 | 苏州同元软控信息技术有限公司 | Node application layer equipment simulation testing system in CAN communication system |
CN104954215A (en) * | 2015-07-29 | 2015-09-30 | 天津市英贝特航天科技有限公司 | CAN bus circuit |
CN112865996A (en) * | 2019-11-28 | 2021-05-28 | 北京国电智深控制技术有限公司 | Equipment testing method and system based on simulation card and simulation card |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108595353B (en) | PCIe bus-based data transmission control method and device | |
CN112416840B (en) | Remote mapping method, device, equipment and storage medium for computing resources | |
CN108228513B (en) | Intelligent serial port communication device based on FPGA framework | |
CN104702474A (en) | FPGA (Field Programmable Gate Array)-based EtherCAT (Ethernet Control Automation Technology) main station device | |
US20140343915A1 (en) | Test environment configuration apparatus and method of operating network simulation apparatus using same | |
CN101963798B (en) | Embedded-type rail transit station equipment information collection method | |
CN105490876A (en) | Method for automatic testing of server performance through packet sending linkage and concurrent monitoring | |
CN104714907B (en) | A kind of pci bus is converted to ISA and APB bus design methods | |
CN103149909A (en) | Field programmable gate array (FPGA)-based controller area network (CAN) simulation node system | |
CN103713940A (en) | Method for reconfigurable distributed real-time simulation based on RTX-HLA reflection storage card | |
CN104142876A (en) | Function verification method and verification environmental platform for USB (universal serial bus) equipment controller modules | |
CN102291337B (en) | Gateway for switching communication based on EtherCAT (Ethernet for Control and Automation Technology) protocol and Profibus-DP (Process Field Bus-Decentralized Periphery) protocol and communication method thereof | |
CN204733178U (en) | A kind of EtherCAT master station device based on FPGA | |
CN101876825B (en) | Human-computer interface device of small PLC | |
CN102033540B (en) | System for testing automobile instrument with a controller area network (CAN) bus and testing method thereof | |
CN105487403A (en) | Establishment of motion control system based on CAN and simulation modeling method | |
CN110727420A (en) | Serial port compatible method and system | |
CN110098989A (en) | A kind of multichannel CAN analogue system and test method based on CANFD bus | |
CN102436186B (en) | Performer simulator and satellite closed loop simulation system with performer simulator | |
CN104734900A (en) | Sending control method for communication protocol testing | |
CN203754167U (en) | Handheld terminal for elevator debugging and maintenance | |
CN116074397A (en) | Data sharing system | |
CN113609052A (en) | Chip simulation system based on FPGA and microprocessor and implementation method | |
CN105138390B (en) | Apply the real-time data communication system and method between process monitoring control system and simulation support svstem | |
CN103246607B (en) | The emulation test method of aerial camera address bit pattern communication interface |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20130612 |