Texas Instruments TMS320C80 User Manual

1995 digital signal processing products
Table of Contents

Advertisement

Quick Links

TMS320C80 to TMS320C82

Software Compatibility

User's Guide
1995
Digital Signal Processing Products

Advertisement

Table of Contents
loading

Summary of Contents for Texas Instruments TMS320C80

  • Page 1: Software Compatibility

    TMS320C80 to TMS320C82 Software Compatibility User’s Guide 1995 Digital Signal Processing Products...
  • Page 2 SPRU154 Printed in U.S.A., November, 1995 M418017-9741 revision *...
  • Page 3 TMS320C80 to TMS320C82 Software Compatibility User’s Guide SPRU154 November 1995 Printed on Recycled Paper...
  • Page 4 IMPORTANT NOTICE Texas Instruments (TI) reserves the right to make changes to its products or to discontinue any semiconductor product or service without notice, and advises its customers to obtain the latest version of relevant information to verify, before placing orders, that the information being relied on is current.
  • Page 5: Read This First

    Preface Read This First About This Manual The TMS320C80 and the TMS320C82 are the first two members of the ’C8x family of high-performance DSP devices. This guide explains how to port software developed for one of these devices to the other. It also presents a set of software compatibility guide- lines for developing software that will run on either device.
  • Page 6 SPRU113) describes the ’C8x features, development environment, architecture, memory organization, and communication network (the crossbar). TMS320C80 C Source Debugger User’s Guide (literature number SPRU107) describes the ’C8x master processor and parallel processor C source debuggers. This manual provides information about the features and operation of the debuggers and the parallel debug manager;...
  • Page 7 Related Documentation From Texas Instruments / If You Need Assistance TMS320C80 Parallel Processor User’s Guide (literature num- ber SPRU110) describes the ’C8x parallel processor (PP). This manual provides information about the PP features, ar- chitecture, operation, and assembly language instruction set.
  • Page 8 TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 9: Table Of Contents

    Contents Contents 1 Comparison of the ’C80 and ’C82 ........Describes differences between the ’C80 and ’C82 that affect software compatibility.
  • Page 10 ........Provides ’C80 and ’C82 memory maps. TMS320C80 to TMS320C82 Software Compatibility User’s Guide viii...
  • Page 11 A–1 TMS320C80 Memory Map ........
  • Page 12 3–8 Sample PP C Program With an Assembly Language Function ..3-17 3–9 Assembly Language Function to Calculate the Dot Product of ..3-18 Two Vectors TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 13 Running Title—Attribute Reference Contents 4 Comparison of the ’C80 and ’C82 ........Describes differences that affect compatibility in the ’C80 and ’C82.
  • Page 14 ........Provides the memory maps of the ’C80 and ’C82. TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 15 A–1 TMS320C80 Memory Map ........
  • Page 16 TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 17: Comparison Of The 'C80 And 'C82

    Chapter 1 Comparison of the ’C80 and ’C82 There are several differences between the ’C80 and the ’C82. As a programmer, you must be aware of these differences to effec- tively write code that runs on both the ’C80 and the ’C82. This chapter describes important differences to prepare you for the software-related discussions in Chapter 2 and Chapter 3.
  • Page 18: Overview Of 'C80 And 'C82 Features

    4 KB PP instruction cache size 2 KB 4 KB MP parameter RAM size 2 KB 4 KB MP data cache size 4 KB 4 KB MP instruction cache size 4 KB 4 KB TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 19: Parallel Processor Differences

    Parallel Processor Differences 1.2 Parallel Processor Differences The most important difference related to the parallel processors (PPs) is the number of PPs per chip: the ’C80 has four PPs and the ’C82 has two. Since the ’C82 has two PPs, software written to execute on both the ’C80 and ’C82 must not require more than two PPs.
  • Page 20: Transfer Controller Differences

    1.3.2 RAM Bank Configuration Mechanisms The special RAM bank configuration pins on the ’C80 and the configuration cache on the ’C82 are hardware features that have a negligible impact on software. TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 21: Video Controller Differences

    Video Controller Differences 1.4 Video Controller Differences The ’C80 has an on-chip video controller, but the ’C82 does not. If the chips are to be used in video applications, the portion of your software that sets up the video timing registers needs to be written so that an external video controller can be used with the ’C82.
  • Page 22: Memory Differences

    ’C82’s PP0 data RAM 1 and PP1 data RAM 1 is unpopulated on the ’C80. The memory locations occu- pied by the ’C80’s data RAMs for PP2 and PP3 are unpopulated on the ’C82. TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 23: C80 And 'C82 Data Rams In The Memory Map

    Memory Differences Figure 1–1. ’C80 and ’C82 Data RAMs in the Memory Map Address (Hex) ’C80 Block ’C82 Block 0000 0000 PP0 data RAM 0 PP0 data RAM 0 0000 07FF 0000 0800 (4096 bytes) PP0 data RAM 1 0000 0FFF 0000 1000 PP1 data RAM 0 0000 17FF...
  • Page 24: Parameter Rams

    In the ’C80, the MP parameter RAM can be accessed only by the MP and TC. However, in the ’C82, the MP parameter RAM can be accessed by the MP, TC, and PPs. TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 25: C80 And 'C82 Parameter Rams In The Memory Map

    Memory Differences Figure 1–2. ’C80 and ’C82 Parameter RAMs in the Memory Map Address (Hex) ’C80 Block ’C82 Block 0100 0000 PP0 parameter RAM PP0 parameter RAM 0100 07FF É É É É É É É É É É 0100 0800 (4096 bytes) É...
  • Page 26: C80 And 'C82 Mp Parameter Ram Block Diagram

    É É É É É É É É É É (2K bytes) É É É É É É É É É É 0101 0FFF É É É É É É É É É É 1-10 TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 27: C80 And 'C82 Pp Parameter Ram Block Diagram

    Memory Differences Figure 1–4 shows a typical PP parameter RAM in the ’C80 and ’C82. In the figure, the # sign in each address corresponds to the PP number. The memory maps of the first 512 bytes of the PP parameter RAM are identical in the ’C80 and ’C82.
  • Page 28: Pp State Information On The Stack At Reset

    (stack pointer points here after reset) IPE value from before reset 0100 #7F4 0100 #FF4 IPA value from before reset 0100 #7F8 0100 #FF8 SP value from before reset 0100 #7FC 0100 #FFC 1-12 TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 29: Caches

    Memory Differences 1.5.3 Caches Generally, cache operation is completely transparent; in most cases you need not worry about cache differences between the ’C80 and the ’C82. Cache memory is generally not directly accessed by application software, so the locations of the caches are not important. This information is available on the memory maps in Appendix A, for your reference.
  • Page 30 1-14 TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 31: Programming For Compatibility

    Chapter 2 Programming for Compatibility By following simple compatibility guidelines, you can write code that will run equally well on both the ’C80 and the ’C82. Object code written with these guidelines in mind should run on both de- vices without recompiling or relinking. In this chapter, you will find information that will help you: Select the best compatibility technique for your application.
  • Page 32: Programming Considerations

    ’C80 and ’C82 without recompiling or relinking is not difficult. Writing code that runs on both the ’C80 and ’C82 is straightfor- ward because of the similarities in the two devices’ memory maps. TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 33: The Type Field In The Mp Config Register

    Obtaining Device-Specific Information 2.2 Obtaining Device-Specific Information Device-specific information can be obtained by your software. This information can help you effectively use all available PPs and properly initialize each PP’s stack pointer. 2.2.1 Determining the Device that is Executing your Software (MP) An MP-resident program can determine which device it is running on by reading the MP’s CONFIG register, which is shown in Figure 2–1.
  • Page 34: Initializing A Pp's Stack Pointer

    ; fix for ’C80 revs 1–3 a7 = comm & (1 \\ 8) ; is this a ’C80 or a ’C82? sp = [nz] sp | (1 \\ 11) ; if ’C82, modify initial SP TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 35: Counting The Number Of Pps

    Obtaining Device-Specific Information 2.2.4 Counting the Number of PPs Counting the number of PPs is essentially a process of checking which device is executing a program and then using that informa- tion to determine the number of PPs that are available on the pro- cessor.
  • Page 36: Technique #1: Using Only Common Ram

    PP3 on the ’C80, since the ’C82 doesn’t have these PPs. Do not use absolute addresses to access the PP stacks since the PP stacks have different locations in the ’C80 and ’C82. TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 37: Considerations When Using Technique #1

    Technique #1: Using Only Common RAM 2.3.4 Considerations When Using Technique #1 Although PP code that uses this technique should produce identi- cal results on the ’C80 and ’C82, the timing and performance of PP-resident programs may be affected by two main differences between the devices: Each ’C82 PP instruction cache is larger than each ’C80 PP instruction cache.
  • Page 38: Technique #2: Using Pointers To Allocate Ram

    ’C80 or ’C82. From this information, the MP should determine the loca- tion of the additional RAM and then pass pointers to this RAM to TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 39: Structure Of A Pp Command Buffer

    The MP should pass a pointer to this RAM through a command buffer, such as the one shown in Figure 2–3 (taken from Sec- tion 5.2.6, Command Buffer , in the TMS320C80 Multitasking Executive User’s Guide ). The args field in the command buffer contains a pointer to a buffer in shared memory that contains the argument values for the command.
  • Page 40 2-10 TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 41: Prototyping 'C82 Code On The 'C80

    Chapter 3 Prototyping ’C82 Code on the ’C80 The ’C80 can be used to prototype code that is targeted to run on the ’C82 alone. In this chapter, you will find information that will help you: Prototype ’C82 applications with a ’C80. Develop ’C82 code on a ’C80 development board.
  • Page 42: Overview

    ’C80. In the actual target board, you would link your software using the linker command file for the ’C82. In this way, a ’C80 software development board (SDB) can be used to develop software for the ’C82. TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 43: Emulating The 'C82'S Data Rams

    Emulating the ’C82’s Data RAMs 3.2 Emulating the ’C82’s Data RAMs The PP data RAMs are relatively simple to emulate since the ’C80 has four 4-KB blocks of contiguous memory in the form of data RAMs 0 and 1 for each of its four PPs. The level of emulation provided by this approach should be adequate for many applica- tions.
  • Page 44: Emulating The 'C82'S Parameter Rams

    Access these RAMs through pointers to mask the memory ad- dress differences between the ’C80 and ’C82. This approach is viable as long as your application can tolerate the fact that the RAM modules used for the emulation are not con- tiguous. TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 45: Emulating The Mp Parameter Ram

    Emulating the ’C82’s Parameter RAMs 3.3.2 Emulating the MP Parameter RAM The remaining issue is how to emulate the ’C82’s 4096-byte MP parameter RAM. The last half of the memory address block occu- pied by this RAM is unpopulated on the ’C80. The ’C80’s PP2 pa- rameter RAM can be mapped into this space and accessed via a pointer.
  • Page 46: Prototyping Code Using Linker Command Files

    For a list of linker directives, see Section 13.4, Linker Command Files , in the TMS320C80 (MVP) Code Generation Tools User’s Guide . 3.4.1 PP-Relative Addressing One linker command file can be used for linking code so that it can be executed by all PPs in each device.
  • Page 47: Map Files

    For more information about map files, see subsection 13.3.8, Create a map file (–m filename option) , in the TMS320C80 (MVP) Code Generation Tools User’s Guide . 3.4.3 Linking Your ’C82 Code for Prototyping on a ’C80 Example 3–1 is a sample PP C program that will be used to illus-...
  • Page 48: Sample Pp C Program

    .usect assembler directives. To allocate the vector A in assembly language, the proper directive would be as follows: .usect ”.a_sect”,1536 In this way, you can use the linker to specify where to place vari- ables in memory. TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 49 2.8, Pragma Directives in the TMS320C80 (MVP) Code Generation Tools User’s Guide . For more information about the .sect and .usect directives, see Section 9.10, Directives Refer- ence , in the TMS320C80 (MVP) Code Generation Tools User’s Guide . 3.4.3.2 The ’C80 Linker Command File Example 3–2 shows a linker command file for prototyping ’C82...
  • Page 50: C80 Pp Linker Command File For Example.c

    DRAM0 and .b_sect was placed at address 00002000h in DRAM1. To see a complete map file, see Section 14.5, The Example Link- er Map Files , in the TMS320C80 (MVP) Code Generation Tools User’s Guide . 3-10 TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 51: Linking Your Code For A 'C82

    Prototyping Code Using Linker Command Files Example 3–3.’C80 Map File Lines for Vector A and Vector B ***************************************************** MVP COFF Linker Version 1.10 ***************************************************** Tue Oct 3 10:00:06 1995 OUTPUT FILE NAME: <c80ex.out> ENTRY POINT SYMBOL: ”$c_int00” address: 020006b8 MEMORY CONFIGURATION name origin length...
  • Page 52: C82 Pp Linker Command File

    Example 3–5 shows the lines from the map file that show where A and B were placed in memory. The entire file is not shown in that example; dots (..) are used to show sections that were deleted. 3-12 TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 53: C82 Map File Lines For Vector A And Vector B

    DRAM0 and .b_sect was placed at address 00008000h in DRAM1. To see a complete map file, see Section 14.5, The Example Link- er Map Files , in the TMS320C80 (MVP) Code Generation Tools User’s Guide . Prototyping ’C82 Code on the ’C80...
  • Page 54: Mp Linker Command Files

    : o=0x01002000 l = 0x800 SECTIONS .text > EXTMEM .ptext > EXTMEM .bss > EXTMEM .const > EXTMEM .switch > EXTMEM .sysmem > EXTMEM .stack > EXTMEM .cinit > EXTMEM .pcinit > EXTMEM 3-14 TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 55: Considerations When Using Linker Command Files

    Prototyping Code Using Linker Command Files Example 3–7.’C82 MP Linker Command File /******************************************************** * c82mp.lnk – ’C82 MP linker command file ********************************************************/ –c –x –heap 0x2000 –stack 0x2000 –l mp_rts.lib MEMORY EXTMEM : o=0x02000000 l = 0x80000 MPPRAM : o=0x01010000 l = 0x1000 SECTIONS .text...
  • Page 56 RAM that is global to a ’C80 PP, and use the local port when accessing RAM that is local to a ’C80 PP. 3-16 TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 57: Sample Pp C Program With An Assembly Language Function

    Prototyping Code Using Linker Command Files Example 3–8.Sample PP C Program With an Assembly Language Function /******************************************************** * ex_asm.c This example C code calculates the dot product of vectors A and B. The code uses an assembly language function to calculate the dot product. The assembly language code has the filename c80ex.p.
  • Page 58: Assembly Language Function To Calculate The Dot Product Of

    ; loops to DOT_PROD_LOOP. br = iprs ; return to calling function. dot_product = dot_product + prod ; calculate last sum. .uexit ; tell ppca that this is the end of ; this function. 3-18 TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 59 Running Title—Attribute Reference Appendix A The ’C80 and ’C82 Memory Maps The TMS320C8x is a byte-addressable device with a single 4-GB memory space common to its processors. Each address refers to a specific byte in the address space. Addresses less than 02000000h are reserved for on-chip memory, and addresses from 02000000h to FFFFFFFFh are assigned to off-chip memory.
  • Page 60: Tms320C80 Memory Map

    É É É É É É É É É É É É É É É É É É É É É É É É É É É É † Block sizes have been rounded to the nearest unit size. TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 61 The ’C80 and ’C82 Memory Maps Figure A–1. TMS320C80 Memory Map (Continued) Starting Ending Bank Address Address Size (hex) (hex) (bytes) Memory or Device 0101 0000 0101 07FF MP Parameter RAM É É É É É É É É É É É É É É...
  • Page 62: Tms320C82 Memory Map

    É É É É É É É É É É É É É É É É É É É É É É É É É É É É É É † Block sizes have been rounded to the nearest unit size. TMS320C80 to TMS320C82 Software Compatibility User’s Guide...
  • Page 63 The ’C80 and ’C82 Memory Maps Figure A–2. TMS320C82 Memory Map (Continued) Starting Ending Bank Address Address size (hex) (hex) (bytes) Memory or Device 0181 8000 0181 8FFF MP Instruction Cache É É É É É É É É É É É É É É 0181 9000 0181 FFFF Reserved...
  • Page 64 TMS320C80 to TMS320C82 Software Compatibility User’s Guide...

This manual is also suitable for:

Tms320c82

Table of Contents