home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_10 / DEVELOP.LZH / DSP / DSPDEBUG / REGDTA.HLP < prev    next >
Text File  |  1992-10-15  |  32KB  |  597 lines

  1.  
  2. {Address Registers} ({Rn}){êR0}{êR1}{êR2}{êR3}{êR4}{êR5}{êR6}{êR7}
  3.  
  4.     The eight 16-bit address registers, R0-R7, can contain addresses or
  5. general-purpose data. The 16-bit address in a selected address register is
  6. used in the calculation of the effective address ofan operand. When
  7. supporting parallel X and Y data memory moves, the address registers must be
  8. thought of as two separate files, R0-R3 and R4-R7. The contents of an Rn
  9. may point directly to data or may be offset. In addition, {Rn} can be
  10. pre-updated or post-updated according to the addressing mode selected. If an
  11. {Rn} is updated, modifier registers, {Mn}, are always used to specify the type
  12. of update arithmetic. Offset registers, {Nn}, are used for the
  13. update-by-offset addressing modes. The address register modification is
  14. performed by one of the two modulo arithmetic units. Most addressing modes
  15. modify the selected address register in a read-modify-write fashion; the
  16. address register is read, its contents are modified by the associated modulo
  17. arithmetic unit, and the register is written with the appropriate output of
  18. the modulo arithmetic unit. Each address register is preset to $FFFF during
  19. a processor reset.
  20.  
  21.  
  22. {Offset Registers} ({Nn}){êN0}{êN1}{êN2}{êN3}{êN4}{êN5}{êN6}{êN7}
  23.  
  24.     The eight 16-bit offset registers, N0-N7, can contain offset values used
  25. to increment/decrement address registers in address register update
  26. calculations or can be used for 16-bit general-purpose storage. For example,
  27. the contents of an offset register can be used to step through a table at
  28. some rate (e.g., five locations per step for waveform generation), or the
  29. contents can specify the offset into a table or the base of the table for
  30. indexed addressing. Each address register, {Rn}, has its own offset
  31. register, {Nn}, associated with it. Each offset register is preset to $FFFF
  32. during a processor reset.
  33.  
  34.  
  35. {Modifier Registers} ({Mn}){êM0}{êM1}{êM2}{êM3}{êM4}{êM5}{êM6}{êM7}
  36.  
  37.     The eight 16-bit modifier registers, M0-M7, define the type of address
  38. arithmetic to be performed for addressing mode calculations, or they can be
  39. used for general-purpose storage. The address ALU supports linear, modulo,
  40. and reverse-carry arithmetic types for all address register indirect
  41. addressing modes. For modulo arithmetic, the contents of {Mn} also specify
  42. the modulus. Each address register, {Rn}, has its own modifier register,
  43. {Mn}, associated with it. Each modifier register is set to $FFFF on
  44. processor reset, which specifies linear arithmetic as the default type for
  45. address register update calculations.
  46.  
  47.  
  48. {Data ALU Input Registers} ({X1},{X0},{Y1},{Y0}){êY}{êX}
  49.  
  50.     X1,X0,Y1, and Y0 are four 24-bit, general-purpose data registers. They
  51. can be treated as four independent, 24-bit registers oras two 48-bit
  52. registers called {X} and {Y}, develloped by the concatenation of {X1}:{X0}
  53. and {Y1}:{Y0}, respectively. {X1} is the most significant word in {X} and
  54. {Y1} is the mostsignificant word in {Y}. The registers serve as input
  55. buffer registers between the XDB or YDB and the MAC unit. They are used as
  56. data ALU source operands, allowing new operands to be loaded for the next
  57. instruction while the register contents are used by the current instruction.
  58. The registers may also be read back out to the appropriate data bus to
  59. implement memory-delay operations and save/restore operations for interrupt
  60. service routines.
  61.  
  62.  
  63. {Data ALU Accumulator Registers} ({A2},{A1},{A0},{B2},{B1},{B0}){êA}{êB}
  64.  
  65.     The six data ALU registers ({A2},{A1},{A0},{B2},{B1}, and {B0}) form
  66. two general-purpose, 56-bit accumulators, {A} and {B}. Each of these two
  67. registers consists of the three concatenated registers ({A2}:{A1}:{A0} and
  68. {B2}:{B1}:{B0}, respectively). The 24-bit MSP is stored in {A1} or {B1}; the
  69. 24-bit LSP is stored in {A0} or {B0}. The 8-bit EXT is stored in {A2} or {B2}.
  70.  
  71. The 8-bit extension registers offer protection against overflow. On the
  72. DSP56000/DSP56001, the extreme values that a word operand can assume are
  73. -1 and +0.9999998. if the sum of two numbers is less than -1 or greater than
  74. +0.9999998, the result (which cannot be represented in a word operand --
  75. i.e., 24 bits) has underflowed or overflowed. The 8-bit extension registers
  76. can accurately represent the result of 255 overflows or 255 underflows.
  77. Whenever the accumulator extension registers are in use, the {V} bit in the
  78. status register is set.
  79.  
  80. Automatic sign extension is provided when writing to the 56-bit accumulators
  81. {A} or {B} with a 48- or 24-bit operand. When a 24-bit operand is written,
  82. the low-order portion will be automatically zero filled to form a valid
  83. 56-bit operand. The registers may also be written without sign extension or
  84. zero fill by specifying the individual register name. When accumulator
  85. registers {A} or {B} are read, they may be optionnaly scaled one bit left
  86. or one bit right for block floating-point arithmetic.
  87.  
  88. Reading the {A} or {B} accumulators over the XDB and YDB is protected
  89. against overflow by substituing a limiting constant for the data that is
  90. being transfered. The content of {A} or {B} is not affected should
  91. limiting occur; only the value transferred over the XDB or YDB is limited.
  92. This overflow protection is performed after the contents of the accumulator
  93. have been shifted according to the scaling mode. Shifting and limiting will
  94. be performed only when the entire 56-bit {A} or {B} register is specified
  95. as the source for a parallel data move over the XDB or YDB. When {A0},{A1},{A2},
  96. {B0},{B1}, or {B2} are specified as the source for a parallel data move,
  97. shifting and limiting are not performed. The accumulator registers serve as
  98. buffer registers between the MAC unit and the XDB and/or YDB. These
  99. registers are used as both data ALU source and destination operands.
  100.  
  101. Automatic sign extension of the 56-bit accumulators is provided when the {A}
  102. or {B} register is written with a smaller operand. Sign extension can occur
  103. when writing {A} or {B} from the XDB and/or YDB or with the results of
  104. certain data ALU operations (such as the transfer conditionally ({Tcc}) or
  105. transfer data ALU register ({TFR}) instructions). If a word operand is to be
  106. written to an accumulator register ({A} or {B}), the MSP ({A1} or {A2})
  107. portion of the accumulator is written with the word operand, the LSP ({A0} or
  108. {B0}) portion is zero filled, and the EXT ({A2} or {B2}) portion is sign
  109. extended from MSP. Long-word operands are written into the low-order portion,
  110. MSP:LSP, of the accumulator register, and the EXT portion is sign extended
  111. from MSP. No sign extension is performed if an individual 24-bit register
  112. is written ({A1},{A0},{B1}, or {B0}) Test logic is included in each
  113. accumulator register to support operation of the data shifter/limiter
  114. circuits. This test logic is used to detect overflows out of the data
  115. shifter so that the limiter can substitute one of several constants to
  116. minimize errors due to the overflow. This process is commonly referred to as
  117. saturation arithmetic.
  118.  
  119.  
  120. {Status Register} ({SR}){êMR}{êCCR}{êC}{êV}{êZ}{êN}{êU}{êE}{êL}{êI1}{êI0}{êS1}{êS0}{êT}{êl}{êMode Register}{êInterrupt 0}{êInterrupt 1}{êTrace}{êloop}{êCondition Code Register}{êCarry}{êOverflow}{êZero}{êNegative}{êUnnormalized}{êExtension}{êLimit}
  121.  
  122.     This 16-bit {SR} consists of a mode register ({MR}) in the high-order
  123. eight bits and a condition code register ({CCR}) in the low-order eight
  124. bits. The SR is stacked when program looping is initialized, when a
  125. {JSR} is performed, or when interrupts occur, (except for no-overhead
  126. fast interrupts).
  127.  
  128.      15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
  129.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  130.     |LF|* |T |* |S1|S0|I1|I0|* |L |E |U |N |Z |V |C |
  131.     ++-++-++-++-++-++-++-++-++-++-++-++-++-++-++-++-+
  132.      | |  |  |  |  |  |  |  |  |  |  |  |  |  |  +--> CARRY
  133.      | |  |  |  |  |  |  |  |  |  |  |  |  |  +-----> OVERFLOW
  134.      | |  |  |  |  |  |  |  |  |  |  |  |  +--------> ZERO
  135.      | |  |  |  |  |  |  |  |  |  |  |  +-----------> NEGATIVE
  136.      | |  |  |  |  |  |  |  |  |  |  +--------------> UNNORMALIZED
  137.      | |  |  |  |  |  |  |  |  |  +-----------------> EXTENSION
  138.      | |  |  |  |  |  |  |  |  +--------------------> LIMIT
  139.      | |  |  |  |  |  |  |  +-----------------------> RESERVED
  140.      | |  |  |  |  |  +--+--------------------------> INTERRUPT MASK
  141.      | |  |  |  +--+--------------------------------> SCALING MODE
  142.      | |  |  +--------------------------------------> RESERVED
  143.      | |  +-----------------------------------------> TRACE MODE
  144.      | +--------------------------------------------> RESERVED
  145.      +----------------------------------------------> LOOP FLAG
  146.  
  147. {Mode Register} ({MR})
  148.  
  149. The {MR} is a special-purpose control register defining the current
  150. system state of the processor. The MR bits are affected by processor
  151. reset, exception processing, the {DO}, end current DO loop ({ENDDO}),
  152. return from interrupt ({RTI}), and {SWI} instructions and by instructions
  153. that directly reference the MR register - OR immediate to control
  154. register ({ORI}) and AND immediate to control register ({ANDI}). During
  155. processor reset, the interrupt mask bits of the MR will be set; the
  156. scaling mode bits, loop flag, and trace bit will be cleared.
  157.  
  158. {Condition Code Register} ({CCR})
  159.  
  160. The {CCR} is a special-purpose control register that defines the
  161. current user state of the processor. The CCR bits are affected by data
  162. arithmetic logic unit (ALU) operations, parallel move operations, and by
  163. instructions that directly reference the CCR({ORI} and {ANDI}). The CCR bits
  164. are not affected by parallel move operations unless data limiting occurs
  165. reading {A} or {B} accumulators. During processor reset, all CCR bits are
  166. cleared.
  167.  
  168. CARRY (BIT 0):
  169.     The Carry {C} bit is set if carry is generated out of
  170. the MSB of the result in an addition. This bit is also set if a borrow
  171. is generated in subtraction. The carry borrow is generated from bit 55
  172. of the result. The carry bit is also affected by bit manipulation,
  173. rotate, and shift instructions. Otherwise, this bit is cleared.
  174.  
  175. OVERFLOW (BIT 1):
  176.     The overflow {V} bit is set if an arithmetic
  177. overflow occurs in the 56-bit result. This bit indicates that the
  178. result cannot be represented in the accumulator register; thus, the
  179. register has overflowed. Otherwise, this bit is cleared.
  180.  
  181. ZERO (BIT 2):
  182.     The zero {Z} bit is set if the result equals zero;
  183. otherwise, this bit is cleared.
  184.  
  185. NEGATIVE (BIT 3):
  186.     The negative {N} bit is set if the MSB (bit 55) of the result
  187. is set; otherwise, this bit is cleared.
  188.  
  189. UNNORMALIZED (BIT 4):
  190.     The unnormalized {U} bit is set if the two MSBs of
  191. the most significant product (MSP) portion of the result are identical.
  192. Otherwise, this bit is cleared. The MSP portion of the {A} or {B}
  193. accumulators, which is defined by the scaling mode and the U bit, is
  194. computed as follows:
  195.  
  196.     +----+----+--------------+----------------------+
  197.     | S1 | S0 | Scaling Mode | U Bit Computation    |
  198.     +----+----+--------------+----------------------+
  199.     |  0 | 0 | No Scaling    | U=~(Bit 47 ^ Bit 46) |
  200.     +----+----+--------------+----------------------+
  201.     |  0 | 1 | Scale Down    | U=~(Bit 48 ^ Bit 47) |
  202.     +----+----+--------------+----------------------+
  203.     |  1 | 0 | Scale Up      | U=~(Bit 46 ^ Bit 45) |
  204.     +----+----+--------------+----------------------+
  205.  
  206. EXTENSION (BIT 5):
  207.     The extension {E} bit is cleared if all the bits of
  208. the integer portion of the 56-bit result are all ones or all zeros;
  209. otherwise, this bit is set. The integer portion, defined by the scaling
  210. mode and the E bit, is computed as follows:
  211.  
  212.     +----+----+--------------+-------------------+
  213.     | S1 | S0 | Scaling Mode | U Bit Computation |
  214.     +----+----+--------------+-------------------+
  215.     |  0 |  0 | No Scaling   | Bits 55,54..48,47 |
  216.     +----+----+--------------+-------------------+
  217.     |  0 |  1 | Scale Down   | Bits 55,54..49,48 |
  218.     +----+----+--------------+-------------------+
  219.     |  1 |  0 | Scale Up     | Bits 55,54..47,46 |
  220.     +----+----+--------------+-------------------+
  221.  
  222. If the E bit is cleared, then the low-order fraction portion contains
  223. all the significant bits; the high-order integer portion is just sign
  224. extension. In this case, the accumulator extension register can be
  225. ignored. If the E bit is set, it indicates that the accumulator extension
  226. register is in use.
  227.  
  228. LIMIT (BIT 6):
  229.     The Limit {L} bit is set if the overflow bit is set. The
  230. L bit is also set if the data shifter/limiter circuits perform a
  231. limiting operation; otherwise, it is not affected. The L bit is cleared
  232. only by a processor reset or by an instruction that specifically clears
  233. it, which allows the L bit to be used as latching overflow bit (i.e.,
  234. a "sticky" bit). L is affected by data movement operations that read the
  235. {A} or {B} accumulator registers.
  236.  
  237. INTERRUPT MASKS (BITS 8 AND 9):
  238.     The interrupt mask bits, {I1} and {I0},
  239. reflect the current {IPL} of the processor and indicate the IPL needed
  240. for an interrupt source to interrupt the processor. The current IPL of
  241. the processor can be changed under software control. The interrupt
  242. mask bits are set during hardware reset but not during software reset.
  243.  
  244.     +----+----+---------------------+------------------+
  245.     | I1 | I0 | Exception Permitted | Exception Masked |
  246.     +----+----+---------------------+------------------+
  247.     |  0 |  0 | IPL 0,1,2,3         | None             |
  248.     +----+----+---------------------+------------------+
  249.     |  0 |  1 | IPL 1,2,3           | IPL 0            |
  250.     +----+----+---------------------+------------------+
  251.     |  1 |  0 | IPL 2,3             | IPL 0,1          |
  252.     +----+----+---------------------+------------------+
  253.     |  1 |  1 | IPL 3               | IPL 0,1,2        |
  254.     +----+----+---------------------+------------------+
  255.  
  256. SCALE MODE (BITS 10 AND 11):
  257.     The scaling mode bits, {S1} and {S0},
  258. specify the scaling to be performed in the data ALU shifter/limiter and
  259. the rounding position in the data ALU multiply accumulator ({MAC}). The
  260. scaling modes are shown in the following table:
  261.  
  262.     +----+----+--------------+-------------------------------------------+
  263.     | S1 | S0 | Rounding Bit | Scaling Mode                              |
  264.     +----+----+--------------+-------------------------------------------+
  265.     |  0 |  0 |           23 | No Scaling                                |
  266.     +----+----+--------------+-------------------------------------------+
  267.     |  0 |  1 |           24 | Scale Down (1-Bit Arithmetic Right Shift) |
  268.     +----+----+--------------+-------------------------------------------+
  269.     |  1 |  0 |           22 | Scale Up (1-Bit Arithmetic Left Shift)    |
  270.     +----+----+--------------+-------------------------------------------+
  271.     |  1 |  1 |           -- | Reserved for Future Expansion             |
  272.     +----+----+--------------+-------------------------------------------+
  273.  
  274. The shifter/limiter scaling mode affects data read from the {A} or {B}
  275. accumulator registers out to the XDB and YDB. Different scaling modes
  276. can be used with the same program code to allow dynamic scaling. One
  277. application of dynamic scaling is to facilitate block floating-point
  278. arithmetic. The scaling mode also affects the {MAC} rounding position
  279. to maintain proper rounding when different portions of the accumulator
  280. registers are read out of the XDB and YDB. The scaling mode bits, which
  281. are cleared at the start of a long interrupt service routine, are also
  282. cleared during a processor reset.
  283.  
  284. TRACE MODE (BIT 13):
  285.     The trace mode {T} bit is specifies the tracing
  286. function of the DSP. If the T bit is set at the begining of any
  287. instruction execution, a trace exception will be generated after the
  288. instruction execution is completed. If the T bit is cleared, tracing is
  289. disabled and instruction instruction execution proceeds normally. If a
  290. long interrupt is executed during a trace exception, the SR having the
  291. trace bit set will will be staked, and the trace bit in the SR is
  292. cleared. The T bit is also cleared during processor reset.
  293.  
  294. RESERVED STATUS (BITS 7,12,14):
  295.     These bits, which are reserved for
  296. future expansion, will read as zero during DSP read operations.
  297.  
  298. LOOP FLAG (BIT 15):
  299.     The loop flag {LF} bit, set when a program loop is
  300. is in progress, enables the detection of the end of a program loop. The
  301. {LF} is the only {SR} bit that is restored when terminating a program loop.
  302. Stacking and restoring the {LF} when initiating and exiting a program
  303. loop, respectively, allow the nesting of program loops. At the start of
  304. a long interrupt service routine, the SR (including the LF) is pushed
  305. on the SS and the SR LF is cleared. When returning from the long
  306. interrupt with an {RTI} instruction, the {SS} is restored. During a 
  307. processor reset, the {LF} is cleared.
  308.  
  309.  
  310. {Operating Mode Register} {OMR}{êDE}{êSD}{êEA}{êData Rom Enable}{êStop Delay}{êExternal Memory Access}
  311.  
  312.     The {OMR} is a 24-bit register (only five bits are defined) that sets the
  313. current operating mode of the processor (i.e., the memory maps for program
  314. and data memories as well as the startup procedure). The OMR bits are only
  315. affected by processor reset and by instructions directly referencing the
  316. OMR: {ANDI}, {ORI}, and {MOVEC}. During processor reset, the chip operating mode
  317. bits, MB and MA, will be loaded from the external mode select pins B and A,
  318. respectively. The data ROM enable {DE} bit will be cleared, disabling the X
  319. and Y on-chip lookup-table ROMs.
  320.  
  321. OMR Format:
  322.  
  323.      23    8  7  6    5  4  3  2    1  0
  324.     +-----------+--+--+--+--+--+--+--+--+
  325.     |  *       |EA|SD| *| *| *|DE|MB|MA|
  326.     ++---------+++-++-++-++-++-++-++-++-+
  327.      |         | |  |  |  |  |  |  +--+---> OPERATING MODE
  328.      |         | |  |  |  |  |  +---------> DATA ROM ENABLE
  329.      |         | |  |  +--+--+------------> RESERVED
  330.      |         | |  +---------------------> STOP DELAY
  331.      |         | +------------------------> EXTERNAL MEMORY ACCESS
  332.      +---------+--------------------------> RESERVED
  333.  
  334. DSP56001 Operating Mode Summary:
  335.  
  336.     +-----------+----+----+---------------------------------------------+
  337.     | Operating |    |    | DSP56001 Program Memory Map                 |
  338.     | Mode      | MA | MB +--------------+-------------+----------------+
  339.     |           |    |    | Internal RAM | External    | Reset          |
  340.     +-----------+----+----+--------------+-------------+----------------+
  341.     |         0 |  0 |  0 | $0000-$01FF  | $0200-$FFFF | Internal-$0000 |
  342.     +-----------+----+----+--------------+-------------+----------------+
  343.     |           |    |    | Special bootstrap mode; after program RAM   |
  344.     |         1 |  0 |  1 | loading, mode 2 is automatically selected   |
  345.     |           |    |    | but PC = $0000                              |
  346.     +-----------+----+----+--------------+-------------+----------------+
  347.     |         2 |  1 |  0 | $0200-$FFFF  | $0200-$FFFF | External-$E000 |
  348.     +-----------+----+----+--------------+-------------+----------------+
  349.     |         3 |  1 |  1 |      ---     | $0000-$FFFF | External-$0000 |
  350.     +-----------+----+----+--------------+-------------+----------------+
  351.  
  352. DSP56000/DSP56001 DE Memory Control:
  353.  
  354.     +----+--------------------------------------------------------------+
  355.     |                          Data Memory Map                          |
  356.     | DE +---------------------------+----------------------------------+
  357.     |    |          Y Memory         |              X Memory            |
  358.     +----+---------------------------+----------------------------------+
  359.     |    | Internal RAM: $0000-$00FF | Internal RAM: $0000-$00FF        |
  360.     |  0 | External: $0100-$FFFF     | External: $0100-$FFBF            |
  361.     |    |           ---             | On-Chip Peripherals: $FFC0-$FFFF |
  362.     +----+---------------------------+----------------------------------+
  363.     |    | Internal RAM: $0000-$00FF | Internal RAM: $0000-$00FF        |
  364.     |    | Internal ROM: $0100-$01FF | Internal ROM: $0100-$01FF        |
  365.     |  1 | External: $0200-$FFFF     | External: $0200-$FFBF            |
  366.     |    |           ---             | On-Chip Peripherals: $FFC0-$FFFF |
  367.     +----+---------------------------+----------------------------------+
  368.  
  369. CHIP OPERATING MODE (BITS 0 AND 1):
  370.     The chip operating mode bits, MB and MA,
  371. indicate the bus expansion mode of the DSP56000/DSP56001. On processor
  372. reset, these bits are loaded from the external mode select pins, ~MODB and
  373. ~MODA, respectively. After the DSP leaves the reset state, MB and MA can be
  374. changed under program control. The "secure DSP56000" is an exception. The
  375. external mode select pins, ~MODB and ~MODA, are disabled on the "secure
  376. DSP56000" and are only used for interrupts as ~IRQA and ~IRQB. The operating
  377. modes are shown in the following table:
  378.  
  379.     +----+----+------------------------------------+
  380.     | MB | MA |         Chip Operating Mode        |
  381.     +----+----+------------------------------------+
  382.     |  0 |    0 | Single-Chip Nonexpanded            |
  383.     +----+----+------------------------------------+
  384.     |  0 |    1 | Special Bootstrap (DSP 56001 Only) |
  385.     +----+----+------------------------------------+
  386.     |  1 |    0 | Normal Expanded                    |
  387.     +----+----+------------------------------------+
  388.     |  1 |    1 | Development Expanded               |
  389.     +----+----+------------------------------------+
  390.  
  391. DATA ROM ENABLE (BIT 2):
  392.     The {DE} bit enables the two, on-chip, 256*24 data ROMs located at 
  393. address $0100-$01FF in the X and Y memory spaces. When DE is cleared, 
  394. the $0100-$01FF in the X and Y memory spaces. When DE is cleared, 
  395. the $0100-$01FF address space is part of the external X and Y data spaces,
  396. and the on-chip data ROMs are disabled.
  397.  
  398. STOP DELAY (BIT 6):
  399.     The {STOP} instruction causes the DSP56000/DSP56001 to
  400. indefinitely suspend processing in the middle of the {STOP} instruction.
  401. When exiting the stop state, if the stop delay bit is zero, a 64K clock
  402. cycle delay (i.e., 131,072 T states) is selected before continuing the stop
  403. instruction cycle. However, if the stop delay bit is one, the delay before
  404. continuing the instruction cycle is 16 T states. The long delay allows a
  405. clock stabilisation period for the internal clock to begin oscillating and
  406. to stabilize. When a stable external clock is used, the shorter delay allows
  407. faster startup of the DSP.
  408.  
  409. EXTERNAL MEMORY ACCESS (BIT 7):
  410.     The external memory access mode bit selects
  411. the function of two of the port A control pins. The DSP56000/DSP56001 comes
  412. out of reset with these pins defined as bus request/bus grant (~BR/~BG) --
  413. i.e., bit 7 is cleared. When bit 7 is clear, wait states are only introduced
  414. into the port A timing by using the bus control register (BCR). When bit 7
  415. is set under program control (using {ANDI},{ORI}, or {MOVEC}), these pins are
  416. defined as bus strobe (~BS) and wait (~WT). In this mode, wait states are
  417. introduced into port A timing by using either the BCR or asserting ~WT. ~BR
  418. and ~BG allow the DSP56000/DSP56001 to give the external bus to an external
  419. device, thus preventing busconflicts. ~BS and ~WT allow the DSP56000/
  420. DSP56001 to work with asynchronous devices (bus arbitrators) on port A. The
  421. definition of the control pins is summarized in the following table.
  422.  
  423.     +-------------+-------------------+------------------+
  424.     | OMR Bit 7   | ~BR Pin (Input)   | ~BG Pin (Output) |
  425.     +-------------+-------------------+------------------+
  426.     | 0 (Default) | Bus Request (~BR) | Bus Grand (~BG)  |
  427.     +-------------+-------------------+------------------+
  428.     |           1 | Wait (~WT)        | Bus Strobe (~BS) |
  429.     +-------------+-------------------+------------------+
  430.  
  431. RESERVED OMR BITS (BITS 3-5 AND 8-23):
  432.     These OMR bits, reserved for future expansion, will read as zero
  433.  during DSP read operations.
  434.  
  435.  
  436. {Loop Address Register} ({LA})
  437.  
  438.     The contents of the {LA} register indicate the location of the last
  439. instruction word in a program loop. This register is stacked into the {SSH} by
  440. a {DO} instruction and is unstackded by end-of-loop processing or by execution
  441. of an {ENDDO} instruction. When the instruction at the address contained in
  442. this register is fetched, the contents of the {LC} register are checked. If
  443. the contents are not one, the {LC} is decremented, and the next instruction is
  444. taken from the address at the top of the {SS}; otherwise, the {PC} is
  445. incremented, the loop flag is restored (pulled from the {SS}), the {SS} is
  446. purged, the {LA} and {LC} registers are pulled from the {SS} and restored,
  447. and instruction execution continues normally. The {LA} regsiter, a read/write
  448. register, is written by a {DO} instruction and read by the {SS} when stacking
  449. the register. Since the {LC} register can be accessed under program control,
  450. the number of times a loop has been executed can be determined.
  451.  
  452.  
  453. {Loop Counter Register} ({LC})
  454.  
  455.     The {LC} register is a special 16-bit counter used to specify the number
  456. of times a hardware program loop is to be repeated. This register is stacked
  457. into the {SSL} by a {DO} instruction and unstacked by end-of-loop processing
  458. or by execution of an {ENDDO} instruction. When the end of a hardware
  459. program loop is reached, the contents of the {LC} register are tested for
  460. one. If the {LC} is one, the program loop is terminated, and the {LC}
  461. register is loaded loaded with the previous {LC} contents stored on the {SS}.
  462. If {LC} is not one, it is decremented and the program loop is repeated. The
  463. {LC} can be read under program control, which allows the number of times a
  464. loop will be executed to be monitored/changed dynamically. The {LC} is also
  465. used in the {REP} instruction.
  466.  
  467.  
  468. {System Stack} ({SS}){êSSH}{êSSL}{êStack Overflow}{êStack Underflow}{êSystem Stack High}{êSystem Stack Low}
  469.  
  470.     The {SS} is a separate 15*32-bit internal memory divided into two bank:
  471. {SSH} and {SSL}, each 16 bits wide. The {SSH} stores the {PC} contents,
  472. and the {SSL} stores the {SR} contents for subroutine calls and long
  473. interrupts. The {SS} will also store the {LA} and {LC} registers in addition
  474. to the {PC} and {SR} registers for program looping. The {SS} is in stack
  475. memory space; its address is always inherent and implied by the current
  476. instruction.
  477.  
  478. The contents of the {PC} and {SR} register are pushed on the top location
  479. of the {SS} when a subroutine call and long interrupt occurs. When a return
  480. from subroutine (RTS) occurs, the contents of the top location in the {SS}
  481. are pulled and put in the {PC}; the {SR} is not affected. When an {RTI}
  482. occurs, the contents ofthe top location in the {SS} are pulled to both the
  483. {PC} and {SR}.
  484.  
  485. The {SS} is also used to implement no-overhead nested hardware {DO} loops.
  486. When the {DO} instruction is executed, the {LA}:{LC} are pushed on the {SS},
  487. then the {PC}:{SR} are pushed on the {SS}. Since each {SS} location can
  488. be addressed as a separate 16-bit registers ({SSH} and {SSL}), software stacks
  489. can be created for unlimited nesting.
  490.  
  491. Up to 15 long interrupts, seven {DO} loops, 15 {JSR}s or combinations of
  492. these can be accommodate by the {SS}. When the {SS} limit is exceeded, a
  493. nonmaskable stack error interrupt occurs, and the {PC} is pushed to {SS}
  494. location zero, which isnot implemented in hardware. The {PC} will be lost,
  495. and there will be no {SP} from the stack interrupt routine to the program
  496. that was executing when the error occurred.
  497.  
  498.  
  499. {Stack Pointer Register} ({SP}){êO}{êU}
  500.  
  501.     The 6-bit {SP} register indicates the location of the top of the {SS}
  502. (underflow, empty, full, and overflow). The {SP} register is referenced
  503. implicitly by some instructions ({DO},{REP},{JSR},{RTI},etc. ) or directly
  504. by the {MOVEC} instruction. The {SP} register is implemented as a 6-bit
  505. counter that address (selects) a 15-location stack with its four LSBs.
  506.  
  507. {SP} Register Format:
  508.  
  509.     +----+----+----+----+----+----+
  510.     | UF | SE | P3 | P2 | P1 | P0 |
  511.     +-+--+-+--+-+--+-+--+-+--+-+--+
  512.       |    |    +----+----+----+----> STACK POINTER
  513.       |    +------------------------> STACK ERROR FLAG
  514.       +-----------------------------> UNDERFLOW FLAG
  515.  
  516. {SP Register Values}{êO}{êU}
  517.  
  518.      UF SE P3 P2 P1 P0
  519.       1  1  1  1  1  0  STACK UNDERFLOW CONDITION AFTER DOUBLE PULL
  520.       1  1  1  1  1  1  STACK UNDERFLOW CONDITION
  521.       0  0  0  0  0  0  STACK EMPTY (RESET:) PULL CAUSES UNDERFLOW
  522.       0  0  0  0  0  1  STACK LOCATION 1
  523.             ...
  524.             ...
  525.       0  0  1  1  1  0  STACK LOCATION 14
  526.       0  0  1  1  1  1  STACK LOCATION 15; PUSH CAUSES OVERFLOW
  527.       0  1  0  0  0  0  STACK OVERFLOW CONDITION
  528.       0  1  0  0  0  1  STACK OVERFLOW CONDITION AFTER DOUBLE PUSH
  529.  
  530. STACK POINTER (BITS 0-3):
  531.     The {SP} points to the last used location on the {SS}. Immediately
  532. after hardware reset, these bits are cleared ({SP} = 0), indicating that the
  533. {SS} is empty.
  534.  
  535. Data is pushed onto the {SS} by decrementing the {SP}, then writing data
  536. to the location pointed to by the {SP}. An item is pulled off the stack by
  537. copying it from the location pointed to by the SP and then by decrementing
  538. {SP}.
  539.  
  540. STACK ERROR FLAG (BIT 4, {SE}):
  541.     The stack error flag indicates that a stack error has occurred, and the
  542. transition of the stack error flag from zero to one causes a priority
  543. level-3 stack error exception.
  544.  
  545. When the stack is completely full, the {SP} reads 001111, and any operation
  546. that pushes data onto the stack will cause a stack error exception to occur.
  547. The {SR} will read 010000 (or 010001 if an implied double push occurs).
  548.  
  549. Any implied pull operation with {SP} equal to zero will cause a stack error
  550. exception, and the {SP} will read 111111 (or 111110 if an implied double
  551. pull occurs). The stack error bit is set as shown before.
  552.  
  553. The stack error flag is a "sticky bit" which, once set, remains set until
  554. cleared by the user. There is a sequence of instructions which can cause a
  555. stack oveflow which, without the sticky bit, would not be detected because
  556. the stack pointer is decremented before the stack error interrupt is taken.
  557. The sticky bit keeps the stack error bit set until cleared by the user by
  558. writing a zero to {SP} bit 4. It also latches the overflow/underflow bit
  559. so that it cannot be changed by stack poibnter increments or decrements as
  560. long as the stack error is set. The overflow/underflow bit remains latched
  561. until the first move to {SP} is executed.
  562.  
  563. NOTE:    When {SP} is zero (stack empty), instructions that read the stack
  564. without {SP} postdecrement and instructions that write to the stack without
  565. {SP} preincrement do not cause a stack error exception (i.e,
  566. 1] {DO} {SSL},xxxx 2] {REP} {SSL} 3] {MOVEC} or move peripheral data ({MOVEP})
  567. when {SSL} is specified as a source or destination).
  568.  
  569. UNDERFLOW FLAG (BIT 5, {UF}):
  570.     The undeflow flagis set when a stack underflow occurs. The stack
  571. undeflow flag is a "sticky bit" when the stack error flag is set, the
  572. underflow flag will not change state. The combination of "underflow=1" and
  573. "stack error=0" is an illegal combination and will not occur unless it is
  574. forced by the user. If this condition is forced by the user, the hardware
  575. will correct itself based on the result of the next stack operation.
  576.  
  577. RESERVED STACK POINTER REGISTER BITS (BIT 6-23):
  578.     Any unimplemented {SP} register bits are reserved for future expansion
  579. and will read as zero during DSP56000/DSP56001 read operations.
  580.  
  581.  
  582. {Program Counter} ({PC})
  583.  
  584.     This 16-bit register contains the address of the next
  585. location to be fetched from program memory space. The {PC} can
  586. point to instructions, data operands, or addresses of operands.
  587. References to this register are always inherent and are implied by
  588. most instructions. This special-purpose address register is
  589. stacked when program looping is initialized, when a {JSR} is
  590. performed, or when interrupts occur (except for no-overhead fast
  591. interrupts).
  592.  
  593.  
  594.  
  595.  
  596.  
  597.