section 7 - Index of

section 7 - Index of section 7 - Index of

11.07.2015 Views

-23 876543210I * 1* JSO I * I Mel yoJ OE1MBIMAII I IFigure 5-6 OMR FormatOPERATING MODE A, BDATA ROM ENABLEINTERNAL Y MEMORY DISABLEOPERATING MODE CRESERVEDSTOP DELAYRESERVEDRESERVED5.4.3 Operating Mode RegisterThe OMR is a 24-bit register (only six bits are d~fined) that sets the current operatingmode of the processor. Each chip in the DSP56K family of processors has its own set ofoperating modes which determine the memory maps for program and data memories, andthe startup procedure that occurs when the chip leaves the reset state. The OMR bits areonly affected by processor reset and by the ANDI, ORI, and MOVEC instructions, whichdirectly reference the OMR.The OMR format with all of its defined bits is shown in Figure 5-6. For product-specificOMR bit definitions, see the individual chip's user manual for details on its respective operatingmodes.5.4.4 System StackThe SS is a separate 15X32-bit internal memory divided into two banks, the SSH and theSSL, each 16 bits wide. The SSH stores the PC contents, and the SSL stores the SR contentsfor subroutine calls, long interrupts, and program looping. The SS will alsC? store theLA and LC registers. The SS is in stack memory space; its address is always inherent andimplied by the current instruction.The contents of the PC and SR are pushed on the top location of the SS when a subroutinecall or long interrupt occurs. When a return from subroutine (RTS) occurs, thecontents of the top location in the SS are pulled and put in the PC; the SR is not affected.When an RTI occurs, the conte~ts of the top location in the SS are pulled to both the PCand SR.The SS is also used to implement no-overhead nested hardware DO loops. When the DOinstruction is executed, the LA:LC are pushed on the SS, then the PC:SR are pushed on

the SS. Since each SS location can be addressed as separate 16-bit registers (SSH andSSL), software stacks can be created for unlimited nesting.The SS can accommodate up to 15 long interrupts, seven DO loops, 15 JSRs, or combinationsthereof. When the SS limit is exceeded, a nonmaskable stack error interruptoccurs, and the PC is pushed to SS location zero, which is not implemented in hardware.The PC will be lost, and there will be no SP from the stack interrupt routine to the programthat was executing when the error occurred.5 4 3 2 oSTACK POINTERSTACK ERROR FLAGUNDERFLOW FLAGFigure 5-7 Stack Pointer Register Format5.4.5 Stack Pointer RegisterThe 6-bit SP register indicates the location of the top of the SS and the status of the SS(underflow, empty, full, and overflow). The SP register is referenced implicitly by some instructions(DO, REP, JSR, RTI, etc.) or directly by the MOVEC instruction. The SPregister format is shown in Figure 5-7. The SP register works as a 6-bit counter that addresses(selects) a 15-location stack with its four LSBs. The possible SP values areshown in Figure 5-8 and described in the following paragraphs.UF SE P3 P2 P1 POSTACK UNDERFLOW CONDITION AFTER DOUBLE PULL1 STACK UNDERFLOW CONDITION0 0 0 STACK EMPTY (RESET); PULL CAUSES UNDERFLOW0 0 0 STACK LOCATION 10 0 STACK LOCATION 140 0 STACK LOCATION 15; PUSH CAUSES OVERFLOW0 0 0 0 STACK OVERFLOW CONDITION0 0 0 0 STACK OVERFLOW CONDITION AFTER DOUBLE PUSHFigure 5-8 SP Register Values

the SS. Since each SS location can be addressed as separate 16-bit registers (SSH andSSL), s<strong>of</strong>tware stacks can be created for unlimited nesting.The SS can accommodate up to 15 long interrupts, seven DO loops, 15 JSRs, or combinationsthere<strong>of</strong>. When the SS limit is exceeded, a nonmaskable stack error interruptoccurs, and the PC is pushed to SS location zero, which is not implemented in hardware.The PC will be lost, and there will be no SP from the stack interrupt routine to the programthat was executing when the error occurred.5 4 3 2 oSTACK POINTERSTACK ERROR FLAGUNDERFLOW FLAGFigure 5-7 Stack Pointer Register Format5.4.5 Stack Pointer RegisterThe 6-bit SP register indicates the location <strong>of</strong> the top <strong>of</strong> the SS and the status <strong>of</strong> the SS(underflow, empty, full, and overflow). The SP register is referenced implicitly by some instructions(DO, REP, JSR, RTI, etc.) or directly by the MOVEC instruction. The SPregister format is shown in Figure 5-7. The SP register works as a 6-bit counter that addresses(selects) a 15-location stack with its four LSBs. The possible SP values areshown in Figure 5-8 and described in the following paragraphs.UF SE P3 P2 P1 POSTACK UNDERFLOW CONDITION AFTER DOUBLE PULL1 STACK UNDERFLOW CONDITION0 0 0 STACK EMPTY (RESET); PULL CAUSES UNDERFLOW0 0 0 STACK LOCATION 10 0 STACK LOCATION 140 0 STACK LOCATION 15; PUSH CAUSES OVERFLOW0 0 0 0 STACK OVERFLOW CONDITION0 0 0 0 STACK OVERFLOW CONDITION AFTER DOUBLE PUSHFigure 5-8 SP Register Values

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!