section 7 - Index of

section 7 - Index of section 7 - Index of

11.07.2015 Views

additional (if any) instruction program words that are required for the effective address ofthe Jcc instruction. The term "jx" represents the number of additional (if any) oscillatorclock cycles required for a jump-type instruction.2. Evaluate the "jx" term using Table A-11.According to Table A-11, the Jcc instruction will require jx=ea+(2 * ap) additional oscillatorclock cycles. The term "ea" represents the number of additional (if any) oscillatorclock cycles that are required for the effective addressing mode specified in the Jccinstruction. The term "ap" represents the number of additional (if any) oscillator clockcycles that are required to access a P memory operand. Note that the "+(2 * ap)" termrepresents the two program memory instruction fetches executed at the end of a onewordjump instruction to refill the instruction pipeline.3. Evaluate the "ea" term using Table A-13.The JLC (R2+N2) instruction uses the "indexed by offset Nn" effective addressing mode.According to Table A-13, this operation will require ea=O additional instruction programwords and ea=2 additional oscillator clock cycles.4. Evaluate the "ap" term using Table A-14.According to Table A-14, the term "ap" depends upon where the referenced P memorylocation is located in the DSP56K memory space. External memory accesses requireadditional oscillator clock cycles according to the number of wait states programmed intothe DSP56K bus control register (8CR). Thus, assuming that the 16-bit bus control registercontains the value $2246, external P memory accesses require wp=4 wait states oradditional oscillator clock cycles. For this example, the P memory reference is assumedto be an external reference. Thus, according to Table A-14, the Jcc instruction will usethe value ap=wp=4 oscillator clock cycles.5. Compute final results.Thus, based upon the assumptions given for Table A-6 and those listed in the problemstatement for Example 2, the instruction-

JLC (R2+N2)will requireand will execute in= (1 +ea)= (1 +0)= 1= (4+jx)instruction program word= (4+ea+(2 * ap»= (4+ea+(2 * wp»= (4+2+(2 * 4» oscillator clock cycles.= 14Example 18: RTll!lstructionproblem: Calculate the number of 24-bit instruction program words and the number ofoscillator clock cycles required for the instructionRTIwhereOperating Mode Register (OMR)Sus Control Register (SCR)Return Address (on the stack)= 02 (normal expanded memory map),= $0012, and,= $0100 (internal P memory).Solution: To determine the number of instruction program words and the number ofoscillator clock cycles required for the given instruction, the user should perform the followingoperations:1. Look up the number of instruction program words and the number of oscillator clockcycles required for the opcode-operand portion of the instruction in Table A-6.According to Table A-6, the RTI instruction will require one instruction program word andwill execute in (4+rx) oscillator clock cycles. The term "rx" represents the number of additional(if any) oscillator clock cycles required for an RTI or RTS instruction.2. Evaluate the "rx" term using Table A-12.According to Table A-12, the RTI instruction will require rx=(2 * ap) additional oscillator-clock cycles. The term "ap" represents the number of additional (if any) oscillator clockcycles that are required to access a P memory operand. Note that the term "(2 * ap)" representsthe two program memory instruction fetches executed at the end of an RTI orRTS instruction to refill the instruction pipeline.

JLC (R2+N2)will requireand will execute in= (1 +ea)= (1 +0)= 1= (4+jx)instruction program word= (4+ea+(2 * ap»= (4+ea+(2 * wp»= (4+2+(2 * 4» oscillator clock cycles.= 14Example 18: RTll!lstructionproblem: Calculate the number <strong>of</strong> 24-bit instruction program words and the number <strong>of</strong>oscillator clock cycles required for the instructionRTIwhereOperating Mode Register (OMR)Sus Control Register (SCR)Return Address (on the stack)= 02 (normal expanded memory map),= $0012, and,= $0100 (internal P memory).Solution: To determine the number <strong>of</strong> instruction program words and the number <strong>of</strong>oscillator clock cycles required for the given instruction, the user should perform the followingoperations:1. Look up the number <strong>of</strong> instruction program words and the number <strong>of</strong> oscillator clockcycles required for the opcode-operand portion <strong>of</strong> the instruction in Table A-6.According to Table A-6, the RTI instruction will require one instruction program word andwill execute in (4+rx) oscillator clock cycles. The term "rx" represents the number <strong>of</strong> additional(if any) oscillator clock cycles required for an RTI or RTS instruction.2. Evaluate the "rx" term using Table A-12.According to Table A-12, the RTI instruction will require rx=(2 * ap) additional oscillator-clock cycles. The term "ap" represents the number <strong>of</strong> additional (if any) oscillator clockcycles that are required to access a P memory operand. Note that the term "(2 * ap)" representsthe two program memory instruction fetches executed at the end <strong>of</strong> an RTI orRTS instruction to refill the instruction pipeline.

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

Saved successfully!

Ooh no, something went wrong!