Loop and Status Stacks and Sequencing
3-16
ADSP-2126x SHARC Processor Hardware Reference
following example, instruction 2 immediately follows instruction 1 in all
occasions:
jump (pc, 3) (db):
instruction 1
;
instruction 2;
During a delayed branch, a program can read the
PC
stack register
or
PC
stack pointer register. This read shows that the return address
on the PC stack has already been pushed or popped, even though
the branch has not yet occurred.
Loop and Status Stacks and Sequencing
The sequencer includes a Program Counter (PC) stack, which appears in
. At the start of a subroutine or loop, the sequencer
pushes return addresses for subroutines (
CALL
/
RETURN
instructions) and
top-of-loop addresses for loops (
DO
/
UNTIL
instructions) onto the PC stack.
The sequencer pops the PC stack during a return from interrupt (
RTI
),
return from subroutine (
RTS
), and a loop termination.
The Program Counter (
PC
) register is the last stage in the
fetch-decode-execute instruction pipeline. It contains the 24-bit address of
the instruction the DSP will execute on the next cycle. The
PC
register,
combined with the Program Counter Stack (
PCSTK
) register, stores return
addresses and top-of-loop addresses.
The PC stack is 30 locations deep. The stack is full when all entries are
occupied, is empty when no entries are occupied, and is overflowed if a
push occurs when the stack is full. The following bits in the
STKYx
register
indicate the PC stack full and empty states.
Summary of Contents for ADSP-21261 SHARC
Page 30: ...Contents xxx ADSP 2126x SHARC Processor Hardware Reference ...
Page 40: ...Register Diagram Conventions xl ADSP 2126x SHARC Processor Hardware Reference ...
Page 58: ...Differences From Previous SHARCs 1 18 ADSP 2126x SHARC Processor Hardware Reference ...
Page 112: ...Secondary Processing Element PEy 2 54 ADSP 2126x SHARC Processor Hardware Reference ...
Page 178: ...Summary 3 66 ADSP 2126x SHARC Processor Hardware Reference ...
Page 204: ...DAG Instruction Summary 4 26 ADSP 2126x SHARC Processor Hardware Reference ...
Page 322: ...Setting Up DMA 7 32 ADSP 2126x SHARC Processor Hardware Reference ...
Page 436: ...SPORT Programming Examples 9 86 ADSP 2126x SHARC Processor Hardware Reference ...
Page 521: ...ADSP 2126x SHARC Processor Hardware Reference 11 31 Input Data Port rts IDP_ISR end ...
Page 522: ...Input Data Port Programming Example 11 32 ADSP 2126x SHARC Processor Hardware Reference ...
Page 590: ...Timer Programming Examples 14 20 ADSP 2126x SHARC Processor Hardware Reference ...
Page 796: ...I O Processor Registers A 174 ADSP 2126x SHARC Processor Hardware Reference ...
Page 800: ...B 4 ADSP 2126x SHARC Processor Core Manual ...
Page 846: ...Index I 36 ADSP 2126x SHARC Processor Hardware Reference ...