Abstract:
A buffer memory device is formed of: a plurality of memory blocks each comprising a register and a comparator for comparing the content of said register and the input data. A control circuit controls the shift of the data of said registers in such a manner that only the contents of said registers from the first memory block to a desired memory block are shifted.

Description:
FIELD OF THE INVENTION 
     The present invention relates to a buffer memory device, and more particularly to that in which the register is of FIG. 3 operates a shift register. 
     BACKGROUND OF THE INVENTION 
     A prior art buffer memory device is shown in FIG. 3. In FIG. 3, the reference numeral 30a designates a comparator, the numeral 30b designates a latch, and the numeral 25 designates a memory circuit for storing the order of the use of the latch 30b. Each memory block 30 of the buffer memory device is constituted by the latch 30b and the comparator 30a. 
     The device as follows. 
     When input data is input to this circuit a coincidence signal a 1  to a n  indicative of the fact that the content of the latch 30b and the input data coincide with each other is output from the comparator 30a associated with the latch 30b which stores the same data as the input data. When no latch 30b stores the content in coincidence with the input data, no coincidence signal a 1  to a n  is output from the comparator 30a. When the input data and the content of the latch 30b of any memory block 30 do not coincide with each other as described above, the input data must be stored in a buffer memory device. In this case, the new data is written in into a block 30 which is selected for storing the input data among the blocks of the buffer memory device. As a method of selecting the memory block 30, there is a LRU (Least Recently Used) method which selects the least recently used memory block, and this method increases the efficiency of the buffer memory device. In order to execute this LRU method the buffer memory device is required to have a memory circuit 25 for storing the order of the use of the memory block 30. Assuming that the number of memory blocks 30 is n, the memory circuit 25 has to be capable of storing n! states. 
     In the prior art buffer memory device with such a construction it is necessary to provide a use order memory circuit 25 capable of storing n! states in replacing of the data in accordance with the LRU method. This results in an increase in the circuit size. 
     Regarding another prior art buffer memory device there is an article, &#34;Basic Integrated Circuit Engineering&#34;, by D. J. HAMILTON and W. G. HOWARD, pp. 566-567, McGRAW-HILL Co., Ltd. In a usual shift register shown in FIG. 15-11 of this article, the contents stored in the respective flip-flops are all shifted to the next stages. A control circuit is not provided for controlling to shift the content of a desired flip-flop to the next stage. 
     Another prior art buffer memory device is disclosed in an article, &#34;Computer Architecture&#34;, by Hiroshi Yamada, pp. 123-131, published by Sangyo Tosho Syuppan Co., Ltd. In this article it can be seen that a circuit for storing the order of the use is required for enabling selecting of the block which has not been used for the longest time. 
     SUMMARY OF THE INVENTION 
     An object of the present invention is to provide an improved buffer memory device capable of conducting a displacement of data with the use of the LRU method without an increase in the memory size. 
     Other objects and advantages of the present invention will become apparent from the detailed description given hereinafter; it should be understood, however, that the detailed description and specific embodiment are given by way of illustration only, since various changes and modifications within the spirit and scope of the invention will become apparent to those skilled in the art from this detailed description. 
     According to the present invention, there is provided a buffer memory device comprising: a plurality of memory blocks each comprising a register and a comparator for comparing the content of said register and the input data; and a control circuit for controlling the shift of the data of said registers in such a manner that only the contents of said registers from the first memory block to a desired memory block are shifted. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a diagram showing a buffer memory device as an embodiment of the present invention; 
     FIG. 2 is a timing chart showing the clock signals φ1 and φ2; and 
     FIG. 3 is a diagram showing a prior art buffer memory device. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In order to explain the present invention in detail, reference will be particularly made to FIGS. 1 and 2. 
     In FIG. 1 the reference numerals 1 to 5 designate memory blocks, the numerals 6 to 10 designate NOR circuits, the numerals 11 to 14 designate NAND circuits, the numerals 15 to 19 designate inverters, the numerals 20 to 24 designate transmission gates, the reference characters a 1  to a 5  designate coincidence signals, and the reference characters E1 to E5 designate shift enable signals. Each memory block 1 to 5 is formed of a register 26 and a comparator 27. The NOR circuits 6 to 10, the NAND circuits 11 to 14, the inverters 15 to 19, and the transmission gates 20 to 24 constitute a control circuit, generally indicated as 28, for controlling the shift operations of the registers 26. 
     Each NMOS transistor 20 to 24 which functions as a transmission gate is connected between the input terminal and the register 26 or between two registers 26. The output of the respective NOR circuit 6 to 10 is connected to the gate electrode of the respective transistor 20 to 24, and the respective shift enable signal E1 to E5 for instructing to conduct a shift or not and a clock signal φ2 are input to the respective NOR circuit 6 to 10. The respective comparator 27 of the respective memory block 1 to 5 compares the input data and the data stored in the register 26 of that memory block when the clock signal φ1 is &#34;1&#34; thereby to output the coincidence signal a 1  to a 5 . The respective coincidence signal a 1  to a 5  becomes &#34;0&#34; when the input data and the content of the register 26 coincide with each other, and becomes &#34;1&#34; otherwise. 
     FIG. 2 shows waveforms of the two clock signals φ1 and φ2. These clock signals φ1 and φ2 have phases opposite to each other, and do not become &#34;1&#34; at the same time. 
     The device will be operated as follows. 
     First of all, when the clock signal φ1 is &#34;1&#34; the comparator 27 of each memory block 1 to 5 compares the input data and the content of the register 26, and outputs the coincidence signal a 1  to a 5  as the result of comparison. For example, when the content of the register 26 of the memory block 3 and the input data coincide with each other, the coincidence signal a 3  from the comparator 27 of the memory block 3 is &#34;0&#34;, and the coincidence signals a 1 , a 2 , a 4 , and a 5  from the other memory blocks 1, 2, 4, and 5 are all &#34;1&#34;. When the shift enable signal E1 is made &#34;0&#34;, the shift enable signal E2 output from the NAND circuit 11 becomes &#34;0&#34;, and the shift enable signal E3 also becomes &#34;0&#34;. The shift enable signal E4 is &#34;1&#34; because the coincidence signal a 3  is &#34;0&#34;, and the shift enable signal E5 is also &#34;1&#34;. The shift enable signals E1 to E3 become &#34;0&#34; and the other shift enable signals E4 and E5 become &#34;1&#34; when the data of the memory block 3 and the input data coincide with each other as described above. Then, the clock signal φ2 is &#34;0&#34;, and the outputs of the NOR circuits 6 to 10 are all &#34;0&#34;, and the transmission gates 20 to 24 are all OFF, and all the paths between the memory blocks 1 to 5 are in high-impedance states, thereby disabling the shift of the data. 
     Next, when the clock signal φ1 becomes &#34;0&#34; and the clock signal φ2 becomes &#34;1&#34;, the outputs of the NOR circuits 6, 7, and 8 become &#34;1&#34;, and the outputs of the NOR circuits 9 and 10 become &#34;0&#34; because the shift enable signals E1, E2, and E3 were &#34;0&#34; and the shift enable signals E4 and E5 were &#34;1&#34;. Thus, the transmission gates 20, 21, and 22 are turned ON, and the transmission gates 23 and 24 are kept OFF. As a result, the input data is shifted to the register 26 of the memory block 1, and the data stored in the register 26 of the memory block 1 is shifted to the register 26 of the memory block 2, and the data of the memory block 2 is shifted to the memory block 3. The data of the registers 26 of the memory blocks 3 and 4 will not be shifted to the next stages because the transmission gates 23 and 24 are OFF, and the contents of the registers 26 of the memory blocks 4 and 5 are unchanged. 
     The above described operation is performed in a case where the input data and at least one of the data of the memory blocks coincide with each other. If the data stored in any of the memory blocks 1 to 5 does not coincide with the input data, the coincidence signals a 1  to a 5  will become all &#34;1&#34;, and the shift enable signals E1 to E5 will become all &#34;0&#34;. As a result, the transmission gates 20 to 24 are all turned ON when the clock signal φ2 is &#34;1&#34;. Thus, the contents of the memory blocks 1 to 4 are shifted to the next stage memory blocks 2 to 5, the content of the memory block 5 is banished, and the input data is stored in the memory block 1. 
     As described above the most recently used data is always stored in the memory block 1, and the data used subsequently thereto are stored in the subsequent memory blocks 2, . . . in the order of the use, and the least recently used data is stored in the memory block 5. When data other than that stored in the memory blocks is used, the data of the registers of all the memory blocks are shifted to the next stages, and the least recently used data stored in the memory block 5 is banished. A buffer memory device realizing the displacement of data with the use of the LRU method is constructed in this way. 
     In the above illustrated embodiment, there are provided five memory blocks, but the number of the memory blocks can be any integer n with the same effects as described above. 
     As is evident from the foregoing description, according to the present invention, the memory section of the memory block is constituted by a shift register, and a control circuit for controlling the shift of the data in such a manner that the data of several blocks from the first block to a desired number block are shifted to the next stages, thereby realizing the data displacement with the use of the LRU method with no increase in the circuit size.