Abstract:
The device embodying the invention uses at least two read-only memory blocks containing the instructions of the application code and of which the addressing inputs are respectively connected to two counters connected to the address bus of the microprocessor. The read outputs of these blocks are connected to the data bus of the microprocessor via two buffers. A control circuit is provided to control, as a function of the nature of the addresses transmitted on the address bus and at the rhythm of the latter, a succession of cycles each comprising the transfer on the data bus, via one or other of the buffers, of the data contained in one or other of the memories and the incrementing of the counter associated with the other memory, in order to anticipate the data transfer of the next cycle. The invention applies notably to the processors taken on board aerodynes.

Description:
BACKGROUND OF THE INVENTION 
     1--Field of the Invention 
     This invention relates to a device for optimizing the performance characteristics of a processor with the use of slow-access read-only memories for the application program associated with a processor. 
     2--Description of the Prior Art 
     It is known that with new processors, e.g. of the 88100, SPARC 601, DSP 320CXX, etc. types, full performance is obtained when the memory, and more particularly the instruction memory, is capable of supplying one instruction per clock cycle. When this is not the case, the maximum performance of the processor is divided by the number of cycles required to access an instruction (i.e., for instance, a power divided by two if the memory response takes two cycles). 
     Thus, for a processor operating at a frequency of 25 MHz (i.e. with cycles of 40 ns) to achieve full performance, instruction memories capable of supplying instructions within a time range of 20 to 25 ns must be used. For a processor operating at 33 MHz, this time is as low as 15 ns. 
     In practice, these access times are available in RAM technology, thus implying, for the application code (programme), that the instructions be copied from a read-only memory space to a RAM space when the processor is powered up. 
     However, this solution is not suited to numerous applications: 
     In the case of an on-board processor, e.g. on board an aerodyne, it is particularly dissuasive to need a multiplicity of memory cases (always costly) in which the application code is copied. Moreover, it cannot be guaranteed that the contents of the RAM will be saved in the event of a power cut-off lasting more than a predetermined period of time. 
     Furthermore, for critical applications such as, e.g. flight controls using application programs in excess of 100 kilobytes, the copying of the program into the RAM necessarily entails an unacceptable interruption of service. 
     Moreover, in a device of this type, the insertion of a correcting code in each instruction stored in the memory is not satisfying since the logic checking this control bit increases memory access time and does not enable sufficient corrections to be guaranteed. It is psychologically difficult to accept that function instructions might be stored in RAM protected by cell or battery. 
     OBJECT OF THE INVENTION 
     The main object of this invention is therefore more particularly to remedy the preceding disadvantages. 
     SUMMARY OF THE INVENTION 
     Accordingly, there is provided a device capable of supplying, on the data bus of a processor, one instruction per cycle coming from read-only memories used as execution memory, without requiring that the processor use a specific signal other than the addresses it issues on its address bus and the control signals it generates during memory access. 
     According to the invention, in this device, the application program instructions are contained in at least two read-only memory blocks of which the addressing inputs are respectively connected to two counters connected to the address bus and of which the read outputs are connected to the data bus via two buffers. A logic circuit is then provided in order to control, as a function of the type of addresses transmitted on the address bus and at the transmission rate of the addresses, a succession of cycles each comprising the transfer, on the data bus via one or other of the buffers, of the data generated by one or other of the memory blocks and the incrementation of the counter associated with the other memory block, so as to anticipate the transfer of data which will be performed during the next cycle. 
     Advantageously, the above-mentioned logic circuit can comprise two logic comparators intended to compare the outputs of the counters with the address provided by the processor, so as to authorize, at the end of the cycle, the transfer of the data contained in the buffer memory, and which correspond theoretically to said address, only in the event of the comparison revealing an identity, and so as to prohibit said transfer in the event of said comparison revealing a discrepancy. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Further features and advantages of the invention will be apparent from the embodiment of the invention described, by way of a non-limiting example, in reference to the corresponding accompanying drawings in which: 
     FIG. 1 is a synoptic diagram of a device embodying the invention; 
     FIG. 2 is a time chart illustrating a linear sequence of code of the device represented in FIG. 1; 
     FIG. 3 is a time chart illustrating an operating cycle of the device represented in FIG. 1 with a break in the sequence. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In this example, the device comprises two read-only memory blocks ROM I , ROM P  of which the address inputs are respectively connected to the address bus 1 of the microprocessor μP via two respective counters Counter P , Counter I , and of which the read outputs are connected to the data bus 2 of the microprocessor μP via two respective buffers Buffer P , Buffer I . 
     The counters Counter P  and Counter I  are intended to respectively receive the even and odd addresses generated on the bus 1, except for the least significant address bit which is loaded in a register 3 of which the output Q is connected to a logic circuit 4 which controls the incrementing of the counters Counter P  and Counter I  and the opening of one or other of the buffers Buffer P  and Buffer I  in order to transmit the data from the memory blocks MP or MI onto the data bus of the microprocessor μP. 
     These counters Counter P  and Counter I  are designed so as to issue the respective addresses of the memory blocks ROM P  and ROM I  with which they are associated, except for the least significant bit of the address coming from the microprocessor μP (which is not received by the memory blocks ROM P  and ROM I ). 
     The buffers Buffer P , Buffer I  receive at their inputs the data contained by the respective memory blocks ROM P , ROM I  at the addresses indicated by the counters Counter P , Counter I . 
     The register 3 operates like a bistable flip-flop during each cycle. The output Q of this register R is used by the logic circuit 4 in order to determine which buffer Buffer P  or Buffer I  will provide the datum from the memory block ROM P  or ROM I  to the microprocessor μP for sampling on the current cycle. 
     Thus, if the output Q of the register is in the &#34;0&#34; state, the cycle is an even address cycle and the buffer register Buffer P  is authorized to transmit the data it contains. If the output Q is in the logic &#34;1&#34; state, the buffer Buffer I  that is open for the memory block ROM I  to transmit its contents onto the data bus 2. 
     As evidenced in the time chart represented in FIG. 2, in the case of a linear sequence of code, the operating cycle CA of the device previously described is as follows from the moment an address A is generated and transmitted by the address bus 1 by the processor μP (microprocessor address): 
     If the address A is even: 
     At the start of the cycle CA, the counter Counter P  contains the address A it acquired during the previous cycle. It presents this address to the memory ROM P . The logic circuit 4, of which the input is in the logic &#34;0&#34; state, increments the counter Counter I  which moves on to the address A+1 (output Counter I ). 
     At the end of the cycle CA, the buffer Buffer P  is open for the memory block ROM P  to transmit the datum DA that was contained in the address A (output MP). The microprocessor μP samples off the datum DA. The buffer Buffer I  is closed during the cycle CA. 
     During the next cycle (cycle CA+1): 
     At the start of this cycle, the counter Counter P  is incremented (output Counter P ) and presents the address A+2 to the memory block ROM P  during the cycle CA+2. Since the cycle CA, the counter Counter I  has contained the address A+1 (output Counter I ) and holds it during the cycle CA+1. At the end of the cycle CA+1, the buffer Buffer I  is open for the memory block ROM I  to transmit the datum DA+1 (data bus). The microprocessor μP can then sample off the datum DA+1. The buffer Buffer P  is closed during the cycle CA+1. 
     The difficulty encountered in applying this method resides in the sequence breaks that must be detected before the microprocessor samples off an erroneous datum due to the anticipation of the address supplied by the counters. 
     This is the reason why the device comprises an error detecting circuit using two logic comparators Comp P , Comp I  (therefore very fast) which respectively compare the outputs of the counters Counter P  and Counter I  with the address supplied by the processor μP. 
     If the output Q of the register 3 is in the logic &#34;0&#34; state, the output of the comparator Comp P  is valid during the cycle. 
     If the result of the comparison performed by the comparator Comp P  reveals an identity, the address anticipated by the counter Counter P  is correct in relation to the one supplied on the bus 1 (microprocessor address) by the microprocessor μP. The datum contained in the memory ROM P  at this address can therefore move past the buffer Buffer P  and be sampled off by the microprocessor μP at the end of the cycle. 
     If the result of the comparison performed by the comparator Comp P  reveals a difference, e.g. due to the fact that the microprocessor μP has just conducted a sequence break and that it therefore presents on the address bus 1 the address B and not the address A (FIG. 3), the address A anticipated by the counter Counter P  (which was incremented during the previous cycle) is therefore incorrect in relation to the one provided by the microprocessor μP on the address bus 1. It is then necessary to block the &#34;ready&#34; response sent by the logic 4 to the microprocessor μP in order to prohibit the latter from sampling off a wrong datum. 
     In addition to this blocking, the difference detected by the comparator Comp P  causes the counters Counter P , Counter I  of the register 3 to be loaded by the address bus 1 (the register 3 being loaded by the least significant bit of the address present on the address bus 1). This loading takes place at the end of cycle B. 
     Subsequent to this loading, if the output Q of the register 3 is in the logic &#34;0&#34; state, this means that the address B is an even address. Accordingly, the counter Counter I  is incremented at the end of the next cycle. Conversely, if the output Q is in the logic &#34;1&#34; state, the counter Counter P  is incremented at the end of the next cycle. The datum 2 contained in the memory at the address B is supplied over three cycles instead of one cycle in a linear sequence. The datum DB+1 is then supplied over one cycle subsequent to the supplying of datum DB. 
     If the output Q of the register 3 is in the logic &#34;1&#34; state, the comparator Comp I  is valid during the cycle. 
     If the result of the comparison performed reveals an identity, the address anticipated by the counter Counter I  is correct in relation to the one provided by the microprocessor μP. The datum supplied by the memory ROM I  via the buffer Buffer I  can be sampled off by the processor μP at the end of the cycle. 
     If the result of the comparison performed by the counter Comp I  reveals a difference due to the fact that the processor μP has just conducted a sequence break and presents address B on the bus 1 and not address A, the address A anticipated by the counter Counter I  is incorrect in relation to the one provided by the microprocessor μP. The logic circuit 4 blocks the &#34;ready&#34; response sent to the processor in order to prohibit the sampling off of a wrong datum. Furthermore, the counters Counter P  and Counter I  are loaded by the address bus 1, whereas the register 3 receives the least significant bit of the address present on the bus 1. This loading takes place at the end of cycle B. 
     Subsequent to this loading, if the output Q of the register 3 is in the logic &#34;0&#34; state, the address B is an even address and the counter Counter I  is incremented at the end of the next cycle. The datum DB is then supplied over three cycles instead of one cycle in a linear sequence. The next datum DB+1 is then supplied during the cycle following the datum DB. 
     The device previously described enables the performance of the microprocessor to be upheld despite the use of slower memories, with a slight deterioration being observed, however, during breaks in the sequence of the processor μP such as those caused by branching instructions. 
     Thus, in the case of a program using 15% branching instructions, this device enables an efficiency of 77% to be achieved instead of 100% (obtained with a RAM code without latencies). With a program using 10% branching instructions, the efficiency would be 83%. 
     The invention is not, of course, limited to the embodiment previously described. 
     Thus, the number of circuits comprising a counter Counter P , Counter I , a memory block ROM P , ROM I  and a buffer Buffer P , Buffer I  could exceed two. 
     This number could e.g. be equal to four. In this case, the register 3 must be designed in order to receive a couple of lower order bits of the addresses generated on the address bus 1. 
     The logic circuit 4 comprises a means for decoding the two bits contained in the register 3 and for commanding the incrementing of one of the four counters Counter P , Counter I  and the opening of one of the four buffers Buffer P , Buffer I  as a function of the value of said couple of bits. 
     Four comparators Comp P , Comp I  will further be provided for comparing the outputs of the four counters Counter P , Counter I  with the address provided by the processor μP and for validating the address anticipated by the counter CP, CI or for prohibiting the sampling off of a wrong datum by the processor, according to a process similar to the one previously described.