Microprocessor with repeat prefetch instruction
First Claim
1. A microprocessor for executing a prefetch instruction specifying a block of cache lines to be prefetched from a System memory into a cache of the microprocessor, the microprocessor comprising:
- a prefetch count register, for storing a count of the cache lines remaining to be prefetched;
a general purpose register, coupled to said prefetch count register, for storing an initial value of said count, said initial value loaded into said general purpose register by an instruction prior to the prefetch instruction;
control logic, coupled to said prefetch count register, for copying said initial value from said general purpose register to said prefetch count register in response to decoding the prefetch instruction; and
a comparator, coupled to said control logic, for determining whether a number of free response buffers in the microprocessor is greater than a threshold value;
wherein said control logic delays prefetching the cache lines until said number of free response buffers is greater than said threshold value, wherein said threshold value is programmable.
2 Assignments
0 Petitions
Accused Products
Abstract
A microprocessor that executes a repeat prefetch instruction (REP PREFETCH). The REP PREFETCH prefetches multiple cache lines, wherein the number of cache lines is specifiable in the instruction. The instruction is specified by the Pentium III PREFETCH opcode preceded by the REP string instruction prefix. The programmer specifies the count of cache lines to be prefetched in the ECX register, similarly to the repeat count of a REP string instruction. The effective address of the first cache line is specified similar to the conventional PREFETCH instruction. The REP PREFETCH instruction stops if the address of the current prefetch cache line misses in the TLB, or if the current processor level changes. Additionally, a line is prefetched only if the number of free response buffers is above a programmable threshold. The prefetches are performed at a lower priority than other activities needing access to the cache or TLB.
-
Citations
11 Claims
-
1. A microprocessor for executing a prefetch instruction specifying a block of cache lines to be prefetched from a System memory into a cache of the microprocessor, the microprocessor comprising:
-
a prefetch count register, for storing a count of the cache lines remaining to be prefetched;
a general purpose register, coupled to said prefetch count register, for storing an initial value of said count, said initial value loaded into said general purpose register by an instruction prior to the prefetch instruction;
control logic, coupled to said prefetch count register, for copying said initial value from said general purpose register to said prefetch count register in response to decoding the prefetch instruction; and
a comparator, coupled to said control logic, for determining whether a number of free response buffers in the microprocessor is greater than a threshold value;
wherein said control logic delays prefetching the cache lines until said number of free response buffers is greater than said threshold value, wherein said threshold value is programmable. - View Dependent Claims (2, 3)
-
-
4. A microprocessor for executing a prefetch instruction specifying a block of cache lines to be prefetched from a system memory into a cache of the microprocessor, the microprocessor comprising:
-
a prefetch count register, for storing a count of the cache lines remaining to be prefetched;
a general purpose register, coupled to said prefetch count register, for storing an initial value of said count, said initial value loaded into said general purpose register by an instruction prior to the prefetch instruction;
control logic, coupled to said prefetch count register, for copying said initial value from said general purpose register to said prefetch count register in response to decoding the prefetch instruction;
a comparator, coupled to said control logic, for determining whether a number of free response buffers in the microprocessor is greater than a threshold value; and
a replay buffer, coupled to said control logic, for storing state associated with the prefetch instruction if said number of free response buffers is not greater than said threshold value. - View Dependent Claims (5)
-
-
6. A microprocessor in a system with a system memory, the microprocessor comprising:
-
an instruction decoder, for decoding a prefetch instruction specifying a count of cache lines to prefetch from the system memory and an address in the system memory of said cache lines;
an address, register, coupled to said instruction decoder, for storing said address specified in said prefetch instruction;
a count register, coupled to said instruction decoder, for storing said count specified in said prefetch instruction;
control logic, coupled to said address register, configured to control the microprocessor to prefetch said cache lines specified in said address register and said count register from the system memory into a cache memory of the microprocessor; and
an address generator, coupled to said address register, for generating said address stored in said address register based on operands specified by said prefetch instruction;
wherein said operands specified by said prefetch instruction are specified in one or more registers of a register file of the microprocessor, wherein said operands specified in said one or more registers is specified in a segment;
offset format substantially conforming to a Pentium III architecture segment;
offset format.- View Dependent Claims (7)
-
-
8. A microprocessor in a system with a system memory, the microprocessor comprising:
-
an instruction decoder, for decoding a prefetch instruction specifying a count of cache lines to prefetch from the system memory and an address in the system memory of said cache lines;
an address register, coupled to said instruction decoder, for storing said address specified in said prefetch instruction;
a count register, coupled to said instruction decoder, for storing said count specified in said prefetch instruction; and
control logic, coupled to said address register, configured to control the microprocessor to prefetch said cache lines specified in said address register and said count register from the system memory into a cache memory of the microprocessor;
wherein said control logic stops prefetching said cache lines if the microprocessor changes its current privilege level to a more privileged privilege level. - View Dependent Claims (9)
-
-
10. A microprocessor in a system with a system memory, the microprocessor comprising:
-
an instruction decoder, for decoding a prefetch instruction specifying a count of cache lines to prefetch from the system memory and an address in the system memory of said cache lines;
an address register, coupled to said instruction decoder, for storing said address specified in said prefetch instruction;
a count register, coupled to said instruction decoder, for storing said count specified in said prefetch instruction; and
control logic, coupled to said address register, configured to control the microprocessor to prefetch said cache lines specified in said address register and said count register from the system memory into a cache memory of the microprocessor;
wherein said control logic decrements said count stored in said count register without prefetching one of said cache lines specified by said address stored in said address register if said address hits in said cache memory, wherein said control logic increments said address stored in said address register if said address hits in said cache memory.
-
-
11. A method of a microprocessor prefetching cache lines into its cache, the method comprising:
-
(a) detecting a repeat prefetch instruction specifying a count of cache lines for prefetching from a system memory address;
(b) copying said count from a general purpose register of the microprocessor to a prefetch count register;
(c) storing said address in a prefetch address register;
(d) prefetching a cache line specified by said prefetch address register into the cache;
(e) decrementing said prefetch count register;
(f) incrementing said prefetch address register;
(g) repeating said steps (d), (e), and (f) until said prefetch count register reaches a zero value; and
skipping step (d) if said address generates a hit in the cache.
-
Specification