Stack Pointer Management
First Claim
Patent Images
1. A digital system comprising a microprocessor, wherein the microprocessor comprises:
- an instruction buffer unit operable to fetch and decode instructions fetched from an instruction memory;
a data computation unit for executing the instructions decoded by the instruction buffer unit;
a program counter which has a first program counter portion and a remaining program counter portion, the program counter operable to provide an instruction address that is provided to the instruction memory;
a first stack pointer operable to address a first stack region in a data memory for saving a first value representative of the first program counter portion in response to a first instruction being executed by the microprocessor; and
a second stack pointer operable to address a second stack region in the data memory for saving a second value representative of the remaining program counter portion in response to executing said first instruction.
1 Assignment
0 Petitions
Accused Products
Abstract
A processor (100) is provided that is a programmable digital signal processor (DSP) with variable instruction length. A user stack region (910) is used to pass variables to a subroutine and to hold values representative of a first portion of a program counter (1000). A system stack region (911) is used to hold values representative of a remaining portion of the program counter (1001) and to hold additional context information. The user stack region and the system stack region are managed independently so that software from a prior generation processor can be translated to run on processor (100).
10 Citations
9 Claims
-
1. A digital system comprising a microprocessor, wherein the microprocessor comprises:
-
an instruction buffer unit operable to fetch and decode instructions fetched from an instruction memory;
a data computation unit for executing the instructions decoded by the instruction buffer unit;
a program counter which has a first program counter portion and a remaining program counter portion, the program counter operable to provide an instruction address that is provided to the instruction memory;
a first stack pointer operable to address a first stack region in a data memory for saving a first value representative of the first program counter portion in response to a first instruction being executed by the microprocessor; and
a second stack pointer operable to address a second stack region in the data memory for saving a second value representative of the remaining program counter portion in response to executing said first instruction. - View Dependent Claims (2, 3, 4)
an integrated keyboard (12) connected to the processor via a keyboard adapter;
a display (14), connected to the processor via a display adapter;
radio frequency (RF) circuitry (16) connected to the processor; and
an aerial (18) connected to the RF circuitry.
-
-
5. A method of operating a digital system, comprising the steps of:
-
executing a plurality of instructions in a processor core, wherein the instructions are fetched in response to a program counter from an instruction memory associated with the processor core;
forming a first stack region for holding a plurality of data values in a data memory associated with the processor core by maintaining a first stack pointer;
forming a second stack region separate from the first stack region in the data memory for storing a second plurality of data values by maintaining a second stack pointer;
storing a first value representative of a first portion of a program counter in the first stack region in response to a first instruction being executed in the processor core; and
storing a second value representative of a remaining portion of the program counter in the second stack region in response to executing said first instruction. - View Dependent Claims (6, 7, 8, 9)
storing a first argument value in the first stack region adjacent to the first program counter value using a first stack pointer relative address relative to the first stack pointer in response to executing a second instruction, such that the first stack pointer relative address is not affected by the second program counter value that is stored in the second stack region;
storing a context data value adjacent to the second program counter value using a second stack pointer relative address relative to the second stack pointer in response to executing the second instruction, such that a stack pointer relative address relative to the first stack pointer is not affected by the context data value that is stored in the second stack region; and
storing a context data value adjacent to the second program counter value using a second stack pointer relative address relative to the second stack pointer in response to executing an interrupt, such that a stack pointer relative address relative to the first stack pointer is not affected by the context data value that is stored in the second stack region.
-
Specification