The Engineering Staff of TEXAS INSTRUMENTS INCORPORATED Semiconductor Group TMS 9900 Microprocessor Data Manual MAY 1976 TEXAS INSTRUMENTS INCORPORATED Information contained in this publication is believed to be accurate and reliable. However, responsibility is assumed neither for its use nor for any infringement of patents or rights of others thai: may result from its use. No license is granted by implication or otherwise under any patent or patent right of Texas Instruments or others. Copyright © 1976 Texas Instruments Incorporated TABLE OF CONTENTS 1. INTRODUCTION 1.1 Description. 3 1.2 Key Features . 3 2. ARCHITECTURE 2.1 Registers and Memory 3 2.2 Interrupts . . . . 6 2.3 Input/Output. . . 7 2.4 Single-Bit CRU Operations 8 2.5 Multiple-Bit CRU Operations. 8 2.6 External Instructions 10 2.7 Load Function 11 2.8 TMS 9900 Pin Description 13 2.9 Timing 15 2.9.1 Memory . 15 2.9.2 Hold 15 2.9.3 CRU . . 18 3. TMS 9900 INSTRUCTION SET 3.1 Definition. . . . . . . 18 3.2 Addressing Modes 18 3.2.1 Workspace Register Addressing R 18 3.2.2 Workspace Register Indirect Addressing * R 18 3.2.3 Workspace Register Indirect Auto Increment Addressing *R+ 18 3.2.4 Symbolic (Direct) Addressing@Label 20 3.2.5 Indexed Addressing@Table (R) . . 20 3.2.6 Immediate Addressing . . . . . 20 3.2.7 Program Counter Relative Addressing 20 3.2.8 CR U Relative Addressing 20 3.3 Terms and Definitions 21 3.4 Status Register 21 3.5 Instructions 22 3.5.1 Dual Operand Instructions with Multiple Addressing Modes for Source and Destination Operand. 22 3.5.2 Dual Operand Instructions with Multiple Addressing Modes for the Source Operand and Workspace Register Addressing for the Destination 23 3.5.3 Extended Operation (XOP) Instruction 24 3.5.4 Single Operand Instructions . 24 3.5.5 CRU Multiple-Bit Instructions 25 3.5.6 CRU Single-Bit Instructions 25 3.5.7 Jump Instructions 25 3.5.8 Shift Instructions. . . . 26 3.5.9 I mmediate Register Instructions. 26 3.5.10 Internal Register Load Immediate Instructions 27 3.5.11 Internal Register Store Instructions. . . . 27 3.5.12 Return Workspace Pointer (RTWP) Instruction 27 3.5.13 External Instructions 27 3.6 TMS 9900 Instruction Execution Times . . . . . 28 4. TMS 9900 ELECTRICAL AND MECHANICAL SPECIFICATIONS 4.1 Absolute Maximum Ratings . . . 29 4.2 Recommended Operating Conditions 30 4.3 Electrical Characteristics 30 4.4 Timing Requirements . 31 4.5 Switching Characteristics 31 TABLE OF CONTENTS (Continued) 5. TMS 9900 PROTOTYPING SYSTEM 5.1 Hardware . . 32 5.2 System Console 33 5.3 Software 33 5.4 Options. . . 33 6. TMS 9900 SUPPORT CIRCUITS 34 7. SYSTEM DESIGN EXAMPLES 34 8. MECHAN ICAL DATA 36 LIST OF ILLUSTRATIONS Figure 1 Architecture . . . . . . 4 Figure 2 Memory Map . . . . . . 5 Figure 3 TMS 9900 Interrupt Interface 8 Figure 4 TMS 9900 Single·Bit CRU Address Development 9 Figure 5 TMS 9900 LDCR/STCR Data Transfers . 9 Figure 6 TMS 9900 16·Bit I nput/Output Interface. 10 Figure 7 External Instruction Decode Logic 11 Figure 8 TMS 9900 CPU Flow Chart . 12 Figure 9 TMS 9900 Memory Bus Timing . 16 Figure 10 TMS 9900 Hold Timing 17 Figure 11 TMS 9900 CRU Interface Timing 19 Figure 12 Clock Timing. . . . . 31 Figure 13 Signal Timing. . . . . . 32 Figure 14 Minimum TMS 9900 System . 35 Figure 15 Maximum TMS 9900 System. 35 LIST OF TABLES Table 1 Interrupt Level Data 7 Table 2 TMS 9900 Pin Assignments and Functions 13 Table 3 Instruction Execution Times. . . . . 28 2 1. INTRODUCTION 1.1 DESCRIPTION The TMS 9900 microprocessor is a single-chip 16-bit central processing unit (CPU) produced using N-channel silicon-gate MOS technology (see Figure 1). The instruction set of the TMS 9900 includes the capabilities offered by full minicomputers. The unique memory-to-memory architecture features multiple register files, resident in memory, which allow faster response to interrupts and increased programming flexibility. The separate bus structure simplifies the system design effort. Texas Instruments provides a compatible set of MOS and TTL memory and logic function circuits to be used with a TMS 9900 system. The system is fully supported by software and a complete prototyping system. 1.2 KEY FEATURES o 16-Bit Instruction Word o Full Minicomputer Instruction Set Capability Including Multiply and Divide o Up to 65,536 Bytes of Memory o 3-M Hz Speed o Advanced Memory-to-Memory Architecture o Separate Memory, I/O, and Interrupt-Bus Structures o 16 General Registers o 16 Prioritized Interrupts o Programmed and DMA I/O Capability oN-Channel Silicon-Gate Technology 2. ARCHITECTURE The memory word of the TMS 9900 is 16 bits long. Each word is also defined as 2 bytes of 8 bits. The instruction set of the TMS 9900 allows both word and byte operands. Thus, all memory locations are on even address boundaries and byte instructions can address either the even or odd byte. The memory space is 65,536 bytes or 32,768 words. The word and byte formats are shown below. MSB LSB 2 3 4 5 6 7 8 9 SIGN ________________________ \~B~I~T ~ ~ ______________________________ ~/ V MEMORY WORD (EVEN ADDRESS) MSB LSB MSB LSB I 0 1 SIGN 2 3 4 5 6 1 7 1 81 9 SIGN 10 111 1 12 13 14 15 1 1 1 1 \ BIT A BIT / V V EVEN BYTE ODD BYTE 2.1 REGISTERS AND MEMORY The TMS 9900 employs an advanced memory-to-memory architecture. Blocks of memory designated as workspace replace internal-hardware registers with program-data registers. The TMS 9900 memory map is shown in Figure 2. The first 32 words are used for interrupt trap vectors. The next contiguous block of 32 memory words is used by the extended operation (XOP) instruction for trap vectors. The last two memory words, FFFC16 and FFFE16' are used for the trap vector of the LOAD signal. The remaining memory is then available for programs, data, and workspace registers. If desired, any of the special areas may also be used as general memory. TENTATIVE DATA This document provides tentative information on a new product. Texas Instruments reserves the right to 3 change specifications for this product in any manner without notice. iNfRTIi: ICO·IC3 AO-A14 15 T1 T2 PROGRAM COUNTER WORKSPACE REGISTER HOLD A HOLDA LOAD ALU WE READY WAIT r;;m;m:J DB IN RESET IAQ CRUCLK 1-4 CRUOUT 00-015 CRUIN FIGURE 1 - ARCHITECTURE 176 4 MEMORY AREA DEFINITION ADDRESS16 MEMORY CONTENT o 15 0000 WP LEVEL 0 INTERRUPT 0002 PC LEVEL 0 INTERRUPT 0004 WP LEVEL 1 INTERRUPT 0006 PC LEVEL 1 INTERRUPT INTERRUPT VECTORS ~I;? .:~ 003C WP LEVEL 15 INTERRUPT 003E PC LEVEL 15 INTERRUPT 0040 WP XOPO 0042 PC XOPO XOP SOFTWARE TRAP VECTORS ~';1' ~> 007C WP XOP 15 007E PC XOP 15 0080 • • • GENERAL·MEMORY AREA GENERAL MEMORY FOR MAY BE ANY PROGRAM,DATA,AND COMBINATION OF WORKSPACE REGISTERS PROGRAM SPACE OR WORKSPACE • • LOAD SIGNAL VECTOR { FFFC FFFE WP PC LOAD FUNCTION LOAD FUNCTION FIGURE 2 - MEMORY MAP Three internal registers are accessible to the user. The program counter (PC) contains the address of the instruction following the current instruction being executed. This address is referenced by the processor to fetch the next instruction from memory and is then automatically incremented. The status register (ST) contains the present state of the processor and will be further defined in Section 3.4. The workspace pointer (WP) contains the address of the first word in the currently active set of workspace registers. A workspace-register file occupies 16 contiguous memory words in the general memory area (see Figure 2). Each workspace register may hold data or addresses and function as operand registers, accumulators, a~dress registers, or 5 index registers. During instruction execution, the processor addresses any register in the workspace by adding the register number to the contents of the workspace pointer and initiating a memory request for the word. The relationship between the workspace pointer and its corresponding workspace is shown below. GENERAL MEMORY TMS 9900 ,.::? PROGRAM A I------- -1 ,.::? PC (AI I I WORKSPACE REGISTER 0 I WP (AI I WORKSPACE A WORKSPACE REGISTER 15 ~ ST (AI I ;t!? ... '7 PROGRAM B ~7 ~'7 WORKSPACE B The workspace concept is particularly valuable during operations that require a context switch, which is a change from one program environment to another (as in the case of an interrupt) or to a subroutine. Such an operation, using a conventional multi-register arrangement, requires that at least part of the contents of the register file be stored and reloaded. A memory cycle is required to store or fetch each word. By exchanging the program counter, status register, and workspace pointer, the TMS 9900 accomplishes a complete context switch with only three store cycles and three fetch cycles. After the switch the workspace pointer contains the starting address of a new 16-word workspace in memory for use in the new routine. A corresponding time saving occurs when the original context is restored. Instructions in the TMS 9900 that result in a context switch include: 1. Branch and Load Workspace Pointer (B LWP) 2. Return from Subroutine (RTWP) 3. Extended Operation (XOP). Device interrupts, RESET, and LOAD also cause a context switch by forcing the processor to trap to a service subroutine. 2.2 INTERRUPTS The TMS 9900 employs 16 interrupt levels with the highest priority level 0 and lowest level 15. Level 0 is reserved for the RESET function and all other levels may be used for external devices. The external levels may also be shared by several device interrupts, depending upon system requirements. The TMS 9900 continuously compares the interrupt code (ICO through IC3) with the interrupt mask contained in status-register bits 12 through 15. When the level of the pending interrupt is less than or equal to the enabling mask level (higher or equal priority interrupt), the processor recognizes the interrupt and initiates a context switch following 6 completion of the currently executing instruction. The processor fetches the new context WP and PC from the interrupt vector locations. Then, the previous context WP, PC, and ST are stored in workspace registers 13, 14, and 15, respectively, of the new workspace. The TMS 9900 then forces the interrupt mask to a value that is one less than the level of the interrupt being serviced, except for level-zero interrupt, which loads zero into the mask. This allows only interrupts of higher priority to interrupt a service routine. The processor also inhibits interrupts until the first instruction of the service routine has been executed to preserve program linkage should a higher priority interrupt occur. All interrupt requests should remain active until recognized by the processor in the device-service routine. The individual service routines must reset the interrupt requests before the routine is complete. If a higher priority interrupt occurs, a second context switch occurs to service the higher priority interrupt. When that routine is complete, a return instruction (RTWP) restores the first service routine parameters to the processor to complete processing of the lower-priority interrupt. All interrupt subroutines should terminate with the return instruction to restore original program parameters. The interrupt-vector locations, device assignment, enabling-mask value, and the interrupt code are shown in Table 1. TABLE 1 INTERRUPT LEVEL DATA Vector Location Interrupt Mask Values To Interrupt I nterrupt Level (Memory Address Device Assignment Enable Respective Interrupts Codes In Hex) (ST12 thru ST15) ICO thru IC3 (Highest priority) 0 00 Reset o through F* 0000 1 04 External device 1 through F 0001 2 08 2 through F 0010 3 OC 3 through F 0011 4 10 4 through F 0100 5 14 5 through F 0101 6 18 6 through F 0110 7 lC 7 through F 0111 8 20 8 through F 1000 9 24 9 through F 1001 10 28 A through F 1010 11 2C B through F 1011 12 30 C through F 1100 13 34 D through F 1101 14 38 E and F 1110 (Lowest priority) 15 3C External device F only 1111 • Level 0 can not be disabled. The TMS 9900 interrupt interface utilizes standard TTL components as shown in Figure 3. Note that for eight or less external interrupts a single SN74148 is required and for one external interrupt INTREQ is used as the interrupt signal with a hard-wired code ICO through IC3. 2.3 INPUT/OUTPUT The TMS 9900 utilizes a versatile direct command-driven I/O interface designated as the communications-register unit (CRU). The CRU provides up to 4096 directly addressable input bits and 4096 directly addressable output bits. Both input and output bits can be addressed individually or in fields of from 1 to 16 bits. The TMS 9900 employs three dedicated 110 pins (CR UI N, CRUOUT, and CRUCLK) and 12 bits (A3 through A 14) of the address bus to interface with the CRU system. The processor instructions that drive the CRU interface can set, reset, or test any bit in the CRU array or move between memory and CRU data fields. 7 VCC SN7408 INTERRUPT SIGNAL 1 GS 1 : ) - - - - - - - - - - 0 (highest priority) b-----~ INTREQ I A2 1 : ) - - - + - - - - - - , SN7404 >-___~ICO I A1 P---+-+---~ AO 10---+--11----, SN7408 I SN7408 Jo----~IC1 TMS 9900 I EI SN7408 )()----~ IC2 GS I A2 10-------1. )O-----~ IC3 A1 P--------~ I AO P-------------' INTERRUPT SIGNAL 15 (lowest priority) FIGURE 3 - TMS 9900 INTERRUPT INTERFACE 2.4 SINGLE-BIT CRU OPERATIONS The TMS 9900 performs three single-bit CRU functions: test bit (TB), set bit to one (SBO), and set bit to zero (SBZ). To identify the bit to be operated upon, the TMS 9900 develops a CRU-bit address and places it on the address bus, A3 to A14. For the two output operations (SBO and SBZ), the processor also generates a CRUCLK pulse, indicating an output operation to the CRU device, and places bit 7 of the instruction word on the CRUOUT line to accomplish the specified operation (bit 7 is a one for SBO and a zero for SBZI. A test-bit instruction transfers the addressed CRU bit from the CRUIN input line to bit 2 of the status register (EQUAL). The TMS 9900 develops a CRU-bit address for the single-bit operations from the CRU-base address contained in workspace register 12 and the signed displacement count contained in bits 8 through 15 of the instruction. The displacement allows two's complement addressing from base minus 128 bits through base plus 127 bits. The base address from W12 is added to the signed displacement specified in the instruction and the result is loaded onto the address bus. Figure 4 illustrates the development of a single-bit CRU address. 2.5 MULTIPLE-BIT CRU OPERATIONS The TMS 9900 performs two multiple-bit CRU operations: store communications register (STCR) and load communications register (LDCR). Both operations perform a data transfer from the CRU-to-memory or from memory-to-CRU as illustrated in Figure 5. Although the figure illustrates a full 16-bit transfer operation, any number of bits from 1 through 16 may be involved. The LDCR instruction fetches a word from memory and right-shifts it to serially transfer it to CR U output bits. If the LDCR involves eight or fewer bits, those bits come from the right-justified field within the addressed byte of the memory word. If the LDCR involves nine or more bits, those bits come from the right-justified field within the whole memory word. When transferred to the CRU interface, each successive bit receives an address that is sequentially greater than the address for the previous bit. This addressing mechanism results in an order reversal of the bits; that is, bit 15 of the memory word (or bit 7) becomes the lowest addressed bit in the CR U and bit 0 becomes the highest addressed bit in the CRU field. An STCR instruction transfers data from the CRU to memory. If the operation involves a byte or less transfer, the transferred data will be stored right-justified in the memory byte with leading bits set to zero. If the operation involves from nine to 16 bits, the transferred data is stored right-justified in the memory word with leading bits set to zero. 8 0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 X X X x I W12 DON'T CARE 8 + 9 10 11 12 13 14 15 I I I I SIGNED DISPLACEMENT "" BIT 8 SIGN EXTENDED ;;;; U 0 2 3 4 5 6 7 8 10 11 12 13 14 0 0 0 ADDRESS BUS '---v--" V EFFECTIVE CRU BIT ADDRESS SET TO ZERO FOR ALL CRU OPERATIONS FIGURE 4 - TMS 9900 SINGLE-BIT CRU ADDRESS DEVELOPMENT CRU CRU INPUT OUTPUT BITS BITS N N N+1 N+1 INPUT (STCR I EFFECTIVE MEMORY ADDRESS 14 OUTPUT (LDCRI N+14 N+14 N+15 N+15 N; BIT SPECIFIED BY CRU BASE REGISTER FIGURE 5 - TMS 9900 LDCR/STCR DATA TRANSFERS When the input from the CRU device is complete, the first bit from the CRU is the least-significant-bit position in the memory word or byte_ Figure 6 illustrates how to implement a 16-bit input and a 16-bit output register in the CRU interface. CRU addresses are decoded as needed to implement up to 256 such 16-bit interface registers. In system application, however, only the exact number of interface bits needed to interface specific peripheral devices are implemented. It is not necessary to have a 16-bit interface register to interface an 8-bit device. 9 FIGURE 6 - TMS 9900 16-BIT INPUT/OUTPUT INTERFACE 2.6 EXTERNAL INSTRUCTIONS The TMS 9900 has five external instructions that allow user-defined external functions to be initiated under program control. These instructions are CKON, CKOF, RSET, IDLE, and LREX. These mnemonics, except for IDLE, relate to functions implemented in the 990 minicomputer and do not restrict use of the instructions to initiate various user-defined functions. IDLE also causes the TMS 9900 to enter the idle state and remain until an interrupt, RESET, or LOAD occurs. When any of these five instructions are executed by the TMS 9900, a unique 3-bit code appears on the most-significant 3 bits of the address bus (AO through A2) along with a CRUCLK pulse. When the TMS 9900 is in an idle state, the 3-bit code and CRUCLK pulses occur repeatedly until the idle state is terminated. The codes are: EXTERNAL INSTRUCTION AO A1 A2 LREX H H H CKOF H H L CKON H L H RSET L H H IDLE L H L Figure 7 illustrates typical external decode logic to implement these instructions. Note that a signal is generated to inhibit CR U decodes during external instructions. 10 TO MEMORY AND CRU ~ ~ ,/ V 15 CRU INHIBIT SIGNAL -- LREX L---c YO Y7 SN74LS138 -- Y6 ... CKOF .. j5 3 ~A TO USER DEFINED TMS 9900 i B Y5 CKON r EXTERNAL INSTRUCTION ~C / -- AO·A14 :.c.A2 Y3 ..... RESET . LOGIC -- IDLE Y2 G1 G2A G2B rI CRlJCLK I -'-- -'-- FIGURE 7 - EXTERNAL INSTRUCTION DECODE LOGIC 2.7 LOAD FUNCTION The LOAD signal allows cold-start ROM loaders and front panels to be implemented for the TMS 9900. When active, LOAD causes the TMS 9900 to initiate an interrupt sequence immediately following the instruction being executed. Memory location FF FC is used to obtain the vector (WP and PC). The old PC, WP and ST are loaded into the new workspace and the interrupt mask is set to 0000. Then, program execution resumes using the new PC and WP. 176 11 RESET SIGNAL CAUSES IMMEDIATE ENTRY HERE Y GET RESET VECTOR (WPAND PC) FROM LOCATION 0,2 Y STORE PREVIOUS PC, WP. AND ST IN NEW WORKSPACE. SET INTERRUPT MASK (ST12-ST15) = 0 N Y N N GET LOAD VECTOR (WP AND PC) FROM LOCATION FFFC16. FFFE16 STORE PREVIOUS PC, STORE PREVIOUS PC, WP. AND ST IN NEW WP. AND ST IN NEW WORKSPACE. SET WORKSPACE. SET INTERRUPT MASK INTERRUPT MASK (ST12 (ST12 - ST15) = 0 ':":'ST15) TO LEVEL - 1 FIGURE 8 - TMS 9900 CPU FLOW CHART 176 12 2.8 TMS 9900 PIN DESCRIPTION Table 2 defines the TMS 9900 pin assignments and describes the function of each pin. TABLE 2 TMS 9900 PIN ASSIGNMENTS AND FUNCTIONS SIGNATURE PIN I/O DESCRIPTION TMS 9900 PIN ASSIGNMENTS AODRESS BUS VBB 64 HOLD AO (MSB) 24 OUT AO through A 14 comprise the address bus. VCC 2 63 MEMEN A1 23 OUT This 3-state bus provides the memory- WAIT 3 62 READY A2 22 OUT address vector to the external·memory LOAD 4 61 WE A3 21 OUT system when MEMEN is active and I/O-bit HOLDA 5 60 CRUCLK A4 20 OUT addresses and external-instruction addresses RESET 6 59 VCC A5 19 OUT to the I/O system when MEMEN is inactive. lAO 7 58 NC A6 18 OUT The address bus assumes the high-impedance <1>1 8 57 NC A7 17 OUT state when HOLOA is active. ct>2 9 56 D15 A8 16 OUT A14 10 55 014 A9 15 OUT A13 11 54 D13 A10 14 OUT A12 12 53 012 A11 13 OUT A11 13 52 011 A12 12 OUT A10 14 51 D10 D A13 11 OUT A9 15 50 D9 A14 (LSB) 10 OUT A8 16 49 D8 A7 17 48 D7 DATA BUS A6 18 47 D6 00 (MSB) 41 I/O 00 through 015 comprise the bidirectional A5 19 46 D5 01 42 I/O 3-state data bus. This bus transfers memory A4 20 45 D4 02 43 I/O data to (when writing) and from (when A3 21 44 D3 03 44 I/O reading) the external-memory system when A2 22 43 D2 04 45 I/O MEMEN is active. The data bus assumes the A1 23 42 D1 05 46 I/O high-impedance state when HOLOA is AO 24 41 DO 06 47 I/O active. ct>4 25 40 VSS 07 48 I/O VSS 26 39 NC 08 49 I/O VDD 27 38 NC 09 50 I/O ct>3 28 37 NC 010 51 I/O DBIN 29 36 ICO 011 52 I/O CRUOUT 30 35 IC1 012 53 I/O CRUIN 31 34 IC2 013 54 I/O INTREO 32 33 IC3 014 55 I/O 015 (LSB) 56 I/O NC - No internal connection POWER SUPPLIES VBB Supply voltage (-5 V NOM) Vce 2,59 Supply voltage (5 V NOM). Pins 2 and 59 must be connected in parallel. VOO 27 Supply voltage (12 V NOM) VSS 26,40 Ground reference. Pins 26 and 40 must be connected in parallel. CLOCKS <1>1 8 IN Phase-1 clock <1>2 9 IN Phase-2 clock <1>3 28 IN Phase-3 clock 4 25 IN Phase-4 clock 576 13 TABLE 2 (CONTINUED) SIGNATURE PIN 1/0 DESCRIPTION BUS CONTROL DBIN 29 OUT Data bus in. When active (high), DBIN indicates that the TMS 9900 has disabled its output buffers to allow the memory to place memory·read data on the data bus during MEMEN. DBIN remains low in all other cases except when HOLDA is active. MEMEN 63 OUT Memory enable. When active (low), MEMEN indicates that the address bus contains a memory address. WE 61 OUT Write enable. When active (low), WE indicates that memory·write data is available from the TMS 9900 to be written into memory. CRUCLK 60 OUT CRU clock. When active (high), CRUCLK indicates that external interface logic should sample the output data on CRUOUT or should decode external instructions on AO through A2. CRUIN 31 IN CRU data in. CRUIN, normally driven by 305tate or open·collector devices, receives input data from external interface logic. When the processor executes a STCR or TB instruction,it samples CRU IN for the level of the CRU input bit specified by the address bus (A3 through A14). CRUOUT 30 OUT CRU data out. Serial 1/0 data appears on the CRUOUT line when an LDCR, SBZ, or SBO instruction is executed. The data on CRUOUT should be sampled by external 1/0 interface logic when CRUCLK goes active (h igh I. INTERRUPT CONTROL INTREQ 32 IN Interrupt request. When active (low), I NTR EQ indicates that an external interrupt is requested. If INTREQ is active, the processor loads the data on the interrupt·code·input lines ICO through IC3 into the internal interrupt-<:ode·storage register. The code is compared to the interrupt mask bits of the status register. If equal or higher priority than the enabled interrupt level (interrupt code equal or less than status register bits 12 through 15) the TMS 9900 interrupt sequence is initiated. If the comparison fails, the processor ignores the request. INTREQ should remain active and the processor will continue to sample ICO through IC3 until the program enables a sufficiently low priority to accept the request interrupt. ICO (MSB) 36 IN Interrupt codes. ICO is the MSB of the interrupt code, which is sampled when INTREQ is active. When IC1 35 IN ICO through IC3 are LLLH, the highest external·priority interrupt is being requested and when HHHH, IC2 34 IN the lowest·priority interrupt is being requested. IC3 (LSB) 33 IN MEMORY CONTROL HOLD 64 IN Hold. When active (low), HOLD indicates to the processor that an external controller (e.g., DMA device) desires to utilize the address and data buses to transfer data to or from memory. The TMS 9900 enters the hold state following a hold signal when it has completed its present memory cycle.* The processor then places the address and data buses in the high·impedance state (along with WE, MEMEN, and DBIN) and responds with a hold·acknowledge signal (HOLDA). When HOLD is removed, the processor returns to normal operation. HOLDA 5 OUT Hold acknowledge. When active (high), HOLDA indicates that the processor is in the hold state and the address and data buses and memory control outputs (WE, MEMEN, and DBIN) are in the high·impedance state. READY 62 IN Ready. When active (high), READY indicates that memory will be ready to read or write during the next clock cycle. When not·ready is indicated during a memory oper;)tion, the TMS 9900 enters a wait state and suspends internal operation until the memory systems indicate ready. WAIT 3 OUT Wait. When active (high), WAIT indicates that the TMS 9900 has entered a wait state because of a not·ready condition from ,memory. 'If the cycle following the present memory cycle is also a memory cycle, it, too, is completed before the TMS9900 enters the hold state. The maximum number of consecutive memory cycles is two. 276 14 TABLE 2 (CONCLUDED) SIGNATURE PIN I/O DESCRIPTION TIMING AND CONTROL lAO OUT Instruction acquisition. lAO is active (high) during any memory cycle when the TMS 9900 is acquiring an instruction. lAO can be used to detect illegal op codes. LOAD 4 IN Load. When active (low), LOAD causes the TMS 9900 to execute a nonmaskable interrupt with memory address FFFC16 containing the trap vector (WP and PC). The load sequence begins after the instruction being executed is completed. LOAD will also terminate an idle state. If LOAD is active during the time RESET is released, then the LOAD trap will occur after the RESET function is completed. LOAD should remain active for one instruction period. lAO can be used to determine instruction boundaries. This signal can be used to implement cold·start ROM loaders. Additionally, front·panel routines can be implemented using CRU bits as front·panel-interface signals and software-control routines to control the panel operations. RESET 6 IN Reset. When active (low), RESET causes the processor to be reset and inhibits WE and CRUCLK. When RESET is released, the TMS 9900 then initiates a level-zero interrupt sequence that acquires WP and PC from locations 0000 and 0002, sets all status register bits to zero, and starts execution. RESET will also terminate an idle state. RESET must be held active for a minimum of three clock cycles. 2.9 TIMING 2.9.1 MEMORY A basic memory read and write cycle is shown in Figure 9. The read cycle is shown with no wait states and the write cycle is shown with one wait state. MEMEN goes active (low) during each memory cycle. At the same time that MEMEN is active, the memory address appears on the address bus bits AO through A14. If the cycle is a memory-read cycle, DBIN will go active (high) at the same time MEMEN and AO through A 14 become valid. The memory-write signal WE will remain inactive (high) during a read cycle. If the read cycle is also an instruction acquisition cycle, IAQ will go active (high) during the cycle. The READY signal, which allows extended memory cycles, is shown high during ¢l of the second clock cycle of the read operation. This indicates to the TMS 9900 that memory-read data will be valid during ¢l of the next clock cycle. If READY is low during ¢l, then the TMS 9900 enters a wait state suspending internal operation until a READY is sensed during a subsequent ¢l. The memory read data is then sampled by the TMS 9900 during the next cpl, which completes the memory-read cycle. At the end of the read cycle, MEMEN and DBIN go inactive (high and low, respectively). The address bus may also change at this time, however, the data bus remains in the input mode for one clock cycle after the read cycle. A write cycle is similar to the read cycle with the exception that WE goes active (low) as shown and valid write data appears on the data bus at the same time the address appears. The write cycle is shown as an example of a one-wait-state memory cycle. READY is low during ¢l resulting in the WAIT signal shown. 2.9.2 HOLD Other interfaces may utilize the TMS 9900 memory bus by using the hold operation (illustrated in Figure 10) of the TMS 9900. When HOLD is active (low), the TMS 9900 enters the hold state at the next available non-memory cycle. Considering that there can be a maximum of two consecutive memory cycles, the maximum delay between HOLD going active to HOLDA going active (high) could be tc(cp) (for setup) + (4+W) tc(¢) + tc(¢) (delay for HOLDA), where W is the number of wait states per memory cycle and tc(¢) is the clock cycle time. When the TMS 9900 has entered the hold state, HOLDA goes active (high) and AO through A15, DO through D15 DBIN, 1'i7IEi'i7fE\f, and WE" go into a high-impedance state to allow other devices to use the memory buses. When HOLD goes inactive (high), the TMS 9900 resumes processing as shown. If hold occurs during a CR U operation, the TMS 9900 uses an extra clock cycle (after the removal of the HOLD signal) to reassert the CRU address providing the normal setup times for the CRU bit transfer that was interrupted. 276 15 .... en 91 n'--------lnL..._________nL..._________n'--------'n~_______InL..._________In'_______'nL..._________InL.___1l ¢2 ~ n n n n n n n n I ct>3 ¢4 l n n n n n n MEMEN \ I \~--------------~I DBIN I \ WE \\--_ _ _ _----11 AO·A14 __________ ~X~_V_A_L_ID_A_D_D_R_E_SS_____JX~ ______________~X~ _____ V_A_L_ID_A_D_D_R_E_SS________ -JX~ _________ READY WAIT ----------------------------------------~I \'---------- DO-D15 CPU DRIVEN INPUT MODE CPU WRITE DATA CPU DRIVEN IAQ __________~/SHOWN ASSUMING THIS \~_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ CYCLE IS AN INSTRUCTION ACQUISITION CYCLE \ V I \~-----~V_--------~I MEMORY READ CYCLE WITH NO WAITS MEMORY WRITE CYCLE WITH ONE WAIT RD = READ DATA FIGURE 9 - TMS 9900 MEMORY BUS TIMING 1>1 n n n n n n n.r.r <;'>2 Jl n n n n n rl n n <;'>3 <;,>4 n n n n n fL; MEMEN \ f' Hi-Z :S , AO-A14 =x >0 Hi-Z '5 C 00-015 =x X ) Hi-Z J; C DBIN J \ I Hi-Z ~"'~ L WE \ Hi-Z f' ,- READY )~§1'f g~R:e\ I '()('X)OO(X)O():~O~:1>9&'j f;~EXXXXXXXX WAIT I \ )c ~,.. HOLDA I '- HOLD \ H- I ~ ~I PROCESSOR OUTPUTS FLOATING FIGURE 10 - TMS 9900 HOLD TIMING 2.9.3 CRU CRU interface timing is shown in Figure 11. The timing for transferring two bits out and one bit in is shown. These transfers would occur during the execution of a CRU instruction. The other cycles of the instruction execution are not illustrated. To output a CRU bit, the CRU-bit address is placed on the address bus AO through A 14 and the actual bit data on CRUOUT. During the second clock cycle a CRU pulse is supplied by CRUCLK. This process is repeated until the number of bits specified by the instruction are completed. The CRU input operation is similar in that the bit address appears on AO through A 14. During the subsequent cycle the TMS 9900 accepts the bit input data as shown. No CRUCLK pulses occur during a CRU input operation. 3. TMS 9900 INSTRUCTION SET 3.1 DEFINITION Each TMS 9900 instruction performs one of the following operations: • Arithmetic, logical, comparison, or manipulation operations on data Q Loading or storage of internal registers (program counter, work~pace pointer, or status) • Data transfer between memory and external devices via the CRU • Control functions. 3.2 ADDRESSING MODES TMS 9900 instructions contain a variety of available modes for addressing random-memory data (e.g., program parameters and flags), or formatted memory data (character strings, data lists, etc.). The following figures graphically describe the derivation of the effective address for each a~dressing mode. The applicability of addressing modes to particular instructions is described in Section 3.5 along with the description of the operations performed by the instruction. The symbols following the names of the addressing modes [R, *R, *R+, @ LABEL, or@TABLE (R)l are the general forms used by TMS 9900 assemblers to select the addressing mode for register R. 3.2.1 WORKSPACE REGISTER ADDRESSING R Workspace Register R contains the operand. Register R (PCI-1 Instruction ~WPI+2R-1 Operand 3.2.2 WORKSPACE REGISTER INDIRECT ADDRESSING *R Workspace Register R contains the address of the operand. Register R (PCI-1 Instruction ~WPI+2R-1 Address HL...__ o_p_e_ra_n_d_---' 3.2.3 WORKSPACE REGISTER INDIRECT AUTO INCREMENT ADDRESSING *R+ Workspace Register R contains the address of the operand. After acquiring the operand, the contents of workspace register R are incremented. (PCI--1 Instruction ~WPI+2R 176 18 <,'>1 n n n n n n n n n n <,'>2 Jl n n n n n n n n ~ <;>3 ~ n n n n n n n n ~ <>4 n n n n n n n n n n AO·A15 UNKNOWN CRU BIT ADDRESS n CRU ADDRESS n + 1 ; X CRU ADDRESS m x= 2 CRUCLK n n H 1-0 ~- c..1- I-} Clock cycle time 0.333 }J.s tr(} Clock rise time 12 ns tf~} Clock fall time 12 ns tw(} Pulse width, any clock high 45 ns td(1 L-2H} Delay time, clock 1 low to clock 2 high (time between clock pulses) 5 ns td(2L-3H} Delay time, clock 2 low to clock 3 high (time between clock pulses) 5 ns td(3L-4H} Delay time, clock 3 low to clock 4 high (time between clock pulses) 5 ns td(4L-1 H) Delay time, clock 4 low to clock 1 high (time between clock pulses) 5 ns td(1 H-2H} Delay time, clock 1 high to clock 2 high (time between leading edges) 80 ns td(2H-3H} Delay time, clock 2 high to clock 3 high (time between leading edges) 80 ns td(3H-4H} Delay time, clock 3 high to clock 4 high (time between leading edges) 80 ns td(4H-1H} Delay time, clock 4 high to clock 1 high (time between leading edges) 80 ns tsu Data or control setup time before clock 1 40 ns th Data hold time after clock 1 10 ns 4.5 SWITCHING CHARACTERISTICS OVER FULL RANGE OF RECOMMENDED OPERATING CONDITIONS (SEE FIGURE 13) PARAMETER TEST CONDITIONS MIN TYP MAX tp LH or tpH L Propagation delay time, clocks to outputs CL = 200 pF 20 /"'1 .1 - - - - - - - - - - - - - - tc(1)1 1 . ~td(91H_¢2H} ~ I ~_;vt ~: tr(1)}----.j j.- j+tW(r/l}-.! I r~:VI~~~~I:I~, :\0.7 V -.ll.-tf(r,'l}1 I I+-- ldll/J2H-4Ht~ II CLOCK l/J3 _ _ _ _ _ _ _ _ _ td(_r/l2L_-3_HII_ .. ~~tl t I II II L - - - -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ I I II I j4-td (r,'l4H -1H'ji ________________ CLOCK_l/J4 3L td_Ir/l__ _-_4_H_} _1"_-A~11 _ > :t:\~ 'd'04L"'HI NOTE: All timing and voltage levels shown on r/l1 applies to l/J2.l/J3. and l/J4 in the same manner. FIGURE 12 - CLOCK TIMING 31 INPUT 7lA::: ~~~f~{f:ttll#ttmmltllltlIltA --.l tsu I+- I M r--+l th I 95vn CLOCK ¢1 0.7 V : 9.5 V '-...;;.0:..;...7....;v_ _ _ _ _ _ _ _ _ _ _ _ _ _---' I '--__________ I CLOCK ¢2 ~:---9.5---lV~'-------------~------'r--\~----- 9.5vn ____ 95V~ CLOCK <1>3 CLOCK ¢4 ----------------~I ----------------~----~I i 95vn ~--------------------I I i I --J I+- tpLH I --.I _I I+- I tpHL I I I CRUCLK OUTPUT -------=------~ :1"V J r ~I tPLH 1,'V! - _I :I ~ I+-tPLH WE OUTPUT WAIT OUTPUT J.- tPLH OR tpHL I Al OTHER OU"UTSr:tJ:l!~~¥V~_1'=I...;;.:~::....;:-------V-;;....;ID-t--------...J'Ii:A~~~~ii~'ti tThe number of cycles over which input/output data must/will remain valid can be determined from Section 3.9. Note that in all cases data should not change during 1>1. FIGURE 13-SIGNAL TIMING 5. TMS 9900 PROTOTYPING SYSTEM 5.1 HARDWARE The TMS 9900 prototyping system enables the user to generate and debug software and to debug I/O controller interfaces. The prototyping system consists of: • 990/4 computer with TMS 9900 microprocessor • 1024 bytes of ROM containing the bootstrap loader for loading prototyping system software, the front-panel and maintenance utility, and the CPU self-testing feature • 16,896 bytes of RAM with provisions for expansion up to 57,334 bytes of RAM • Programmable-write-protect feature for RAM • Interface for Texas Instruments Model 733 ASR* Electronic Data Terminal with provisions for up to five additional interface moculdes • Requires remote device control and 1200 baud EIA interface option on 733 ASR. 276 32 o Available with Texas Instruments Model 733 ASR Electronic Data Terminal o 7-inch-high table-top chassis o Programmer's front panel with controls for run, halt, single-instruction execute, and entering and displaying memory or register contents • Power supply with the following voltages: 5 V dc @20 A 12 V dc @ 2 A -12 V dc @ 1 A -5 V dc@0.1 A o Complete hardware and software documentation. 5.2 SYSTEM CONSOLE The system console for the prototyping system is the 733 ASR, which provides keyboard entry, 30-character-per-second thermal printer, and dual cassette drives for program loading and storage. 5.3 SOFTWARE The following software is provided on cassette for loading into the prototyping system: o Debug Monitor - Provides full control of the prototyping system during program development and includes single instruction, multiple breakpoints, and entry and display capability for register and memory contents for debugging user software under 733 ASR console control. • One-Pass Assembler - Converts source code stored on cassette to relocatable object on cassette and generates program listing. (Object is upward compatible with other 990 series assemblers). o Linking Loader - Allows loading of absolute and relocatable object modules and links object modules as they are loaded. o Source Editor - Enables user modification of both source and object from cassette with resultant storage on cassette. o Trace Routine - Allows user to monitor status of computer at completion of each instruction. o PROM Programming/Documentation Facility - Provides documentation for ROM mask. generation, or communicates directly with the oPtional PROM Programmer Unit. 5.4 OPTIONS The following optional equipment is offered for the prototyping system: • Battery-pack/standby-power supply • PROM programming unit and adapter boards o Universal wire-wrap modules • Expansion RAM modules • Expansion EPROM modules • I/O modules and other interfaces • Rack-mounted version • International ac voltage option 33 6. TMS 9900 SUPPORT CIRCUITS MEMORY DEVICE ORGAN IZATION/FUNCTI ON 1/0 STRUCTURE PACKAGE ACCESS TIME RAMS TMS 4036-2 64 x 8 static Common bus 20 pin 450 ns MAX TMS 4033 1024 x 1 static Dedicated bus 16 pin 450 ns MAX TMS 4039-2 256 x 4 static Dedicated bus 22 pin 450 ns MAX TMS 4042-2 256 x 4 static Common bus 18 pin 450 ns MAX TMS 4050 4096 x 1 dynamic Common bus 18 pin 300 ns MAX TMS 4060 4096 x 1 dynamic Dedicated bus 22 pin 300 ns MAX ROMS/PROMS TMS 4700 1024 x 8 ROM 24 pin 450 ns MAX SN74S371 256 x 8 ROM 20 pin 70 ns MAX SN74S471 256 x 8 PROM 20 pin 70 ns MAX SN74S472 512 x 8 PROM 20 pin 55 ns TYP PERIPHERALS SN74LS259 t Addressable latch 16 pin SN74LS251 t Data multiplexer 16 pin SN74148 Priority encoder 16 pin SN74S412 8-bit 1/0 port 24 pin SN75355 t Quad TTL-to-MOS driver 16 pin TMS 6011 UART 40 pin SN74S241 Bidirectional bus driver 20 pin tTo be announced. 7. SYSTEM DESIGN EXAMPLES Figure 14 illustrates a typical minimum TMS 9900 system. Eight bits of input and output interface are implemented. The memory system contains 1024 x 16 ROM and 256 x 16 RAM memory blocks. The total package count for this system is 15 packages. A maximum TMS 9900 microprocessor system is illustrated in Figure 15. ROM and RAM are both shown for a total of 65,536 bytes of memory. The I/O interface supports 4096-output bits and 4096-input bits. Fifteen external interrupts are implemented in the interrupt interface. The clock generator and control section contains memory decode logic, synchronization logic, and the clock electronics. Bus buffers, required for this maximally configured system, are indicated on the system buses. 34 .. < ,~~------------------------~ 12 BITS r------------------, ADDRESS BUS r----------------~ 15 BITS r---------------~ ..---------II I ~r_----~--------~ AO·A14 DBIN I-------....~ B WE I-------+~ I I -"'./~ BITS ) SN74LS251k==' IN - - - - - - - ,'/\ l.- I-----------~ C RU IN I "1---- B~TS <.tL-------.&,/ SN74LS259k'--- 1-----------1- C RUOUT TMS 9900 I,1 j RAM OUT I ~----------------~CRUCLK CPU TMS 4042 I -~ INTERRUPTCODE=t ICO·IC3 .J . IN TE R RUPT R,EQUEST I NTREQ 00-015 K'\r_________D_A_T_A_B_U_S______________1_6_B_IT_S____---./) ________.01-<,',4 . , . . . . . . ~ - - - - - - - l .. CLOCK GENERATOR ,~------------~ FIGURE 14 - MINIMUM TMS 9900 SYSTEM ADDRESS BUS r-------~ r---------------~ DATA BUS -t>-, . , BUFFER FIGURE 15 - MAXIMUM TMS 9900 SYSTEM 35 8. MECHANICAL DATA '-------------3.200 ± 0.030------------..! ct ct 1--- 0 .900 ± 0. 020 -----l 0.185 MAX1 I. . I 1;0.020 MIN ~4 105 ~SEAnNGC I I- 0.050 NOM~ ~ --ll. .0.0.017 0 PLANE 0 90 0.010-.11- NOM .- 0.120 MIN 003 -J ~ 0.050 PIN SPACING 0.100 T.P. ±0.020 (See Note A) NOTE A. Each pin centerline is located within 0.010 of its true longitudinal position. 36 CB-183A 74072-56-CS Printed in U.S.A.