A kind of PCI bridge with improvement structure
The present invention relates to computer realm, relate in particular to the field of data exchange between computer peripheral and the central processor CPU.
Along with computing machine more and more widely application in every field, the performance and the computing velocity thereof of computing machine also more and more come into one's own, in the various factors that influences computer run speed and efficient, CPU, data exchange process between storer and the external unit is a very important key element, generally, generally CPU and storer are connected together in the system by an internal system bus, by a pci bus each external unit is connected together, internal system bus and pci bus are then connect by PCI master's bridging, what this PCI primary abutment was originally gone up employing is dual-port, one termination internal system bus, another termination pci bus.PCI master's bridge both can be used as the main equipment of pci bus, and the external unit on the realization pci bus is to the visit of storer on the internal system bus; Can be used as the slave unit of pci bus again, realize the active visit of CPU external unit on the external pci bus.In present a lot of systems, also extensively adopt this structure, PCI bridge to this structure in U.S. Pat 526521114 has had very detailed description, in the dual-port bridge construction of introducing among the US5265211, it reads and writes shared storage stack, there is a moderator inside of bridge, it and system bus arbitrator cooperatively interact, and finish the control to bus operation jointly.In this dual-port PCI bridge, two kinds of structures are adopted in the design of PCI primary controller substantially: first kind is many group push-up storage (first-in-first-out, hereinafter to be referred as FIFO) and many primary controllers structure, promptly to different order parts (being used to finish the parts of command operation), to there being a PCI primary controller to finish corresponding operation, the output of each PCI primary controller outputs on the pci bus by a selector switch; Second kind is single group FIFO, orders the shared PCI primary controller structure of parts more, in this structure, controls the PCI primary controller by one group of control signal and finishes corresponding command operation.For first kind of PCI bridge that adopts many primary controllers, organizes fifo structure more, though can satisfy the requirement of high-speed data exchange when many order parts, the function of employed circuit repetition, each circuit is too single, circuit efficiency is lower; For second kind of PCI bridge that adopts single primary controller, single group fifo structure, it is too many that each orders the parts task to finish required unused period expense, and circuit efficiency is low excessively, thereby greatly reduces the speed of data transmission on the bus.
The purpose of this invention is to provide a kind of PCI master's bridge that improves structure that has that satisfies requirements such as transfer efficiency height, circuit design are simple, with low cost simultaneously, of the prior art or circuit repeats to overcome, the function of each circuit is too single, circuit efficiency is lower, the shortcoming that perhaps the unused period expense is too many, circuit efficiency is low excessively, data rate is slow.
In order to finish above-mentioned purpose, the present invention has constructed a kind of PCI master's bridge that improves structure that has, and comprises PCI primary controller, PCI slave unit, system bus primary controller, system bus slave unit, FIFO, FIFO1, FIFO2, FIFO3, PCI moderator and internal register; It is characterized in that, described PCI primary controller also comprise PCI main control unit, MUX, inner arbitration circuit and or door;
The output terminal of described PCI main control unit is connected to pci bus, is connected with described PCI moderator; The output terminal of described MUX is linked described PCI main control unit; The output terminal of described FIFO1, FIFO2, FIFO3 is linked the PCI main control unit by described MUX, and input end is connected with the system bus slave unit of PCI bridge; Three input end REQ1, REQ2 of described inner arbitration circuit, REQ3 are connected with the system bus slave unit respectively, and its three output terminals are connected to described or door and described MUX simultaneously, are connected respectively to described FIFO1, FIFO2 and FIFO3; The other end described or door is connected to described PCI main control unit.
In the PCI bridge that the present invention constructed, because the shared PCI primary controller of many order parts structure, at each order parts, correspondence provides one group of FIFO to be used for the sequential exchange, each is organized the order data of FIFO and exports the input end that is added to the PCI primary controller by a selector switch, controls the output of selector switch by an arbitration circuit.This PCI primary controller structure has been drawn the strong point of above two kinds of circuit structures, has overcome their deficiency, has the transfer efficiency height, and used circuit is few, and advantage is more outstanding during for many orders parts situation.
The invention will be further described below in conjunction with accompanying drawing;
Fig. 1 is the general construction block diagram of PCI master's bridge;
Fig. 2 is the PCI structure of main bridge figure of existing many group FIFO, many primary controllers structure;
Fig. 3 is existing single group FIFO, orders the shared primary controller PCI of parts structure of main bridge figure more;
Fig. 4 is the PCI structure of main bridge figure with improvement structure that the present invention constructs.
Fig. 1 is the structured flowchart of PCI master's bridge.Comprise with the lower part: the PCI primary controller; PCI master's bridge inner buffer FIFO is used to store order and control information from system bus; The system bus slave unit; The PCI slave unit; Internal register is used to store internal control and status information; The system bus main equipment, the external unit that is used to finish on the pci bus is operated the reading and writing of the storer on the system bus; Pci bus; System bus; The external bus moderator of PCI bridge is used for the Control Allocation bus.The PCI primary controller is mainly finished CPU by the reading and writing operation of system bus to the external unit on the pci bus, when CPU read-write external unit, the system bus slave unit is delivered to the first address of external unit among the FIFO, when writing external unit, also need data are write among the FIFO, send a request signal simultaneously and give the PCI primary controller, the PCI primary controller is responsible for a read/write address, data (when writing) and the PCI control timing that produces is delivered on the pci bus, also is responsible for obtaining data and depositing the FIFO from pci bus when reading.
Part is many group FIFO, many primary controllers structure in the frame of broken lines shown in Figure 2, comprise three PCI primary controllers and three groups of FIFO, each group FIFO finishes a command operation of ordering parts together with its corresponding primary controller that links to each other, the output of three primary controllers outputs to pci bus through a selector switch, and the order of specifically transmitting which order parts is determined by PCI bridge moderator.Though this structure satisfies the requirement of high-speed data exchange more in the time of ordering parts, employed circuit repeats, the function of each circuit is too single, circuit efficiency is lower.
At the single group FIFO shown in Fig. 3 is, order among the PCI structure of main bridge figure of the shared primary controller of parts more, have only a PCI primary controller and one group of FIFO, when not being very high situation for single group command transmission, rate request, this structure is proper.But as a plurality of command group (as order one and order two) when needing transmission, because have only one group of FIFO memory command, must order one order two could be write FIFO behind the turned letter by the time from FIFO, obviously this kind mode efficient when many orders is very low, and the high-speed PCI bridge is not suitable for.
Part is many groups FIFO that the present invention constructed, orders parts to share the PCI structure of main bridge figure of same primary controller more in Fig. 4 frame of broken lines, and among the figure, PCI main control unit, MUX or door and inner arbitration circuit constitute the PCI primary controller jointly.The output terminal of PCI main control unit is linked pci bus; The output terminal of MUX is linked pci bus; FIFO1, FIFO2 and FIFO3 are three groups of FIFO, are used to store three group command operating values, constitute three order parts jointly with system bus slave unit, PCI slave unit.Their output is linked the PCI primary controller by MUX, and their input is from the system bus slave unit of PCI bridge; The effect of inner arbitration circuit is when having order to transmit in a plurality of FIFO, be responsible for selecting which carries out earlier, its three input end REQ1, REQ2, REQ3 are respectively from the system bus slave unit, and its output is used to control PCI primary controller, MUX, PCI main control unit, FIFO1, FIFO2 and FIFO3; The pci bus arbiter circuit is responsible for distributing on the pci bus each primary controller to the right to use of pci bus; PCI bridge system bus slave is directly hung on the system bus.
The present invention program realizes like this, suppose FIFO1 and the FIFO2 first address and the data of two POST write operations of corresponding stored respectively, the first address and the data of a DELAY read operation of FIFO3 corresponding stored, when the POST write operation, when writing after first address and first write data be ready among the FIFO1, its corresponding output one arbitration request signal REQ1 is to inner arbitration circuit, and seven data that continue then to be left write among the FIFO1; When writing after first address and first write data be ready among the FIFO2, its corresponding output one arbitration request signal REQ2 continues remaining data are write among the FIFO2 to inner arbitration circuit then; When DELAY operates, after first address is ready among the FIFO3, send an arbitration request signal REQ3 to inner arbitration circuit, decide according to the output of moderator and carry out which kind of operation.After system reset, CPU carries out write operation (as to its initialization) to certain external unit on the external pci bus, CPU writes first address and first data among the FIFO1 by the system bus slave unit on system bus and the PCI bridge, this moment, FIFO1 sent REQ1 to inner arbitration circuit, continue then remaining data are write among the FIFO, multipotency eight data of storage of each group FIFO and an address, when the data of writing continuously when needs surpass eight, the address of the 9th data and the 9th data are delivered among the FIFO2, send REQ2 simultaneously to inner arbitration circuit, then remaining data are write among the FIFO2.For inner arbitration circuit, it mainly is the request arbitration of finishing a plurality of order parts, and which is responsible for selecting carrying out earlier when having order to transmit in a plurality of FIFO.When the response grant1 of REQ1 is effective, make first address and first data among the FIFO1 be read out, the PCI main control unit is sent an arbitration request signal and is taken pci bus to the request of pci bus arbiter device simultaneously, in case the PCI main control unit obtains pci bus, address that it will provide current FIFO according to the pci bus protocol requirement and data are delivered to pci bus and are got on, though FIFO2 has sent the REQ2 request signal in this process, but just can meet with a response after REQ1 is invalid, grant2 becomes effectively.For the PCI primary controller, the output of finding inner arbitration circuit when it has one just to send pci bus to the PCI moderator when effective and take request signal, in case it has obtained pci bus power, promptly begins data transmission.When for read operation, send the address successively and fetch data; When being write operation, send address and data successively.Thereby realized the design of the shared PCI primary controller of multiple order parts.In three order parts structure Design, it has lacked two primary controllers than Fig. 2, has realized carrying out high speed data transfer with less circuit on bridge.Need to prove, the order parts that the present invention constructed are not limited to three, and along with the change of ordering parts, the structure that the present invention constructed can have more superiority, in the time of more order parts, only need to increase described or door, MUX and inner arbitration circuit input port quantity and correspondingly increase the number of FIFO, to adapt to the order parts of increase, in a word, as long as maintenance is described or the number of the quantity of the input port of door, MUX and inner arbitration circuit and FIFO is consistent with instruction part number of packages purpose.