section 7 - Index of
section 7 - Index of section 7 - Index of
Each instruction requires a minimum of three instruction cycles (12 clock phases) to befetched, decoded, and executed. This means that there is a delay of three instructioncycles on powerup to fill the pipe. A new instruction may begin immediately following theprevious instruction. Two-word instructions require a minimum of four instruction cyclesto execute (three cycles for the first instruction word to move through the pipe and executeand one more cycle for the second word to execute). A new instruction may startafter two instruction cycles.-The pipeline is normally transparent to the user. However, there are certain instructionsequencedependent situations where the pipeline will affect the program execution.Such situations are best described by case studies. Most of these restricted sequencesoccur because 1) all addresses are formed during instruction decode, or 2) they are theresult of contention for an internal resource such as the status register (SR). If the executionof an instruction depends on the relative location of the instruction in a sequence ofinstructions, there is a pipeline effect. To test for a suspected pipeline effect, comparebetween the execution of the suspect instruction 1) when it directly follows the previousinstruction and 2) when four NOPs are inserted between the two. If there is a difference,it is caused by a pipeline effect. The DSP56K assembler flags instruction sequences withpotential pipeline effects so that the user can determine if the operation will execute asexpected.Case 1: The following two examples show similar code sequences.1. No pipeline effect:ORI #xx,CCRJcc xxxx;Changes eeR at the end of execution time slot;Reads condition codes in SR in its execution time slotThe Jcc will test the bits modified by the ORI without any pipeline effect in the code segmentabove.2. Instruction that started execution during decode:ORI #04,OMR ;Sets DE bit at execution time slotMOVE x:$100,a ;Reads external RAM instead of internal ROMA pipeline effect occurs in example 2 because the address of the MOVE is formed at itsdecode time before the ORI changes the DE bit (which changes the memory map) in theORI's execution time slot. The following code produces the expected results of readingthe internal ROM:ORI #04,OMRNOPMOVE x:$1 OO,a;Sets DE bit at execution time slot;Delays the MOVE so it will read the updated memory map;Reads internal ROM
Case 2: One of the more common sequences where pipeline effects are apparent is asfollows:;Move a number into register Rn (n=0-7).MOVE #xx,RnMOVE X:(Rn),A;Use the new contents of Rn to address memory.In this case, before the first MOVE instruction has written Rn during its execution cycle,the second MOVE has accessed the old Rn, using the old contents of Rn. This isbecause the address for indirect moves is formed during the decode cycle. This overlappinginstruction execution in the pipeline causes the pipeline effect. One instruction cycleshould be allowed after an address register has been written by a MOVE instructionbefore the new contents are available for use as an address register by another MOVEinstruction. The proper instruction sequence is as follows:MOVEXO,RnNOPMOVE X:(Rn),A;Move a number into register Rn.;Execute any instruction or instruction;sequence not using Rn.Use the new contents of Rn.Case 3: A situation related to Case 2 can be seen in the boot ROM code shown in APPENDIX A of the DSP56001 Technical Data Sheet. At the end of the bootstrap operation,the operation mode register (OMR) is changed to mode #2, and then the program that wasloaded is executed. This process is accomplished in the last three instructions:--BOOTEND MOVEC #2,OMR ;Set the operating mode to 2;(and trigger an exit from;bootstrap mode).ANDI #$O,CCR ;Clear SR as if RESET and;introduce delay needed for;Op. Mode change.JMP
- Page 79 and 80: 4.4.2.4 Address-Modifier-Type Encod
- Page 81: SECTION 5PROGRAM CONTROL UNIT-
- Page 84 and 85: X MEMORYRAM/ROMIII E:XPAf'JSIC)N LI
- Page 86 and 87: interruptible since they are fetche
- Page 88 and 89: PROGRAM CONTROL UNIT-23 1615 023 16
- Page 90 and 91: The GGR is a special purpose contro
- Page 92 and 93: If S 1 =0 and SO=O (no scaling)then
- Page 94 and 95: -23 876543210I * 1* JSO I * I Mel y
- Page 96 and 97: 5.4.5.1 Stack Pointer (Bits 0-3)The
- Page 98 and 99: -DATA ARITHMETIC LOGIC UNITINPUT RE
- Page 101 and 102: 6.1 INSTRUCTION SET INTRODUCTIONThe
- Page 103 and 104: shown in Figure 6-2. Most instructi
- Page 105 and 106: 23 87 0L...-I ___-'-I_---'I BUS~ LS
- Page 107 and 108: The MR and CCR may be accessed indi
- Page 109 and 110: 6.3.4 Operand ReferencesThe DSP sep
- Page 111 and 112: Some address register indirect mode
- Page 113 and 114: EXAMPLE A: IMMEDIATE INTO 24-BIT RE
- Page 115 and 116: EXAMPLE A: IMMEDIATE SHORT INTO AO,
- Page 117 and 118: EXAMPLE A: MOVE P: $3200,XOBEFORE E
- Page 119 and 120: Table 6-1 Addressing Modes SummaryA
- Page 121 and 122: 6.4.2 LogicallnstructlonsThe logica
- Page 123 and 124: START OF LOOP1)SP+ 1 • SP; LA. SS
- Page 125 and 126: OPCODE/OPERANDSPARALLEL MOVE EXAMPL
- Page 127: SECTION 7PROCESSING STATES-
- Page 132 and 133: second instruction of the downloade
- Page 134 and 135: The DO instruction is another instr
- Page 136 and 137: SP and SSH/SSL register manipulatio
- Page 138 and 139: 7.3.1 Interrupt TypesThe DSP56K rel
- Page 140 and 141: Table 7-2 Status Register Interrupt
- Page 142 and 143: 7.3.3 Interrupt SourcesInterrupts c
- Page 144 and 145: interrupts makes it very useful for
- Page 146 and 147: MAINPROGRAMFETCHESLONG INTERRUPTSER
- Page 148 and 149: 7.3.3.3 Other Interrupt SourcesOthe
- Page 150 and 151: 7.3.4 Interrupt ArbitrationInterrup
- Page 152 and 153: 7.3.7 Interrupt Instruction Executi
- Page 154 and 155: MAINPROGRAMMEMORYINTERRUPT SYNCHRON
- Page 156 and 157: MAINPROGRAMFETCHESINTERRUPTSYNCHRON
- Page 158 and 159: MAINPROGRAMFAST INTERRUPTVECTORLONG
- Page 160 and 161: MAINPROGRAMFETCHESNTERRUPTSYN8HRCNZ
- Page 162 and 163: 7.5 WAIT PROCESSING STATEThe WAIT i
- Page 164 and 165: The stop processing state halts all
- Page 166 and 167: the first instruction fetch). If th
- Page 168: RESET -----------------------------
- Page 172 and 173: 16 - BIT INTERNALADDRESS BUSESX ADD
- Page 174 and 175: 8.2.2.1 Address (AO-A15)These three
- Page 177: SECTION 9PLL CLOCK OSCILLATOR-
Case 2: One <strong>of</strong> the more common sequences where pipeline effects are apparent is asfollows:;Move a number into register Rn (n=0-7).MOVE #xx,RnMOVE X:(Rn),A;Use the new contents <strong>of</strong> Rn to address memory.In this case, before the first MOVE instruction has written Rn during its execution cycle,the second MOVE has accessed the old Rn, using the old contents <strong>of</strong> Rn. This isbecause the address for indirect moves is formed during the decode cycle. This overlappinginstruction execution in the pipeline causes the pipeline effect. One instruction cycleshould be allowed after an address register has been written by a MOVE instructionbefore the new contents are available for use as an address register by another MOVEinstruction. The proper instruction sequence is as follows:MOVEXO,RnNOPMOVE X:(Rn),A;Move a number into register Rn.;Execute any instruction or instruction;sequence not using Rn.Use the new contents <strong>of</strong> Rn.Case 3: A situation related to Case 2 can be seen in the boot ROM code shown in APPENDIX A <strong>of</strong> the DSP56001 Technical Data Sheet. At the end <strong>of</strong> the bootstrap operation,the operation mode register (OMR) is changed to mode #2, and then the program that wasloaded is executed. This process is accomplished in the last three instructions:--BOOTEND MOVEC #2,OMR ;Set the operating mode to 2;(and trigger an exit from;bootstrap mode).ANDI #$O,CCR ;Clear SR as if RESET and;introduce delay needed for;Op. Mode change.JMP