CA1233273A - Method for controlling buffer memory in data processing apparatus - Google Patents
Method for controlling buffer memory in data processing apparatusInfo
- Publication number
- CA1233273A CA1233273A CA000526259A CA526259A CA1233273A CA 1233273 A CA1233273 A CA 1233273A CA 000526259 A CA000526259 A CA 000526259A CA 526259 A CA526259 A CA 526259A CA 1233273 A CA1233273 A CA 1233273A
- Authority
- CA
- Canada
- Prior art keywords
- buffer memory
- block
- address
- operand
- data
- 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.)
- Expired
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
ABSTRACT OF THE DISCLOSURE
There is disclosed a method for controlling a buffer memory in a data processing apparatus with a central processing unit which includes a buffer memory for storing a copy of the portion of a main memory. The method includes the steps of detecting, first, a word unit of a block up to which registration of a word has been completed in a process of registration of data from the main memory into a sequence of word units of the block. Then, as a second step, detecting the distance of the word of the address of writing of an operand in the block which is being registered into the block of the buffer memory from the main memory is carried out while detecting, thirdly, the completion of the registration of the word of the address of writing of the operand into the block which is being registered into the block of the buffer memory from the main memory based on the results of the first and second detection steps. When the result of the third detecting step indicates that the word of the address of the writing of the operand has already been registered from the main memory into the block of the buffer memory, writing of the operand into the block of the buffer memory is executed.
There is disclosed a method for controlling a buffer memory in a data processing apparatus with a central processing unit which includes a buffer memory for storing a copy of the portion of a main memory. The method includes the steps of detecting, first, a word unit of a block up to which registration of a word has been completed in a process of registration of data from the main memory into a sequence of word units of the block. Then, as a second step, detecting the distance of the word of the address of writing of an operand in the block which is being registered into the block of the buffer memory from the main memory is carried out while detecting, thirdly, the completion of the registration of the word of the address of writing of the operand into the block which is being registered into the block of the buffer memory from the main memory based on the results of the first and second detection steps. When the result of the third detecting step indicates that the word of the address of the writing of the operand has already been registered from the main memory into the block of the buffer memory, writing of the operand into the block of the buffer memory is executed.
Description
~Z33273 METHOD FOR CONTROLLING BUFFER MEMORY IN
DATA PROCESSING APPARATUS
This application is a divisional application of Serial No. 468,354 filed November 21, 1984.
BACKGROUND OF THE INVENTION
1. Field of the Invention The present invention relates to a method for controlling a buffer memory in a data processing apparatus. The method according to the present invention is applicable to a data processing apparatus including a main memory and a central processing unit having a buffer memory for storing a copy of a portion of the information stored in the main memory, wherein speed-up of the access process to the buffer memory is needed.
DATA PROCESSING APPARATUS
This application is a divisional application of Serial No. 468,354 filed November 21, 1984.
BACKGROUND OF THE INVENTION
1. Field of the Invention The present invention relates to a method for controlling a buffer memory in a data processing apparatus. The method according to the present invention is applicable to a data processing apparatus including a main memory and a central processing unit having a buffer memory for storing a copy of a portion of the information stored in the main memory, wherein speed-up of the access process to the buffer memory is needed.
2. Description of the Related Art In general, in a data processing device having a buffer memory of the set associative type, in which a copy of a portion of a main memory is stored, there is a problem that if the address to which the writing of an operand data is instructed is included in a block in the buffer memory to which the writing of the data of the main memory is being carried out, the writing of the operand data into the address of the block is possible only after the writing of the data of the main memory into the block is completed.
There is further a problem that, even in the case where the writing of the operand data into the address to which the writing of the data of the main memory has been completed is instructed, the writing of the operand data into such address cannot be carried out until the writing of the data of the main memory into the entire block is completed.
1~33273 SUMMARY OF THE INVENTION
It is the object of the invention to provide an improved method for controlling a buffer memory in a data processing apparatus in which the writing of operand data into a block of the buffer memory is speeded up to realize high speed operation of a central processing unit of a data processing apparatus having the buffer memory.
According to the present invention, there is provided a method for controlling a buffer memory in a data processing apparatus with a central processing unit which includes a buffer memory for storing a copy of a portion of a main memory, the method comprising the steps of:
detecting, first, a word unit of a block up to which registration of a word has been completed in a process of registration of data from the main memory into a sequence of word units of the block;
detecting, second, the existence of the word corresponding to the address for writing of an operand in the block which is being registered into the block of the buffer memory from the main memory; and detecting, third, the completion of registration of the word corresponding to the address for writing of the operand into the block which is being registered into the block of the buffer memory from the main memory based on the results of the first and second detecting steps;
wherein, when the result-of the third detecting step indicates that the word corresponding to the address for writing of the operand has already been registered from the main memory into the block of the buffer memory, writing of the operand into the block of the buffer memory is executed.
BRIEF DESCRIPTION OF THE DRAWINGS
In the drawings, Figs. 1 and 2 show the fundamental arrangement of a data processing apparatus to which the method according to the present invention is applied;
Figs. PA, 3B, and 3C illustrate examples of the format of the instruction "IMMEDIATE";
Fig. 4 is a block diagram of the structure of a data processing apparatus to which the method according to the present invention is applied;
Figs. 5 and 6 are time charts of the operation of the apparatus shown in Fig. 4;
Figs. 7 and 8 illustrate the manner of a part of the operation of the apparatus shown in Fig. 4; and Fig. 9 shows the structure of the address decision portion in the apparatus shown in Fig. 4.
DESCRIPTION OF THE PREFERRED EMBODIMENTS
For reference as to the embodiments of the present invention, the fundamental arrangement of a data processing apparatus to which the method according to the present invention is applied will be described with reference to Figs. 1 and 2. An example of the format of the instruction is shown in Figs. PA, 3B, and 3C.
The arrangement shown in Fig. 1 includes a main memory MM and a central processing unit CPU having a buffer memory BY. The buffer memory BY consists of a data portion 1 and an address portion 2. The buffer memory BY is of the set associative type. The data portion 1 consists of m parts. Each of the m parts I consists of n blocks. The structure of the data portion 1 corresponds to the structure of the address portion 2.
An example of the structure of one block BY in the data portion is illustrated in Fig. 2. The block BY
consists of 64 bytes formed by 8 sequences of 8-byte units. An 8-byte unit corresponds to 2 words. The unit , --of writing data into the data portion l is 8-byte.
In the address portion 2, validity bits and addresses corresponding to the addresses in the main memory MM are stored.
With reference to Figs. l and 2, it will be understood that there is a problem, as described herein before, that, if the address to which the writing of the operand data is instructed is included in the block in the buffer memory BY to which the writing of lo the data of the main memory MM is being carried out, the writing of operand data into the address of the block BY
in the buffer memory is possible only after the writing of the data of the main memory MM into the block BY is completed.
Also, it will be understood that there is further a problem, as described herein before, that, even in the case where the writing of the operand data into the address to which the writing of the data of the main memory MM has been completed is instructed, the writing of the operand data into such address cannot be carried out until the writing of the data of the main memory MM
into the entire block BY is completed.
Examples of the format of the instruction "IMMEDIATE" will be described with reference to Figs.
PA, 3B, and 3C.
An AND IMMEDIATE instruction is shown in Fig.
PA. The numerals 0 to 31 indicate bit positions. The AND IMMEDIATE instruction consists of ANTI as the operation code, I as the data, and By and Do as the address. By is the number designating the base register By Do is the displacement with regard to the base number. The logical product of the content of l byte in the address defined by the content of the base register By and the value of Do and the content of I I is stored in the same operand address.
:....
~233273 An OR IMMEDIATE instruction is shown in Fig.
3B. The OR IMMEDIATE instruction consists of OR as the operation code, I as the data, and so and Do as the address. By is the number designating the base register By Do is the displacement with regard to the base number. The logical sum of the content of 1 byte in the address defined by the content of the base register By and the value of Do and the content of I is stored in the operand address.
An ERR IMMEDIATE instruction is shown in Fig.
3C. The ERR IMMEDIATE instruction consists of TORI as the operation code, I as the data, and By and Do as the address. By is the number designating the base register By Do is the displacement with regard to the base number. The exclusive logical sum of the content of l byte in the address defined by the content of the base register By and the value of Do and the content I is stored in the same operand address.
In general, in the case of an instruction for carrying out a fetch-and-store operation to the same address using a format such as shown in Figs. PA, 3B, and 3C in the data processing apparatus shown in Figs. 1 and 2, first, the central processing unit CPU is operated to check if the block including this operand address exists in the buffer memory. When exists, the operand is fetched, the logic operation instructed by the instruction is carried out and the result of the calculation is stored in the buffer memory. In a store-through type buffer memory, the result is stored in both the buffer memory and the main memory.
If the block including this operand address does not exist in the buffer memory, reading-out of the block including this operand address is requested to the main memory, and the read-out block is registered in the buffer memory. If one word is registered by one ~233273 registration operation in the buffer memory, n registration operations to the buffer memory are required for registering n words in the buffer memory.
For example, eight registration operations are required for registering 64 bytes of data into one block of the buffer memory with an 8-byte data registration per each registration operation.
It is common knowledge that control is carried out in such manner that the sequence of registration operation from the main memory to the buffer memory is started from the word including the required operand address.
According to the present invention, if the block including the operand address in question does not exist in the buffer memory, the registration of the block from the main memory to the buffer memory is started, the logic operation is carried out for the operand data with regard to the beginning word, and, after this logic operation, the operand data is stored in the buffer memory.
A data processing apparatus to which a method for controlling a buffer memory according to an embodiment of the present invention is applied is shown in Fig. 4. The apparatus shown in Fig. 4 includes a buffer memory BY consisting of the data port on 1 and the address portion 2, a buffer memory control device BMC, an instruction unit 406, an execution unit 407, a move-in register 408, a buffer write register 409, a buffer data read register 410, an instruction word I register 411, an operand word register 412, a memory write register 413, and a memory address register 414.
The apparatus shown in Fig. 4 also includes a block fetch address register 415, an effective address register 416, a buffer address register 417, selection 3q circuits 418 and 419, a comparison circuit 420, a :. :
.
I: ......
,. .
~23;~273 control line 421, address lines 422 and 423, and data lines 424 and 425. The apparatus shown in Fig. 4 is of the so-called store-through type buffer memory system in which the storing data is stored simultaneously into the buffer memory and the main memory when the storing address exists in the buffer memory.
The operation of the central processing unit CPU will now be described.
Fetch the Instruction: The instruction unit I 406 sends the address of an instruction to be executed to the effective address register 416 through the address line 422, and the existence of the address of the instruction to be executed in the address portion 2 of the buffer memory is checked by the comparison circuit 420.
If the existence of the address of the instruction to be executed in the address portion 2 of the buffer memory is detected, one of N blocks read from the data portion 4 is selected by the selection circuit 418, the word of the instruction in the block to be executed is sent to the instruction word register 411 through the buffer data read register 410 and the selection circuit 419, and the sent word of the instruction is executed in the instruction unit 406.
If the existence of the address of the instruction to be executed in the address portion 2 of the buffer memory is not detected, the memory address register 414 sends a request for reading-out the block including the instruction in question to the main memory MM. The block read from the main memory MM is sent in the sequence of eight 8-byte units from the move-in register 408 through the buffer write register 409 to the data portion 1 of the buffer memory BY, and the sent block is stored in the data portion 1. At the same time, the beginning word including the instruction to be , Jo - :
~233273 executed is sent to the instruction word register 411 bypassing through the data line 424 and the selection circuit 419, and the sent beginning word is executed in the instruction unit 406.
Fetch the Operand and Execute the Instruction:
In order to execute instructions, the instruction unit sends instructions through the control line 421 to the execution unit 407 to carry out the execution. The operand data necessary for the execution unit 407 is lo read from either the buffer memory or the main memory by the similar process as above explained instruction fetching, and the read operand data is sent through the operand word register 412.
When the block including the address into which the result of the execution by the execution unit 407 is to be written is registered in the buffer memory, the result of the execution is sent through the data line 425 and the buffer write register 409 to the buffer memory, and the sent result is stored in the buffer memory. At the same time, the result of the execution is sent through the memory write register 413 to the main memory.
When the block including the address into which the result of the execution by the execution unit 407 is to be written is not registered in the buffer memory, the result of the execution is only sent through the memory write register 413 to be stored into the main memory.
Execute the Fetch-and-Store Instruction: When a fetch-and-store type instruction such as the IMMEDIATE
which instructs the successive executions of the reading from and the writing into the same address is delivered from the instruction unit 406 and the execution unit 407, first, the registration of the address for the operand in question in the buffer memory is checked.
, 12~32~3 g If the address of the operand is registered in the buffer memory, the operand is sent from the buffer memory through the operand word register 412 to the execution unit 407, and subsequently the storing data from the execution unit 407 is written into the buffer memory and the main memory. That is, the logic operation according to the three instructions shown in Figs. PA, 3B, and 3C is effected on the operand data read from the buffer memory by the execution unit 407, and the result of this logic operation is written in the buffer memory and the main memory.
If the operand data of the above-mentioned fetch-and-store instruction does not exist in the buffer memory, the instruction of the reading of the block including the operand is sent to the main memory, the data with the beginning word including the operand data necessary for the execution unit 407 is written in the buffer memory, and, at the same time, the data is sent through the data line 424 and the selection circuit 419 to the execution unit 407.
The logic operation according to the three instructions shown in Figs. PA, 3B, and 3C is effected on the operand data by the execution unit 407, and the result of the logic operation is transmitted through the data line 425. In succession to the writing of the -beginning word of registration of the block from the main memory into the buffer memory, the writing data from the execution unit 407 is written into the buffer memory and the main memory.
To assist understanding of the operation of the apparatus shown in Fig. 4, time charts of an example of the operation regarding the fetch-and-store instruction are given in Figs. 5 and 6. The case where the operand of the fetch-and-store exists in the buffer memory is illustrated in Fig. 5, while the case where -33~73 the operand of the fetch-and-store does not exist in the buffer memory is illustrated in Fig. 6.
The sequence of the cycles for the pipeline timing consists of a priority cycle for the buffer memory access, a tag access cycle for reading the address portion of the buffer memory, a buffer cycle for reading the data portion of the buffer memory, a result cycle of post-processing, a write tag cycle for writing into the address portion of the buffer memory, and a store data cycle for writing into the data portion of the buffer memory.
The process illustrated in Fig. 5 is as follows.
(1) Priority Cycle: Fetch-and-store is instructed.
(2) Tag Access Cycle: Copy of fetch-and-store is held. Effective address register (EAR) 416 is operated. Address portion 2 is read.
There is further a problem that, even in the case where the writing of the operand data into the address to which the writing of the data of the main memory has been completed is instructed, the writing of the operand data into such address cannot be carried out until the writing of the data of the main memory into the entire block is completed.
1~33273 SUMMARY OF THE INVENTION
It is the object of the invention to provide an improved method for controlling a buffer memory in a data processing apparatus in which the writing of operand data into a block of the buffer memory is speeded up to realize high speed operation of a central processing unit of a data processing apparatus having the buffer memory.
According to the present invention, there is provided a method for controlling a buffer memory in a data processing apparatus with a central processing unit which includes a buffer memory for storing a copy of a portion of a main memory, the method comprising the steps of:
detecting, first, a word unit of a block up to which registration of a word has been completed in a process of registration of data from the main memory into a sequence of word units of the block;
detecting, second, the existence of the word corresponding to the address for writing of an operand in the block which is being registered into the block of the buffer memory from the main memory; and detecting, third, the completion of registration of the word corresponding to the address for writing of the operand into the block which is being registered into the block of the buffer memory from the main memory based on the results of the first and second detecting steps;
wherein, when the result-of the third detecting step indicates that the word corresponding to the address for writing of the operand has already been registered from the main memory into the block of the buffer memory, writing of the operand into the block of the buffer memory is executed.
BRIEF DESCRIPTION OF THE DRAWINGS
In the drawings, Figs. 1 and 2 show the fundamental arrangement of a data processing apparatus to which the method according to the present invention is applied;
Figs. PA, 3B, and 3C illustrate examples of the format of the instruction "IMMEDIATE";
Fig. 4 is a block diagram of the structure of a data processing apparatus to which the method according to the present invention is applied;
Figs. 5 and 6 are time charts of the operation of the apparatus shown in Fig. 4;
Figs. 7 and 8 illustrate the manner of a part of the operation of the apparatus shown in Fig. 4; and Fig. 9 shows the structure of the address decision portion in the apparatus shown in Fig. 4.
DESCRIPTION OF THE PREFERRED EMBODIMENTS
For reference as to the embodiments of the present invention, the fundamental arrangement of a data processing apparatus to which the method according to the present invention is applied will be described with reference to Figs. 1 and 2. An example of the format of the instruction is shown in Figs. PA, 3B, and 3C.
The arrangement shown in Fig. 1 includes a main memory MM and a central processing unit CPU having a buffer memory BY. The buffer memory BY consists of a data portion 1 and an address portion 2. The buffer memory BY is of the set associative type. The data portion 1 consists of m parts. Each of the m parts I consists of n blocks. The structure of the data portion 1 corresponds to the structure of the address portion 2.
An example of the structure of one block BY in the data portion is illustrated in Fig. 2. The block BY
consists of 64 bytes formed by 8 sequences of 8-byte units. An 8-byte unit corresponds to 2 words. The unit , --of writing data into the data portion l is 8-byte.
In the address portion 2, validity bits and addresses corresponding to the addresses in the main memory MM are stored.
With reference to Figs. l and 2, it will be understood that there is a problem, as described herein before, that, if the address to which the writing of the operand data is instructed is included in the block in the buffer memory BY to which the writing of lo the data of the main memory MM is being carried out, the writing of operand data into the address of the block BY
in the buffer memory is possible only after the writing of the data of the main memory MM into the block BY is completed.
Also, it will be understood that there is further a problem, as described herein before, that, even in the case where the writing of the operand data into the address to which the writing of the data of the main memory MM has been completed is instructed, the writing of the operand data into such address cannot be carried out until the writing of the data of the main memory MM
into the entire block BY is completed.
Examples of the format of the instruction "IMMEDIATE" will be described with reference to Figs.
PA, 3B, and 3C.
An AND IMMEDIATE instruction is shown in Fig.
PA. The numerals 0 to 31 indicate bit positions. The AND IMMEDIATE instruction consists of ANTI as the operation code, I as the data, and By and Do as the address. By is the number designating the base register By Do is the displacement with regard to the base number. The logical product of the content of l byte in the address defined by the content of the base register By and the value of Do and the content of I I is stored in the same operand address.
:....
~233273 An OR IMMEDIATE instruction is shown in Fig.
3B. The OR IMMEDIATE instruction consists of OR as the operation code, I as the data, and so and Do as the address. By is the number designating the base register By Do is the displacement with regard to the base number. The logical sum of the content of 1 byte in the address defined by the content of the base register By and the value of Do and the content of I is stored in the operand address.
An ERR IMMEDIATE instruction is shown in Fig.
3C. The ERR IMMEDIATE instruction consists of TORI as the operation code, I as the data, and By and Do as the address. By is the number designating the base register By Do is the displacement with regard to the base number. The exclusive logical sum of the content of l byte in the address defined by the content of the base register By and the value of Do and the content I is stored in the same operand address.
In general, in the case of an instruction for carrying out a fetch-and-store operation to the same address using a format such as shown in Figs. PA, 3B, and 3C in the data processing apparatus shown in Figs. 1 and 2, first, the central processing unit CPU is operated to check if the block including this operand address exists in the buffer memory. When exists, the operand is fetched, the logic operation instructed by the instruction is carried out and the result of the calculation is stored in the buffer memory. In a store-through type buffer memory, the result is stored in both the buffer memory and the main memory.
If the block including this operand address does not exist in the buffer memory, reading-out of the block including this operand address is requested to the main memory, and the read-out block is registered in the buffer memory. If one word is registered by one ~233273 registration operation in the buffer memory, n registration operations to the buffer memory are required for registering n words in the buffer memory.
For example, eight registration operations are required for registering 64 bytes of data into one block of the buffer memory with an 8-byte data registration per each registration operation.
It is common knowledge that control is carried out in such manner that the sequence of registration operation from the main memory to the buffer memory is started from the word including the required operand address.
According to the present invention, if the block including the operand address in question does not exist in the buffer memory, the registration of the block from the main memory to the buffer memory is started, the logic operation is carried out for the operand data with regard to the beginning word, and, after this logic operation, the operand data is stored in the buffer memory.
A data processing apparatus to which a method for controlling a buffer memory according to an embodiment of the present invention is applied is shown in Fig. 4. The apparatus shown in Fig. 4 includes a buffer memory BY consisting of the data port on 1 and the address portion 2, a buffer memory control device BMC, an instruction unit 406, an execution unit 407, a move-in register 408, a buffer write register 409, a buffer data read register 410, an instruction word I register 411, an operand word register 412, a memory write register 413, and a memory address register 414.
The apparatus shown in Fig. 4 also includes a block fetch address register 415, an effective address register 416, a buffer address register 417, selection 3q circuits 418 and 419, a comparison circuit 420, a :. :
.
I: ......
,. .
~23;~273 control line 421, address lines 422 and 423, and data lines 424 and 425. The apparatus shown in Fig. 4 is of the so-called store-through type buffer memory system in which the storing data is stored simultaneously into the buffer memory and the main memory when the storing address exists in the buffer memory.
The operation of the central processing unit CPU will now be described.
Fetch the Instruction: The instruction unit I 406 sends the address of an instruction to be executed to the effective address register 416 through the address line 422, and the existence of the address of the instruction to be executed in the address portion 2 of the buffer memory is checked by the comparison circuit 420.
If the existence of the address of the instruction to be executed in the address portion 2 of the buffer memory is detected, one of N blocks read from the data portion 4 is selected by the selection circuit 418, the word of the instruction in the block to be executed is sent to the instruction word register 411 through the buffer data read register 410 and the selection circuit 419, and the sent word of the instruction is executed in the instruction unit 406.
If the existence of the address of the instruction to be executed in the address portion 2 of the buffer memory is not detected, the memory address register 414 sends a request for reading-out the block including the instruction in question to the main memory MM. The block read from the main memory MM is sent in the sequence of eight 8-byte units from the move-in register 408 through the buffer write register 409 to the data portion 1 of the buffer memory BY, and the sent block is stored in the data portion 1. At the same time, the beginning word including the instruction to be , Jo - :
~233273 executed is sent to the instruction word register 411 bypassing through the data line 424 and the selection circuit 419, and the sent beginning word is executed in the instruction unit 406.
Fetch the Operand and Execute the Instruction:
In order to execute instructions, the instruction unit sends instructions through the control line 421 to the execution unit 407 to carry out the execution. The operand data necessary for the execution unit 407 is lo read from either the buffer memory or the main memory by the similar process as above explained instruction fetching, and the read operand data is sent through the operand word register 412.
When the block including the address into which the result of the execution by the execution unit 407 is to be written is registered in the buffer memory, the result of the execution is sent through the data line 425 and the buffer write register 409 to the buffer memory, and the sent result is stored in the buffer memory. At the same time, the result of the execution is sent through the memory write register 413 to the main memory.
When the block including the address into which the result of the execution by the execution unit 407 is to be written is not registered in the buffer memory, the result of the execution is only sent through the memory write register 413 to be stored into the main memory.
Execute the Fetch-and-Store Instruction: When a fetch-and-store type instruction such as the IMMEDIATE
which instructs the successive executions of the reading from and the writing into the same address is delivered from the instruction unit 406 and the execution unit 407, first, the registration of the address for the operand in question in the buffer memory is checked.
, 12~32~3 g If the address of the operand is registered in the buffer memory, the operand is sent from the buffer memory through the operand word register 412 to the execution unit 407, and subsequently the storing data from the execution unit 407 is written into the buffer memory and the main memory. That is, the logic operation according to the three instructions shown in Figs. PA, 3B, and 3C is effected on the operand data read from the buffer memory by the execution unit 407, and the result of this logic operation is written in the buffer memory and the main memory.
If the operand data of the above-mentioned fetch-and-store instruction does not exist in the buffer memory, the instruction of the reading of the block including the operand is sent to the main memory, the data with the beginning word including the operand data necessary for the execution unit 407 is written in the buffer memory, and, at the same time, the data is sent through the data line 424 and the selection circuit 419 to the execution unit 407.
The logic operation according to the three instructions shown in Figs. PA, 3B, and 3C is effected on the operand data by the execution unit 407, and the result of the logic operation is transmitted through the data line 425. In succession to the writing of the -beginning word of registration of the block from the main memory into the buffer memory, the writing data from the execution unit 407 is written into the buffer memory and the main memory.
To assist understanding of the operation of the apparatus shown in Fig. 4, time charts of an example of the operation regarding the fetch-and-store instruction are given in Figs. 5 and 6. The case where the operand of the fetch-and-store exists in the buffer memory is illustrated in Fig. 5, while the case where -33~73 the operand of the fetch-and-store does not exist in the buffer memory is illustrated in Fig. 6.
The sequence of the cycles for the pipeline timing consists of a priority cycle for the buffer memory access, a tag access cycle for reading the address portion of the buffer memory, a buffer cycle for reading the data portion of the buffer memory, a result cycle of post-processing, a write tag cycle for writing into the address portion of the buffer memory, and a store data cycle for writing into the data portion of the buffer memory.
The process illustrated in Fig. 5 is as follows.
(1) Priority Cycle: Fetch-and-store is instructed.
(2) Tag Access Cycle: Copy of fetch-and-store is held. Effective address register (EAR) 416 is operated. Address portion 2 is read.
(3) Buffer Read Cycle: Copy of fetch-and-store is held. Buffer address register (BAR) 417 is operated. Data portion 1 is read.
(4) Result Cycle: Copy of fetch-and-store is held. Operand word register (OW) 412 is operated to send data to execution unit 407.
(5) Write Tag Cycle: Execution unit 407 effects logic operation on data from operand word register (OW) 412. Execution unit store data (ESSAYED) is sent to buffer write register (BAR) 409 and memory write register (MAR) 413.
(6) Store Data Cycle: Buffer address register (BAR) 417 is operated. Buffer write register (BAR) 409 and memory write register (MAR) 413 are operated to store data into the data portion 1 and main memory MM.
:1~3;~Z~3 The process illustrated in Fig. 6 is as follows.
(1) Priority Cycle: Fetch-and-store is instructed.
(2) Tag Access Cycle: Copy of fetch-and-store is held. Effective address register (EAR 416 is operated. Address portion 2 is read.
(3) Buffer Read Cycle: Copy of fetch-and-store is held. Buffer address register (BAR) 417 is operated.
(4) Result Cycle (Priority Cycle): Copy of fetch-and-store is held.
(lo) Priority Cycle: Fetch-and-store is instructed. Copy of fetch-and-store is held.
(PA) Tag Access Cycle: Copy of fetch-and-store is held. Effective address register (EAR) 416 is operated.
(PA) Buffer Read Cycle (Priority Cycle):
Move-in is instructed. Copy of fetch-and-store is held.
Buffer address register (BAR) 417 is operated. Move-in register (MIX) 408 is operated. By-pass operation regarding data portion 1.
AYE) Result Cycle (Write Tag Cycle, Priority Cycle): Fetch-and-store is instructed. Copy of fetch-and-store is held. Effective address register LEAR) 416 is operated. Operand word register (OW) 412 is operated. Data is written into address portion 2.
(PA) Store Data Cycle (Write Tag Cycle):
Effective address register (EAR) 416 is operated.
Buffer address register (BAR) 417 is operated.
Execution unit store data (ESSAYED) is sent to the buffer write register (BAR) 409. Data is written into data portion 1.
-12- lZ33273 (PA) Store Data Cycle: Buffer address register (BAR) 417 is operated. Buffer write register (BAR) 409 is operated. Memory write register (MAR) 413 is operated. Data is written into data portion 1.
To assist understanding of the above-described operation of the apparatus, a sequence of the illustrative models for the case of the present invention is shown in Fig. 7. The prior art sequence of the illustrative models is shown in Fig. 8.
In Fig. 7, the sequence of the operations proceeds from left to right. After writing of the result of the calculation into the 8-byte unit in question in the block in the buffer memory, the transfer of the data from the main memory to the remaining 8-byte units in the block in the buffer memory is carried out.
In Fig. 8, the sequence of the operations also proceeds from left to right. Writing of the result of the calculation into the 8-byte unit in question in the block in the buffer memory is carried out only after the transfer of the data from the main memory to all the 8-byte units in the block in the buffer memory is completed.
As a modified embodiment of the present invention, a buffer memory control device BMC is added to the apparatus shown in Fig. 4.
The structure of the buffer memory control device BMC used for the apparatus shown in Fig. 4 is shown in Fig. 9. The buffer memory control device BMC
includes an address decision portion 3. The address decision portion 3 includes a comparison circuit 31, an increment circuit 32, a decoder 33, a partial validity flag register 34, a decoder 35, and a comparison circuit 36.
Jo ~2~327~3 The partial validity flag stored in the partial validity flag register 34 is used for detecting the present registration position in the block BY as shown in Fig. 2. The partial validity flag register 34 consists of 8 bits. The block BY is constituted by eight 8-byte units (8 byte x 8). Each bit of the partial validity flag register 34 corresponds to one of the 8-byte units.
The flag "1" is established in the bit of the partial validity flag register 34 which corresponds to the 8-byte unit to which the move-in operation is carried out. As the move-in operation proceeds for the block BY from the main memory MM to the buffer memory BY, the existence of bit "1" in the partial validity flag register indicates up to which 3-byte unit the move-in operation has been completed.
When all bits of the partial validity flag become "1", that is, when the move-in operation to the block BY is completed, all "1" bits of the partial validity flag are reset. In this case, the validity of the block BY is indicated by the effective bit of each entry of the address portion 2 of the buffer memory BY.
The operation of the address decision portion 3 shown in Fig. 9 will be described. For executing the instruction, the address of the writing of the operand is requested to the buffer memory BY by the instruction unit 406. The comparison between the addresses is carried out by the block fetch address register 415 and the comparison circuit 31. The address of the block which is intended to be transmitted from the main memory MM to the buffer memory and registered in the buffer memory (for example, 26 bits) and the address of the beginning 8-byte unit as the operand (for example, 3 bits) are stored in the block fetch address register 415.
~233273 The 3 bits which represent the address of the 8-byte unit in the block fetch address register 415 is incremented by the increment circuit 32 as the registration of the block BY proceeds. The decoder 33 decodes these 3 bits and produces the signal of the set condition for the 8-bit partial validity flag register 34.
When the request for the writing of the operand is issued from the instruction unit 406 to the lo buffer memory BY, the 3 bits of two word address of the block BY on the address line 422 are decoded by the decoder 33. The output of the decoder 33 is compared with the partial validity flag of the partial validity flag register 34 in the comparison circuit 36. By this comparison, it is checked whether the partial validity flag corresponding to potential "l" of the signal on the eight output lines of the decoder 33 is potential "l".
When it is detected that the word of the address of the request for writing of operand from the instruction unit 406 exists in the block which is being registered in the buffer memory BY, and it is detected by the partial validity flag register 34 and the comparison circuit 36 that this word has already been transmitted from the main memory MM to the buffer memory BY and registered in the buffer memory, the write enable signal is delivered from the comparison circuit 36, and the delivered write enable signal is transmitted through the buffer write register 409 to the buffer memory BY, through the memory write register 413 to the main memory MM to cause storing into the buffer memory BY and the main memory MM.
If the write non-enable signal is delivered from the comparison circuit 36, writing into the buffer memory BY is prevented.
,....
,, ~2:332~73 Instead of the above-described store-through type system, it is also possible to apply the present invention to a swap type system in which the updating is only carried out on the buffer memory.
.,.~
. . .
:1~3;~Z~3 The process illustrated in Fig. 6 is as follows.
(1) Priority Cycle: Fetch-and-store is instructed.
(2) Tag Access Cycle: Copy of fetch-and-store is held. Effective address register (EAR 416 is operated. Address portion 2 is read.
(3) Buffer Read Cycle: Copy of fetch-and-store is held. Buffer address register (BAR) 417 is operated.
(4) Result Cycle (Priority Cycle): Copy of fetch-and-store is held.
(lo) Priority Cycle: Fetch-and-store is instructed. Copy of fetch-and-store is held.
(PA) Tag Access Cycle: Copy of fetch-and-store is held. Effective address register (EAR) 416 is operated.
(PA) Buffer Read Cycle (Priority Cycle):
Move-in is instructed. Copy of fetch-and-store is held.
Buffer address register (BAR) 417 is operated. Move-in register (MIX) 408 is operated. By-pass operation regarding data portion 1.
AYE) Result Cycle (Write Tag Cycle, Priority Cycle): Fetch-and-store is instructed. Copy of fetch-and-store is held. Effective address register LEAR) 416 is operated. Operand word register (OW) 412 is operated. Data is written into address portion 2.
(PA) Store Data Cycle (Write Tag Cycle):
Effective address register (EAR) 416 is operated.
Buffer address register (BAR) 417 is operated.
Execution unit store data (ESSAYED) is sent to the buffer write register (BAR) 409. Data is written into data portion 1.
-12- lZ33273 (PA) Store Data Cycle: Buffer address register (BAR) 417 is operated. Buffer write register (BAR) 409 is operated. Memory write register (MAR) 413 is operated. Data is written into data portion 1.
To assist understanding of the above-described operation of the apparatus, a sequence of the illustrative models for the case of the present invention is shown in Fig. 7. The prior art sequence of the illustrative models is shown in Fig. 8.
In Fig. 7, the sequence of the operations proceeds from left to right. After writing of the result of the calculation into the 8-byte unit in question in the block in the buffer memory, the transfer of the data from the main memory to the remaining 8-byte units in the block in the buffer memory is carried out.
In Fig. 8, the sequence of the operations also proceeds from left to right. Writing of the result of the calculation into the 8-byte unit in question in the block in the buffer memory is carried out only after the transfer of the data from the main memory to all the 8-byte units in the block in the buffer memory is completed.
As a modified embodiment of the present invention, a buffer memory control device BMC is added to the apparatus shown in Fig. 4.
The structure of the buffer memory control device BMC used for the apparatus shown in Fig. 4 is shown in Fig. 9. The buffer memory control device BMC
includes an address decision portion 3. The address decision portion 3 includes a comparison circuit 31, an increment circuit 32, a decoder 33, a partial validity flag register 34, a decoder 35, and a comparison circuit 36.
Jo ~2~327~3 The partial validity flag stored in the partial validity flag register 34 is used for detecting the present registration position in the block BY as shown in Fig. 2. The partial validity flag register 34 consists of 8 bits. The block BY is constituted by eight 8-byte units (8 byte x 8). Each bit of the partial validity flag register 34 corresponds to one of the 8-byte units.
The flag "1" is established in the bit of the partial validity flag register 34 which corresponds to the 8-byte unit to which the move-in operation is carried out. As the move-in operation proceeds for the block BY from the main memory MM to the buffer memory BY, the existence of bit "1" in the partial validity flag register indicates up to which 3-byte unit the move-in operation has been completed.
When all bits of the partial validity flag become "1", that is, when the move-in operation to the block BY is completed, all "1" bits of the partial validity flag are reset. In this case, the validity of the block BY is indicated by the effective bit of each entry of the address portion 2 of the buffer memory BY.
The operation of the address decision portion 3 shown in Fig. 9 will be described. For executing the instruction, the address of the writing of the operand is requested to the buffer memory BY by the instruction unit 406. The comparison between the addresses is carried out by the block fetch address register 415 and the comparison circuit 31. The address of the block which is intended to be transmitted from the main memory MM to the buffer memory and registered in the buffer memory (for example, 26 bits) and the address of the beginning 8-byte unit as the operand (for example, 3 bits) are stored in the block fetch address register 415.
~233273 The 3 bits which represent the address of the 8-byte unit in the block fetch address register 415 is incremented by the increment circuit 32 as the registration of the block BY proceeds. The decoder 33 decodes these 3 bits and produces the signal of the set condition for the 8-bit partial validity flag register 34.
When the request for the writing of the operand is issued from the instruction unit 406 to the lo buffer memory BY, the 3 bits of two word address of the block BY on the address line 422 are decoded by the decoder 33. The output of the decoder 33 is compared with the partial validity flag of the partial validity flag register 34 in the comparison circuit 36. By this comparison, it is checked whether the partial validity flag corresponding to potential "l" of the signal on the eight output lines of the decoder 33 is potential "l".
When it is detected that the word of the address of the request for writing of operand from the instruction unit 406 exists in the block which is being registered in the buffer memory BY, and it is detected by the partial validity flag register 34 and the comparison circuit 36 that this word has already been transmitted from the main memory MM to the buffer memory BY and registered in the buffer memory, the write enable signal is delivered from the comparison circuit 36, and the delivered write enable signal is transmitted through the buffer write register 409 to the buffer memory BY, through the memory write register 413 to the main memory MM to cause storing into the buffer memory BY and the main memory MM.
If the write non-enable signal is delivered from the comparison circuit 36, writing into the buffer memory BY is prevented.
,....
,, ~2:332~73 Instead of the above-described store-through type system, it is also possible to apply the present invention to a swap type system in which the updating is only carried out on the buffer memory.
.,.~
. . .
Claims (2)
1. A method for controlling a buffer memory in a data processing apparatus with a central processing unit which includes a buffer memory for storing a copy of a portion of a main memory, said method comprising the steps of:
detecting, first, a word unit of a block up to which registration of a word has been completed in a process of registration of data from said main memory into a sequence of word units of the block;
detecting, second, the existence of the word corresponding to the address for writing of an operand in the block which is being registered into said block of said buffer memory from said main memory; and detecting, third, the completion of registration of the word corresponding to the address for writing of said operand into the block which is being registered into said block of said buffer memory from said main memory based on the results of said first and second detecting steps;
wherein, when the result of said third detecting step indicates that the word corresponding to the address for writing of said operand has already been registered from said main memory into said block of said buffer memory, writing of said operand into said block of said buffer memory is executed.
detecting, first, a word unit of a block up to which registration of a word has been completed in a process of registration of data from said main memory into a sequence of word units of the block;
detecting, second, the existence of the word corresponding to the address for writing of an operand in the block which is being registered into said block of said buffer memory from said main memory; and detecting, third, the completion of registration of the word corresponding to the address for writing of said operand into the block which is being registered into said block of said buffer memory from said main memory based on the results of said first and second detecting steps;
wherein, when the result of said third detecting step indicates that the word corresponding to the address for writing of said operand has already been registered from said main memory into said block of said buffer memory, writing of said operand into said block of said buffer memory is executed.
2. A method according to claim 1, wherein said first detecting step is carried out by using a partial validity flag register, and said second and third detecting steps are carried out by using comparison circuits.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CA000526259A CA1233273A (en) | 1983-11-30 | 1986-12-23 | Method for controlling buffer memory in data processing apparatus |
Applications Claiming Priority (6)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP58226335A JPS60118951A (en) | 1983-11-30 | 1983-11-30 | Buffer memory control system in information processor |
JP58-226335 | 1983-11-30 | ||
JP58-231105 | 1983-12-07 | ||
JP58231105A JPS60123944A (en) | 1983-12-07 | 1983-12-07 | Buffer memory controlling system of information processor |
CA000468354A CA1228678A (en) | 1983-11-30 | 1984-11-21 | Method for controlling buffer memory in data processing apparatus |
CA000526259A CA1233273A (en) | 1983-11-30 | 1986-12-23 | Method for controlling buffer memory in data processing apparatus |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CA000468354A Division CA1228678A (en) | 1983-11-30 | 1984-11-21 | Method for controlling buffer memory in data processing apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CA1233273A true CA1233273A (en) | 1988-02-23 |
Family
ID=27167477
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CA000526259A Expired CA1233273A (en) | 1983-11-30 | 1986-12-23 | Method for controlling buffer memory in data processing apparatus |
Country Status (1)
Country | Link |
---|---|
CA (1) | CA1233273A (en) |
-
1986
- 1986-12-23 CA CA000526259A patent/CA1233273A/en not_active Expired
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA1186801A (en) | Central processing unit for executing instructions of variable length | |
US5125083A (en) | Method and apparatus for resolving a variable number of potential memory access conflicts in a pipelined computer system | |
US5560036A (en) | Data processing having incircuit emulation function | |
US4095269A (en) | Data processing system having a high speed buffer memory | |
US5652900A (en) | Data processor having 2n bits width data bus for context switching function | |
JP3016575B2 (en) | Multiple cache memory access methods | |
US4710866A (en) | Method and apparatus for validating prefetched instruction | |
KR100335785B1 (en) | Execution of data processing instructions | |
EP0066376B1 (en) | Data processing system | |
JP2773471B2 (en) | Information processing device | |
CA1228678A (en) | Method for controlling buffer memory in data processing apparatus | |
US5379402A (en) | Data processing device for preventing inconsistency of data stored in main memory and cache memory | |
JPH03225542A (en) | Memory of data and processing circuit for bit encode data | |
US20090292857A1 (en) | Cache memory unit | |
JPS59231652A (en) | Detection system for memory access overlap | |
EP0030463B1 (en) | Buffer memory control system | |
CA1233273A (en) | Method for controlling buffer memory in data processing apparatus | |
US4737908A (en) | Buffer memory control system | |
JPS5991551A (en) | Instruction prefetching device forecasting address to be branched | |
US5243601A (en) | Apparatus and method for detecting a runaway firmware control unit | |
JPH0326862B2 (en) | ||
JPS6236258B2 (en) | ||
JP3047992B2 (en) | Main memory key control method | |
JPH1185613A (en) | Cache memory | |
JPH0443445A (en) | Registered data invalidating processing system for associative storage mechanism |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
MKEX | Expiry | ||
MKEX | Expiry |
Effective date: 20050223 |