The Mc68020 32-Bit Microprocessor by Paul F
Total Page:16
File Type:pdf, Size:1020Kb
NEW C HIPS THE MC68020 32-BIT MICROPROCESSOR BY PAUL F. GROEPLER AND JAMES KENNEDY The latest member of Motorola's 68000 family includes on-board cache and virtual memory THE MC68020, the newest addition to the chip managers. They control inter- ate control for the micromachine. the Motorola M68000 family of micro- nal buses, registers, and the execution The instruction prefetch and decode processors, is a full 32-bit processor unit. unit fetches and decodes an instruc- with separate 32-bit data and address The execution unit contains the pro- tion for execution by the execution buses, an on-board instruction cache, gram counter (PC), the address, and unit. The prefetch is a three-word- dynamic bus sizing, and a coproces- the data . The PC section calculates in- deep on-chip instruction store. It elim- sor interface. It is object-code com- struction addresses and manages inates the need for the processor to patible with the earlier members of pointers. The address section calcu- sequentially fetch an instruction from the M68000 family but has new ad- lates operand addresses and stores external memory, decode and ex- dressing modes in support of high- the registers available to the user. The ecute it, and fetch another. level languages. data section performs all data opera- Instead, because of the sequential The MC68020 is an HCMOS (high- tions, such as immediate data value nature of instruction accesses, the speed complementary metal-oxide moves . It also contains the barrel prefetch can anticipate the next ac- semiconductor) microprocessor with shifter, which performs one-cycle cess and make it before it is needed. some 200,000 individual transistors shifts of any amount on data. Thus, external memory fetches are an- on a 375- by 350-millimeter die, The bus controller manages cache ticipated and overlapped with current operating at a 16 . 67-MHz clock fre- and external memory accesses. It also processor execution. quency (60-nanosecond clock period) provides control for the various parts The instruction addresses for the and dissipating less than 1 . 5 watts of of the 68020 microprocessor and in- prefetch are calculated independently power. It can process instructions at terprets the nanorom information. of data addresses, allowing for par- a sustained rate of 2 to 3 million in- This information is combined with de- allel accesses of instruction and data structions per second ( MIPS) and at coding the instruction pipe to gener- addresses. This simultaneous access burst rates exceeding 8 MIPS. ....................................... will occur if the data access is from Paul F. Groepler is a systems applications external memory and the instruction MC68020 PARTS designer in the High-end Applications Engi- access is from the instruction cache. Figure I is a block diagram of the neering Department at Motorola. James When this happens, a simultaneous MC68020 with the various internal Kennedy is a software engineer in the MPU instruction and data access occurs. sections labeled. We'll briefly describe Design Department at Motorola. You can The 256-byte instruction cache in- their functions. reach them at Motorola Inc ., POB 6000, creases performance by reducing the The sequencer and control unit are Austin, TX 78762. (continued) NOVEMBER 1984 • BYTE 159 Circle 58 on inquiry card. WHY THE MC68020 JOHNNY CAN'T number of instruction fetches, or bus register is used only for the clear en- cycles, from main memory. This lets try (CE) function in conjunction with READ system performance increase because the CACR. the processor's bus use is decreased, HIS freeing the bus for other system bus DYNAMIC B us SIZING masters. Only instructions are stored A nice feature of the MC68020 for the in the cache. Data accesses must still designer as well as the programmer OWN be read from main memory. is the dynamic bus. Now a designer Hardware and software may control need not worry about excessive hard- the cache. Hardware control is in the ware "glue" to interface to 16- or 8-bit CODE form of the cache disable (CDIS pin), peripherals and a programmer need which can disable the cache. The not worry about word or long-word Johnny's CDIS pin has priority and overrides aligned data in data space. The A Good any software setting. MC68020 allows transfers of 8-, 16-, Programmer, Software control is in the form of and 32-bit data between 8-, 16-, and two control registers: the cache con- 32-bit ports. The only requirement for Even Brilliant, trol register (CACR) and the cache ad- data alignment is that it occur on a But-Johnny works in 8080/Z80 assembly dress register (CAAR). The CACR and byte boundary. Instructions and any language, with a conventional assembler. CAAR are organized as shown in fig- associated extension words must still That can make yesterday's brilliance ures 2 and 3. Bits 4 to 31 are unused fall on word address boundaries, but today's garble, a maze of mnemonics and a jumble of meaningless labels. Johnny's and always read as zeros. The CACR word/long-word alignment is no program is less than self-explanatory- lets the systems programmer enable longer required for program space even for Johnny. or freeze the cache, clear an entry, or operands. Johnny could read his own code if he used clear the entire cache. The CAAR is The processor lets misaligned trans- SMAL/80-the superassembler-and so can you. SMAL/80 boosts your program's a 32-bit register that provides an ad- fers occur by determining the data clarity and your productivity by giving you: dress for cache control functions. This (continued) n Familiar algebraic notation in place of cryptic mnemonics-"A=A-3" for example, instead of "SUI 3" (if you know BASIC or SEQUENCER Pascal, you already know SMAL/80) n CONTROL Control structures like BEGIN... END, UNIT LOOP... REPEAT WHILE, and IF...THEN... INSTRUCTION ELSE... to replace tangled branches and PREFETCH AND arbitrary label names (eliminating up to 90% DECODE of labels with no overhead imposed) n Complete control over your processor- because SMAL/80 is a true assembler, it doesn't reduce execution speed or burden your program with its own runtime routines. SMAL/80, the assembler that handles like a high-level language , lets you do it right the first time, and lets you read and understand LER = BUS CONTROL your work afterward-the next day or a EXECUTION INSTRUCTION ADDRESS/ UNIT DATA BUS year later. Users say SMAL/80 has doubled BUS ^; CACHE and even tripled their output of quality code. 32 But don't take our word for it-TRY IT! 32 Use SMAL/80 for 30 days. If you're not completely satisfied with it-for any rea- Figure l: MC68020 block diagram. son-return the package for a full refund. SPECIAL BONUS : Order before Dec. 31, 1984, and get Structured Microprocessor 3 8 7 0 Programming-a $25 book FREE! C SMAL/80 for CP/M-80 systems (all CP/M C =CLEAR CACHE CE -CLEAR ENTRY disk formats available-please specify); F =FREEZE CACHE produces 8080/8085 and Z80 code. Now E =ENABLE CACHE supports Microsoft REL.ONLY $149.95 SMAL/80 for CP/M-80 systems, Figure 2: The cache control register. 8080/8085 output only. SAVE $20 : $129.95 NEW! SMAL /80X65-for Apple II and lie (requires Z80 card and CP/M); produces Z80 and 6502 object code. $ 169.95 s 7 2 I 0 CACHE FUNCTION ADDRESS INDEX Mastercard We pay Visa SMALshipping/80 on C.o. D.'s CHROMOD ASSOCIATES prepaid Figure 3 : The cache address register. (201) 653-7615 orders 1030 Park Ave. Hoboken, N.J. 07030 160 BYTE • NOVEMBER 1984 THE MC68020 port size during each bus cycle. By the misaligned data across the port only data bits Dal to D24 need to be handshaking lines between the pro- within one bus cycle. A normal trans- connected to the peripheral. Four bus cessor and external memory or pe- fer occurring from an aligned 32-bit cycles are necessary to complete this ripherals, the MC68020 can transfer operand address across a 32-bit bus transfer with only I byte being moved this mismatched or mis-sized data. to a 32-bit peripheral would take only across the bus per cycle. Figure 4 illustrates the workings of the one transfer cycle. The MC68020 relaxes word and internal hardware that makes this pos- In a mis-sized transfer, as well as a long-word alignment restrictions for sible and the alignment of operand normal transfer, the peripheral uses data. It is now possible to execute an bytes for an 8-, 16-, and 32-bit bus in- the DSACKO and DSACKI pins to sig- operand transfer across a memory terfacing with the MC68020. nal to the processor that it has a bus boundary that only needs to be byte Misaligned operand transfers can width of 8, 16, or 32 bits. The proces- aligned. Even and odd word restric- lead to an increased number of bus sor outputs the operand transfer size tions are gone. Some performance cycles because the processor might using the SIZO and SIZI pins. degradation can occur, due to extra not be able to successfully transfer Notice that with an 8-bit peripheral, bus cycles needed to transfer mis- aligned long-word or word data across MC68020 boundaries. OPO OP1 OP2 OP3 Figure 5 shows a misaligned long- INTERNAL SOURCE / DESTINATION word transfer across a word-wide bus. In the example, a byte box with "xxx" MULTIPLEXOR denotes that the location in memory is not overwritten and remains un- EXTERNAL DATA BUS changed. As you can see from this ex- ample, it is important for the system designer to control the enabling/dis- abling of the appropriate data buffers 32-BIT PORT to avoid overwriting or misreading 31 0 nonpertinent data during a mis- aligned cycle.