A kind of RTDS emulating instruments and the method for PCI-Express fast exchange data
Technical field
The present invention relates to method for interchanging data technical field, more particularly to a kind of RTDS emulating instruments and PCI-Express are quick
The method for exchanging data.
Background technology
RTDS is current most widely used electro-magnetic transient real-time simulation instrument, and it can set up the emulation of electric power primary system
Model, and be connected with outside experimental rig closed loop, so as to verify the performance of outside experimental rig.
The interface of outside experimental rig and RTDS, mainly there is two kinds of forms:The first is traditional analog quantity and switching value,
Second is the network interface for meeting IEC61850.RTDS can provide both interface shapes, easily can be tried with outside
Experiment device is connected.
But if the number of channels needed is a lot, traditional analog quantity and switching value mode is very limited;If needed
Want communication speed quickly, IEC61850 network interface can not meet requirement.
When external device (ED) is developed, require that external device (ED) has substantial amounts of physical interface using first way;Adopt
Require that external device (ED) possesses IEC61850 protocol stacks with the second way, and traffic rate also not necessarily meets and required.
Therefore, in view of the shortcomings of the prior art, providing a kind of method of RTDS emulating instruments and PCI-Express fast exchange data
To overcome prior art not enough very necessary.
The content of the invention
A kind of RTDS emulating instruments and PCI-Express are provided it is an object of the invention to avoid the deficiencies in the prior art part
The method of fast exchange data, the RTDS emulating instruments and the method for PCI-Express fast exchange data transfer MGT optical fiber interfaces
For PCI-Express, the network capacity amount of PCI-Express is big, and each simulation step length can be carried out data exchange in transfer process, improves
Simulation frequency, number of channels is more, it is to avoid the copy of data, so as to minimize transmission delay.
The above-mentioned purpose of the present invention is realized by following technological means.
A kind of method for providing RTDS emulating instruments and PCI-Express fast exchange data, is provided with interconnecting module, switching model
The MGT optical fiber interfaces switching of PB5 processors in RTDS emulating instruments is PCI-Express by block, and PCI-Express is by gigabit network cable and outside
Part device is connected;
Interconnecting module includes Zero-copy data transmission unit and PHY ethernet physical layer interfaces, and Zero-copy data transmission is single
Transmitted after the high-speed serial data processing that member exports MGT optical fiber interfaces to PHY ethernet physical layer interfaces.
Specifically, Zero-copy data transmission unit includes SER/DES modular converters, DRRAM memories and MAC ether
FidonetFido interface, DRRAM memories are dual interface memory, and DRRAM memories enter the data that SER/DES modular converters are exported
Row buffering, DPRAM memories directly exchange data by DMA data transfer mode with MAC Ethernet protocol interfaces.
Further, the converting high-speed serial that SER/DES modular converters export MGT optical fiber interfaces is parallel data.
Further, DRRAM memories are electrically connected with SER/DES modular converters and MAC Ethernet protocols interface to be two-way.
Specifically, SER/DES modular converters are divided into external interface unit, control unit, SER receiving units and DES
Transmitting element;
DPRAM points are Rx DPRAM memory cell and Tx DPRAM memory cell;
External interface unit is connected with MGT optical fiber interfaces;
MAC Ethernet protocols interface is imported data in DMA transfer mode in the mac frame head of Tx DPRAM memories, MAC
Frame head electrically connects SER receiving units, and SER receiving units are sent to MGT optical fiber interfaces by external interface;
Signal is sent on SER/DES modular converters by MGT optical fiber interfaces by external interface, and DES transmitting elements are by number
According to sending to the mac frame head of Rx DPRAM memory insides, mac frame head is in DMA transfer mode to MAC Ethernet protocol interfaces
On.
It is preferred that, the signal that the MGT optical fiber interfaces that SER/DES modular converters are received are sent is high-speed serial signals, is turned
High-speed serial signals after changing have independent address wire, data wire and read-write.
Further, read-write is using burst read-write mode.
It is preferred that, the mac frame head of Tx DPRAM memories and the mac frame head of Rx DPRAM memory insides are same
Mac frame head.
Specifically, each simulation step length in SER receiving units and DES transmitting elements can receive 64 32 it is whole
64 32 integers of number and transmission.
It is preferred that, each simulation step length carries out once receiving and sending with MGT optical fiber interfaces.
The RTDS emulating instruments of invention and the method for PCI-Express fast exchange data, set interconnecting module by RTDS emulating instruments
The MGT optical fiber interfaces switching of middle PB5 processors is PCI-Express, can directly be connected and use with RTDS emulating instruments, it is not necessary to be outer
Connect accessory;External device (ED) also need to only possess PCI-Express, it is not necessary to other physical interfaces, more convenient to use;Port number
Amount is more, can receive 64 32 integers and send 64 32 integers;Traffic rate is high, each simulation step length with MGT optical fiber
Interface once receive and send.
Brief description of the drawings
Using accompanying drawing, the present invention is further illustrated, but the content in accompanying drawing does not constitute any limit to the present invention
System.
Fig. 1 is a kind of RTDS emulating instruments of the invention and the hardware composition figure of the method for PCI-Express fast exchange data.
Fig. 2 is the method SER/DES modular converters of a kind of RTDS emulating instruments of the invention and PCI-Express fast exchange data
Communication interface.
Fig. 3 is the pin menu of a kind of RTDS emulating instruments of the invention and method Fig. 2 of PCI-Express fast exchange data
Lattice.
Fig. 4 is that a kind of RTDS emulating instruments of the invention and the method Zero-copy data of PCI-Express fast exchange data are transmitted
Schematic diagram.
In Fig. 1 into Fig. 4, black bars are MGT optical fiber interfaces.
Embodiment
The invention will be further described with the following Examples.
Embodiment 1.
As Figure 1-4, a kind of RTDS emulating instruments and the method for PCI-Express fast exchange data, are provided with switching model
The MGT optical fiber interfaces switching of PB5 processors in RTDS emulating instruments is PCI-Express by block, interconnecting module, and PCI-Express passes through thousand
Million netting twines are connected with external device (ED).
Interconnecting module includes Zero-copy data transmission unit and PHY ethernet physical layer interfaces, and Zero-copy data transmission is single
Transmitted after the high-speed serial data processing that member exports MGT optical fiber interfaces to PHY ethernet physical layer interfaces, can directly and RTDS
Emulating instrument connection is used, it is not necessary to external accessories, using more convenient.
Zero-copy data transmission unit includes SER/DES modular converters, DRRAM memories and MAC Ethernet protocol interfaces,
The converting high-speed serial that SER/DES modular converters export MGT optical fiber interfaces is parallel data, and DRRAM memories connect to be double
Mouth memory, DRRAM memories are electrically connected with SER/DES modular converters and MAC Ethernet protocols interface to be two-way, and DRRAM is deposited
The data that SER/DES modular converters are exported are entered row buffering by reservoir, DPRAM memories by DMA data transfer mode and MAC with
Too fidonetFido interface directly exchanges data.
SER/DES modular converters are divided into external interface unit, control unit, SER receiving units and DES transmitting elements.
Each simulation step length in SER receiving units and DES transmitting elements can receive 64 32 integers and transmission 64
Individual 32 integers, number of channels is more, so that interface shape is simplified, and 64 integers can be parsed directly as needed, it is not necessary to
Complicated communication protocol, each simulation step length carries out once receiving and sending with MGT optical fiber interfaces, strengthens the speed of communication.
DPRAM points are Rx DPRAM memory cell and Tx DPRAM memory cell.External interface unit and MGT optical fiber interfaces
Connection.MAC Ethernet protocols interface is imported data in DMA transfer mode in the mac frame head of Tx DPRAM memories, mac frame
Head electrical connection SER receiving units, SER receiving units are sent to MGT optical fiber interfaces by external interface.
Signal is sent on SER/DES modular converters by MGT optical fiber interfaces by external interface, and DES transmitting elements are by number
According to sending to the mac frame head of Rx DPRAM memory insides, mac frame head is in DMA transfer mode to MAC Ethernet protocol interfaces
On.
The mac frame head of Tx DPRAM memories and the mac frame head of Rx DPRAM memory insides are same mac frame head.
The copy of data is avoided by sharing buffer memory, realizes that Zero-copy data is transmitted, so as to reduce transmission delay most
Bigization handling capacity, MAC Ethernet protocols interface packets mac frame head more than SER/DES modular converter messages, and 64 32
The data division of integer is identical;By the way that the reception of the transmission of DES transmitting elements and SER receiving units is increased into mac frame
The length of head, can thus make both sides shared data buffer memory;The content of mac frame head fills in institute in program initialization
The destination address of need, source address, type of message information.
It should be noted that this invention simplifies the form of interface, passing through MGT optical fiber interfaces and use high speed serialization agreement
New number transmission is carried out, high-speed serial signals are converted to by parallel signal by SER/DES modular converters, and import DPRAM storages
In device, because MGT optical fiber interfaces are different with the clock frequency of MAC Ethernet protocol interfaces, data buffering is carried out to signal, then lead to
DMA transfer mode is crossed, signal is directly imported into PHY ethernet physical layer interfaces, the process for importing transmission passes through public buffering
Internal memory avoids the copy of data, so as to realize the zero-copy of data, finally reuses PHY ethernet physical layer interfaces to MAC
The data of Ethernet protocol interface carry out serialization and are directed at the exchange that rapid data is realized in PCI-Express.
Finally it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention rather than the present invention is protected
The limitation of scope, although being explained in detail with reference to preferred embodiment to the present invention, one of ordinary skill in the art should manage
Solution, technical scheme can be modified or equivalent, without departing from technical solution of the present invention essence and
Scope.