This application claims priority to Taiwan Application Serial Number 109100232, filed Jan. 3, 2020, which is herein incorporated by reference in its entirety.
The present invention relates to a memory technology. More particularly, the present invention relates to a memory device and an operation method of the same.
A memory that performs accessing operations usually requires multiple clock periods. To decrease the waiting time for higher operation frequency, a cache memory is usually added in a processor to improve the operating speed. However, the area taken up and the cost of the processor will increase as such.
Another way to improve the operating speed is to increase the bandwidth of the memory, such that more of the data including multiple words may be read at a time. However, when the read command encounters a branch of addresses, if the addresses are not aligned with the read words, the read time of a target address and fetch time of a next continuous command then require an additional period, decreasing the performance of the processor. Additionally, in terms of writing data, it often requires an additional write register to combine the multiple words to be written at a time, thus the cost is increased due to the additional hardware.
Therefore, how to design a new memory device and an operation method related thereto for dealing with the aforesaid deficiencies is an issue for those in this technical field.
One purpose of the present disclosure is to provide a memory device and the operation method of the same, in order to solve the problem of the prior art.
To achieve the aforesaid purpose, one aspect of the present disclosure is related to a device, and the device includes a first memory, a second memory and an accessing circuit. The first memory and the second memory are adapted for coupling to a processing circuit. A plurality of actual addresses of the first memory and the second memory alternately correspond to a plurality of reference addresses of a processing circuit. The accessing circuit is coupled to first memory and the second memory. The accessing circuit is configured to: receive a read command corresponding to a reference read address from the processing circuit and convert the reference read address to the actual address of the first memory and the second memory; read a first read data from the first one of the first memory and the second memory, prefetch a second data from the second one of the first memory and the second memory, according to the actual read address and a next first actual read address, simultaneously; response the first read data to the processing circuit; and when the processing circuit receives a next read command corresponding to a next first reference read address and the next first reference read address corresponds to the next first actual read address, output the second read data to the processing circuit.
The other aspect of the present disclosure is related to a method including: receiving the read command corresponding to the reference read address by the accessing circuit from the processing circuit to convert the reference read address to the actual read address of the first memory and the second memory, wherein the reference addresses of the process circuiting correspond to the actual addresses of the first memory and the second memory; reading the first read data from the first one of the first memory and the second, prefetching the second read data from the first memory and the second memory, by the accessing circuit, according to the actual read address and the next first actual read address, simultaneously; outputting the first read data to the to the processing circuit by the accessing circuit; and when the accessing circuit receives the next read command corresponding to the next first reference read address and the next first reference read address corresponds to the next first actual read address, outputting the second read data to the processing circuit.
The device and the method for operating the device in the present disclosure are utilized, through configurations of two memories, in manners of parallel read and prefetch read, to eliminate a read delay caused by access of multiple periods. Additionally, with address configurations associated with two memories that can be controlled alternately and respectively, a branch command is not limited to the alignment of address bits, which decreases a suspend period caused by the branch command.
The present invention can be more fully understood by reading the following detailed description of the embodiment, with reference made to the accompanying drawings as follows:
Reference is made to
A processing circuit 100 can access a device 110 by transmitting access commands including, for example, but not limited to, a read command RC and a write command WC. For example, when the processing circuit 100 transmits the read command RC, the processing circuit 100 may read the read data RD from the device 110 according to corresponding addresses. When the processing circuit 100 transmits the write command WC, the processing circuit 100 may write the write data WD to the device 110 according to the corresponding address.
In one embodiment, the aforesaid transmission of commands and data between the processing circuit 100 and the device 110 may be performed by a bus 120 between the processing circuit 100 and the device 110.
It is to be noticed that, the computer system 1 may actually include other elements which may interact with the processing circuit 100 and the device 110, but the number of the elements is not limited to that illustrated in
The device 110 includes a first memory SRAM1, a second memory SRAM2 and an accessing circuit FET. The first memory SRAM1 and a second memory SRAM2 are adapted for coupling to a processing circuit. The accessing circuit is coupled to first memory SRAM1 and the second memory SRAM2.
In one embodiment, the first memory SRAM1 and the second memory SRAM2 both are static random access memories, but the present disclosure is not limited thereto.
The accessing circuit FET is configured to access the first memory SRAM1 and the second memory SRAM2 according to the read command RC and the write command WC transmitted by the processing circuit 100.
When the device 110 performs the read operation, the accessing circuit FET receives the read command RC from the processing circuit 100, and converts the reference read address corresponded by the read command RC to the actual read address of the first memory SRAM1 and the second memory SRAM2, in order to read corresponding data from the first memory SRAM1 and the second memory SRAM2. The device 110 further includes a first read register BUF1 and a second read register BUF2. The first read register BUF1 and the second read register BUF2 temporarily store data read by accessing circuit FET respectively, and then the accessing circuit FET is configured to output the data to the processing circuit 100.
On the other hand, the device 110 has a structure without the write register. When the device 110 performs the write operation, the accessing circuit FET receives the write command WC of the processing circuit 100, and converts the reference write address corresponded by the write command WC to the actual write address of the first memory SRAM1 and the second memory SRAM2. The corresponding data is written to the first memory SRAM1 and the second memory SRAM2 in a situation that does not require the temporary storage.
The following detail example will be further discussed to illustrate the structure and the operation of the device110.
The multiple reference addresses of the processing circuit 100 alternately correspond to the multiple actual addresses of the first memory SRAM1 and the second memory SRAM2. To discuss in more detail, in one embodiment, the Mth actual address of the actual addresses of the first memory corresponds to the 2M-1th reference address of the reference addresses of the processing circuit, the Mth actual address of the actual addresses of the second memory corresponds to the 2Mth reference address of the reference addresses of the processing circuit, and the M is a positive integer greater than or equal to 1.
Reference is made to
As shown in
On the other hand, the first reference addresses to the eighth reference addresses of the processing circuit 100 is represented in the hexadecimal system, and the first reference address to the eighth reference address are respectively 0x0, 0x4, 0x8, 0xC, 0x10, 0x14, 0x18, 0x1C, continuously.
As a result, the first to the fourth actual addresses of the first memory SRAM1 respectively correspond to the first, the third, the fifth, the seventh reference addresses of the processing circuit 100, by the aforesaid calculating. The first to the fourth actual addresses of the second memory SRAM2 respectively correspond to the second, the fourth, the sixth, the eighth reference addresses of the processing circuit 100, by the aforesaid calculating.
It is noticed that, there is only a portion of the conversion table illustrating in
The read operation is used for an example, when the accessing circuit FET receives the read command RC from the processing circuit 100, and then converts the corresponding reference read address to the actual read address of the first memory SRAM1 and the second memory SRAM2.
Reference is made to
In the
As shown in
In the unit clock T0, the accessing circuit FET receives the first read command RC1 corresponding to the reference read address 0x0 from the processing circuit 100 through, for example, but not limited to, the bus 120.
And then, the accessing circuit FET reads the first read data RD1 from the first memory SRAM1, and prefetches the second read data RD2 from the second memory SRAM2, according to the actual read address (the actual address 0x0 of the first memory SRAM1, and which corresponds to the reference read address 0x0 of the processing circuit 100) and the next first actual read address (the actual address 0x0 of the second memory SRAM2, and which corresponds to the reference read address 0x4 of the processing circuit 100).
In the unit clock T1, the first memory SRAM1 and the second memory SRAM2 require two of the unit clocks to read. As a result, the processing circuit 100 is suspended.
In the unit clock T2, the first read data RD1 and the second read data RD2 have been temporarily stored in the first read register BUF1 and the second read register BUF2. Meanwhile, the accessing circuit FET outputs the first read data RD1 to the processing circuit 100 in one of the unit clocks.
It is noticed that, in actual operation, the first memory SRAM1 requires two of the unit clocks to read. As a result, in the unit clock T2, the first read data RD1 can also be selectively outputted to processing circuit 100 by the accessing circuit FET instead of being temporarily stored by the first read register BUF1, but the present disclosure is not limited thereto.
Meanwhile, the accessing circuit FET receives the next read command RC2 from the processing circuit 100. In the present embodiment, the next first reference read address corresponded by the read command RC2 is 0x4.
The accessing circuit FET determines that the next first reference read address corresponds to the aforesaid next first actual read address, in order to prefetch the third read data RD3 from the first memory, and prefetch the fourth read data RD4 from the second memory SRAM2, according to the next second actual read address (the actual address 0x1 of the first memory SRAM1, and the actual address 0x1 of the first memory SRAM1 corresponds to the reference read address 0x8 of the processing circuit 100) and the next third actual read address (the actual address 0x1 of the second memory SRAM2, and the actual address 0x1 of the second memory SRAM2 corresponds to the reference read address 0xC of the processing circuit 100).
In the unit clock T3, since the reference read address corresponded by the read command RC2 received by the accessing circuit FET in the unit clock T2 is 0x4, which matches the second read data RD2 prefetched from the second memory SRAM2 by the accessing circuit FET. As a result, the accessing circuit FET outputs the second read data RD2 from the second read register BUF2 to the processing circuit 100.
Meanwhile, the accessing circuit FET receives the next read command RC3 from the processing circuit 100. In the present embodiment, the reference read address corresponded by the read command RC3 is 0x8. The accessing circuit FET determines that the reference read address corresponds to the aforesaid third read data RD3 which has been prefetched, and does not perform other operation.
In the unit clock T4, the read command RC3 received by the access FET in the unit clock T3 corresponds to the reference read address 0x8, which matches the third read data prefetched from the first memory SRAM1 by the accessing circuit FET. As a result, the accessing circuit FET will output the third read data RD3 from the first read register BUF1 to the processing circuit 100.
Similarly, as the above mentioned, in the actual operation, the first memory SRAM1 requires two of the unit clocks to read. Therefore, in the unit clock T4, the third read data RD3 can also be selectively outputted by the accessing circuit FET to the processing circuit 100 instead of being temporarily stored by the first read register BUF1, but the present disclosure is not limited thereto.
Meanwhile, the accessing circuit FET receives the next read command RC4 from the processing circuit 100. In the present embodiment, the read command RC4 corresponds to the reference read address 0xC. The accessing circuit FET determines the reference read address corresponds to the aforesaid fourth read data RD4 which has been prefetched, and the accessing circuit prefetches two read data from the first memory SRAM1 and the second memory SRAM2 according to the next first actual read address (the actual address of the first memory SRAM1 is 0x2, and which corresponds to the reference read address 0x10 of the processing circuit 100) and the actual read address after the next first actual read address (the actual address of the second memory SRAM2 is 0x2, and which corresponds to the reference read address 0x14 of the processing circuit 100).
As a result, when the multiple read commands RC received by the accessing circuit FET from the processing circuit 100 are all correspond to the continuous reference read address, the accessing circuit FET will continuously read the data until unit clock T5, uninterrupted.
In the unit clock T6, due to the idle sate of the processing circuit 100, the accessing circuit FET does not receive the read command RC from the processing circuit 100, and the accessing circuit FET continuously prefetches two read data. Therefore, when the reference read address of the read command RC received by the accessing circuit FET in the unit clock T7 is still continuous with the previous read address, the prefetching mechanism is benefit to the read operation of the device 110 instead of generating the unnecessary suspension.
Reference is made to
In the present embodiment, in the unit clock T4, the read command RC4 received by the accessing circuit FET corresponds to the reference read address 0x84 instead of 0xC. Such the reference read address is not continuous with the reference read address 0x8 corresponded by the previous read command RC3. Therefore, the read command RC4 is a branch command escaped from the original read command corresponding to the continuous read address.
Although the first read register BUF1 and the second read register BUF2 temporarily store the third read data RD3 and the fourth read data RD4, which have been prefetched and respectively correspond to the reference read address 0x8 and 0xC. Instead of outputting the fourth read data RD4 to the processing circuit 100 according to the read command RC3 in the next unit clock T5, the accessing circuit FET could only output the third read data RD3 to the processing circuit 100 according to the read command RD3 in the unit clock T4.
Therefore, in the unit clock T4, the accessing circuit FET will read the fifth read data RD5 (the fifth read data RD5 corresponds to the reference read address 0x84 of the processing circuit 100) according to the read command RC4, and prefetches the sixth read data RD6 (the sixth read data RD6 corresponds to the reference read address 0x88 of the processing circuit 100). The corresponding relationship in the conversion table illustrating in
The processing circuit 100 is suspended in the unit clock T5, because of reading data requires two of the unit clocks.
In the unit clock T6, the accessing circuit FET receives the read command RC5 from the processing circuit 100, and the reference read address corresponded by the read command RC5 is 0x88, which corresponds to the sixth read data RD6 which has been prefetched.
Therefore, the accessing circuit FET not only outputs the fifth read data RD5 to the processing circuit 100, but also prefetches the seventh read data RD7 and the eighth read data RD8 from the second memory SRAM2 and the first memory SRAM1, the seventh read data RD7 and the eighth read data RD8 respectively correspond to the reference read address 0x8C and 0x90. The subsequent operation of each unit clock is identical to the state of the reference read address continuous with each other of the read command. Therefore, no more discussed here.
In the part of the techniques, although the access length of the single memory is increased to the data amount to read two words in one time, the target address to be read must be aligned with 64 bits. When the branch command is encountered during the memory reading, and the branch target addresses are not aligned with 64 bits, the read time of the target address and the fetch time of the next continuous command of the target address both require two of the unit clocks, and the access of the processing circuit must be suspended in multiple periods.
The device 110 in the present disclosure is utilized, through configurations of two memories, in the parallel read manner and the command prefethch manner. And, the staggered addresses configuration of the two memories could be respectively controlled, such that the branch command will be not constrained by the alignment of the 64 bits, the suspend period caused by the branch command will then be decreased.
On the other hand, the write operation is used for an example, the accessing circuit FET receives the read command WC corresponding to one reference write address from the processing circuit 100, and converts the reference write address to the actual address of the first memory SRAM1 and the second memory SRAM2, in order to determine the address to actually write the data.
Reference is made to
As shown in
Wherein, the reference write address 0x0, 0x4, 0x8 and 0xC respectively correspond to the actual address 0x0 of the first memory SRAM1, the actual address 0x0 of the second memory SRAM2, the actual address 0x1 of the first memory SRAM1 and the actual address 0x1 of the second memory SRAM2.
The first memory SRAM1 and the second memory SRAM2 require two of the unit clocks to write the data, and the first memory SRAM1 and the second memory SRAM2 can respectively access the data, independently. As a result, the accessing circuit FET sequentially writes the write data WD1-WD4 corresponding to the write command WC1-WC4 to the aforesaid addresses of the first memory SRAM1 and the second memory SRAM2 in the unit clocks T0-T3. Similarly, there can be operated according to the identical manner after unit clock T4. Therefore, no more discussed here.
Therefore, the accessing circuit FET can write one piece of data in each of the unit clocks without any suspended situation, and the configuration of the write register is not required.
The method 600 can be utilized to operate the device 110 as shown in
In step 601, the read command RC corresponding to the reference read command is received, by the accessing circuit FET, from the processing circuit 100.
In step 602, the reference read address is converted to the actual read address of the first memory SRAM1 and the second memory SRAM2, by the accessing circuit FET, wherein the multiple reference addresses of the processing circuit 100 alternately correspond to the multiple actual addresses of the first memory and the second memory.
In step 603, the first read data RD1 is read from the first one of the first memory SRAM1 and the second memory SRAM2, and the second read data RD2 is prefetched from the second one of the first memory SRAM1 and the second memory SRAM2, by the accessing circuit FET, according to the actual read address and the next first actual read address, simultaneously.
In step, 604, the first read data RD1 is outputted to the processing circuit 100 by the accessing circuit FET.
In step 605, the next read command RC corresponding to the next first reference read address is received, and whether the next first reference read address corresponds the next first actual read address is determined, by the accessing circuit FET.
In step 606, when the next first reference read address of the next read command RC corresponds to the next first actual read address, the prefetched read data such as the second read data RD2, is outputted by the accessing circuit FET to the processing circuit 100.
In step 607, the next two piece of read data are prefetched and respectively stored to the first read register BUF1 and the second register BUF2, by the accessing circuit FET.
To explain in more detail, the accessing circuit FET prefetches the third read data RD3 from the first memory SRAM1, and prefetches the fourth read data RD4 from the second memory SRAM2, according to the next second actual read address and the next third actual read address, and the accessing circuit FET respectively stores the third read data RD3 and the fourth read data RD4 to the first register BUF1 and the second register BUF2.
After step 607, the procedure will return to the step 605 to determine the next first received read command, continuously.
In step 605, when the accessing circuit FET determines that the next first reference read address does not correspond to the next first actual read address, in the step 608, whether the processing circuit 100 does not send the read command is determined by the accessing circuit FET.
When the accessing circuit FET determines that the processing circuit 100 does not send the read command, the procedure will proceed to the step 607 to continuously prefetch the read data. When the accessing circuit FET determines that the processing circuit 100 does send the read command, the procedure will return to the step 602, so as to read the first memory SRAM1 and the second memory SRAM2 according to the new read address.
The method 700 can be utilized to operate the device 110 as shown in
In step 701, the write command WC corresponding to the reference read address is received from the processing circuit 100 by the accessing circuit FET.
In step 702, the reference write address is converted to the actual write address of the first memory SRAM1 and the second memory SRAM2 by the accessing circuit FET.
In step 703, the write data WD is written to the actual write address according to the write command WC by the accessing circuit FET.
Although the present disclosure has been described in considerable detail with reference to certain embodiments thereof, other embodiments are possible. Therefore, the spirit and scope of the appended claims should not be limited to the description of the embodiments contained herein. It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims.
Number | Date | Country | Kind |
---|---|---|---|
109100232 | Jan 2020 | TW | national |
Number | Name | Date | Kind |
---|---|---|---|
4621320 | Holste | Nov 1986 | A |
4888679 | Fossum | Dec 1989 | A |
4918587 | Pechter | Apr 1990 | A |
20010043507 | Ooishi | Nov 2001 | A1 |
20070025173 | Cullum | Feb 2007 | A1 |
20070180186 | Cornwell | Aug 2007 | A1 |
20070255891 | Chow | Nov 2007 | A1 |
20080250211 | Imamizu | Oct 2008 | A1 |
20100281232 | Takagi et al. | Nov 2010 | A1 |
20130138867 | Craft | May 2013 | A1 |
20130227229 | Ishikawa | Aug 2013 | A1 |
20140136748 | Por | May 2014 | A1 |
Number | Date | Country | |
---|---|---|---|
20210209018 A1 | Jul 2021 | US |