Claims
- 1. A method of managing a cache, comprising:
partitioning the cache into a locked cache portion and a normal cache portion, wherein the contents of the normal cache portion is controlled by a hardware replacement algorithm; locking the locked cache portion so that the hardware replacement algorithm cannot change the contents of the locked cache portion; and using software to control the contents of each block in the locked cache portion.
- 2. The method of claim 1, wherein partitioning the cache includes partitioning the cache such that the locked cache portion and the normal cache portion are approximately equal in size.
- 3. The method of claim 1, further including providing a control mechanism which enables the cache to be selectively used as either a single normal cache or as the partitioned cache having the locked cache portion and normal cache portion.
- 4. The method of claim 1, further including providing a direct memory access engine for controlling transfer of data between the locked cache portion and an external memory.
- 5. The method of claim 1, wherein using software to control the contents of the data cache includes using an instruction which is operable to respectively allocate blocks in the locked cache to any location in the external memory.
- 6. A microprocessor, comprising a control unit and a cache connected with the control unit for storing data to be used by the control unit, wherein the cache is selectively configurable as either a single cache or as a partitioned cache having a locked cache portion and a normal cache portion, the normal cache portion being controlled by a hardware implemented automatic replacement process, and further wherein the locked cache portion is locked so that the automatic replacement process cannot modify the contents of the locked cache portion.
- 7. The microprocessor of claim 6, further including an instruction that enables software to selectively allocate lines in the locked cache portion to correspond to locations in an external memory
- 8. The microprocessor of claim 7, wherein the instruction enables any line in the locked cache portion to be allocated to any line in the external memory.
- 9. The microprocessor of claim 7, further including a direct memory access engine that controls transfer of data between the locked cache portion and the external memory.
- 10. The microprocessor of claim 9, wherein the direct memory access engine includes first and second special purpose registers, wherein the first special purpose register controls transfer of data from the external memory into the locked cache potion and the second special purpose register controls transfer of data from the locked cache portion to the external memory.
- 11. The microprocessor of claim 7, wherein the microprocessor further includes a hardware implementation dependent special purpose register which determines whether the cache is configured as the single normal cache or the partitioned cache.
- 12. The microprocessor of claim 6, wherein the cache is a level one data cache.
- 13. A data processor, comprising a control unit, a cache connected to the control unit, means for partitioning the cache into a locked cache portion and a normal cache portion, wherein the contents of the normal cache portion is controlled by a hardware replacement algorithm; means for locking the locked cache portion so that the hardware replacement algorithm cannot change the contents of the locked cache portion, and software control means for controlling the contents of each block in the locked cache portion.
- 14. The data processor of claim 13, wherein the means for partitioning the cache partitions the cache such that the locked cache portion and the normal cache portion are approximately equal in size.
- 15. The data processor of claim 13, further including control means which enables the cache to be selectively used as either a single normal cache or as the partitioned cache having the locked cache portion and the normal cache portion.
- 16. The data processor of claim 13, further including means for controlling transfer of data between the locked cache portion and an external memory.
- 17. The data processor of claim 13, wherein the software control means includes an instruction which is operable to respectively allocate blocks in the locked cache to any location in the external memory.
- 18. An information processor, including a decoder for decoding instructions including at least some graphics instructions and at least some cache control instructions, wherein the decoder is operable to decode at least one 32 bit data-cache-block-set-to-zero instruction bit pattern wherein bits 0 through 5 encode a primary op code of “4”, bits 6 through 10 encode a reserved field of “00000”, bits 11 through 15 designate a first register, bits 16 through 20 designate a second register, the content of which is to be added to the content of the first register to provide a cache block address to be cleared or allocated, bits 21 through 30 encode a secondary op code of “1014”, and bit 31 encodes a reserved field of “0”.
- 19. The information processor of claim 18, wherein the decoder is further operable to decode a 32 bit register bit pattern containing bits 0 through 31, wherein bits 0 through 26 comprise 27-bit high order address bits representing a starting address in main memory and bits 27-31 comprise 5 high order bits representing transfer length in cache lines.
- 20. The information processor of claim 19, wherein the decoder is further operable to decode a 32-bit register bit pattern including bits 0 through 31, wherein bits 0 through 26 comprise 27 high order bits representing a starting address in a locked cache, bit 27 comprises a one-bit load command that encodes whether direct memory access transfer is from the locked cache to external memory or from external memory to locked cache, bits 28 through 29 comprise two low order bits representing a transfer length in cache lines, bit 30 comprises a trigger bit representing whether to activate or deactivate direct memory access, and bit 31 comprises a flush bit encoding normal direct memory access operation or flush of a queued direct memory access command.
- 21. The information processor of claim 20, wherein the decoder is further operable to decode at least one move-to-special-purpose register command bit pattern including a special purpose register bit encoding whether to configure a cache as single normal cache or as a partitioned cache containing a normal cache portion and a locked cache portion, wherein the special purpose register bit is the forth bit in the bit pattern.
- 22. A storage medium storing a plurality of instructions including at least some graphics instructions and at least some cache control instructions, wherein the cache control instructions include at least one 32 bit data-cache-block set-to-zero instruction bit pattern wherein bits 0 through 5 encode a primary op code of “4”, bits 6 through 10 encode a reserved field of “00000”, bits 11 through 15 designate a first register, bits 16 through 20 designate a second register, the content of which is to be added to the content of the first register to provide a cache block address to be cleared or allocated, bits 21 through 30 encode a secondary op code of “1014”, and bit 31 encodes a reserved field of “0”.
- 23. The storage medium of claim 22, further storing a 32-bit register bit pattern containing bits 0 through 31, wherein bits 0 through 26 comprise 27-bit high order address bits representing a starting address in main memory and bits 27-31 comprise 5 high order bits representing transfer length in cache lines.
- 24. The storage medium of claim 23, further storing a 32-bit register bit pattern including bits 0 through 31, wherein bits 0 through 26 comprise 27 high order bits representing a starting address in a locked cache, bit 27 comprises a one-bit load command that encodes whether direct memory access transfer is from the locked cache to external memory or from external memory to locked cache, bits 28 through 29 comprise two low order bits representing a transfer length in cache lines, bit 30 comprises a trigger bit representing whether to activate or deactivate direct memory access, and bit 31 comprises a flush bit encoding normal direct memory access operation or flush of a queued direct memory access command.
- 25. The storage medium of claim 24, further storing at least one move-to-special-purpose register command bit pattern including a special purpose register bit encoding whether to configure a cache as single normal cache or as a partitioned cache containing a normal cache portion and a locked cache portion, wherein the special purpose register bit is the forth bit in the bit pattern.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is related to U.S. application Ser. No. ______, entitled “METHOD AND APPARATUS FOR OBTAINING A SCALAR VALUE DIRECTLY FROM A VECTOR REGISTER” and U.S. application Ser. No. ______, entitled “METHOD AND APPARATUS FOR EFFICIENT LOADING AND STORING OF VECTORS”, filed by the same inventors on the same date as the instant application. Both of these related cases are hereby incorporated by reference in their entirety.
Continuations (1)
|
Number |
Date |
Country |
Parent |
09545184 |
Apr 2000 |
US |
Child |
09918703 |
Aug 2001 |
US |