ColdFire 2/2M (R) Integrated Microprocessor User's Manual Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. "Typical" parameters can and do vary in different applications. All operating parameters, including "Typicals" must be validated for each customer application by customer's technical experts. Motorola does not convey any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part. Motorola and are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer. MOTOROLA, 1998 All Rights Reserved. ColdFire is a registered trademark of Motorola, Inc. All other trademarks are the property of their respective owners. DOCUMENTATION FEEDBACK FAX 512-895-8593--Documentation Comments Only (no technical questions please) http: / / www.mot.com/hpesd/docs_survey.html--Documentation Feedback Only The Technical Communications Department welcomes your suggestions for improving our documentation and encourages you to complete the documentation feedback form at the World Wide Web address listed above. Your help helps us measure how well we are serving your information requirements. The Technical Communications Department also provides a fax number for you to submit any questions or comments about this document or how to order other documents. Please provide the part number and revision number (located in upper right-hand corner of the cover) and the title of the document. When referring to items in the manual, please reference by the page number, paragraph number, figure number, table number, and line number if needed. Please do not fax technical questions to this number. When sending a fax, please provide your name, company, fax number, and phone number including area code. For Internet Access: Web Only: http: // www.mot.com/aesop For Hotline Questions: FAX (US or Canada): 1-800-248-8567 MOTOROLA ColdFire2/2M User's Manual iii Applications and Technical Information For questions or comments pertaining to technical information, questions, and applications, please contact one of the following sales offices nearest you. -- Sales Offices -- Field Applications Engineering Available Through All Sales Offices UNITED STATES ALABAMA, Huntsville ARIZONA, Tempe CALIFORNIA, Agoura Hills CALIFORNIA, Los Angeles CALIFORNIA, Irvine CALIFORNIA, Rosevllle CALIFORNIA, San Diego CALIFORNIA, Sunnyvale COLORADO, Colorado Springs COLORADO, Denver CONNECTICUT, Wallingford FLORIDA, Maitland FLORIDA, Pompano Beach/ Fort Lauderdale FLORIDA, Clearwater GEORGlA, Atlanta IDAHO, Boise ILLINOIS, Chicago/Hoffman Estates INDlANA, Fort Wayne INDIANA, Indianapolis INDIANA, Kokomo IOWA, Cedar Rapids KANSAS, Kansas City/Mission MARYLAND, Columbia MASSACHUSETTS, Marborough MASSACHUSETTS, Woburn MICHIGAN, Detroit MINNESOTA, Minnetonka MISSOURI, St. Louis NEW JERSEY, Fairfield NEW YORK, Fairport NEW YORK, Hauppauge NEW YORK, Poughkeepsie/Fishkill NORTH CAROLINA, Raleigh OHIO, Cleveland OHIO, Columbus/Worthington OHIO, Dayton OKLAHOMA, Tulsa OREGON, Portland PENNSYLVANIA, Colmar Philadelphia/Horsham TENNESSEE, Knoxville TEXAS, Austin TEXAS, Houston TEXAS, Plano VIRGINIA, Richmond WASHINGTON, Bellevue Seattle Access WISCONSIN, Milwaukee/Brookfield CANADA BRITISH COLUMBIA, Vancouver ONTARIO, Toronto ONTARIO, Ottawa QUEBEC, Montreal INTERNATIONAL AUSTRALIA, Melbourne AUSTRALIA, Sydney BRAZIL, Sao Paulo CHINA, Beijing FINLAND, Helsinki Car Phone FRANCE, Paris/Vanves iv (205) 464-6800 (602) 897-5056 (818) 706-1929 (310) 417-8848 (714) 753-7360 (916) 922-7152 (619) 541-2163 (408) 749-0510 (719) 599-7497 (303) 337-3434 (203) 949-4100 (407) 628-2636 (305) 486-9776 (813) 538-7750 (404) 729-7100 (208) 323-9413 (708) 490-9500 (219) 436-5818 (317) 571-0400 (317) 457-6634 (319) 373-1328 (913) 451-8555 (410) 381-1570 (508) 481-8100 (617) 932-9700 (313) 347-6800 (612) 932-1500 (314) 275-7380 (201) 808-2400 (716) 425-4000 (516) 361-7000 (914) 473-8102 (919) 870-4355 (216) 349-3100 (614) 431-8492 (513) 495-6800 (800) 544-9496 (503) 641-3681 (215) 997-1020 (215) 957-4100 (615) 584-4841 (512) 873-2000 (800) 343-2692 (214) 516-5100 (804) 285-2100 (206) 454-4160 (206) 622-9960 (414) 792-0122 (604) 293-7605 (416) 497-8181 (613) 226-3491 (514) 731-6881 (61-3)887-0711 (61(2)906-3855 55(11)815-4200 86 505-2180 358-0-35161191 358(49)211501 33(1)40 955 900 GERMANY, Langenhagen/ Hanover 49(511)789911 GERMANY, Munich 49 89 92103-0 GERMANY, Nuremberg 49 911 64-3044 GERMANY, Sindelfingen 49 7031 69 910 GERMANY, Wiesbaden 49 611 761921 HONG KONG, Kwai Fong 852-4808333 Tai Po 852-6668333 INDIA, Bangalore (91-812)627094 ISRAEL, Tel Aviv 972(3)753-8222 ITALY, Milan 39(2)82201 JAPAN, Aizu 81(241)272231 JAPAN, Atsugi 81(0462)23-0761 JAPAN, Kumagaya 81(0485)26-2600 JAPAN, Kyushu 81(092)771-4212 JAPAN, Mito 81(0292)26-2340 JAPAN, Nagoya 81(052)232-1621 JAPAN, Osaka 81(06)305-1801 JAPAN, Sendai 81(22)268-4333 JAPAN, Tachikawa 81(0425)23-6700 JAPAN, Tokyo 81(03)3440-3311 JAPAN, Yokohama 81(045)472-2751 KOREA, Pusan 82(51)4635-035 KOREA, Seoul 82(2)554-5188 MALAYSIA, Penang 60(4)374514 MEXICO, Mexico City 52(5)282-2864 MEXICO, Guadalajara 52(36)21-8977 Marketing 52(36)21-9023 Customer Service 52(36)669-9160 NETHERLANDS, Best (31)49988 612 11 PUERTO RICO, San Juan (809)793-2170 SINGAPORE (65)2945438 SPAIN, Madrid 34(1)457-8204 or 34(1)457-8254 SWEDEN, Solna 46(8)734-8800 SWITZERLAND, Geneva 41(22)7991111 SWITZERLAND, Zurich 41(1)730 4074 TAlWAN, Taipei 886(2)717-7089 THAILAND, Bangkok (66-2)254-4910 UNITED KINGDOM, Aylesbury 44(296)395-252 FULL LINE REPRESENTATIVES COLORADO, Grand Junction Cheryl Lee Whltely (303) 243-9658 KANSAS, Wichita Melinda Shores/Kelly Greiving (316) 838 0190 NEVADA, Reno Galena Technology Group (702) 746 0642 NEW MEXICO, Albuquerque S&S Technologies, lnc. (505) 298-7177 UTAH, Salt Lake City Utah Component Sales, Inc. (801) 561-5099 WASHINGTON, Spokane Doug Kenley (509) 924-2322 ARGENTINA, Buenos Aires Argonics, S.A. (541) 343-1787 HYBRID COMPONENTS RESELLERS Elmo Semiconductor (818) 768-7400 Minco Technology Labs Inc. (512) 834-2022 Semi Dice Inc. (310) 594-4631 ColdFire2/2M User's Manual MOTOROLA PREFACE The ColdFire2/2M Integrated Microprocessor User's Manual describes the programming, capabilities, and operation of the ColdFire2/2M device. Refer to the MCF5200 ColdFire Family Programmer's Reference Manual Rev. 1.0 for information on the ColdFire Family of microprocessors. Throughout this document, the ColdFire2/2M integrated microprocessor is referred to as "the ColdFire2/2M." CONTENTS This user manual is organized as follows: Section 1: Overview Section 2: Signal Summary Section 3: Master Bus Operations Section 4: Exception Processing Section 5: Integrated Memories Section 6: Multiply-Accumulate Unit Section 7: Debug Support Section 8: Test Operation Section 9: Instruction Execution Timing Section 10: Electrical Characteristics Appendix A: Register Summary Appendix B: New MAC Instructions Index MOTOROLA ColdFire2/2M User's Manual v TABLE OF CONTENTS Paragraph Number Title Page Number Section 1 Overview 1.1 1.1.1 1.1.2 1.2 1.3 1.3.1 1.3.1.1 1.3.1.2 1.3.1.3 1.3.1.4 1.3.2 1.3.2.1 1.3.2.2 1.3.2.3 1.3.2.4 1.3.2.5 1.3.2.6 1.3.2.7 1.3.2.8 1.3.2.9 1.4 1.4.1 1.4.1.1 1.4.1.2 1.4.1.3 1.4.1.4 1.4.1.5 1.4.2 1.4.2.1 1.4.2.2 1.4.2.3 1.4.3 FlexCore Integrated Processors ..................................................................1-2 FlexCore Advantages .............................................................................1-4 FlexCore Module Types .........................................................................1-4 Development Cycle......................................................................................1-5 System Architecture.....................................................................................1-8 Internal Bus Structure.............................................................................1-8 Master Bus.........................................................................................1-8 Slave Bus...........................................................................................1-9 External Bus ......................................................................................1-9 Test Bus.............................................................................................1-9 System Functional Blocks ......................................................................1-9 Alternate Master ................................................................................1-9 ColdFire2/2M .....................................................................................1-9 I-Cache Data Array ..........................................................................1-10 I-Cache Tag Array ...........................................................................1-10 Master Bus Arbiter (MARB) .............................................................1-10 ROM Array.......................................................................................1-11 Slave Modules .................................................................................1-11 SRAM Array.....................................................................................1-11 System Bus Controller (SBC) ..........................................................1-11 Programming Model ..................................................................................1-11 Integer Unit User Programming Model .................................................1-11 Data Registers (D0 - D7) ................................................................1-12 Address Registers (A0 - A6) ...........................................................1-12 Stack Pointer (A7,SP)......................................................................1-12 Program Counter (PC).....................................................................1-12 Condition Code Register (CCR) ......................................................1-12 MAC Unit User Programming Model ....................................................1-13 Accumulator (ACC)..........................................................................1-14 Mask Register (MASK) ....................................................................1-14 MAC Status Register (MACSR).......................................................1-14 Supervisor Programming Model ...........................................................1-14 MOTOROLA ColdFire2/2M User's Manual vii TABLE OF CONTENTS (Continued) Paragraph Number 1.4.3.1 1.4.3.2 1.4.3.3 1.4.3.4 1.4.3.5 1.4.3.6 1.5 1.6 1.6.1 1.6.2 1.7 1.8 Title Page Number Status Register (SR)........................................................................ 1-14 Cache Control Register (CACR)...................................................... 1-15 Access Control Registers (ACR0, ACR1)........................................ 1-15 Vector Base Register (VBR)............................................................ 1-15 ROM Base Address Register (ROMBAR0) ..................................... 1-15 SRAM Base Address Register (RAMBAR0).................................... 1-15 Integer Data Formats................................................................................. 1-16 Organization of Data in Registers.............................................................. 1-16 Organization of Integer Data Formats in Registers .............................. 1-16 Organization of Integer Data Formats in Memory ................................ 1-17 Addressing Mode Summary ...................................................................... 1-18 Instruction Set Summary ........................................................................... 1-19 Section 2 Signal Summary 2.1 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.17 2.3 2.3.1 2.3.2 2.4 2.4.1 viii Introduction.................................................................................................. 2-1 Master Bus Signals...................................................................................... 2-3 68K Interrupt Acknowledge Mode Enable (IACK_68K).......................... 2-3 Master Address Bus (MADDR[31:0]) ..................................................... 2-3 Master Arbiter Control (MARBC[1:0])..................................................... 2-3 Master Freeze (MFRZB) ........................................................................ 2-4 Master Kill (MKILLB) .............................................................................. 2-4 Master Read Data Bus (MRDATA[31:0]) ............................................... 2-4 Master Read Data Input Enable (MIE) ................................................... 2-4 Master Read/Write (MRWB)................................................................... 2-4 Master Reset (MRSTB) .......................................................................... 2-4 Master Size (MSIZ[1:0]) ......................................................................... 2-4 Master Transfer Acknowledge (MTAB) .................................................. 2-5 Master Transfer Error Acknowledge (MTEAB)....................................... 2-5 Master Transfer Modifier (MTM[2:0])...................................................... 2-5 Master Transfer Start (MTSB) ................................................................ 2-6 Master Transfer Type (MTT[1:0]) ........................................................... 2-6 Master Write Data Bus (MWDATA[31:0])............................................... 2-6 Master Write Data Output Enable (MWDATAOE).................................. 2-6 General Control Signals .............................................................................. 2-6 Clock (CLK) ............................................................................................ 2-6 Interrupt Priority Level (IPLB[2:0]) .......................................................... 2-6 Integrated Memory Signals.......................................................................... 2-7 Instruction Cache Signals....................................................................... 2-7 ColdFire2/2M User's Manual MOTOROLA TABLE OF CONTENTS (Continued) Paragraph Number 2.4.1.1 2.4.1.2 2.4.1.3 2.4.1.4 2.4.1.5 2.4.1.6 2.4.1.7 2.4.1.8 2.4.1.9 2.4.1.10 2.4.1.11 2.4.1.12 2.4.2 2.4.2.1 2.4.2.2 2.4.2.3 2.4.2.4 2.4.2.5 2.4.3 2.4.3.1 2.4.3.2 2.4.3.3 2.4.3.4 2.4.3.5 2.4.3.6 2.4.3.7 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.6 2.6.1 Title Page Number Instruction Cache Address Bus (ICH_ADDR[14:2])...........................2-7 Instruction Cache Data Chip-Select (ICHD_CSB) .............................2-7 Instruction Cache Data Input Bus (ICHD_DI[31:0]) ...........................2-7 Instruction Cache Data Output Bus (ICHD_DO[31:0]).......................2-7 Instruction Cache Data Strobe (ICHD_ST)........................................2-7 Instruction Cache Data Read/Write (ICHD_RWB).............................2-7 Instruction Cache Size (ICH_SZ[2:0])................................................2-8 Instruction Cache Tag Chip-Select (ICHT_CSB)...............................2-8 Instruction Cache Tag Input Bus (ICHT_DI[31:8]) .............................2-8 Instruction Cache Tag Output Bus (ICHT_DO[31:8]) ........................2-8 Instruction Cache Tag Strobe (ICHT_ST)..........................................2-9 Instruction Cache Tag Read/Write (ICHT_RWB) ..............................2-9 Integrated ROM Signals .........................................................................2-9 ROM Address Bus (ROM_ADDR[14:2]) ............................................2-9 ROM Data Output Bus (ROM_DO[31:0])...........................................2-9 ROM Enable (ROM_ENB[1:0]) ..........................................................2-9 ROM Size (ROM_SZ[2:0]) .................................................................2-9 ROM Valid (ROM_VLD)...................................................................2-10 Integrated SRAM Signals .....................................................................2-10 SRAM Address Bus (SRAM_ADDR[14:2]) ......................................2-10 SRAM Chip-Select (SRAM_CSB)....................................................2-10 SRAM Data Input Bus (SRAM_DI[31:0]) .........................................2-11 SRAM Data Output Bus (SRAM_DO[31:0]).....................................2-11 SRAM Size (SRAM_SZ[2:0]) ...........................................................2-11 SRAM Strobe (SRAM_ST[3:0]) .......................................................2-11 SRAM Read/Write (SRAM_RWB[3:0]) ............................................2-11 Debug Signals ...........................................................................................2-11 Break Point (BKPTB)............................................................................2-11 Debug Data (DDATA[3:0])....................................................................2-12 Development Serial Clock (DSCLK).....................................................2-12 Development Serial Input (DSI)............................................................2-12 Development Serial Output (DSO) .......................................................2-12 Processor Status (PST[3:0]).................................................................2-12 Test Signals ...............................................................................................2-12 Integrated Memory Test Signals...........................................................2-12 MOTOROLA ColdFire2/2M User's Manual ix TABLE OF CONTENTS (Continued) Paragraph Number 2.6.1.1 2.6.1.2 2.6.1.3 2.6.1.4 2.6.1.5 2.6.1.6 2.6.1.7 2.6.1.8 2.6.1.9 2.6.1.10 2.6.1.11 2.6.1.12 2.6.1.13 2.6.1.14 2.6.2 2.6.2.1 2.6.2.2 2.6.2.3 2.6.2.4 2.6.2.5 2.6.2.6 2.6.2.7 2.6.2.8 2.6.2.9 2.6.2.10 2.6.2.11 2.6.2.12 2.6.2.13 Title Page Number Test Address Bus (TEST_ADDR[14:2]) .......................................... 2-13 Test Control (TEST_CTRL) ............................................................. 2-13 Test IDATA Read (TEST_IDATA_RD) ............................................ 2-13 Test IDATA Write (TEST_IDATA_WRT) ......................................... 2-13 Test Instruction Cache Read Hit (TEST_RHIT)............................... 2-13 Test Invalidate Inhibit (TEST_IVLD_INH)........................................ 2-13 Test ITAG Write (TEST_ITAG_WRT).............................................. 2-13 Test KTA Mode Enable (TEST_KTA).............................................. 2-13 Test Mode Enable (TEST_MODE) .................................................. 2-13 Test SRAM Read (TEST_SRAM_RD) ............................................ 2-13 Test SRAM Write (TEST_SRAM_WRT).......................................... 2-13 Test Read (TEST_RD) .................................................................... 2-13 Test ROM Read (TEST_ROM_RD) ................................................ 2-13 Test Write Inhibit (TEST_WR_INH)................................................. 2-13 Scan Signal Description ....................................................................... 2-13 Scan Enable (SCAN_ENABLE)....................................................... 2-14 Scan Exercise Array (SCAN_XARRAY).......................................... 2-14 Scan Input (SCAN_IN[15:0]) ........................................................... 2-14 Scan Mode (SCAN_MODE) ............................................................ 2-14 Scan Output (SCAN_OUT[15:0])..................................................... 2-14 Scan Test Ring Clock (TR_CLK)..................................................... 2-14 Scan Test Ring Core Mode Enable (TR_CORE_EN) ..................... 2-14 Scan Test Ring Data Input 0 (TR_DI0)............................................ 2-14 Scan Test Ring Data Input 1 (TR_DI1)............................................ 2-14 Scan Test Ring Data Output 0 (TR_DO0) ....................................... 2-14 Scan Test Ring Data Output 1 (TR_DO1) ....................................... 2-14 Scan Test Ring Enable (TR_EN)..................................................... 2-14 Scan Test Ring Mode (TR_MODE) ................................................. 2-14 Section 3 Master Bus Operation 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 x Signal Description........................................................................................ 3-1 68K Interrupt Acknowledge Mode Enable (IACK_68K).......................... 3-1 Master Address Bus (MADDR[31:0]) ..................................................... 3-1 Master Arbiter Control (MARBC[1:0])..................................................... 3-1 Master Freeze (MFRZB) ........................................................................ 3-2 Master Kill (MKILLB) .............................................................................. 3-2 Master Read Data Bus (MRDATA[31:0]) ............................................... 3-2 Master Read Data Input Enable (MIE) ................................................... 3-2 Master Read/Write (MRWB)................................................................... 3-2 Master Reset (MRSTB) .......................................................................... 3-2 ColdFire2/2M User's Manual MOTOROLA TABLE OF CONTENTS (Continued) Paragraph Number 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.2 3.2.1 3.2.1.1 3.2.1.2 3.2.1.3 3.2.1.4 3.2.1.5 3.2.2 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.4 3.5 3.6 3.7 3.7.1 3.7.2 3.8 3.8.1 3.8.2 3.9 3.10 3.10.1 3.10.1.1 3.10.1.2 3.10.1.3 3.10.2 Title Page Number Master Size (MSIZ[1:0])..........................................................................3-2 Master Transfer Acknowledge (MTAB) ..................................................3-2 Master Transfer Error Acknowledge (MTEAB) .......................................3-3 Master Transfer Modifier (MTM[2:0])......................................................3-3 Master Transfer Start (MTSB) ................................................................3-3 Master Transfer Type (MTT[1:0]) ...........................................................3-3 Master Write Data Bus (MWDATA[31:0]) ...............................................3-4 Master Write Data Output Enable (MWDATAOE) ..................................3-4 Data Transfer Mechanism ...........................................................................3-4 Transfer Type Control Signals................................................................3-4 ColdFire2/2M Access.........................................................................3-4 Alternate Master Access....................................................................3-5 Emulator Mode Access......................................................................3-5 Interrupt Acknowledge Access ..........................................................3-5 CPU Space Access ...........................................................................3-5 Data Bus Requirements .........................................................................3-5 Data Transfers .............................................................................................3-6 Byte, Word, and Longword Read Transfers ...........................................3-6 Byte, Word, and Longword Write Transfers ...........................................3-9 Line Read Transfer...............................................................................3-11 Line Write Transfers .............................................................................3-14 Misaligned Operands.................................................................................3-18 Invalid Master Bus Cycles .........................................................................3-20 Pipeline Stalls ............................................................................................3-20 Interrupt Acknowledge Bus Cycles ............................................................3-21 Interrupt Acknowledge Bus Cycle (Terminated normally) ....................3-22 Spurious Interrupt Acknowledge Bus Cycle .........................................3-27 Master Bus Exception Control Cycles .......................................................3-27 Bus Errors.............................................................................................3-28 Fault-on-Fault Halt................................................................................3-29 Reset Operation.........................................................................................3-29 Master Bus Arbitration ...............................................................................3-30 Master Bus Arbitration Algorithm..........................................................3-30 Park on ColdFire2/2M......................................................................3-30 Park on Alternate Master .................................................................3-30 Park on Current Master ...................................................................3-31 Bus Arbitration Programming Model.....................................................3-31 Section 4 Exception Processing 4.1 Exception Processing Overview ..................................................................4-1 MOTOROLA ColdFire2/2M User's Manual xi TABLE OF CONTENTS (Continued) Paragraph Number 4.1.1 4.1.1.1 4.1.2 4.1.3 4.1.4 4.2 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.2.10 4.2.11 4.2.11.1 4.2.11.2 Title Page Number Exception Stack Frame Definition .......................................................... 4-3 Self-Aligning Stack ............................................................................ 4-4 Exception Vectors .................................................................................. 4-5 Multiple Exceptions ................................................................................ 4-6 Fault-on-Fault Halt.................................................................................. 4-6 Exceptions ................................................................................................... 4-7 Reset Exception ..................................................................................... 4-7 Access Error Exception .......................................................................... 4-7 Address Error Exception ........................................................................ 4-8 Illegal Instruction Exception.................................................................... 4-9 Privilege Violation Exception .................................................................. 4-9 Trace Exception ..................................................................................... 4-9 Unimplemented Opcode Exception........................................................ 4-9 Debug Interrupt .................................................................................... 4-10 Format Error Exceptions ...................................................................... 4-10 TRAP Instruction Exceptions................................................................ 4-10 Interrupt Exception ............................................................................... 4-10 Level Seven Interrupts..................................................................... 4-11 Spurious, Autovectored, and Uninitialized Interrupts....................... 4-12 Section 5 Integrated Memories 5.1 5.1.1 5.1.1.1 5.1.1.2 5.1.1.3 5.1.1.4 5.1.1.5 5.1.1.6 5.1.1.7 5.1.1.8 5.1.1.9 5.1.1.10 5.1.1.11 5.1.1.12 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 xii Instruction Cache......................................................................................... 5-1 Instruction Cache Signal Description ..................................................... 5-1 Instruction Cache Address Bus (ICH_ADDR[14:2]) .......................... 5-2 Instruction Cache Data Chip-Select (ICHD_CSB)............................. 5-2 Instruction Cache Data Input Bus (ICHD_DI[31:0]) ........................... 5-2 Instruction Cache Data Output Bus (ICHD_DO[31:0]) ...................... 5-2 Instruction Cache Data Strobe (ICHD_ST)........................................ 5-2 Instruction Cache Data Read/Write (ICHD_RWB) ............................ 5-3 Instruction Cache Size (ICH_SZ[2:0]) ............................................... 5-3 Instruction Cache Tag Chip-Select (ICHT_CSB)............................... 5-3 Instruction Cache Tag Input Bus (ICHT_DI[31:8])............................. 5-3 Instruction Cache Tag Output Bus (ICHT_DO[31:8]) ........................ 5-3 Instruction Cache Tag Strobe (ICHT_ST) ......................................... 5-4 Instruction Cache Tag Read/Write (ICHT_RWB) .............................. 5-4 Instruction Cache Physical Organization................................................ 5-4 Interaction With Other Modules.............................................................. 5-4 Cache Miss Fetch Algorithm/Line Fills ................................................... 5-4 Cacheability............................................................................................ 5-5 Invalidating Cache Entries...................................................................... 5-5 ColdFire2/2M User's Manual MOTOROLA TABLE OF CONTENTS (Continued) Paragraph Number 5.1.7 5.1.8 5.1.9 5.2 5.2.1 5.3 5.3.1 5.3.1.1 5.3.1.2 5.3.1.3 5.3.1.4 5.3.1.5 5.3.2 5.4 5.4.1 5.4.1.1 5.4.1.2 5.4.1.3 5.4.1.4 5.4.1.5 5.4.1.6 5.4.1.7 5.4.2 Title Page Number Cache Coherency...................................................................................5-6 Reset ......................................................................................................5-6 Instruction Cache Programming Model ..................................................5-6 Access Control Registers ............................................................................5-8 ACR Programming Model.......................................................................5-8 ROM Module..............................................................................................5-10 ROM Signal Description .......................................................................5-10 ROM Address Bus (ROM_ADDR[14:2]) ..........................................5-11 ROM Data Output Bus (ROM_DO[31:0]).........................................5-11 ROM Enable (ROM_ENB[1:0]) ........................................................5-11 ROM Size (ROM_SZ[2:0]) ...............................................................5-12 ROM Valid (ROM_VLD)...................................................................5-12 ROM Programming Model....................................................................5-12 SRAM Module............................................................................................5-14 SRAM Signal Description .....................................................................5-14 SRAM Address Bus (SRAM_ADDR[14:2]) ......................................5-15 SRAM Chip-Select (SRAM_CSB)....................................................5-16 SRAM Data Input Bus (SRAM_DI[31:0]) .........................................5-16 SRAM Data Output Bus (SRAM_DO[31:0]).....................................5-16 SRAM Size (SRAM_SZ[2:0]) ...........................................................5-16 SRAM Strobe (SRAM_ST[3:0]) .......................................................5-16 SRAM Read/Write (SRAM_RWB[3:0]) ............................................5-16 SRAM Programming Model..................................................................5-16 Section 6 Multiply-Accumulate Unit 6.1 6.2 6.2.1 6.2.2 6.2.3 6.3 6.4 6.5 Introduction ..................................................................................................6-1 MAC Programming Model ...........................................................................6-2 Accumulator (ACC).................................................................................6-2 MAC Status Register (MACSR)..............................................................6-2 Mask Register (MASK) ...........................................................................6-3 Shifting Operations ......................................................................................6-4 Overflow Mode.............................................................................................6-4 MAC Instruction Set Summary ....................................................................6-5 Section 7 Debug Support 7.1 7.1.1 7.1.2 Signal Description........................................................................................7-1 Break Point (BKPTB)..............................................................................7-1 Debug Data (DDATA[3:0])......................................................................7-2 MOTOROLA ColdFire2/2M User's Manual xiii TABLE OF CONTENTS (Continued) Paragraph Number Title Page Number 7.1.3 Development Serial Clock (DSCLK)....................................................... 7-2 7.1.4 Development Serial Input (DSI).............................................................. 7-2 7.1.5 Development Serial Output (DSO) ......................................................... 7-2 7.1.6 Processor Status (PST[3:0])................................................................... 7-2 7.2 Real-Time Trace.......................................................................................... 7-2 7.2.1 Processor Status Signal Encoding ......................................................... 7-3 7.2.1.1 Continue Execution (PST = $0) ......................................................... 7-3 7.2.1.2 Begin Execution of an Instruction (PST = $1).................................... 7-3 7.2.1.3 Entry into User Mode (PST = $3) ...................................................... 7-3 7.2.1.4 Begin Execution of PULSE or WDDATA instructions (PST = $4) ..... 7-3 7.2.1.5 Begin Execution of Taken Branch (PST = $5)................................... 7-4 7.2.1.6 Begin Execution of RTE Instruction (PST = $7) ................................ 7-5 7.2.1.7 Begin Data Transfer (PST = $8 - $A) ................................................ 7-5 7.2.1.8 Exception Processing (PST = $C) ..................................................... 7-5 7.2.1.9 Emulator-Mode Exception Processing (PST = $D) ........................... 7-5 7.2.1.10 Processor Stopped (PST = $E) ......................................................... 7-5 7.2.1.11 Processor Halted (PST = $F) ............................................................ 7-5 7.3 Background Debug Mode (BDM) ................................................................ 7-5 7.3.1 CPU Halt ................................................................................................ 7-6 7.3.2 BDM Serial Interface .............................................................................. 7-7 7.3.2.1 Receive Packet Format ..................................................................... 7-8 7.3.2.2 Transmit Packet Format .................................................................... 7-9 7.3.3 BDM Command Set ............................................................................... 7-9 7.3.3.1 BDM Command Set Summary .......................................................... 7-9 7.3.3.2 ColdFire BDM Commands............................................................... 7-10 7.3.3.3 Command Sequence Diagram ........................................................ 7-11 7.3.3.4 Command Set Descriptions............................................................. 7-12 7.3.3.4.1 Read A/D Register (RAREG/RDREG) ....................................... 7-13 7.3.3.4.2 Write A/D Register (WAREG/WDREG)...................................... 7-13 7.3.3.4.3 Read Memory Location (READ)................................................. 7-14 7.3.3.4.4 Write Memory Location (WRITE) ............................................... 7-16 7.3.3.4.5 Dump Memory Block (DUMP).................................................... 7-17 7.3.3.4.6 Fill Memory Block (FILL) ............................................................ 7-19 7.3.3.4.7 Resume Execution (GO) ............................................................ 7-21 7.3.3.4.8 No Operation (NOP)................................................................... 7-21 7.3.3.4.9 Read Control Register (RCREG) ............................................... 7-22 7.3.3.4.10 Write Control Register (WCREG)............................................... 7-23 7.3.3.4.11 Read Debug Module Register (RDMREG) ................................ 7-24 7.3.3.4.12 Write Debug Module Register (WDMREG)................................ 7-25 7.3.3.4.13 Unassigned Opcodes................................................................. 7-25 7.4 Real-Time Debug Support......................................................................... 7-26 7.4.1 Theory of Operation ............................................................................. 7-26 xiv ColdFire2/2M User's Manual MOTOROLA TABLE OF CONTENTS (Continued) Paragraph Number 7.4.1.1 7.4.1.2 7.4.2 7.4.2.1 7.4.2.2 7.4.2.3 7.4.2.4 7.4.2.5 7.4.2.6 7.4.3 7.4.4 7.4.5 Title Page Number Emulator Mode ................................................................................7-27 Reuse of Debug Module Hardware .................................................7-28 Programming Model .............................................................................7-28 Address Breakpoint Registers (ABLR, ABHR) ................................7-29 Address Attribute Register (AATR)..................................................7-30 Program Counter Breakpoint Register (PBR, PBMR) .....................7-32 Data Breakpoint Register (DBR, DBMR) .........................................7-33 Trigger Definition Register (TDR) ....................................................7-34 Configuration/Status Register (CSR)...............................................7-36 Concurrent BDM and Processor Operation..........................................7-39 Motorola Recommended BDM Pinout ..................................................7-39 Differences Between the ColdFire2/2M BDM and CPU32 BDM ..........7-40 Section 8 Test Operation 8.1 8.1.1 8.1.1.1 8.1.1.2 8.1.1.3 8.1.1.4 8.1.1.5 8.1.1.6 8.1.1.7 8.1.1.8 8.1.1.9 8.1.1.10 8.1.1.11 8.1.1.12 8.1.1.13 8.1.1.14 8.1.2 8.1.3 8.1.4 8.1.4.1 8.1.4.2 8.1.5 8.1.5.1 8.1.5.2 8.1.6 8.1.7 Integrated Memory Testing..........................................................................8-1 Test Bus Signal Description ...................................................................8-1 Test Address Bus (TEST_ADDR[14:2]).............................................8-1 Test Control (TEST_CTRL) ...............................................................8-1 Test IDATA Read (TEST_IDATA_RD) ..............................................8-1 Test IDATA Write (TEST_IDATA_WRT) ...........................................8-2 Test Instruction Cache Read Hit (TEST_RHIT).................................8-2 Test Invalidate Inhibit (TEST_IVLD_INH) ..........................................8-2 Test ITAG Write (TEST_ITAG_WRT)................................................8-2 Test KTA Mode Enable (TEST_KTA) ................................................8-2 Test Mode Enable (TEST_MODE) ....................................................8-2 Test SRAM Read (TEST_SRAM_RD)...............................................8-2 Test SRAM Write (TEST_SRAM_WRT)............................................8-2 Test Read (TEST_RD) ......................................................................8-2 Test ROM Read (TEST_ROM_RD)...................................................8-2 Test Write Inhibit (TEST_WR_INH) ...................................................8-2 Theory of Operation................................................................................8-2 Test Mode...............................................................................................8-3 Instruction Cache Tag RAM Testing.......................................................8-3 Instruction Cache Tag RAM Write Function ......................................8-3 Instruction Cache Tag RAM Read Function ......................................8-5 Instruction Cache Data RAM Testing .....................................................8-6 Instruction Cache Data RAM Write Function .....................................8-6 Instruction Cache Data RAM Read Function.....................................8-8 Instruction Cache KTA Mode Testing.....................................................8-9 ROM Testing ........................................................................................8-11 MOTOROLA ColdFire2/2M User's Manual xv TABLE OF CONTENTS (Continued) Paragraph Number 8.1.7.1 8.1.8 8.1.8.1 8.1.8.2 8.2 8.2.1 8.2.1.1 8.2.1.2 8.2.1.3 8.2.1.4 8.2.1.5 8.2.1.6 8.2.1.7 8.2.1.8 8.2.1.9 8.2.1.10 8.2.1.11 8.2.1.12 8.2.1.13 8.2.2 8.3 8.4 Title Page Number ROM Read Function........................................................................ 8-11 SRAM Testing ...................................................................................... 8-13 SRAM Write Function ...................................................................... 8-13 SRAM Read Function...................................................................... 8-15 Scan Testing.............................................................................................. 8-16 Scan Signal Description ....................................................................... 8-16 Scan Enable (SCAN_ENABLE)....................................................... 8-16 Scan Exercise Array (SCAN_XARRAY).......................................... 8-16 Scan Input (SCAN_IN[15:0]) ........................................................... 8-16 Scan Mode (SCAN_MODE) ............................................................ 8-17 Scan Output (SCAN_OUT[15:0])..................................................... 8-17 Scan Test Ring Clock (TR_CLK)..................................................... 8-17 Scan Test Ring Core Mode Enable (TR_CORE_EN) ..................... 8-17 Scan Test Ring Data Input 0 (TR_DI0)............................................ 8-17 Scan Test Ring Data Input 1 (TR_DI1)............................................ 8-17 Scan Test Ring Data Output 0 (TR_DO0) ....................................... 8-17 Scan Test Ring Data Output 1 (TR_DO1) ....................................... 8-17 Scan Test Ring Enable (TR_EN)..................................................... 8-17 Scan Test Ring Mode (TR_MODE) ................................................. 8-17 Test Ring .............................................................................................. 8-17 Burn-In Testing .......................................................................................... 8-18 Data Retention Testing.............................................................................. 8-18 Section 9 Instruction Execution Timing 9.1 9.2 9.3 9.4 9.5 9.6 9.7 Timing Assumptions .................................................................................... 9-1 MOVE Instruction Execution Times............................................................. 9-2 Standard One-Operand Instruction Execution Times.................................. 9-4 Standard Two-Operand Instruction Execution Times.................................. 9-5 Miscellaneous Instruction Execution Times................................................. 9-7 MAC Instruction Execution Timing .............................................................. 9-8 Branch Instruction Execution Times ............................................................ 9-8 Section 10 Electrical Chacteristics 10.1 10.1.1 10.1.2 10.1.3 10.1.4 xvi Definitions of Specifications....................................................................... 10-1 Current ................................................................................................. 10-1 Voltage ................................................................................................. 10-1 Capacitance ......................................................................................... 10-2 AC Switching Parameters and Waveforms .......................................... 10-2 ColdFire2/2M User's Manual MOTOROLA TABLE OF CONTENTS (Continued) Paragraph Number 10.2 Title Page Number ColdFire2 Data Sheet ................................................................................10-6 Appendix A Register Summary A.1 A.2 Register Access Methods ........................................................................... A-1 Register Formats ........................................................................................ A-2 Appendix B New MAC Instructions B.1 B.2 B.3 B.4 Enhanced Integer Multiply Instructions....................................................... B-1 New MAC Instructions ................................................................................ B-1 New Register Instructions......................................................................... B-12 Operation Code Map ................................................................................ B-22 MOTOROLA ColdFire2/2M User's Manual xvii LIST OF ILLUSTRATIONS Figure Number 1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-9 1-10 1-11 1-12 2-1 3-1 3-2 3-3 3-4 3-5 3-6 3-7 3-8 3-9 3-10 3-11 3-12 3-13 3-14 3-15 3-16 3-17 3-18 4-1 4-2 5-1 5-2 5-3 5-4 5-5 Title Page Number FlexCore Integrated Processor Typical Die Layout...........................................1-3 Design System Overview ..................................................................................1-7 ColdFire2/2M System Diagram .........................................................................1-8 ColdFire2/2M Block Diagram ..........................................................................1-10 Integer Unit User Programming Model............................................................1-12 Condition Code Register (CCR)......................................................................1-13 MAC Unit User Programming Model...............................................................1-13 Supervisor Programming Model......................................................................1-14 Status Register (SR) .......................................................................................1-15 Organization of Integer Data Formats in Data Registers ................................1-16 Organization of Integer Data Formats in Address Registers...........................1-17 Memory Operand Addressing .........................................................................1-18 ColdFire2/2M Detailed Block Diagram ..............................................................2-1 Byte, Word, and Longword Read Transfer Flowchart .......................................3-7 Normal Transfer (without Wait States) ..............................................................3-8 Byte, Word, and Longword Write Transfer Flowchart .......................................3-9 Normal Write Transfer (with wait states) .........................................................3-10 Line Read Transfer Flowchart.........................................................................3-12 Line Read Transfer (without wait states).........................................................3-13 Line Write Transfer Flowchart .........................................................................3-15 Line Write Transfer (without wait states).........................................................3-16 Line Write Transfer (with wait states)..............................................................3-17 Example of a Misaligned Longword Transfer ................................................3-18 Example of a Misaligned Word Transfer .........................................................3-18 Misaligned Word Read Transfer .....................................................................3-19 Example Master Bus Wait State .....................................................................3-21 Interrupt Acknowledge Bus Cycle Flowchart...................................................3-23 ColdFire Mode Interrupt Acknowledge Bus Cycle...........................................3-24 68K Mode Interrupt Acknowledge Bus Cycle..................................................3-26 Bus Exception Cycle .......................................................................................3-29 Initial Power-On Reset ....................................................................................3-30 Exception Processing Flowchart .......................................................................4-2 Exception Stack Frame Form............................................................................4-3 Example 8 Kbyte Instruction Cache Interface Diagram ....................................5-2 Cache Control Register (CACR) .......................................................................5-6 Access Control Register (ACR0, ACR1) ...........................................................5-9 Example 8 Kbyte ROM Interface Diagram ......................................................5-11 ROM Base Address Register (ROMBAR0).....................................................5-12 MOTOROLA ColdFire2/2M User's Manual xix LIST OF ILLUSTRATIONS (Continued) Figure Number 5-6 5-7 6-1 6-2 6-3 7-1 7-2 7-3 7-4 7-5 7-6 7-7 7-8 7-9 7-10 7-11 7-12 7-13 7-14 7-15 7-16 7-17 7-18 8-1 8-2 8-3 8-4 8-5 8-6 8-7 8-8 10-1 10-2 10-3 10-4 10-5 10-6 10-7 A-1 A-2 A-3 A-4 xx Title Page Number Example 8 Kbyte SRAM Interface Diagram.................................................... 5-15 SRAM Base Address Register (RAMBAR0) ................................................... 5-17 MAC Flow Diagram........................................................................................... 6-2 MAC Status Register (MACSR) ........................................................................ 6-3 MAC Mask Register (MASK) ............................................................................ 6-4 Processor/Debug Module Interface .................................................................. 7-1 Example PST Diagram ..................................................................................... 7-4 BDM Serial Transfer ......................................................................................... 7-8 BDM Signal Sampling ....................................................................................... 7-8 Receive BDM Packet ........................................................................................ 7-8 Transmit BDM Packet ....................................................................................... 7-9 Command Sequence Diagram........................................................................ 7-12 Debug Programming Model ............................................................................ 7-29 Address Breakpoint Low Register (ABLR)...................................................... 7-29 Address Breakpoint High Register (ABHR) .................................................... 7-30 Address Attribute Register (AATR) ................................................................. 7-30 Program Counter Breakpoint Register (PBR) ................................................. 7-32 Program Counter Breakpoint Mask Register (PBMR) .................................... 7-33 Data Breakpoint Register (DBR)..................................................................... 7-33 Data Breakpoint Mask Register (DBMR) ........................................................ 7-33 Trigger Definition Register (TDR) ................................................................... 7-34 Configuration/Status Register (CSR) .............................................................. 7-37 Recommended BDM Connector ..................................................................... 7-40 Test Instruction Cache Tag Write Cycles.......................................................... 8-4 Test Instruction Cache Tag Read Cycles ......................................................... 8-5 Test Instruction Cache Data Write Cycles ........................................................ 8-7 Test Instruction Cache Data Read Cycles ........................................................ 8-8 KTA Mode Cycles ........................................................................................... 8-10 Test ROM Read Cycles .................................................................................. 8-12 Test SRAM Write Cycles ................................................................................ 8-14 Test SRAM Read Cycles ................................................................................ 8-15 tPLH and tPHL Measurements .......................................................................... 10-2 tr and tf Measurements ................................................................................... 10-2 Internal Cell Three-State Measurements and Example Circuits ..................... 10-3 trec Recovery Time.......................................................................................... 10-4 tsu and th Measurements Between Data and a Control Signal ....................... 10-4 tsu and th Measurements Between Data and Clock Signals ........................... 10-4 Switching Waveforms Showing tw(L) and tw(H) Measurements ....................... 10-5 Address Attribute Register (AATR) ...................................................................A-2 Address Breakpoint High Register (ABHR) ......................................................A-2 Address Breakpoint Low Register (ABLR)........................................................A-2 Access Control Register (ACR0, ACR1)...........................................................A-3 ColdFire2/2M User's Manual MOTOROLA LIST OF ILLUSTRATIONS (Continued) Figure Number A-5 A-6 A-7 1-8 1-9 1-10 1-11 1-12 1-13 A-14 A-15 A-16 A-17 Title Page Number Cache Control Register (CACR) ...................................................................... A-3 Condition Code Register (CCR)....................................................................... A-3 Configuration/Status Register (CSR) ............................................................... A-4 Data Breakpoint Mask Register (DBMR) ......................................................... A-4 Data Breakpoint Register (DBR) ...................................................................... A-4 MAC Status Register (MACSR) ....................................................................... A-4 MAC Mask Register (MASK)............................................................................ A-5 Program Counter Breakpoint Mask Register (PBMR)...................................... A-5 Program Counter Breakpoint Register (PBR) .................................................. A-5 SRAM Base Address Register (RAMBAR0) .................................................... A-5 ROM Base Address Register (ROMBAR0)...................................................... A-6 Status Register (SR) ........................................................................................ A-6 Trigger Definition Register (TDR)..................................................................... A-6 MOTOROLA ColdFire2/2M User's Manual xxi LIST OF TABLES Table Number 1-1 1-2 1-3 1-4 1-5 2-1 2-2 2-3 2-4 2-5 2-6 2-7 2-8 2-9 2-10 2-11 2-12 2-13 3-1 3-2 3-3 3-4 3-5 3-6 3-7 3-8 3-9 4-1 4-2 4-3 4-4 5-1 5-2 5-3 5-4 5-5 5-6 5-7 Title Page Number MOVEC Register Map.....................................................................................1-14 Integer Data Formats ......................................................................................1-16 Effective Addressing Modes and Categories ..................................................1-19 Notational Conventions ...................................................................................1-19 Instruction Set Summary.................................................................................1-21 Signal Summary................................................................................................2-2 Master Arbiter Control Encoding .......................................................................2-4 Master Bus Transfer Size Encoding..................................................................2-5 Master Bus Transfer Modifier Encoding............................................................2-5 Master Bus Transfer Type Encoding.................................................................2-6 Interrupt Levels and Mask Values.....................................................................2-7 Cache Configuration Encoding .........................................................................2-8 Valid Tag RAM Data Signals.............................................................................2-8 Valid ROM Address Bits....................................................................................2-9 ROM Configuration Encoding .........................................................................2-10 Valid SRAM Address Bits................................................................................2-10 SRAM Configuration Encoding .......................................................................2-11 Processor Status Encoding.............................................................................2-12 Master Arbiter Control Encoding .......................................................................3-1 Master Bus Transfer Size Encoding..................................................................3-2 Master Bus Transfer Modifier Encoding............................................................3-3 Master Bus Transfer Type Encoding.................................................................3-4 MRDATA Requirements for Read Transfers.....................................................3-5 MWDATA Bus Requirements for Write Transfers.............................................3-6 Allowable Line Access Patterns ......................................................................3-11 Memory Alignment Cycles ..............................................................................3-19 MTAB and MTEAB Assertion Results.............................................................3-27 Stack Pointer Alignment....................................................................................4-5 Exception Vector Assignments .........................................................................4-5 Exception Priority Groups .................................................................................4-6 Interrupt Levels and Mask Values...................................................................4-11 Cache Configuration Encoding .........................................................................5-3 Valid Tag RAM Data Signals.............................................................................5-3 Initial Fetch Offset and CLNF Bits.....................................................................5-5 Cache Line Fill Encoding ..................................................................................5-8 Valid ROM Address Bits..................................................................................5-11 ROM Configuration Encoding .........................................................................5-12 Valid ROM Base Address Bits ........................................................................5-13 MOTOROLA ColdFire2/2M User's Manual xxiii LIST OF TABLES (Continued) Figure Number 5-8 5-9 5-10 6-1 6-2 6-3 7-1 7-2 7-3 7-4 7-5 7-6 7-7 7-8 7-9 7-10 7-11 9-1 9-2 9-3 9-4 9-5 9-6 9-7 9-8 9-9 A-1 xxiv Title Page Number Valid SRAM Address Bits ............................................................................... 5-15 SRAM Configuration Encoding ....................................................................... 5-16 Valid SRAM Base Address Bits ...................................................................... 5-17 Mask Addressing Mode .................................................................................... 6-4 Accumulator Result in Saturation Mode............................................................ 6-5 MAC Instruction Set Summary.......................................................................... 6-6 Processor Status Encoding .............................................................................. 7-2 CPU-Generated Message Encoding ................................................................ 7-9 BDM Command Summary .............................................................................. 7-10 BDM Size Field Encoding ............................................................................... 7-11 Control Register Map ...................................................................................... 7-22 Definition of DRc Encoding - Read ................................................................. 7-24 Definition of DRc Encoding - Write ................................................................. 7-25 DDATA, CSR[31:28] Breakpoint Response.................................................... 7-26 Shared BDM/Breakpoint Hardware................................................................. 7-28 Misaligned Data Operand References............................................................ 7-34 BDM Connector Correlation............................................................................ 7-40 Misaligned Operand References ...................................................................... 9-2 Move Byte and Word Execution Times............................................................. 9-3 Move Long Execution Times ............................................................................ 9-3 One Operand Instruction Execution Times ....................................................... 9-4 Two Operand Instruction Execution Times ....................................................... 9-5 Miscellaneous Instruction Execution Times ...................................................... 9-7 MAC Instruction Execution Times..................................................................... 9-8 General Branch Instruction Execution Times.................................................... 9-8 BRA, BCC Instruction Execution Times............................................................ 9-8 Register Summary ............................................................................................A-1 ColdFire2/2M User's Manual MOTOROLA LIST OF ACRONYMS Acronym Definition PR EL IM IN AR Y BCD ........................................................ binary coded decimal BDM........................................................ background debug mode CAD ........................................................ computer-aided design CPU ........................................................ central processing unit DSP ........................................................ digital signal processing ET ........................................................... execution time IACK ....................................................... interrupt acknowledge IFP .......................................................... instruction fetch pipeline LRU......................................................... least recently used LSB ......................................................... least significant bit LSW ........................................................ least significant word MAC........................................................ multiply-accumulate MARB ..................................................... master bus arbiter MSB ........................................................ most significant bit MSW ....................................................... most significant word OEP ........................................................ operand execution pipeline RISC ....................................................... reduced instruction set computer ROM ....................................................... read-only memory SBC ........................................................ system bus controller SRAM ..................................................... static random access memory TA ........................................................... transfer acknowledge TS ........................................................... transfer start MOTOROLA ColdFire2/2M User's Manual xxv SECTION 1 OVERVIEW This is a summary of the use and operation of the FlexCore ColdFire(R) microprocessor core (referred to as the ColdFire2) and FlexCore ColdFire microprocessor core with the MultiplyAccumulate unit (MAC), referred to as the ColdFire2M. It also contains a detailed set of timing and electrical specifications. All references to ColdFire2/2M will apply to both the ColdFire2 and the ColdFire2M devices. Refer to the ColdFire Programmer's Reference Manual Rev 1.0 (MCF5200PRM/AD) for detailed information on the operation of the instruction set and addressing modes. The ColdFire2/2M is part of the FlexCore Program, a semicustom, standard-cell based design program. Based on the concept of variable-length Reduced Instruction Set Computer (RISC) technology, ColdFire combines the architectural simplicity of conventional 32-bit RISC with a memory-saving, variable-length instruction set. In the FlexCore program, highvolume manufacturers can create their own integrated microprocessor containing a core processor (such as the ColdFire2/2M) and their own proprietary technology. A FlexCore integrated processor allows significant reductions in component count, power consumption, board space, and cost--resulting in higher system reliability and performance. The main features of the ColdFire2/2M processor include: * 32-bit address bus which can directly address up to 4 Gbytes * 32-bit data bus * Variable-length RISC * Optimized instruction set for high-level language constructs * Sixteen general-purpose 32-bit data- and address- registers * Multiply Accumulate (MAC) unit for DSP applications (ColdFire2M only) * Supervisor/user modes for system protection * Vector-base register to relocate exception-vector table * Special core interfacing signals for integrated memories * Full debug support The ColdFire2/2M has 32-bit address and data busses. The 32-bit address bus allows direct addressing of up to 4 Gbytes. A misalignment unit provides support for misaligned data accesses, and an optional bus arbitration unit provides support for additional bus masters. The ColdFire2/2M also supports an integrated instruction cache, SRAM, and ROM (maximum of 32 Kbyte each.) MOTOROLA ColdFire2/2M User's Manual 1-1 Overview The ColdFire2/2M supports a subset of the 68000 instruction set, and the ColdFire2M has the added functionality of a Multiply Accumulate (MAC) unit for DSP applications. The removed instructions include binary coded decimal, bit field, logical rotate, decrement and branch, integer division, and integer multiply with a 64-bit result. In addition, only the twelve addressing modes supported by the 68000 are supported. User-mode code developed for the ColdFire2 processor will run unchanged on 68020, 68030, 68040, and 68060 processors. The new MAC instructions on the ColdFire2M processor will not run on other processors. A complete debug module is integrated into the ColdFire2/2M. This unit provides real-time trace, background debug mode, and real-time debug support. This includes a parallel processor status port, a subset of the background debug mode (BDM) functionality found on Motorola's 683xx family of parts, and real-time breakpoint capability. This built-in debug support results in a standard debug interface to established tools for all ColdFire-based processors. 1.1 FLEXCORE INTEGRATED PROCESSORS The FlexCore design methodology allows designers of high-volume digital systems and third-party technology providers to place their proprietary circuitry on-chip with a Motorola microprocessor core. By using FlexCore, a designer can reduce the total system cost, component count, and power consumption while providing higher performance and greater reliability. Custom logic, memory, and peripheral modules can be added to a core processor to produce the most cost-effective solution for a designer's system. Core processors provide special power-management features such as 5 V, 3.3 V, and static operation. The 68000 family of processors have a proven architecture with a broad base of application and system software support, including real-time kernels, operating systems, and compilers, in addition to a wide range of tools to support software development. In the future, additional processing architectures will be included in the FlexCore program, including PowerPC and Digital Signal Processing (DSP). Figure 1-1 shows a typical die layout of a FlexCore integrated processor. 1-2 ColdFire2/2M User's Manual MOTOROLA Overview CUSTOMER-DESIGNED LOGIC SPECIAL-FUNCTION OR MEMORY BLOCK FLEXCORE FAMILY PROCESSOR CORE SPECIAL FUNCTION OR MEMORY BLOCK Figure 1-1. FlexCore Integrated Processor Typical Die Layout Complete product lines can be created using FlexCore by implementing one base design using a variety of core processors. Designers already familiar with 680x0 Family design can easily migrate to FlexCore processors as the core processors use similar interfaces. Additionally, many peripheral modules and memory elements are available for integration. Motorola has developed a complete design system for the customer that includes both a broad cell-based library and effective Computer-Aided Design (CAD) tools. By building on Motorola's proven 680x0 microprocessor architecture and superior manufacturing capabilities, FlexCore offers designers the best path to higher system integration. FlexCore custom processors are ideal for: * High-volume users of 8-, 16-, and 32-bit integrated solutions requiring higher system performance whose needs are not met by standard 68300 Family devices. * Designers of high-volume applications who need to reduce cost, space, and/or power consumption. * Third-party technology providers who want to deliver their proprietary applicationspecific technology to a worldwide marketplace. To develop a solution that best suits system requirements in the shortest time frame, integrated processor design is performed by the designer using a methodology created, tested, and documented by Motorola. The resulting netlist is then laid out by Motorola, verified, and fabricated in silicon. This enables FlexCore integrated processors to be produced quickly and cost-effectively, with the resulting device integrating many of the discrete functions needed in the final system. To implement the application-specific logic, the designer uses Motorola's standard-cell library. This library offers an extensive range of design elements, memory configurations, and an expanding array of peripheral modules. Each cell in the library has been designed MOTOROLA ColdFire2/2M User's Manual 1-3 Overview for optimum size, power, and performance. The added flexibility of high-speed, high-density cells allows the designer to achieve the most cost-effective solution while satisfying critical timing requirements. The standard cell library has been thoroughly characterized and maintained to ensure a smooth transition from a simulated design to working silicon. If both Motorola and the customer have the desire, a custom part may also become a standard product. Standard products are sold on the open market, allowing costs to be spread over additional units, resulting in lower component prices for high-volume users. Third-party technology providers can use the same methodology to combine their application-specific systems expertise with a core processor. The resulting device is manufactured by Motorola and can be delivered to the marketplace through either the technologist's or Motorola's marketing and sales channels. Refer to the Design System User's Guide for Semicustom & FlexCore for more information on the FlexCore design methodology. 1.1.1 FlexCore Advantages Developers face challenges in reducing product cost. By incorporating user-designed logic and Motorola-supplied functions into a single FlexCore processor, a system designer can realize significant savings in cost, power consumption, board space, and pin count. The equivalent functionality can easily require 20 separate components. Each component might have 16-64 pins, totaling over 350 connections. Each connection is a candidate for a bad solder joint or misrouted trace. Each component is another part to qualify, purchase, inventory, and maintain. Each component requires a share of the printed circuit board. Each component draws power--often to drive large buffers and circuit board traces to get signals to another chip. Each component must be individually placed and attached to a printed circuit board. The signals between the core processor unit and a peripheral might not be compatible nor run from the same clock, requiring time delays or other special design considerations. In a FlexCore integrated processor, the major functions and glue logic are all properly connected internally, timed with the same clock, and fully tested. Only essential signals are brought out to pins. The processor is then assembled and tested in a surface-mount package for the smallest possible footprint. 1.1.2 FlexCore Module Types The three types of FlexCore modules are: * Hard Module -- -- -- -- Not alterable Laid out Has a technology file containing timing data Has a defined test scheme * Soft Module -- Netlist -- Not alterable other than by clock tree insertion 1-4 ColdFire2/2M User's Manual MOTOROLA Overview -- Not laid out -- Has a defined test scheme -- Simulation test fixture is provided * Parameterizable Module -- -- -- -- Alterable via insertion of predefined parameters Behavioral model Definition of parameters defines test scheme Customer selects parameter values and Motorola synthesizes the design The ColdFire2/2M is available as a hard module only. 1.2 DEVELOPMENT CYCLE There are several steps that must be followed in order to create a FlexCore integrated microprocessor with a ColdFire2/2M. Figure 1-2 illustrates the standard cell design flow. These steps include: * Schematic capture on workstation--Use the engineering workstation to implement the required system functions with a ColdFire2/2M, memory blocks, peripherals, and cells from the Motorola standard cell library. * Verilog modules--Optionally use Verilog to implement complex user modules or system interconnect of standard cells. * Generate test patterns--Generate the stimulus and test patterns for the design to be used during functional simulation. * Module compilation--Use Motorola software to generate compiled modules (SRAM, ROM, etc.) * Functional simulation--Ensure that the logic of the system is functionally sound by simulating the design. (No timing information is yet associated with the simulations, and all propagation delays are preset to a unit delay.) * Logic synthesis--The behavioral and structural level description of the design is mapped to a more efficient structural description using Synopsys. This final description is a netlist of standard cell components. * Electrical rule check--Motorola software verifies the electrical integrity of the design. This includes checking connectivity, fan-out, edge rates, and other electrical rules. * Calculate node delays-- Motorola software calculates the estimated propagation delays of each node in the circuit. The design software estimates delays based on the fanout, input rise/fall times, drive characteristics, and estimated interconnect capacitances of the netlist. * Path delay analysis--With path delay information, the delays between the clocked elements of the circuit can be determined, and the critical paths that limit the clock rate can be identified. Checking for setup, hold, and pulse-width violations can also be accomplished. * Perform real-time simulation--The real-time simulation is run to verify full functionality using the estimated propagation delays calculated by the design tools. * Package and pinout definition--Develop the package and pin definition file. MOTOROLA ColdFire2/2M User's Manual 1-5 Overview * Extract test vectors--The simulator records the input/output patterns generated during the real-time simulation. The test vectors that Motorola will use to test the prototypes are derived from these patterns. * Post testkit verification--Simulate the design using the extracted test vectors to ensure proper operation. * Perform fault grading--Determine the fault coverage of the extracted test vectors. * Timing constraints--Chip-level timing constraints are created to be used during floorplanning, clock tree synthesis, placement, and routing. * Floor planning/Clock tree synthesis--Floor planning and clock tree synthesis are performed by Motorola using the design timing constraints provided by the designer. * Automatic place & route--The circuit's physical layout is created by Motorola from the netlist using automatic place and route software. * Post-layout delay calculation--After the cells are placed and routed, the interconnect resistances and capacitances are extracted by Motorola. Extracted elements replace those estimated earlier during the pre-layout calculation of the node delays. * Re-simulate--The circuit is re-simulated with Verilog to ensure no problems have arisen due to a change in load conditions. * In-place optimization--If the new delay information causes the simulation to fail, Synopsys is used to further optimize the layout. Placement and routing is then repeated. This cycle continues until the final layout, with post-layout delay, satisfies the design goals. * Post testkit simulation--Simulate the design using the extracted test vectors to ensure proper operation. * Re-extract test vectors--Extract the test vectors again in order to account for timing changes due to more accurate delay analysis after layout and routing. * Power simulation--A power simulation is performed to determine if the design meets the necessary design goals. Power simulation should also be run early in the design cycle to ensure design goals are met. * Netlist comparison--The netlist after place and route is compared by Motorola to the original netlist to check for connectivity errors. * Pattern, mask, and wafer generation--Motorola generates the patterns, masks, and wafers. * Assembly/test--Parts are assembled by Motorola and tested using the test vectors. * Ship tested prototypes--Tested prototypes are shipped from Motorola to the customer. * Final test program--The final test is performed by Motorola. 1-6 ColdFire2/2M User's Manual MOTOROLA Overview VERILOG MODULES GENERATE TEST PATTERNS SCHEMATIC CAPTURE ON WORKSTATION MODULE COMPILATION FUNCTIONAL SIMULATION LOGIC SYNTHESIS ELECTRICAL RULE CHECK CALCULATE NODE DELAYS PATH DELAY ANALYSIS PERFORM REAL-TIME SIMULATION TIMING CONSTRAINTS FLOOR PLANNING / CLOCK TREE SYNTHESIS PACKAGE AND PINOUT DEFINITION EXTRACT TEST VECTORS POST TESTKIT VERIFICATION PERFORM FAULT GRADING AUTOMATIC PLACE & ROUTE POST-LAYOUT DELAY CALCULATION IN-PLACE OPTIMIZATION RE-SIMULATE POST TESTKIT SIMULATION POWER SIMULATION EXTRACT TEST VECTORS NETLIST COMPARISON PATTERN, MASK AND WAFER GENERATION OPTIONAL STEPS TO BE DONE IN PARALLEL ASSEMBLY / TEST STEPS TO BE DONE IN PARALLEL SHIP TESTED PROTOTYPES MOTOROLA FINAL TEST PROGRAM CUSTOMER Figure 1-2. Design System Overview MOTOROLA ColdFire2/2M User's Manual 1-7 Overview 1.3 SYSTEM ARCHITECTURE Most FlexCore custom processors will be designed according to a standard system architecture. A block diagram of this architecture is shown in Figure 1-3. This architecture contains the standardized busses and modules discussed below. I-CACHE DATA ARRAY I-CACHE TAG ARRAY TEST BUS MASTER BUS COLDFIRE2/2M MASTER BUS ARBITER (OPTIONAL) SYSTEM BUS CONTROLLER EXTERNAL BUS MASTER BUS SLAVE BUS SLAVE MODULE MASTER BUS SRAM ARRAY ALTERNATE MASTER (OPTIONAL) ROM ARRAY SLAVE MODULE SLAVE MODULE Figure 1-3. ColdFire2/2M System Diagram For more information on ColdFire system configurations refer to the MCF5204 User's Manual (MCF5204UM/AD) and the MCF5206 User's Manual (MCF5206UM/AD.) 1.3.1 Internal Bus Structure 1.3.1.1 MASTER BUS. The master bus is the primary data interface for the ColdFire2/2M. It is a basic two-cycle unidirectional bus. Devices on the master bus are capable of initiating bus transactions. This bus includes a 32-bit address bus, 32-bit read data bus, 32-bit write data bus, and various control signals. None of the signals can be tri-stated. As a result, an optional master bus arbiter is required if multiple masters are present in the system. Refer to Section 3 Master Bus Operation for more information. 1-8 ColdFire2/2M User's Manual MOTOROLA Overview 1.3.1.2 SLAVE BUS. The slave bus is a simplified bus that provides the interface between the internal master bus and the on-chip peripheral modules. The system bus controller (SBC) transfers information between the master bus and the slave bus and is the slave bus master. Only the SBC can initiate slave bus transactions. The slave bus includes device select lines, interrupt lines, output enables, write enables, interrupt vector enables, and other control signals to interface to slave modules. All signals are unidirectional and can not be tri-stated. 1.3.1.3 EXTERNAL BUS. The external bus provides the interface between the internal master bus and external resources. This bus has no predefined requirements. It can be asynchronous or synchronous. The address and data bus widths may be different than the internal master bus. The SBC provides the necessary translation between the master and external busses. 1.3.1.4 TEST BUS. The test bus provides an interface for performing extensive tests of the integrated memories. Signals are provided to control reading and writing of the integrated SRAMs, SROMs, instruction cache tag RAM, and the instruction cache data RAM. 1.3.2 System Functional Blocks 1.3.2.1 ALTERNATE MASTER. Any device that is required to initiate bus transactions is required to be on the master bus. All master bus devices except the ColdFire2/2M that initiate bus transactions are considered to be alternate masters. Use of alternate masters requires a master bus arbiter module. Examples of alternate masters include DMA controllers and coprocessors. 1.3.2.2 COLDFIRE2/2M. The ColdFire2/2M is the primary CPU for any ColdFire custom processor. It has dedicated busses for instruction cache and integrated memories. The master bus is the data interface bus used for all data movement to and from the CPU and is usually connected to the system bus controller. Clock and debug signals are connected directly to I/O pins. See Section 2 Signal Summary for more information on all of the ColdFire2/2M interface signals. A block diagram of the CPU is shown in Figure 1-4. MOTOROLA ColdFire2/2M User's Manual 1-9 MASTER BUS MASTER BUS CONTROLLER INTERNAL BUS TEST BUS INTERFACE MULTIPLY ACCUMULATE UNIT (COLDFIRE2M ONLY) MISALIGNMENT UNIT COLDFIRE CORE DEBUG MODULE DEBUG INTERFACE Overview SRAM CONTROLLER SRAM INTERFACE ROM CONTROLLER ROM INTERFACE INSTRUCTION CACHE CONTROLLER INSTRUCTION CACHE INTERFACE Figure 1-4. ColdFire2/2M Block Diagram 1.3.2.3 I-CACHE DATA ARRAY. The optional instruction cache data array is a compiled RAM used to hold cache data. It is connected directly to the ColdFire2/2M via a dedicated bus. Refer to Section 5.1 Instruction Cache for more information on the cache configuration and interface signals. 1.3.2.4 I-CACHE TAG ARRAY. The optional instruction cache tag array is a compiled RAM used to hold tag information for the cache. It is connected directly to the ColdFire2/2M via a dedicated bus. Refer to Section 5.1 Instruction Cache for more information on the cache configuration and the interface signals. 1.3.2.5 MASTER BUS ARBITER (MARB). The optional master bus arbiter is required to support multiple masters on the master bus. It performs bus control and multiplexing for the unidirectional signals on the master bus. Refer to Section 3.10 Master Bus Arbitration for more information. 1-10 ColdFire2/2M User's Manual MOTOROLA Overview 1.3.2.6 ROM ARRAY. The optional ROM array is a compiled ROM used to hold boot code, critical code, and monitor code. It is connected directly to the ColdFire2/2M via a dedicated bus. Refer to Section 5.3 ROM Module for more information on the ROM configuration and the interface signals. 1.3.2.7 SLAVE MODULES. The slave modules are on-chip peripherals. They communicate with the ColdFire2/2M via the slave bus and SBC. Slave modules are always bus slaves and cannot initiate bus transactions except via interrupts. Examples of slave modules include serial ports, parallel ports, and timers. 1.3.2.8 SRAM ARRAY. The optional SRAM array is a compiled RAM used to hold critical variables and the stack. It is connected directly to the ColdFire2/2M processor via a dedicated bus. Refer to Section 5.4 SRAM Module for more information on the SRAM configuration and the interface signals. 1.3.2.9 SYSTEM BUS CONTROLLER (SBC). The system bus controller is responsible for providing overall control of the slave and external busses. The system bus controller is the single slave-bus master and interrupt controller, a possible external bus master, bus arbiter and interrupt controller, and a master-bus slave and interrupt controller. The SBC provides programmable registers to configure the memory map and interrupt control. The SBC provides master bus cycle termination for accesses to slave modules on the slave bus. It also generates interrupts on the master bus when requested by slaves on the slave bus, and it responds to interrupt acknowledge cycles on the master bus. 1.4 PROGRAMMING MODEL The ColdFire2/2M programming model consists of three register groups: integer unit user, MAC unit user, and supervisor. Programs executing in the user mode use only the registers in the integer and MAC groups. System software executing in the supervisor mode can access all registers and use the control registers in the supervisor group to perform supervisor functions. The following paragraphs provide a brief description of the registers in the user and supervisor models. Refer to Appendix A Register Summary. 1.4.1 Integer Unit User Programming Model Figure 1-5 illustrates the integer portion of the user programming model. It consists of the following registers: * 16 general-purpose 32-bit registers (D0 - D7, A0 - A7) * 32-bit Program Counter (PC) * 8-bit Condition Code Register (CCR) MOTOROLA ColdFire2/2M User's Manual 1-11 Overview 31 16 15 8 7 0 Data Register 0 (D0) Data Register 1 (D1) Data Register 2 (D2) Data Register 3 (D3) Data Register 4 (D4) Data Register 5 (D5) Data Register 6 (D6) Data Register 7 (D7) Address Register 0 (A0) Address Register 1 (A1) Address Register 2 (A2) Address Register 3 (A3) Address Register 4 (A4) Address Register 5 (A5) Address Register 6 (A6) Stack Pointer (SP,A7) Program Counter (PC) Condition Code Register (CCR) Figure 1-5. Integer Unit User Programming Model 1.4.1.1 DATA REGISTERS (D0 - D7) . Registers D0-D7 are used as data registers for bit (1 bit), byte (8 bits), word (16 bits), and long word (32 bits) operations and may also be used as index registers. 1.4.1.2 ADDRESS REGISTERS (A0 - A6) . These registers can be used as software stack pointers, index registers, or base address registers and may be used for word and long word operations. 1.4.1.3 STACK POINTER (A7,SP) . ColdFire2/2M supports a single hardware stack pointer (A7) used during stacking for subroutine calls, returns, and exception handling. The initial value of A7 is loaded from the reset exception vector, address $0. The same register is used for user mode and supervisor mode, and may be used for word and long word operations. A subroutine call saves the PC on the stack, and the return restores the PC from the stack. Both the PC and the Status Register (SR) are saved on the stack during the processing of exceptions and interrupts. The return from exception instruction restores the SR and PC values from the stack. 1.4.1.4 PROGRAM COUNTER (PC). The PC contains the address of the currently executing instruction. During instruction execution and exception processing, the processor automatically increments the contents of the PC or places a new value in the PC, as appropriate. For some addressing modes, the PC can be used as a pointer for PC-relative operand addressing. 1.4.1.5 CONDITION CODE REGISTER (CCR). The CCR is the least significant byte of the processor Status Register (SR), as shown in Figure 1-6. Bits 4-0 represent indicator flags 1-12 ColdFire2/2M User's Manual MOTOROLA Overview based on results generated by processor operations. Bit 4, the extend bit (X bit), is also used as an input operand during multiprecision arithmetic computations. BITS 7 6 5 4 3 2 1 0 FIELD - - - X N Z V C RESET - - - - - - - - R/W R R R R/W R/W R/W R/W R/W Figure 1-6. Condition Code Register (CCR) Field Definitions: X[4]--Extend Condition Code Assigned the value of the carry bit for arithmetic operations; otherwise not affected or set to a specified result. N[3]--Negative Condition Code Set if the most significant bit of the result is set; otherwise cleared. Z[2]--Zero Condition Code Set if the result equals zero; otherwise cleared. V[1]--Overflow Condition Code Set if an arithmetic overflow occurs implying that the result cannot be represented in the operand size; otherwise cleared. C[0]--Carry Condition Code Set if a carryout of the most significant bit of the operand occurs for an addition, or if a borrow occurs in a subtraction; otherwise cleared. 1.4.2 MAC Unit User Programming Model Figure 1-7 illustrates the MAC portion of the user programming model available on the ColdFire2M only. It consists of the following registers: * 32-bit accumulator (ACC) * 16-bit mask register (MASK) * 8-bit MAC status register (MACSR) 31 16 15 8 7 0 Accumulator (ACC) Mask Register (MASK) MAC Status Register (MACSR) Figure 1-7. MAC Unit User Programming Model MOTOROLA ColdFire2/2M User's Manual 1-13 Overview See Section 6.2 MAC Programming Model for more details. 1.4.2.1 ACCUMULATOR (ACC). This is a 32-bit special purpose register used to accumulate the results of MAC operations. 1.4.2.2 MASK REGISTER (MASK). This is a 16-bit special purpose register used to hold the address mask for MAC load operations. 1.4.2.3 MAC STATUS REGISTER (MACSR). This is an 8-bit special purpose register used to hold the status of MAC operations. 1.4.3 Supervisor Programming Model System programers use the supervisor programming model to implement sensitive operating system functions. The following paragraphs briefly describe the registers in the supervisor programming model. All accesses that affect the control features of the ColdFire2/2M are in the supervisor programming model, which consist of the registers available to users as well as the registers listed in Figure 1-8. 31 16 15 0 Cache Control Register (CACR) Access Control Register 0 (ACR0) Access Control Register 1 (ACR1) Vector Base Register (VBR) ROM Base Address Register (ROMBAR0) SRAM Base Address Register (RAMBAR0) Status Register (SR) Figure 1-8. Supervisor Programming Model Most of the control registers are accessed via the MOVEC instruction using the control register definitions shown in Table 1-1. These are a subset of the registers defined in the ColdFire Programmer's Reference Manual Rev. 1.0 (MCF5200PRM/AD). Table 1-1. MOVEC Register Map RC[11:0] REGISTER DEFINITION $002 $004 $005 $801 $C00 $C04 Cache Control Register (CACR) Access Control Register 0 (ACR0) Access Control Register 1 (ACR1) Vector Base Register (VBR) ROM Base Address Register (ROMBAR0) RAM Base Address Register 0 (RAMBAR0) Refer to Appendix A Register Summary for a description of the access methods for all of the register in the ColdFire2/2M. 1.4.3.1 STATUS REGISTER (SR). Figure 1-9 illustrates the SR, which stores the processor status and contains the condition codes that reflect the results of a previous operation. The low-order byte of the SR is the condition code register (CCR.) 1-14 ColdFire2/2M User's Manual MOTOROLA Overview BITS 15 14 13 12 11 FIELD T - S M - I RESET 0 0 1 1 0 R/W R/W R R/W R/W R 10 8 7 5 4 3 2 1 0 - X N Z V C 7 0 0 0 0 0 0 R/W R R/W R/W R/W R/W R/W Figure 1-9. Status Register (SR) Field Definitions: T[15]--Trace Enable When set, the processor will perform a trace exception after every instruction; otherwise no trace exception is performed. S[13]--Supervisor / User State Denotes the processor privilege mode: supervisor mode (S set) or user mode (S cleared). M[12]--Master / Interrupt State This bit is cleared by an interrupt exception, and can be set by software during execution of the RTE or move to SR instructions. I[10:8]--Interrupt Priority Mask Defines the current interrupt priority. Interrupt requests are inhibited for all priority levels less than or equal to the current priority, except the level seven request, which cannot be masked. 1.4.3.2 CACHE CONTROL REGISTER (CACR). The CACR controls the cache operation. This includes cache enable, cache freeze, cache invalidate, cache mode, and default write protect. See Section 5.1.11 Cache Control Register (CACR) for more information. 1.4.3.3 ACCESS CONTROL REGISTERS (ACR0, ACR1). The ACRs allow definition of access attributes for two definable memory regions. These attributes include burst control, instruction caching, and write protection. These attributes override the defaults in the CACR. See Section 5.2.1 ACR Programming Model for more information. 1.4.3.4 VECTOR BASE REGISTER (VBR). The VBR contains the base address of the exception vector table in memory. The displacement of an exception vector is added to the value in this register to access the vector table. Only the upper 12 bits of the VBR are used and the lower 20 bits are filled with zeros. This forces the exception vector table to be aligned on a 1 MByte boundary. This register is reset to zero. 1.4.3.5 ROM BASE ADDRESS REGISTER (ROMBAR0). The ROMBAR0 register configures the internal ROM module. This includes the base address, code space masks, and enable. See Section 5.3.2 ROM Programming Model for more information. 1.4.3.6 SRAM BASE ADDRESS REGISTER (RAMBAR0). The RAMBAR0 register configures the internal SRAM module. This includes the base address, write protect, code MOTOROLA ColdFire2/2M User's Manual 1-15 Overview space masks, and enable. See Section 5.4.3 RAM Programming Model for more information. 1.5 INTEGER DATA FORMATS Table 1-2 lists the operand data formats that are supported by the integer unit. Integer unit operands can reside in registers, memory, or instructions. The operand size for each instruction is either explicitly encoded in the instruction or implicitly defined by the instruction operation. Table 1-2. Integer Data Formats OPERAND DATA FORMAT SIZE Bit Byte Integer Word Integer Long-Word Integer 1 Bit 8 Bits 16 Bits 32 Bits 1.6 ORGANIZATION OF DATA IN REGISTERS The following paragraphs describe data organization within the data, address, and control registers. 1.6.1 Organization of Integer Data Formats in Registers Figure 1-10 shows the integer format for data registers. Each integer data register is 32 bits wide. Byte and word operands occupy the lower 8- and 16-bit portions of integer data registers, respectively. Long-word operands occupy the entire 32 bits of integer data registers. A data register that is either a source or destination operand only uses or changes the appropriate lower 8 or 16 bits in byte or word operations, respectively. The remaining high-order portion does not change. The least significant bit (LSB) of all integer sizes is zero, the most significant bit (MSB) of a longword integer is 31, the MSB of a word integer is 15, and the MSB of a byte integer is 7. 31 1 30 LSB MSB 31 NOT USED 31 7 0 MSB LSB MSB BIT (0 _< MODULO (OFFSET) < 31,OFFSET OF 0 = MSB) BYTE 0 15 NOT USED LOW-ORDER WORD 31 MSB 0 LSB 16-BIT WORD 0 LONG WORD LSB LONG WORD Figure 1-10. Organization of Integer Data Formats in Data Registers Because address registers and stack pointers are 32-bits wide, address registers cannot be used for byte-size operands. When an address register is a source operand, either the low- 1-16 ColdFire2/2M User's Manual MOTOROLA Overview order word or the entire longword operand is used, depending on the operation size. When an address register is the destination operand, the entire register becomes affected, despite the operation size. If the source operand is a word size, it is sign-extended to 32 bits and then used in the operation to an address register destination. Address registers are primarily for addresses and address computation support. The instruction set (See Section 1.8 Instruction Set Summary) explains how to add, compare, and move the contents of address registers. Figure 1-11 illustrates the integer format for address registers. 31 16 15 SIGN-EXTENDED 0 16-BIT ADDRESS OPERAND 31 0 FULL 32-BIT ADDRESS OPERAND Figure 1-11. Organization of Integer Data Formats in Address Registers Control registers vary in size according to function. Some control registers have undefined bits reserved for future definition by Motorola. Those particular bits read as zeros and must be written as zeros for future compatibility. All operations to the SR and CCR are word-size operations. For all CCR operations, the upper byte is read as all zeros and is ignored when written, despite privilege mode. 1.6.2 Organization of Integer Data Formats in Memory The ColdFire2/2M uses a big-endian addressing scheme. The byte-addressable organization of memory allows lower addresses to correspond to higher order bytes. The address N of a long-word data item corresponds to the address of the high order word. The lower order word is located at address N + 2. The address N of a word data item corresponds to the address of the high order byte. The lower order byte is located at address N + 1. This organization is shown in Figure 1-12. MOTOROLA ColdFire2/2M User's Manual 1-17 Overview 31 23 15 7 0 LONG WORD $00000000 WORD $00000000 BYTE $00000000 WORD $00000002 BYTE $00000001 BYTE $00000002 BYTE $00000003 LONG WORD $00000004 WORD $00000004 BYTE $00000004 WORD $00000006 BYTE $00000005 BYTE $00000006 BYTE $00000007 LONG WORD $FFFFFFFC WORD $FFFFFFFC BYTE $FFFFFFFC WORD $FFFFFFFE BYTE $FFFFFFFD BYTE $FFFFFFFE BYTE $FFFFFFFF Figure 1-12. Memory Operand Addressing 1.7 ADDRESSING MODE SUMMARY The addressing modes are grouped into categories according to the mode of use. Data addressing modes refer to data operands. Memory addressing modes refer to memory operands. Alterable addressing modes refer to alterable (writable) operands. Control addressing modes refer to memory operands without an associated size. These categories sometimes combine to form new categories that are more restrictive. Two combined classifications are alterable memory (both alterable and memory) and data alterable (both alterable and data). Table 1-3 lists a summary of effective addressing modes and their categories. Only the twelve addressing modes supported by the 68000 are available on the ColdFire2/2M. 1-18 ColdFire2/2M User's Manual MOTOROLA Overview Table 1-3. Effective Addressing Modes and Categories ADDRESSING MODES SYNTAX CATEGORY MODE FIELD REG. FIELD DATA MEMORY CONTROL ALTERABLE Register Direct Data Address Register Indirect Address Address with Postincrement Address with Predecrement Address with Displacement Dn An 000 001 reg. no. reg. no. X -- -- -- -- -- X X (An) (An)+ -(An) (d16, An) 010 011 100 101 reg. no. reg. no. reg. no. reg. no. X X X X X X X X X -- -- X X X X X Address Register Indirect with Index 8-Bit Displacement (d8, An, Xn) 110 reg. no. X X X X Program Counter Indirect with Displacement (d16, PC) 111 010 X X X -- Program Counter Indirect with Index 8-Bit Displacement (d8, PC, Xn) 111 011 X X X -- Absolute Data Addressing Short Long Immediate (xxx).W (xxx).L # 111 111 111 000 001 100 X X X X X X X X -- -- -- -- 1.8 INSTRUCTION SET SUMMARY Table 1-4 lists the notational conventions used throughout this manual unless otherwise specified. Table 1-5 lists the ColdFire2/2M instruction set by opcode. This instruction set is a reduced version of the 68000 instruction set. The removed instructions include BCD, bit field, logical rotate, decrement and branch, integer division, and integer multiply with a 64bit result. Nine new MAC instructions have been added. Table 1-4. Notational Conventions OPCODE WILDCARDS cc Logical Condition (example: NE for not equal) An Ay,Ax Dn Dy,Dx Rn Ry,Rx Rw Rc Any Address Register n (example: A3 is address register 3) Source and destination address registers, respectively Any Data Register n (example: D5 is data register 5) Source and destination data registers, respectively Any Address or Data Register Any source and destination registers, respectively Any second source register Any Control Register (example VBR is the vector base register) REGISTER OPERANDS REGISTER/PORT NAMES ACC DDATA CCR MACSR MASK PC PST SR MOTOROLA MAC Accumulator Debug Data Port Condition Code Register (lower byte of status register) MAC Status Register Mask Register Program Counter Processor Status Port Status Register ColdFire2/2M User's Manual 1-19 Overview Table 1-4. Notational Conventions (Continued) MISCELLANEOUS OPERANDS #