Method and apparatus for least-recently-used replacement of a block frame in an electronic memory device
AssigneeOn Demand Microelectronics
InventorFlorian Blaschegg
Life of this patent
Estimating the term…
Abstract
A method and apparatus for replacement in a least-recently-used strategies is disclosed. An exemplary embodiment of the replacement strategy presented herein is a replacement strategy for set associative caches. The method and apparatus stores a priority level to determine which block frame is to be selected for replacement. Due to its simplicity, the disclosed approach and apparatus enables small implementations and is easily scalable. Consequently, the present method and apparatus is highly desirable for implementations of area critical applications.
Claims15
An electronic system to implement a replacement strategy, the system comprising:
- a set of N blocks, each of the set of N blocks capable of storing at least one value;
- and
- a set of N priority modules, each of the N priority modules being electrically coupled to a select one of the set of N blocks, each of the set of N priority modules including:
- a priority level register configured to store a priority level value, the priority level being an integer within a range of 0 to N−1;
- an incrementor configured to generate a next higher priority level value;
- an equal comparator configured to compare the priority level value with a reference value and generate an equal signal when the priority level value and the reference value are equal, the reference value being an integer from 0 to N−1;
- a second comparator configured to compare the priority level value with the reference value and generate a second signal when the priority level value is greater than the reference value;
- and
- a logic circuit configured to load the priority level register, the logic circuit further configured to be responsive to the equal signal and the second signal.
A method of reading a block from a set of N blocks in a data processing environment, the method comprising:
- storing a select one of a plurality of priority level values in each of a set of N priority modules;
- determining whether a selected block in the set of N blocks is available using an address of the block;
- determining a current priority level value,
- the current priority level value being a priority level of the selected block to be read;
- reading the selected block;
- resetting the current priority level to zero;
- and
- incrementing each priority level of a set of N priority level registers to a next higher priority level which are lower than a reference value.
A method of replacing a current block in a set of N blocks with a new block in the set of N blocks in a data processing environment, the method comprising:
- storing one of a plurality of priority level values in each of a plurality of priority modules;
- determining whether the current block has a priority level value of N−1;
- overwriting the current block with the new block;
- and
- resetting the priority level value assigned to the current block to zero;
- incrementing each priority level of the set of N priority level registers to a next higher priority level except for the priority level assigned to the current block.
Dependencies are inferred from the claim text.