Electrical computers and digital processing systems: memory – Address formation
Reexamination Certificate
2001-12-05
2004-02-17
Gossage, Glenn (Department: 2187)
Electrical computers and digital processing systems: memory
Address formation
C711S220000, C711S132000, C711S219000
Reexamination Certificate
active
06694420
ABSTRACT:
TECHNICAL FIELD OF THE INVENTION
The present invention is directed, in general, to data processing systems and, more specifically, to a circuit and method for determining if an address is within the address range of a stack cache.
BACKGROUND OF THE INVENTION
The demand for high performance computers requires that state-of-the-art microprocessors execute instructions in the minimum amount of time. A number of different approaches have been taken to decrease instruction execution time, thereby increasing processor throughput. One way to increase processor throughput is to use a pipeline architecture in which the processor is divided into separate processing stages that form the pipeline. Instructions are broken down into elemental steps that are executed in different stages in an assembly line fashion.
A pipelined processor is capable of executing several different machine instructions concurrently. This is accomplished by breaking down the processing steps for each instruction into several discrete processing phases, each of which is executed by a separate pipeline stage. Hence, each instruction must pass sequentially through each pipeline stage in order to complete its execution. In general, a given instruction is processed by only one pipeline stage at a time, with one clock cycle being required for each stage. Since instructions use the pipeline stages in the same order and typically only stay in each stage for a single clock cycle, an N stage pipeline is capable of simultaneously processing N instructions. When filled with instructions, a processor with N pipeline stages completes one instruction each clock cycle.
The execution rate of a pipeline processor is theoretically N times faster than an equivalent non-pipelined processor. A non-pipelined processor is a processor that completes execution of one instruction before proceeding to the next instruction. Typically, pipeline overheads and other factors decrease somewhat the execution advantage rate that a pipelined processor has over a non-pipelined processor.
A multi-stage processor pipeline may consist of an instruction fetch stage, a decode stage, an operand fetch stage, and an execute stage, among others. In addition, the processor may have an instruction cache that stores program instructions for execution, a data cache that temporarily stores data operands that otherwise are stored in processor memory, and a register file that also temporarily stores data operands.
In a stack-based microprocessor system, the variables, arguments and processor status may be stored in a portion of memory called the stack frame. A stack frame base pointer contains the address of the root location of the current stack frame, while a stack frame index pointer contains the address of the exact memory location of the byte or word, as shown in FIG.
5
.
FIG. 5
illustrates an exemplary stack frame in a portion of the memory stack. The processor accesses the stack frame frequently, using the index pointer or sometimes using an absolute pointer. In the case of an index pointer, the absolute address can be calculated by adding the base pointer and the index pointer.
In high performance computer systems, it is desirable to maintain portion of the current stack frame in a very small but fast register cache, in order to speed up the access to the otherwise slower large L1 or L2 cache, or the even slower off-chip main memory. For example, a program can setup a stack frame base pointer register and use an index pointer to access a memory location. If a data processor implements a stack cache and ensures that the base of the cache corresponds to the base pointer, the memory value can be addressed simply by indexing, as if it is read from a register file. Normally a valid status bit is used to indicate the validity of a given entry in the cache.
However, in such designs, maintaining the data coherence between the stack cache and the slower memory that it mirrors has proved to be a critical issue. Take the following program sequence as an example: 1) store a value to absolute location A; 2) read a memory location using base pointer B and index C. A high performance machine would normally fetch the memory location indexed by C from the stack cache before executing the store operation. This is so because the store operation has to wait for the data operand from an execution stage, which is usually near the end of the pipeline. The processor can fetch the value indexed by index C from stack cache quickly. However, it has to also make sure that the store operation does not make the data stale (i.e., if A=B+C). A typical approach employed by many designs is to compare the absolute address A with the range of addresses in cache and invalidate the entry by resetting the valid status bit if there is a match, thereby forcing a cache miss and maintaining the integrity of the cache data.
Invalidation of the stack cache valid bits has proved to be a critical timing issue in a high-speed design. In a typical implementation, the data processor subtracts the base address B from the absolute store address A and invalidates an entry using the lower bits of the difference if the high order bits of the result are zero. For example, for a 16-entry cache, the twenty-eight (28) most significant bits, D[31:4], of the difference, assuming a 32-bit address space, must be zero if address A is cached in the stack cache. Unfortunately this approach is slow because it relies on the result of a relatively large and slow adder that is normally used to do the subtraction. In addition to its speed problems, the adder also requires a large amount of chip space.
Therefore, there is a need in the art for an improved data processor that more rapidly invalidates an entry in the stack cache. In particular, there is a need in the art for improved address rang check circuitry for invalidating an entry in the stack cache.
SUMMARY OF THE INVENTION
To address the above-discussed deficiencies of the prior art, it is a primary object of the present invention to provide an address range checking circuit capable of determining if a target address, A[M:0], is within an address space having 2
N
address locations beginning at a base address location, B[M:0], wherein the address range checking circuit does not require a large comparator circuit.
According to an advantageous embodiment of the present invention, the address range checking circuit comprises: 1) comparison circuitry capable of determining if the address segment A[N−1:0] is less than the address segment B[N−1:0] and generating on an output a first control signal having a first logic state indicating A[N−1:0] is less than B[N−1:0] and having a second logic state indicating A[N−1:0] is not less than B[N−1:0]; 2) first equivalence detection circuitry capable of determining if the address segment A[M:N] is equal to the address segment B[M:N] and generating on an output an A=B status signal having a first logic state indicating A[M:N] is equal to B[M:N] and having a second logic state indicating A[M:N] is not equal to B[M:N]; 3) second equivalence detection circuitry capable of determining if the address segment A[M:N] is equal to the address segment B[M:N] plus one and generating on an output an A=B+1 status signal having a first logic state indicating A[M:N] is equal to B[M:N] plus one and having a second logic state indicating A[M:N] is not equal to B[M:N] plus one; and 4) a multiplexer controlled by the first control signal generated by the comparison circuitry, the multiplexer having a first input coupled to the first equivalence detection circuitry output and a second input coupled to the second equivalence detection circuitry output, wherein the first control signal causes the multiplexer to output the A=B status signal when the first control signal is at th
Gossage Glenn
Jorgenson Lisa K.
Munck Willam A.
STMicroelectronics Inc.
LandOfFree
Address range checking circuit and method of operation does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Address range checking circuit and method of operation, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Address range checking circuit and method of operation will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-3322631