Chapter 15. C50 Domain Authors: Luis Gutierrez 15.1 Introduction The C50 domain generates assembly code for the Texas Instruments C5x series of processors. Chapter 12 describes the features common to all code generation domains. The basic principles of writing code generation stars are explained in section 12.2. You will find explanations for codeblocks, macros, and attributes there. This chapter explains features specific to the C50 domain. Refer to the C50 chapter in the user manual for an introduction to these domains. 15.2 Data Types The supported CG50 data types are: int intarray fix fixarray In addition the complex data type is supported for portholes (but not states). A complex number is stored as a sequence of two 16 bit numbers. The real part is stored at the lower address. 15.3 Attributes In addition to the code generation attributes detailed in 12.2.6, for C50 attributes are defined to specify the Single Access RAM and Double Access RAM memory banks. They are: A_BMEM Allocate this state in the address range specified by the bMemMap target parameter. A_UMEM Allocate this state in the address range specified by the uMemMap target parameter. The underlying bits are AB_BMEM, and AB_UMEM. Each attribute above turns one off and turns the other on (e.g. A_BMEM turns AB_BMEM on and AB_UMEM off). Also for C50 stars, portholes can assert attributes P_BMEM and P_UMEM, which work in exactly the same way as A_BMEM and A_UMEM. The default attribute for a C50 porthole is P_BMEM, which allocates the porthole buffer in DARAM memory. Specifying the P_UMEM attribute places the porthole buffer in SARAM memory. 15.4 Code Streams The C50 domain uses the default assembly language code streams discussed in "Assembly code streams" on page 12-17. Additionally, TITarget declares a code stream named TISuProcs to store code that should be placed outside the main loop. Note that the code stored in this code stream will get added after the wrapup methods of the stars have been called. The TISuProcs code stream is useful for adding procedures when using non-COFF assemblers (like the TI DSK assembler) or defining tables of coefficients in program memory (as an example, the C50 instruction macd needs one of the operands to be in program memory) 15.5 Symbols The DSKC50 targets defines certain symbols that are meant to be unique. They are AIC_INIT, SETUPX, SETUPR, XINT, RINT and TINT . The C50Sin star defines a global symbol SINTBL used to store a sine table that is shared by all C50Sin stars. The user should avoid redefining these symbols in the output assembly file. 15.6 Reserved Memory The DSKC50 target reserves the last 9 words in DARAM block 1 to store data needed to configure the Analog Interface Chip in the DSK board