CN103559152A - Device and method for CPU (central processing unit) to access local bus on basis of PCIE (peripheral component interface express) protocol - Google Patents

Device and method for CPU (central processing unit) to access local bus on basis of PCIE (peripheral component interface express) protocol Download PDF

Info

Publication number
CN103559152A
CN103559152A CN201310528347.9A CN201310528347A CN103559152A CN 103559152 A CN103559152 A CN 103559152A CN 201310528347 A CN201310528347 A CN 201310528347A CN 103559152 A CN103559152 A CN 103559152A
Authority
CN
China
Prior art keywords
pcie
local bus
data
read
cpu
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.)
Granted
Application number
CN201310528347.9A
Other languages
Chinese (zh)
Other versions
CN103559152B (en
Inventor
韩震
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Changjiang Computing Technology Co., Ltd
Original Assignee
Fiberhome Telecommunication Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN201310528347.9A priority Critical patent/CN103559152B/en
Publication of CN103559152A publication Critical patent/CN103559152A/en
Application granted granted Critical
Publication of CN103559152B publication Critical patent/CN103559152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a device and a method for a CPU (central processing unit) to access a local bus on the basis of a PCIE (peripheral component interface express) protocol, which relate to the field of IPRAN (internet protocol radio access network). The device comprises a PCIE interface module, a data conversion module and a local bus interface module, wherein the PCIE interface module is used for realizing the PCIE underlying protocol, so that the device is used as one PCIE slave-end device to work under a PCIE system; the local bus interface module is used for simulating the time sequence of a traditional local bus and realizing the reading-writing access to an FPGA (field programmable gate array) local register or an external chip which is bridged through the FPGA. By Adopting the device and method, the highest possibility and performance can be obtained on the premise of consuming the least logic resource, the complexity in designing a PCIE interface transmission layer can be effectively simplified, the reading-writing efficiency of the system can be remarkably improved, and different local bus time sequences can be provided in real time.

Description

The device and method of the CPU access local bus based on PCIE agreement
Technical field
The present invention relates to IPRAN field, particularly relate to a kind of device and method of the CPU access local bus based on PCIE agreement.
Background technology
Along with based on IP(Internet Protocol, Internet protocol) transmission network development, at IPRAN(IP Radio Access Network Carrier, IPization wireless backhaul bearer network) main card CPU(Central Processing Unit in equipment, central processing unit) need to carry out exchanges data with numerous acp chips and subcard, from the viewpoint of the maintenance of device tree, interface, simplify and data transmission efficiency etc. traditional localbus(local bus) be difficult to be competent at this work.PCIE(Pedpherd Component Interconnect Express, quick component interconnection) as a kind of maturation and widely used local bus technology, because its device tree is easy to safeguard, interface is simple, message transmission rate advantages of higher, be specially adapted to the exchanges data of CPU and peripheral hardware.
In the various device of optical-fiber network, CPU is indispensable function for the read and write access of local bus.CPU need to be to configuration register value of writing of local parts (FPGA design cell or local chip), thereby local parts are worked under predetermined mode of operation, and CPU also needs to read status register, the data buffer storage of local parts to be realized monitoring function and extracts the required data of protocol algorithm.
FPGA(Field Programmable Gate Array in the past, field programmable gate array) read-write interface that is designed to CPU and provides is generally local bus interface, local bus interface is comprised of chip selection signal (cs), read-write (rw), 32 bit address signals (addr), 8/16/32 bi-directional data signal (data), the advantage of this interface is that sequential is simple, easy to use, but the shortcoming of local bus is also fairly obvious:
(1) read-write efficiency is low: each read-write operation of CPU can only transmit a register data.
(2) device tree is difficult in maintenance and extendability is poor: for different peripheral hardwares, CPU distinguishes by different chip selection signals, and CPU need to access how many peripheral hardwares, and how many chip selection signals just should be provided.
(3) transfer rate is low, and it is large that hardware is realized cost: local bus is parallel bus, and it is only tens megahertzes that the cross-interference issue of parallel bus makes its reliably working frequency, and the PCB cabling of parallel bus is also very complicated simultaneously.
PCIE is a kind of HSSI High-Speed Serial Interface agreement being proposed by intel, is characterized in high speed serialization point-to-point transmission, has very high bandwidth.The terminal device that PCIE bus connects exclusively enjoys channel bandwidth, is the main flow trend of current local bus.Than traditional local bus, the advantage that the read-write interface of CPU is upgraded to PCIE interface is fairly obvious:
(1) read-write efficiency is high: the data upper limit of each PCIE read-write message transmissions is minimum is 128 bytes, can pass through DMA(Direct Memory Access, direct memory access simultaneously) mode promotes the work efficiency of CPU.
(2) plant maintenance is simple: the base address of PCIE device is by system software dynamic assignment, and different PCIE devices is distinguished by PCIE base address in PCIE bus territory, and supports the hot plug of PCIE device.
(3) transfer rate is high, and hardware line is simple: hardware line only need bi-directional data and reference clock several to differential lines, PCIE interface is HSSI High-Speed Serial Interface, the minimum speed limit of single path is 2.5Gbps.
But the cpu i/f that will realize FPGA design in IPRAN equipment upgrades to PCIE interface by local bus interface, realize the memory read/write message of PCIE interface and the conversion of local bus operation, also exist at present following technical matters urgently to be resolved hurrily:
(1) externally need to provide the PCIE interface of standard, requirement can be processed PCIE message, and as an EP(Endpoint, PCIE is from end equipment) communicate by letter with CPU.
(2) internally need to provide the local bus interface that can join flexibly, as supported from end reply pattern, the characteristic such as the operating cycle is adjustable, realize with in the past for the compatibility of the FPGA design of local bus interface exploitation.
(3) need to define the data structure corresponding relation of PCIE interface and local bus interface.
Summary of the invention
The object of the invention is in order to overcome the deficiency of above-mentioned background technology, a kind of device and method of the CPU access local bus based on PCIE agreement is provided, can under the prerequisite of consumes least logical resource, obtain the highest reliability and performance, effectively simplify the complexity of PCIE interface transport layer design, significantly improve the read-write efficiency of system, different local bus sequential is provided in real time.
The device that the invention provides a kind of CPU access local bus based on PCIE agreement, comprises PCIE interface module, data conversion module and local bus interface module, wherein:
Described PCIE interface module, for: realize PCIE underlying protocol, make this device under PCIE system as a PCIE from the work of end equipment;
Described data conversion module, for: realize the entrained data layout of PCIE read-write message and the conversion of local bus data layout;
Described local bus interface module, for: simulate traditional local bus sequential, realize to the local register of FPGA or via the read and write access of the external chip of FPGA bridge joint.
On the basis of technique scheme, described PCIE interface module designs according to the three-decker of PCIE protocol definition, the PCIE stone that the Physical layer of PCIE interface and data link layer functions are carried by FPGA device completes, PCIE stone is realized the processing of configuration space, PCIE data link layer and Physical layer message of PCIE interface, the link training function of PCIE link, realize the bottom passage of PCIE link, the transport layer logic of PCIE interface module is communicated by letter with the user side interface of PCIE stone, realizes the processing of PCIE read-write message.
On the basis of technique scheme, described PCIE Design of Interface Module flow control mechanism: utilize PCIE read-write message that the user side interface place of PCIE stone provides to receive enable signal and be designed with control submodule, it is not busy controlling submodule original state, when client layer receives a PCIE read-write message, control submodule and transfer busy condition to, when control submodule is busy condition, will close the user side interface of PCIE stone, the PCIE read-write packet buffer of this stylish reception is in PCIE stone; Complete after the processing of a PCIE read-write message, control submodule and return to not busy state, reopen the user side interface of PCIE stone; In the situation that CPU sends PCIE read-write message continuously, above flow process loops, until all PCIE read-write messages are disposed in PCIE stone buffer memory.
On the basis of technique scheme, described data conversion module is write with CPU and is read the data buffer storage that two data transfer directions arrange suitable capacity at CPU, the buffer memory capacity of data conversion module is all designed to the twice of PCIE read-write message maximum data capacity 32 double words, i.e. 256 bytes, data-switching corresponding relation is 32 bit data of the corresponding local bus operation of a double word of PCIE read-write message data; In PCIE read-write message, four bytes of a double word are that large end is arranged.
On the basis of technique scheme, described local bus interface module has been combined the timing of local bus sequential by counter, counter works clock is 125Mhz, counter combination comprises double word counter and period counter, wherein double word counter is the high-positioned counter of period counter, double word counter shows which double-word data at transmission PCIE message, be which local bus operating cycle, period counter shows how many 125Mhz clock period of transmission needs of each double-word data; The length field of PCIE message has determined the maximum count value of double word counter, double word counter reads and writes at the moment or the PCIE that reset, PCIE interface mould receives PCIE read-write message the moment zero clearing that message is finished dealing with, period counter is except above condition, also zero clearing when meeting carry condition; Period counter each 125Mhz rising edge clock between each double-word data transmission period adds one, and after reaching carry condition, period counter zero clearing simultaneously double word counter adds one.
On the basis of technique scheme, described local bus interface module realizes by operator scheme and two parameters of operation width the local bus sequential that can join flexibly, operator scheme has general mode and from end reply pattern, when this block configuration is general mode, the carry condition of period counter is to equal to operate width parameter, be the length in local bus operating cycle corresponding to the assignment of operation width parameter, this module supports under general mode the local bus operating cycle adjustable by 6-240 125Mhz clock period; This block configuration is during from end reply pattern, now operates width parameter invalid, and the carry condition of this module period counter is to receive from reply or the stand-by period of end to surpass 240 125Mhz clock period.
On the basis of said apparatus, the present invention also provides a kind of method of the CPU access local bus based on PCIE agreement, comprises the following steps:
CPU comprises two separate processes of write and read to the access method of local bus, is described below respectively:
(1) write the realization of process:
First, PCIE interface module is processed PCIE and is write message in writing process, be that the storer that CPU sends is write message, the storer sending for CPU is write message, the data that PCIE interface module extraction CPU writes, the start address that CPU writes, three fields of length that CPU writes, the data that PCIE interface module is write CPU, start address, data length are submitted to data conversion module, and the start address of simultaneously CPU being write, length are submitted to local bus interface module;
Then, data conversion module buffer memory in writing process is write data, start address, data length from the CPU of PCIE interface module, data conversion module knows that according to data length local bus interface module needs to produce continuously how many local bus write operations, when each local bus write cycles starts, local bus interface module sends commencing signal to data conversion module, then by data conversion module, to it, provides data and the address of this local bus write operation;
Finally, local bus interface module is responsible for the generation that local bus is write sequential in writing process, when each local bus operating cycle starts, this module sends commencing signal to data conversion module, behind the write operation address and data that have obtained from data conversion module, local bus interface module completes this local bus write operation, enter the next local bus operating cycle, until that current storage is write all data processings of message is complete;
(2) realization of read procedure:
First, PCIE interface module is processed the PCIE literary composition of reading the newspaper in read procedure, it is storer that CPU the sends literary composition of reading the newspaper, the storer sending for the CPU literary composition of reading the newspaper, the start address that PCIE interface module extraction CPU reads, the data length that CPU reads, requestor ID, request label, the data length that the start address that PCIE interface module is read CPU, CPU read is submitted to data conversion module and local bus interface module;
Then, data conversion module buffer memory in read procedure is read start address, data length from the CPU of PCIE interface module, data conversion module knows that according to data length local bus interface module needs to produce continuously how many local bus read operations, each local bus read operation cycle is when start, local bus interface module sends commencing signal to data conversion module, then by data conversion module, to it, provides the address of this local bus read operation;
Next, local bus interface module is responsible for the generation that local bus is read sequential in read procedure, and local bus is read the realization of sequential and combined by counter, realizes principle with writing process; Each local bus read operation cycle, while starting, local bus interface module sent commencing signal to data conversion module, and behind the local bus read operation address having obtained from data conversion module, local bus interface module is initiated this local bus read operation; In each local bus read operation, local bus interface module is obtained local bus Data Concurrent and is given data conversion module, local bus data acquisition is complete enters the next local bus operating cycle, until that current PC IE reads all data acquisitions of message request is complete;
Finally, after each local bus read operation completes, data conversion module extracts local bus data buffer memory; After all local bus read operations complete, data conversion module offers PCIE interface module by data according to PCIE stone user side interface data layout; The storer sending for the CPU literary composition of reading the newspaper, PCIE interface module is replied message according to PCIE agreement echo back data, the requestor ID that PCIE interface module is extracted, request label generate for the frame head of data recovery message, and the read request data of obtaining from local bus generate for the payload of data recovery message.
Compared with prior art, advantage of the present invention is as follows:
(1) the PCIE stone that the present invention calls FPGA device manufacturer and provides is realized Physical layer and the data link layer of PCIE interface, only need be absorbed in the design of PCIE interface transport layer, the Physical layer of PCIE interface and data link layer realize with PCIE stone, can under the prerequisite of consumes least logical resource, obtain the highest reliability and performance.
(2) local bus interface data width of the present invention is defined as 32, compatible 8,16,32 read-writes flexibly, simultaneously consistent with the minimum data transmission unit of PCIE agreement and need not consider byte mask field, can effectively simplify the complexity that PCIE interface transport layer designs.
(3) local bus interface support of the present invention is converted to repeatedly continuous local bus operation to carrying the PCIE read-write message of a plurality of double-word datas, PCIE read-write message of maximum support is converted to 32 continuous local bus operations, can reduce the free time of local bus between the operating cycle, significantly improve the read-write efficiency of system.
(4) the present invention can configuration operation pattern, two parameters of operation width, realize the local bus sequential that can join flexibly.Operator scheme, operation width offer FPGA top layer logic as module pin of the present invention, FPGA top layer logic can be adjusted this two module pins in real time according to different local bus operation address, can realize different local bus sequential is provided when CPU accesses different local bus addresses in real time, because this function is that FPGA realizes automatically, its flexibility ratio is that traditional local bus does not possess.
(5) the invention provides the switching of PCIE interface and local bus interface, when enjoying PCIE interface advantage, the FPGA design that can compatiblely in the past develop for local bus interface.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of writing process in the embodiment of the present invention.
Fig. 2 is the process flow diagram of read procedure in the embodiment of the present invention.
Embodiment
Below in conjunction with drawings and the specific embodiments, the present invention is described in further detail.
Shown in Figure 1, the embodiment of the present invention provides a kind of device of the CPU access local bus based on PCIE agreement, comprises PCIE interface module, data conversion module and local bus interface module, wherein:
PCIE interface module, for: realize PCIE underlying protocol, this device is worked from end equipment (EP) as a PCIE under PCIE system;
Data conversion module, for: realize the entrained data layout of PCIE read-write message and the conversion of local bus data layout;
Local bus interface module, for: simulate traditional local bus sequential, realize to the local register of FPGA or via the read and write access of the external chip of FPGA bridge joint.
PCIE interface module designs according to the three-decker of PCIE protocol definition, the PCIE stone that the Physical layer of PCIE interface and data link layer functions are carried by FPGA device completes, PCIE stone is realized the processing of configuration space, PCIE data link layer and Physical layer message of PCIE interface, the functions such as link training of PCIE link, realize the bottom passage of PCIE link, the transport layer logic of PCIE interface module need to be communicated by letter with the user side interface of PCIE stone, realizes the processing of PCIE read-write message.
PCIE interface module needs design discharge controlling mechanism.Data (being 32 double words in the embodiment of the present invention to the maximum) due to a plurality of double words of PCIE read-write message portability, need repeatedly local bus operation to complete, if receive again a new PCIE read-write message in the processing procedure of the PCIE read-write message that a CPU sends, the embodiment of the present invention cannot be processed it, in order to address this problem, the embodiment of the present invention utilizes the PCIE read-write message reception enable signal that the user side interface place of PCIE stone provides to design control submodule, it is not busy controlling submodule original state, when client layer receives a PCIE read-write message, control submodule and transfer busy condition to, when control submodule is busy condition, the user side interface of PCIE stone will be closed, the PCIE read-write packet buffer of this stylish reception is in PCIE stone, complete after the processing of a PCIE read-write message, control submodule and return to not busy state, reopen the user side interface of PCIE stone, in the situation that CPU sends PCIE read-write message continuously, above flow process loops, until all PCIE read-write messages are disposed in PCIE stone buffer memory.Because PCIE agreement has guaranteed when not having enough time to respond the request of main side from end by credit mechanism, flow control can be carried out according to the water level from end buffer memory in main side, and (from end buffer memory, arriving certain water level main side stops sending, until water level drops to safe numerical value), so there is not the possibility of overflowing in PCIE stone buffer memory.
Data conversion module is write with CPU and is read the data buffer storage that two data transfer directions need to arrange suitable capacity at CPU, reason is the data (embodiment of the present invention is 32 double words to the maximum) of a plurality of double words of PCIE read-write message portability, and PCIE interface rate is far above local bus speed.That the capacity of data buffer storage need to meet is simultaneously functional, the requirement of reliability and resource utilization.Owing to being designed with control submodule in PCIE interface module, the buffer memory capacity of data conversion module is all designed to the twice of PCIE read-write message maximum data capacity (32 double word), i.e. 256 bytes.The data-switching corresponding relation of the embodiment of the present invention is 32 bit data of the corresponding local bus operation of a double word of PCIE read-write message data.In PCIE read-write message, four bytes of a double word are that large end is arranged (big-endian), and four bytes of a double word of local bus are small end arrangement (little-endian), for aspects such as logical design in the past of compatibility and application layer software personnel operating habits, consider, these mapping relations realize in the drive software of this invention.The benefit designing is like this in downstream logic of the present invention or the data rule of seeing in CPU application layer is all that large end is arranged (big-endian).
Local bus interface module has been combined the timing of local bus sequential by counter, counter works clock is 125Mhz.Counter combination comprises double word counter and period counter, and wherein double word counter is the high-positioned counter of period counter.Double word counter shows that at which double-word data (which local bus operating cycle) of transmission PCIE message, period counter shows how many 125Mhz clock period of transmission needs of each double-word data.The length field of PCIE message has determined the maximum count value of double word counter.Double word counter reads and writes at the moment or the PCIE that reset, PCIE interface mould receives PCIE read-write message the moment zero clearing that message is finished dealing with, and period counter, also can zero clearing when meeting carry condition except above condition.Period counter each 125Mhz rising edge clock between each double-word data transmission period adds one, and after reaching carry condition, period counter zero clearing simultaneously double word counter adds one.
Local bus interface module realizes by operator scheme and two parameters of operation width the local bus sequential that can join flexibly.Operator scheme has general mode and from end reply pattern.When this block configuration is general mode, the carry condition of period counter is to equal to operate width parameter, be the length in local bus operating cycle corresponding to the assignment of operation width parameter, this module supports under general mode the local bus operating cycle adjustable by 6-240 125Mhz clock period.This block configuration is during from end reply pattern, now operates width parameter invalid, and the carry condition of this module period counter is to receive from reply or the stand-by period of end to surpass 240 125Mhz clock period.Operator scheme and operation width two parameter designing are module pin rather than preset parameter, and this just allows each local bus operating cycle can be in real time to these two parameter pin assignment.The meaning of doing is like this to make CPU without being concerned about the concrete sequential of access from device, and the mapping of address and specific time sequence relation is completed automatically by FPGA.By above flexible design, local bus interface of the present invention not only can normally be accessed all FPGA designs for traditional local bus exploitation in the past, local bus signal of the present invention is all the synchronizing signal in FPGA sheet simultaneously, more convenient than traditional local bus interface use, reliability is higher.
On the basis of said apparatus, the embodiment of the present invention also provides a kind of method of the CPU access local bus based on PCIE agreement, comprises the following steps:
CPU comprises two separate processes of write and read to the access method of local bus, is described below respectively:
(1) write the realization of process:
Shown in Figure 1, first, PCIE interface module is processed PCIE and is write message in writing process, and the storer that CPU sends is write message.The storer sending for CPU is write message, PCIE interface module need be extracted the data that CPU writes, the start address that CPU writes, three fields of length that CPU writes, the data that PCIE interface module is write CPU, start address, data length are submitted to data conversion module, and the start address of simultaneously CPU being write, length are submitted to local bus interface module.
Then, data conversion module buffer memory in writing process is write data, start address, data length from the CPU of PCIE interface module.Data conversion module knows that according to data length local bus interface module needs to produce continuously how many local bus write operations, when each local bus write cycles starts, local bus interface module sends commencing signal to data conversion module, then by data conversion module, to it, provides data and the address of this local bus write operation.
Finally, local bus interface module is responsible for the generation that local bus is write sequential in writing process, when each local bus operating cycle starts, this module sends commencing signal to data conversion module, behind the write operation address and data that have obtained from data conversion module, local bus interface module completes this local bus write operation and enters the next local bus operating cycle, until that current storage is write all data processings of message is complete.
(2) realization of read procedure:
Shown in Figure 2, first, PCIE interface module is processed the PCIE literary composition of reading the newspaper in read procedure, the storer that CPU the sends literary composition of reading the newspaper.The storer sending for the CPU literary composition of reading the newspaper, PCIE interface module is extracted the start address that CPU reads, data length, requestor ID, the request label that CPU reads.The data length that the start address that PCIE interface module is read CPU, CPU read is submitted to data conversion module and local bus interface module.
Then, data conversion module buffer memory in read procedure is read start address, data length from the CPU of PCIE interface module, data conversion module knows that according to data length local bus interface module needs to produce continuously how many local bus read operations, each local bus read operation cycle is when start, local bus interface module sends commencing signal to data conversion module, then by data conversion module, to it, provides the address of this local bus read operation.
Next, local bus interface module is responsible for the generation that local bus is read sequential in read procedure, and local bus is read the realization of sequential and combined by counter, realizes principle with writing process; Each local bus read operation cycle, while starting, local bus interface module sent commencing signal to data conversion module, and behind the local bus read operation address having obtained from data conversion module, local bus interface module is initiated this local bus read operation; In each local bus read operation, local bus interface module is obtained local bus Data Concurrent and is given data conversion module, local bus data acquisition is complete enters the next local bus operating cycle, until that current PC IE reads all data acquisitions of message request is complete.
Finally, after each local bus read operation completes, data conversion module extracts local bus data buffer memory; After all local bus read operations complete, data conversion module offers PCIE interface module by data according to PCIE stone user side interface data layout; The storer sending for the CPU literary composition of reading the newspaper, PCIE interface module need to be replied message according to PCIE agreement echo back data.The requestor ID that PCIE interface module is extracted, request label generate for the frame head of data recovery message, and the read request data of obtaining from local bus generate for the payload of data recovery message.
The embodiment of the present invention is applied on the IPRAN of Fiberhome telecommunication equipment, and under the prerequisite without the modification local bus interface that ripe FPGA designed in the past, the mode that has successfully realized CPU access FPGA upgrades to PCIE interface by traditional local bus interface.
Those skilled in the art can carry out various modifications and variations to the embodiment of the present invention, if these revise and modification within the scope of the claims in the present invention and equivalent technologies thereof, these modifications and modification are also within protection scope of the present invention.
The prior art that the content of not describing in detail in instructions is known to the skilled person.

Claims (7)

1. the CPU based on PCIE agreement accesses a device for local bus, it is characterized in that: comprise PCIE interface module, data conversion module and local bus interface module, wherein:
Described PCIE interface module, for: realize PCIE underlying protocol, make this device under PCIE system as a PCIE from the work of end equipment;
Described data conversion module, for: realize the entrained data layout of PCIE read-write message and the conversion of local bus data layout;
Described local bus interface module, for: simulate traditional local bus sequential, realize to the local register of FPGA or via the read and write access of the external chip of FPGA bridge joint.
2. the CPU based on PCIE agreement as claimed in claim 1 accesses the device of local bus, it is characterized in that: described PCIE interface module designs according to the three-decker of PCIE protocol definition, the PCIE stone that the Physical layer of PCIE interface and data link layer functions are carried by FPGA device completes, PCIE stone is realized the configuration space of PCIE interface, the processing of PCIE data link layer and Physical layer message, the link training function of PCIE link, realize the bottom passage of PCIE link, the transport layer logic of PCIE interface module is communicated by letter with the user side interface of PCIE stone, realize the processing of PCIE read-write message.
3. the CPU based on PCIE agreement as claimed in claim 2 accesses the device of local bus, it is characterized in that: described PCIE Design of Interface Module flow control mechanism: utilize PCIE read-write message that the user side interface place of PCIE stone provides to receive enable signal and be designed with control submodule, it is not busy controlling submodule original state, when client layer receives a PCIE read-write message, control submodule and transfer busy condition to, when control submodule is busy condition, to close the user side interface of PCIE stone, the PCIE read-write packet buffer of this stylish reception is in PCIE stone; Complete after the processing of a PCIE read-write message, control submodule and return to not busy state, reopen the user side interface of PCIE stone; In the situation that CPU sends PCIE read-write message continuously, above flow process loops, until all PCIE read-write messages are disposed in PCIE stone buffer memory.
4. the CPU based on PCIE agreement as claimed in claim 3 accesses the device of local bus, it is characterized in that: described data conversion module is write with CPU and read the data buffer storage that two data transfer directions arrange suitable capacity at CPU, the buffer memory capacity of data conversion module is all designed to the twice of PCIE read-write message maximum data capacity 32 double words, i.e. 256 bytes, data-switching corresponding relation is 32 bit data of the corresponding local bus operation of a double word of PCIE read-write message data; In PCIE read-write message, four bytes of a double word are that large end is arranged.
5. the CPU based on PCIE agreement as claimed in claim 4 accesses the device of local bus, it is characterized in that: described local bus interface module has been combined the timing of local bus sequential by counter, counter works clock is 125Mhz, counter combination comprises double word counter and period counter, wherein double word counter is the high-positioned counter of period counter, double word counter shows which double-word data at transmission PCIE message, it is which local bus operating cycle, period counter shows how many 125Mhz clock period of transmission needs of each double-word data, the length field of PCIE message has determined the maximum count value of double word counter, double word counter reads and writes at the moment or the PCIE that reset, PCIE interface mould receives PCIE read-write message the moment zero clearing that message is finished dealing with, period counter is except above condition, also zero clearing when meeting carry condition, period counter each 125Mhz rising edge clock between each double-word data transmission period adds one, and after reaching carry condition, period counter zero clearing simultaneously double word counter adds one.
6. the CPU based on PCIE agreement as claimed in claim 5 accesses the device of local bus, it is characterized in that: described local bus interface module realizes by operator scheme and two parameters of operation width the local bus sequential that can join flexibly, operator scheme has general mode and from end reply pattern, when this block configuration is general mode, the carry condition of period counter is to equal to operate width parameter, be that the length in local bus operating cycle is corresponding to the assignment of operation width parameter, under this module support general mode, the local bus operating cycle is adjustable by 6-240 125Mhz clock period, this block configuration is during from end reply pattern, now operates width parameter invalid, and the carry condition of this module period counter is to receive from reply or the stand-by period of end to surpass 240 125Mhz clock period.
7. the method for the CPU access local bus based on PCIE agreement based on installing described in any one in claim 1 to 6, is characterized in that, comprises the following steps:
CPU comprises two separate processes of write and read to the access method of local bus, is described below respectively:
(1) write the realization of process:
First, PCIE interface module is processed PCIE and is write message in writing process, be that the storer that CPU sends is write message, the storer sending for CPU is write message, the data that PCIE interface module extraction CPU writes, the start address that CPU writes, three fields of length that CPU writes, the data that PCIE interface module is write CPU, start address, data length are submitted to data conversion module, and the start address of simultaneously CPU being write, length are submitted to local bus interface module;
Then, data conversion module buffer memory in writing process is write data, start address, data length from the CPU of PCIE interface module, data conversion module knows that according to data length local bus interface module needs to produce continuously how many local bus write operations, when each local bus write cycles starts, local bus interface module sends commencing signal to data conversion module, then by data conversion module, to it, provides data and the address of this local bus write operation;
Finally, local bus interface module is responsible for the generation that local bus is write sequential in writing process, when each local bus operating cycle starts, this module sends commencing signal to data conversion module, behind the write operation address and data that have obtained from data conversion module, local bus interface module completes this local bus write operation, enter the next local bus operating cycle, until that current storage is write all data processings of message is complete;
(2) realization of read procedure:
First, PCIE interface module is processed the PCIE literary composition of reading the newspaper in read procedure, it is storer that CPU the sends literary composition of reading the newspaper, the storer sending for the CPU literary composition of reading the newspaper, the start address that PCIE interface module extraction CPU reads, the data length that CPU reads, requestor ID, request label, the data length that the start address that PCIE interface module is read CPU, CPU read is submitted to data conversion module and local bus interface module;
Then, data conversion module buffer memory in read procedure is read start address, data length from the CPU of PCIE interface module, data conversion module knows that according to data length local bus interface module needs to produce continuously how many local bus read operations, each local bus read operation cycle is when start, local bus interface module sends commencing signal to data conversion module, then by data conversion module, to it, provides the address of this local bus read operation;
Next, local bus interface module is responsible for the generation that local bus is read sequential in read procedure, and local bus is read the realization of sequential and combined by counter, realizes principle with writing process; Each local bus read operation cycle, while starting, local bus interface module sent commencing signal to data conversion module, and behind the local bus read operation address having obtained from data conversion module, local bus interface module is initiated this local bus read operation; In each local bus read operation, local bus interface module is obtained local bus Data Concurrent and is given data conversion module, local bus data acquisition is complete enters the next local bus operating cycle, until that current PC IE reads all data acquisitions of message request is complete;
Finally, after each local bus read operation completes, data conversion module extracts local bus data buffer memory; After all local bus read operations complete, data conversion module offers PCIE interface module by data according to PCIE stone user side interface data layout; The storer sending for the CPU literary composition of reading the newspaper, PCIE interface module is replied message according to PCIE agreement echo back data, the requestor ID that PCIE interface module is extracted, request label generate for the frame head of data recovery message, and the read request data of obtaining from local bus generate for the payload of data recovery message.
CN201310528347.9A 2013-10-31 2013-10-31 The CPU of Based PC IE agreement accesses the device and method of local bus Active CN103559152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310528347.9A CN103559152B (en) 2013-10-31 2013-10-31 The CPU of Based PC IE agreement accesses the device and method of local bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310528347.9A CN103559152B (en) 2013-10-31 2013-10-31 The CPU of Based PC IE agreement accesses the device and method of local bus

Publications (2)

Publication Number Publication Date
CN103559152A true CN103559152A (en) 2014-02-05
CN103559152B CN103559152B (en) 2016-06-08

Family

ID=50013403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310528347.9A Active CN103559152B (en) 2013-10-31 2013-10-31 The CPU of Based PC IE agreement accesses the device and method of local bus

Country Status (1)

Country Link
CN (1) CN103559152B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102605A (en) * 2014-06-25 2014-10-15 华为技术有限公司 Data transmission method, device and system
CN104270341A (en) * 2014-09-03 2015-01-07 烽火通信科技股份有限公司 A data protocol forwarding system and method in an IPRAN
CN105183680A (en) * 2015-09-18 2015-12-23 烽火通信科技股份有限公司 FPGA chip and method for transforming PCIe interface into CF card interface
CN106569974A (en) * 2016-11-02 2017-04-19 深圳市博巨兴实业发展有限公司 Software and hardware interface protocol
CN109144916A (en) * 2017-06-16 2019-01-04 深圳市中兴微电子技术有限公司 It is a kind of to handle the method and device of data packet, chip
CN109274747A (en) * 2018-09-29 2019-01-25 上海中畅信息科技有限公司 Market gateway system and its processing method
CN109271108A (en) * 2018-09-03 2019-01-25 青岛镕铭半导体有限公司 A kind of storage control device and data storage device
CN109597785A (en) * 2018-12-04 2019-04-09 中国航空工业集团公司西安航空计算技术研究所 A kind of design method of the PCI Express bus adaption multiplex roles based on AXI4 interface
CN110663029A (en) * 2017-05-24 2020-01-07 Wago管理有限责任公司 Distributed processing of process data
CN111078619A (en) * 2019-03-29 2020-04-28 新华三技术有限公司 Conversion device, network equipment and data transmission method
CN111078609A (en) * 2019-11-13 2020-04-28 南京航空航天大学 PCIe-to-three bus interface and method based on FPGA
CN111092830A (en) * 2019-12-11 2020-05-01 成都九芯微科技有限公司 PCIE (peripheral component interface express) exchange chip port configuration system and method
CN111143250A (en) * 2019-12-20 2020-05-12 苏州浪潮智能科技有限公司 Method, device and medium for accessing FPGA storage unit based on AXI-ST interface
CN111770074A (en) * 2020-06-23 2020-10-13 天津芯海创科技有限公司 Data path test message generation device and method
CN116521607A (en) * 2023-06-29 2023-08-01 湖南源科创新科技有限公司 Heterogeneous platform and file system standardization method based on CPU and FPGA

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120005539A1 (en) * 2010-07-01 2012-01-05 Dell Products, Lp Peripheral Component Interconnect Express Root Port Mirroring
CN103024359A (en) * 2012-12-25 2013-04-03 四川赛狄信息技术有限公司 Embedded image recorder
CN103324596A (en) * 2013-03-19 2013-09-25 中国科学院声学研究所 VME single board computer device based on X 86 system architecture processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120005539A1 (en) * 2010-07-01 2012-01-05 Dell Products, Lp Peripheral Component Interconnect Express Root Port Mirroring
CN103024359A (en) * 2012-12-25 2013-04-03 四川赛狄信息技术有限公司 Embedded image recorder
CN103324596A (en) * 2013-03-19 2013-09-25 中国科学院声学研究所 VME single board computer device based on X 86 system architecture processor

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
张君鹏: "基于FPGA的PCIE总线SD卡控制器", 《中国优秀硕士学位论文全文数据库 信息科技辑 》, no. 8, 15 August 2013 (2013-08-15) *
张君鹏等: "基于PCIE总线的SD卡控制器实现研究", 《现代商贸工业》, no. 9, 1 May 2012 (2012-05-01), pages 165 - 166 *
李木国等: "基于FPGA的PCIe总线接口的DMA传输设计", 《计算机测量与控制》, vol. 21, no. 1, 25 January 2013 (2013-01-25), pages 233 - 235 *
杨子元等: "基于PCIE /104总线的高速数据接口设计", 《现代电子技术》, vol. 34, no. 14, 15 July 2011 (2011-07-15) *
梁国龙等: "PCIE 数据采集系统的驱动程序开发", 《计算机工程与应用》, vol. 45, no. 31, 1 November 2009 (2009-11-01), pages 63 - 65 *

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102605B (en) * 2014-06-25 2018-03-09 华为技术有限公司 A kind of data transmission method, device and system
CN104102605A (en) * 2014-06-25 2014-10-15 华为技术有限公司 Data transmission method, device and system
CN104270341A (en) * 2014-09-03 2015-01-07 烽火通信科技股份有限公司 A data protocol forwarding system and method in an IPRAN
CN104270341B (en) * 2014-09-03 2017-10-10 烽火通信科技股份有限公司 Data protocol repeater system in ip ran and method
CN105183680A (en) * 2015-09-18 2015-12-23 烽火通信科技股份有限公司 FPGA chip and method for transforming PCIe interface into CF card interface
CN105183680B (en) * 2015-09-18 2018-03-20 烽火通信科技股份有限公司 Realize that PCIe interface turns the fpga chip and method of CF card interfaces
CN106569974A (en) * 2016-11-02 2017-04-19 深圳市博巨兴实业发展有限公司 Software and hardware interface protocol
CN110663029A (en) * 2017-05-24 2020-01-07 Wago管理有限责任公司 Distributed processing of process data
CN110663029B (en) * 2017-05-24 2023-11-10 Wago管理有限责任公司 Distributed process data
CN109144916A (en) * 2017-06-16 2019-01-04 深圳市中兴微电子技术有限公司 It is a kind of to handle the method and device of data packet, chip
CN109271108B (en) * 2018-09-03 2021-11-30 青岛镕铭半导体有限公司 Memory control device and data storage equipment
CN109271108A (en) * 2018-09-03 2019-01-25 青岛镕铭半导体有限公司 A kind of storage control device and data storage device
CN109274747A (en) * 2018-09-29 2019-01-25 上海中畅信息科技有限公司 Market gateway system and its processing method
CN109597785A (en) * 2018-12-04 2019-04-09 中国航空工业集团公司西安航空计算技术研究所 A kind of design method of the PCI Express bus adaption multiplex roles based on AXI4 interface
CN111078619A (en) * 2019-03-29 2020-04-28 新华三技术有限公司 Conversion device, network equipment and data transmission method
WO2020200111A1 (en) * 2019-03-29 2020-10-08 新华三技术有限公司 Network device
CN111078609B (en) * 2019-11-13 2023-04-25 南京航空航天大学 PCIe-to-three bus interface and method based on FPGA
CN111078609A (en) * 2019-11-13 2020-04-28 南京航空航天大学 PCIe-to-three bus interface and method based on FPGA
CN111092830A (en) * 2019-12-11 2020-05-01 成都九芯微科技有限公司 PCIE (peripheral component interface express) exchange chip port configuration system and method
CN111092830B (en) * 2019-12-11 2022-01-11 成都华大九天科技有限公司 PCIE (peripheral component interface express) exchange chip port configuration system and method
CN111143250A (en) * 2019-12-20 2020-05-12 苏州浪潮智能科技有限公司 Method, device and medium for accessing FPGA storage unit based on AXI-ST interface
CN111143250B (en) * 2019-12-20 2022-03-22 苏州浪潮智能科技有限公司 Method, device and medium for accessing FPGA storage unit based on AXI-ST interface
CN111770074A (en) * 2020-06-23 2020-10-13 天津芯海创科技有限公司 Data path test message generation device and method
CN111770074B (en) * 2020-06-23 2022-03-18 天津芯海创科技有限公司 Data path test message generation device and method
CN116521607A (en) * 2023-06-29 2023-08-01 湖南源科创新科技有限公司 Heterogeneous platform and file system standardization method based on CPU and FPGA
CN116521607B (en) * 2023-06-29 2023-08-29 湖南源科创新科技有限公司 Heterogeneous platform and file system standardization method based on CPU and FPGA

Also Published As

Publication number Publication date
CN103559152B (en) 2016-06-08

Similar Documents

Publication Publication Date Title
CN103559152A (en) Device and method for CPU (central processing unit) to access local bus on basis of PCIE (peripheral component interface express) protocol
US8812758B2 (en) Mechanism to flexibly support multiple device numbers on point-to-point interconnect upstream ports
CN102495920B (en) Integrated logic analysis module based on PCIe (peripheral component interconnection express) for FPGA (field programmable gate array)
CN105824777B (en) A kind of implementation method of spi bus in IPRAN equipment
CN101866328B (en) Automatically accessed serial bus read/write control method
CN201583944U (en) PCI bus based real-time acquisition card realized by adopting FPGA
CN101599004B (en) SATA controller based on FPGA
CN101140556A (en) Method and device for realizing accessing multiple I2C slave device by programmable device
CN105335548B (en) A kind of MCU emulation mode for ICE
CN104320317B (en) A kind of transfer approach and device of ethernet physical layer chip status
CN101436171B (en) Modular communication control system
CN103853642A (en) Injection type simulation system for infrared digital image based on USB3.0 and method thereof
CN104636301B (en) A kind of extensive PLC High speed rear panels bus system based on PCI E interfaces
CN103827841A (en) Bandwidth configurable io connector
CN110968352B (en) Reset system and server system of PCIE equipment
CN105373511A (en) Device and method for simultaneous communication with multiple optical modules
CN105607940A (en) Method for transmitting information to UEFI BIOS from BDK in ARM platform
CN105718396B (en) A kind of I of big data master transmissions2C bus units and its means of communication
CN103914427A (en) On-chip communication method and on-chip communication device on basis of three physical interconnection lines for integrated circuits
CN102291337A (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
CN104460857A (en) Peripheral component interconnect-express card and method and device for using same
CN109491949B (en) Zynq-based dynamic reconfigurable framework and method
CN116401065A (en) Server, heterogeneous equipment and data processing device thereof
CN209560543U (en) Big data operation chip
CN204390237U (en) A kind of encryption and decryption card of Based PC I-E bussing technique

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200813

Address after: 430000 part of the third floor of cable building, Guandong science and Technology Park, Donghu New Technology Development Zone, Wuhan, Hubei Province

Patentee after: Wuhan Changjiang Computing Technology Co., Ltd

Address before: China Science and Technology Park Dongxin road East Lake Development Zone 430074 Hubei Province, Wuhan City, No. 5

Patentee before: FIBERHOME TELECOMMUNICATION TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right