Abstract:
Method and apparatus for converting a virtual address contained in an instruction into a real memory access address, when the stored data are organized in functional sets, the latter being divided into segments. Conversion is performed by means of a functional set number register 12, a segment label table 7, a plurality of base registers 4, and a base register updating device. The invention is applicable to data processing systems.

Description:
BACKGROUND OF THE INVENTION 
     (a) Field of the Invention 
     The present invention relates to methods and apparatus for converting virtual addresses to real addresses. 
     A virtual address is defined as an address which is contained in a program instruction and which needs modifying in order to gain access to data represented by a word in a central memory, while a real address allows direct access. A central memory is defined as the memory containing the data to which the central unit of a computer has direct access, as opposed to auxiliary memories. 
     The invention relates more particularly to methods and apparatus for converting virtual addresses to real addresses for a real-time data processing system in which the programs are divided into numbered functional sets, each functional set being divided into segments defined by as many labels. 
     The division of a program into segments, or segmentation, is a method for limiting central memory congestion by loading the central memory at any one time with only that segment needed for executing the program at that time. 
     (b) Discussion of the Prior Art 
     Conventional conversion devices use a functional set number register, a table of segment labels located in the data processing system central memory and so-called &#34;base&#34; registers, each capable of storing a segment label, all these registers taken together being capable of storing the labels of segments required by a functional set. 
     Segmentation makes it necessary to consult the segment label table prior to each central memory access operation, since the virtual address (the only address known by the programmer), simply indicates the displacement (or relative address) within the segment. In order to obtain the absolute address, it is necessary to add this displacement to the base address (or start address) of the segment, which is given by the segment label table. This base address, comprising a given binary number, is conventionally associated with an access code and data indicating the size of the segment in order to constitute a segment label. This is the operating system of the data processing system controlling the segment label table, i.e. the locations of segments in the central memory. 
     In addition, the grouping of segments into functional sets comprises consulting a functional set number register prior to each segment label table access operation, since it is preferable to use functional set change instructions for updating the functional set number register rather than indicating this number in all instructions of the same functional set. This increases the effective addressing capacity of the data processing system. 
     In the case of known multiprogramming data processing systems using segmentation and the division of programs into functional sets, a supervisory program is called for each functional set change in order to update the base registers. 
     A disadvantage of the program-controlled updating method is its relatively long execute time. The disadvantage of this method thus increases with the number of functional set changes, which is especially true for the data processing systems used in electronic telephone exchanges. 
     Also in the case of known systems, the supervisory program updates all the central unit base registers at each change of functional set. This method needlessly increases the supervisory program execute time, since in telephone switching applications, processing of all the segments of the same functional set, before changing the latter, is very infrequent. 
     SUMMARY OF THE INVENTION 
     The purpose of the present invention is to overcome the disadvantages described above. According to one aspect of the invention, the apparatus for converting virtual addresses to real addresses is configured such that base register updating is performed automatically and upon request by a base register updating circuit. 
     According to another aspect of the invention, the base register updating device includes means for storing a table indicating the validity, with respect to the current functional set, of the segments contained in the base registers, and a central memory access order circuit for ordering either normal instruction execution access or prior access to a segment label table followed by normal access, depending on whether the label of the segment defined in the current instruction is present or not present in the base registers. 
     The purposes and characteristics of the present invention appear more clearly from the following description of an illustrative example, the said description referring to the appended drawings, in which: 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block schematic diagram of an illustrative address conversion circuit according to the invention. 
     FIG. 2 is a more detailed circuit diagram of the validity indicator table used in FIG. 1. 
     FIG. 3 is a more detailed circuit diagram of the central memory access order circuit used in FIG. 1. 
    
    
     DETAILED DESCRIPTION 
     FIG. 1 shows the manner in which address conversion circuit 1 communicates with a central unit 2 and a central memory 3. The address conversion circuit 1 includes a plurality of base registers 4 which are capable of storing part of the segment labels of the current functional set, an adder 5 for establishing the real address, i.e. the central memory address for normal instruction execution access, and a register 6 for establishing the prior address, i.e. the central memory address for prior access to the segment label table 7 located in the central memory. 
     In accordance with the invention, the address conversion circuit 1 includes a base register updating device 8 which has itself a table 9 indicating the validity, with respect to the current functional set, of the segment labels contained in the base registers 4 and a central memory access order circuit 10, ordering either normal access or prior access to the segment label table followed by normal access, depending on whether or not the segment label defined in the current instruction is present in the base registers 4. 
     The virtual address is provided by a virtual address register 11 located in the central unit. This register contains the current segment number (bits S 0  to S 4 ), and the displacement within this segment (bits NL 0  to NL 9 ). The instruction operation code (bits OP 0  to OP 7 ) is provided by an instruction register 11 located in the central unit. The current functional set number (bits E 0  to E 6 ) is provided by a functional set number register 12 located in the central unit. The segment label table start address (bits B 0  to B 6 ) is provided by a stack pointer 13 located in the central unit. 
     The term &#34;current&#34; implies that all the operations performed from the instant of loading the instruction into the instruction register are being performed. Adder 5 establishes the real address (bits AR 9  to AR 31 ) from the segment label (bits BS 0  to BS 19 ) provided by the base registers 4 and the displacement in the segment (bits NL 0  to NL 9 ) provided by virtual address register 11. Register 6 establishes the prior address (bits AP 13  to AP 31 ) by juxtaposing the segment number, the functional set number and the segment label table start address. The central unit also includes a functional set change instruction decoding circuit 14, which is fed with the operation code. 
     The number of bits selected for encoding the various signals is only in the embodiment of the invention to be described illustrative of the invention. This number may be modified in any way without exceeding the scope of the invention. 
     The operation of the above circuit will now be described, considering the various types of instruction. 
     If the operation code of the instruction indicates that the latter is an instruction other than a functional set change instruction, the central unit sends a central memory access request signal DM to the central unit access order circuit 10. Order circuit 10 first checks if the current segment label is present in the base register by applying the current segment number to the input of the validity indicator table, which then feeds a segment label validity signal VDS to the order circuit 10. 
     If signal VDS indicates that the current segment label is present in the base registers, i.e. if this label is validated, normal access is ordered by applying the current segment number to the input of the base registers which then feed the label base value to adder 5. Order circuit 10, fed with the real and trial addresses, then selects the real address and sends a memory access trigger signal DCM to the central memory. Since the central memory address (bits AM 9  to AM 31 ) are those of the real address, the data read in the central memory (bits DOM 0  to DOM 31 ) can be acquired by the central unit. For this purpose, the memory answer signal RM fed by the central memory to the order circuit 10 is converted by the latter into a data validation signal DV for the central unit. 
     On the other hand, if signal VDS indicates that the current segment label is not present in the base registers, prior access to the segment label table is ordered. For this purpose, order circuit 10 selects the prior address and feeds a central memory access trigger signal DCM to the central memory. Since the central memory address is equal to the prior address, order circuit 10 inhibits transmission signal DV to the central unit and enables bits DOM 0  to DOM 31  to be written into the base registers by feeding the latter with a base register write order signal ERB. Order circuit 10 then sends a validity indicator table write order signal EIV to the validity indicator table for changing the status of the current segment label validity indicator. Real address access can then be ordered and the operation is executed, as described above. 
     If the operation code of the instruction indicates that the latter is a functional set change instruction, the operation code decoder changes the states of all the validity indicators in table 9 by means of a signal ETIV, and the contents of the functional set number register 12 are also changed. 
     In the example illustrated by FIG. 1, the segment number is encoded by means of 5 bits (S 0  to S 4 ). The maximum number n of segments per functional set is then 32. 
     Turning now to FIG. 2, the validity indicator table includes 32 type D indicating flip-flops BI 0  to BI 31 . The validity indicator table read circuit comprises a read multiplexer 15 having 32 inputs connected to outputs Q of the indicating flip-flops, and controlled by the current segment number (bits S 0  to S 4 ). The output signal VDS of multiplexer 15 is equal to the signal available on the indicating flip-flop whose number coincides with the segment number, while The D inputs of the n indicating flip-flops are held in the logical &#34;1&#34; state. The indicating flip-flop write circuit comprises a coincidence circuit having 32 AND-gates P 0  to P 31 , each having one input fed with the validity indicator table write order signal EIV, another input connected to one of the outputs of a segment number decoder 16, and an output connected to the clock input CK or a corresponding one of the indicating flip-flops. Decoder 16 has one input held in the logical &#34;1&#34; state and is controlled by bits S 0  to S 4 . Input CL, for forcing the 32 indicating flip-flops to zero, is fed with signal ETIV obtained on the output of the functional set change instruction decoding circuit. 
     Following a central memory access request DM, order circuit 10 tests signal VDS. If signal VDS is a logical &#34;1&#34;, this indicates that the current segment label is present in the base registers, allowing normal access. If signal VDS is a logical &#34;0&#34;, order circuit 10 orders prior access to the segment label table and, when the label is loaded in the base registers, sends a logical &#34;1&#34; signal EIV to the validity indicator table. This signal EIV, in combination with decoder 16, then activates the indicating flip-flop whose number corresponds to the current segment number, thereby changing the Q output of this flip-flop to &#34;1&#34;. 
     Referring now to FIG. 3, it is seen that the central memory access order circuit 10 includes a central memory addressing multiplexer 17, a sequencer consisting of a first delay line 18 and a second delay line 19, a segment label validity detection circuit 20, a circuit 21 controlling multiplexer 17, a base register write order circuit 22, a validity indicator table write order circuit 23, a central memory access trigger circuit 24 and a circuit 25 validating data read in the central memory. 
     The first delay line 18 has an input 26 which comprises the first input terminal of the sequencer and which is fed with the central memory access request signal DM, an output 27 which comprises the first output terminal of the sequencer and which produces a first sequencer output signal T 1 , an output 28 which comprises the second output terminal of the sequencer and which produces a second sequencer output signal T 2 , and an output 29 which comprises the third output terminal of the sequencer and which produces a third sequencer output signal T 3 . 
     The second delay circuit 19 has an input 30 which comprises the second input terminal of the sequencer and which is fed with the central memory acknowledge signal RM, an output 31 which comprises the fourth output terminal of the sequencer and which produces a fourth sequencer output signal T 4 , an output 32 which comprises the fifth output terminal of the sequencer and which produces a fifth sequencer output signal T 5 , an output 33 which comprises the sixth output terminal of the sequencer and which produces a sixth sequencer output signal T 6 . 
     The validity detection circuit 20 includes a type JK validity detection flip-flop 34, whose input J is fed with signal VDS inverted by an inverter 35, whose input K is held in the logical &#34;0&#34; state, whose &#34;0&#34; forcing input CL is fed with the fifth sequencer output signal T 5 , whose clock input CK is fed with the first sequencer output signal, and whose output Q produces the validity detection signal DTV. 
     The input signals of address multiplexer 17 comprise the real address (bits AR 9  to AR 31 ) produced by adder 5, and the prior address (bits AP 13  to AP 31 ) produced by register 6. When ordered by signal SAD produced by circuit 21, multiplexer 17 produces the central memory address (bits AM 9  to AM 31 ). The central memory addressing order circuit 21 comprises a first AND-gate fed with signal DTV and the third sequencer output signal T 3 . 
     The base register write order circuit 22 comprises a second AND-gate fed with signal DTV and the fourth sequencer output signal T 4 . 
     The validity indicator table write order circuit 23 comprises a third AND-gate fed with signal DTV and the fifth sequencer output signal T 5 . 
     The central memory access triggering circuit 24 comprises a type D triggering flip-flop 36, whose input D is held in the logical &#34;1&#34; state, whose clock input CK is fed with the output signal of a first OR-gate 37 fed with the second and sixth sequencer output signals, whose &#34;0&#34; forcing input CL is fed with the output signal of a second OR-gate 38 fed with a signal DTV and the fifth sequencer output signal T 5 , and whose output Q produces the central memory access triggering signal DCM. 
     Circuit 25 validating the data read in the central memory comprises a fourth AND-gate 39 fed with signal RM received on the second sequencer input terminal and signal DTV inverted by an inverter 40. 
     In reply to a first sequencer input pulse, i.e. to a central memory access request from the central unit, signals T 1 , T 2  and T 3  present first, second and third sequencer output signals respectively delayed, with respect to each other and with respect to the first sequencer input pulse, by an interval determined by the first delay line 18. The first sequencer output pulse activates the validity detection flip-flop 34. 
     If the current segment label is not present in the base registers, i.e. if signal VDS is a logical &#34;0&#34;, signal DTV then changes to a logical &#34;1&#34;. The memory access triggering flip-flop 36 is activated on the second sequencer output pulse, triggering prior access to the segment label table with a prior address produced by multiplexer 17 on the third sequencer output pulse. Following prior access execution, the memory acknowledge signal RM presents a pulse which constitutes the second sequencer input pulse. Because signal DTV is a logical &#34;1&#34;, validation circuit 25 inhibits transmission of signal DV to the central unit. In reply to this second input pulse, signals T 4 , T 5  and T 6  present fourth, fifth and sixth sequencer output pulses respectively, delayed one with respect to the other and with respect to the second input pulse by an interval determined by the second delay line 19. Signal ERB is activated on the fourth sequencer output pulse and orders the label to be written into the base registers. Signal EIV is activated on the fifth sequencer output pulse and orders the change of the label validity indicator to a logical &#34;1&#34;. At the same time, signal DTV changes back to a logical &#34;0&#34; on the fifth sequencer output pulse. The triggering flip-flop 36 is again activated on the sixth sequencer output pulse, which then triggers normal central memory access, with the real address produced by multiplexer 17. Following real access execution, signal RM presents a pulse. Because signal DTV is a logical &#34;0&#34;, validation circuit 25 enables signal DV to be sent to the central unit. 
     If the current segment label is present in the base registers, i.e. if signal VDS is a logical &#34;1&#34;, signal DTV remains a logical &#34;0&#34; on the first sequencer output pulse. The triggering flip-flop 36 is activated on the second sequencer output pulse, thereby triggering normal access with the real address produced by multiplexer 17. Because signal DTV is a logical &#34;0&#34; upon normal access execution, validation circuit 25 enables signal DV to be fed to the central unit. 
     It is thus seen that the base registers are automatically updated, i.e. without provision being made by the programmer, since the base register updating device consists entirely of wired logic. In addition, it is seen that this updating is performed upon request by means of the validity indicator table, i.e. as and when necessary, instead of being performed systematically, since the labels of segments not used within the same functional set are not loaded into the base registers. The data processing speed obtained by a base register updating device of this type is, thus, considerably higher than that obtained when using a supervisory programme. 
     Automatic and on-request updating can also be performed using the same principle by a microprogrammed automaton instead of a wired automaton. 
     Although the principles of the present invention are described above in relation with a practical example, it should be clearly understood that the said description is given as an example only and does not limit the scope of the present invention.