Chapter 0 : Introduction



  Digital Signal Controller
    TMS320F2812



Technology beyond the Dreams™   Copyright © 2006 Pantech Solutions Pvt
What is a Digital Signal Controller ?
      Microprocessor (µP):
          – Central Device of a multi chip Micro Computer System
          – Two basic architectures:
              • „Von Neumann“- Architecture
              • „Harvard“ – Architecture
          – „Von Neumann“ - Architecture:
              • Shared memory space between code and data
              • Shared memory busses between code and data
              • Example: Intel‘s x86 Pentium Processor family
          – „Harvard“ – Architecture:
              • Two independent memory spaces for code and data
              • Two memory bus systems for code and data
          – A µP to operate needs additional devices

Technology beyond the Dreams™                     Copyright © 2006 Pantech Solutions Pvt
History (1984): Microprocessor
                   Intel 80x86
                                                               address
                                          Bus-Unit
               Address-Unit                                    status /
                                       - bus control
           - Memory Manager                                    control
                                  - address & databus-
           - logical / physical
                                          Interface
                 address
                                    -Instruction queue
                                                               data




                                      Instruction - Unit
              Execution-Unit
                                  - Instruction - Decode
                  - CPU
                                     - Operation queue
                   - ALU
               - Register




Technology beyond the Dreams™                   Copyright © 2006 Pantech Solutions Pvt
Micro Computer
 Micro Computer
     – Micro Computer = Microprocessor(µP) + Memory +
       Peripherals
     – Example: your Desktop –PC

        Code - Memory                 Data - Memory


         Clock         MICROPROCESSOR         Timer/Counter


                 Digital I/O    Analog I/O
Technology beyond the Dreams™           Copyright © 2006 Pantech Solutions Pvt
Computer Peripherals
  • Peripherals include:
     – Digital Input / Output Lines
     – Analogue to Digital Converter (ADC)
     – Digital to Analogue Converter (DAC)
     – Timer / Counter units
     – PWM Output Lines
     – Digital Capture Input Lines
     – Network Interface Units:
         • Serial Communication Interface (SCI) - UART
         • Serial Peripheral Interface ( SPI)
         • Inter Integrated Circuit ( I2C) – Bus
         • Controller Area Network (CAN)


Technology beyond the Dreams™                       Copyright © 2006 Pantech Solutions Pvt
Continue...,
      Network interface unit
             - Local Interconnect Network (LIN)
             - Universal Serial Bus (USB)
             - Local / Wide Area Networks (LAN, WAN)
         Graphical Output Devices
         and more …




Technology beyond the Dreams™                     Copyright © 2006 Pantech Solutions Pvt
System on Chip
     Microcontroller (µC)
         – Nothing more than a Micro Computer as a single silicon chip!
         – All computing power AND input/output channels that are required
            to design a real time control system are „on chip“
         – Guarantee cost efficient and powerful solutions for embedded
            control applications
         – Backbone for almost every type of modern product
         – Over 200 independent families of µC
         – Both µP – Architectures („Von Neumann“ and „Harvard“) are used
            inside Microcontrollers




Technology beyond the Dreams™                      Copyright © 2006 Pantech Solutions Pvt
Digital Signal Processor
     Digital Signal Processor (DSP)
          – Similar to a Microprocessor(µP), e.g. core of a computing system
          – Additional Hardware Units to speed up computing of sophisticated
              mathematical operations:
               • Additional Hardware Multiply Unit(s)
               • Additional Pointer Arithmetic Unit(s)
               • Additional Bus Systems for parallel access
               • Additional Hardware Shifter for scaling and/or multiply/divide
                  by 2n




Technology beyond the Dreams™                         Copyright © 2006 Pantech Solutions Pvt
What are the typical DSP algorithms?
     •   The Sum of Products (SOP) is the key element in most DSP
         algorithms:

            Algorithm                          Equation
            Finite Impulse Response Filter                 M

                                                        ∑
                                                 y ( n)= ak x ( n −k )
                                                         k=0



            Infinite Impulse Response Filter           M                   N
                                                y (n) =∑a k x (n − k )+∑bk y (n − k )
                                                      k =0                k =1




            Convolution                                    N

                                                        ∑
                                                y ( n) = x ( k ) h( n −k )
                                                        k=0




            Discrete Fourier Transform                  N −1
                                               X ( k ) = ∑ x ( n) exp[− j ( 2π / N ) nk ]
                                                        n =0




Technology beyond the Dreams™                                       Copyright © 2006 Pantech Solutions Pvt
Doing a SOP with a µP
     Task : use a Desktop - PC and code the equation into a common C-
           compiler system, e.g. Microsoft Visual Studio.Net3
                                                      y = ∑data[i ] * coeff [i ]
     A C-Code Solution could look like this:              i =0




                    #include <stdio.h>
                    int data[4]={1,2,3,4};
                    int coeff[4]={8,6,4,2};
                    int main(void)
                    {
                       int i;
                       int result =0;
                       for (i=0;i<4;i++)
                               result += data[i]*coeff[i];
                       printf("%i",result);
                       return 0;
                    }

Technology beyond the Dreams™                                Copyright © 2006 Pantech Solutions Pvt
Basic Operations of a SOP
     •   What will a Pentium be forced to do?
           1. Set a Pointer1 to point to data[0]
           2. Set a second Pointer2 to point to coeff[0]
           3. Read data[i] into core
           4. Read coeff[i] into core
           5. Multiply data[i]*coeff[i]
           6. Add the latest product to the previous ones
           7. Modify Pointer1
           8. Modify Pointer2
           9. Increment I;
           10.If i<3 , then go back to step 3 and continue
     •   Steps 3 to 8 are called “6 Basic Operations of a DSP”
     •   A DSP is able to execute all 6 steps in one single machine cycle!

Technology beyond the Dreams™                          Copyright © 2006 Pantech Solutions Pvt
SOP machine code of a µP
     Address    M-Code                          Assembly - Instruction
     10:        for (i=0;i<4;i++)
     00411960   C7 45 FC 00 00 00 00 mov        dword ptr [i],0
     00411967   EB 09                           jmp    main+22h (411972h)
     00411969   8B 45 FC                        mov eax,dword ptr [i]
     0041196C   83 C0 01                        add   eax,1
     0041196F   89 45 FC                        mov dword ptr [i],eax
     00411972   83 7D FC 04            cmp dword ptr [i],4
     00411976   7D 1F                           jge   main+47h (411997h)
     11:        result += data[i]*coeff[i];
     00411978   8B 45 FC                        mov eax,dword ptr [i]
     0041197B   8B 4D FC                        mov ecx,dword ptr [i]
     0041197E   8B 14 85 40 5B 42 00 mov edx,dword ptr[eax*4+425B40h]
     00411985   0F AF 14 8D 50 5B 42 00 imul edx,dword ptr[ecx*4+425B50h]
     0041198D   8B 45 F8                        mov eax,dword ptr [result]
     00411990   03 C2                           add eax,edx
     00411992   89 45 F8                        mov dword ptr [result],eax
     00411995   EB D2                           jmp main+19h (411969h)


Technology beyond the Dreams™                                   Copyright © 2006 Pantech Solutions Pvt
Doing a SOP with a DSP
     •   Now: use a DSP-Development System and code the equation into a
         DSP C-compiler system, e.g. Texas Instruments Code Composer
         Studio                                  3
                                           y = ∑data[i ] * coeff [i ]
     •   C-Code Solution is identical:         i =0




                  int data[4]={1,2,3,4};
                  int coeff[4]={8,6,4,2};
                  int main(void)
                  {
                     int i;
                     int result =0;
                     for (i=0;i<4;i++)
                             result += data[i]*coeff[i];
                     printf("%i",result);
                     return 0;
                  }

Technology beyond the Dreams™                          Copyright © 2006 Pantech Solutions Pvt
DSP-Translation into machine code
   Address                MCode              Assembly Instruction
   0x8000                       FF69         SPM    0
   0x8001                       8D04 0000R   MOVL XAR1,#data
   0x8003      76C0 0000R MOVL XAR7,#coeff
   0x8005                       5633         ZAPA
   0x8006                       F601         RPT    #1
   0x8007                       564B 8781 || DMAC ACC:P,*XAR1+
                          +,*XAR7++
   0x8009                       10AC         ADDL ACC,P<<PM
   0x800A                       8D04 0000R   MOVL XAR1,#y
   0x800B                       1E81         MOVL *XAR1,ACC
        Example: Texas Instruments TMS320F2812
        Space : 12 Code Memory ; 9 Data Memory
        Execution Cycles : 10 @ 150MHz = 66 ns

Technology beyond the Dreams™                 Copyright © 2006 Pantech Solutions Pvt
Digital Signal Controller (DSC)
 Digital Signal Controller (DSC)

     – recall: a Microcontroller(µC) is a single chip Microcomputer with a
       Microprocessor(µP) as core unit.

     – Now: a Digital Signal Controller(DSC) is a single chip Microcomputer with a
       Digital Signal Processor(DSP) as core unit.

     – By combining the computing power of a DSP with memory and peripherals
       in one single device we derive the most effective solution for embedded
       real time control solutions that require lots of math operations.

     – DSC –Example: Texas Instruments C2000 family.



Technology beyond the Dreams™                         Copyright © 2006 Pantech Solutions Pvt
Texas Instruments DSP/DSC -
      TMS320 – Family
      Branches        Portfolio

                                                         C6000
                                C5000
                                                      High Performance
                                                      ‘C’ Efficiency
         C2000                  Power Efficient       DSP
                                Performance
                                DSP
    Efficient Integration
    for Control
    DSC
Technology beyond the Dreams™                     Copyright © 2006 Pantech Solutions Pvt
Texas Instruments’ TMS320 family
      •     Different families and sub-families exist to support different
            markets.

      C2000                       C5000                              C6000


  Lowest Cost                 Efficiency                      Performance &
  Control Systems             Best MIPS per                   Best Ease-of-Use
   Motor Control           Watt / Dollar / Size
   Storage                  Wireless phones
                                                             Multi Channel and Multi
   Digital Ctrl Systems     Internet audio players
                                                              Function App's
                             Digital still cameras
                                                             Comm Infrastructure
                             Modems
                                                             Wireless Base-stations
                             Telephony
                                                             DSL
                             VoIP
                                                             Imaging
                                                             Multi-media Servers
                                                             Video
Technology beyond the Dreams™                                Copyright © 2006 Pantech Solutions Pvt
Roadmap of
                                     TMS320C2000™ DSC’s
                                    Software Compatible
                       Future of Control: Improved
                       Industrial Drive, Improved                                              Higher performance
                       System Density for ONET, etc.                                           Greater integration
 Control Performance




                       High-Precision Uni-processor
                       Control for Applications from                           F2812
                                                                               F2812    R2812
                                                                                        R2812
                       Industrial Drives to Automotive                         150 MIPS 150 MIPS C2812
                                                                               150 MIPS 150 MIPS
                                                                    F2811
                                                                    F2811                           150 MIPS
                                                                    150 MIPS
                                                                    150 MIPS    R2811
                                                                                R2811
                                                         F2810
                                                         F2810                  150 MIPS
                                                                                150 MIPS    C2811
                                                         150 MIPS
                                                         150 MIPS                           150 MIPS
                                                                                    C2810
                                                                                    150 MIPS         F2808
                       Multi-Function, Appliance                                                     100 MIPS
                       & Consumer Control                                                      F2801       F2806
                                                                                               100 MIPS 100 MIPS

                        F24x
                        F24x         LF240xA
                                     LF240xA                                                            Samples December
                                                                                                        04
                        C24x
                        C24x         LC240xA
                                     LC240xA

                                   In Silicon                  Announced

Technology beyond the Dreams™                                                        Copyright © 2006 Pantech Solutions Pvt
Broad C28x™ Application Base
                                Optical Networking
                                Control of laser diode



 Digital Power Supply                                    Printer
 Provides control, sensing,                              Print head control
 PFC, and other functions
                                                         Paper path motor control


Evaluating
Other Segments                                                 Non-traditional
e.g.. Musical                                                  Motor Control
Instruments
                                                               Many new cool
                                                               applications to
                                                               come




Technology beyond the Dreams™                  Copyright © 2006 Pantech Solutions Pvt
For more details
         – www.pantechsolutions.net
         – http://www.slideshare.net/pantechsolutions
         – http://www.scribd.com/pantechsolutions
         – http://www.youtube.com/pantechsolutions




Technology beyond the Dreams™        Copyright © 2006 Pantech Solutions Pvt

Tms320 f2812

  • 1.
    Chapter 0 :Introduction Digital Signal Controller TMS320F2812 Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 2.
    What is aDigital Signal Controller ? Microprocessor (µP): – Central Device of a multi chip Micro Computer System – Two basic architectures: • „Von Neumann“- Architecture • „Harvard“ – Architecture – „Von Neumann“ - Architecture: • Shared memory space between code and data • Shared memory busses between code and data • Example: Intel‘s x86 Pentium Processor family – „Harvard“ – Architecture: • Two independent memory spaces for code and data • Two memory bus systems for code and data – A µP to operate needs additional devices Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 3.
    History (1984): Microprocessor Intel 80x86 address Bus-Unit Address-Unit status / - bus control - Memory Manager control - address & databus- - logical / physical Interface address -Instruction queue data Instruction - Unit Execution-Unit - Instruction - Decode - CPU - Operation queue - ALU - Register Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 4.
    Micro Computer MicroComputer – Micro Computer = Microprocessor(µP) + Memory + Peripherals – Example: your Desktop –PC Code - Memory Data - Memory Clock MICROPROCESSOR Timer/Counter Digital I/O Analog I/O Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 5.
    Computer Peripherals • Peripherals include: – Digital Input / Output Lines – Analogue to Digital Converter (ADC) – Digital to Analogue Converter (DAC) – Timer / Counter units – PWM Output Lines – Digital Capture Input Lines – Network Interface Units: • Serial Communication Interface (SCI) - UART • Serial Peripheral Interface ( SPI) • Inter Integrated Circuit ( I2C) – Bus • Controller Area Network (CAN) Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 6.
    Continue..., Network interface unit - Local Interconnect Network (LIN) - Universal Serial Bus (USB) - Local / Wide Area Networks (LAN, WAN) Graphical Output Devices and more … Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 7.
    System on Chip Microcontroller (µC) – Nothing more than a Micro Computer as a single silicon chip! – All computing power AND input/output channels that are required to design a real time control system are „on chip“ – Guarantee cost efficient and powerful solutions for embedded control applications – Backbone for almost every type of modern product – Over 200 independent families of µC – Both µP – Architectures („Von Neumann“ and „Harvard“) are used inside Microcontrollers Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 8.
    Digital Signal Processor Digital Signal Processor (DSP) – Similar to a Microprocessor(µP), e.g. core of a computing system – Additional Hardware Units to speed up computing of sophisticated mathematical operations: • Additional Hardware Multiply Unit(s) • Additional Pointer Arithmetic Unit(s) • Additional Bus Systems for parallel access • Additional Hardware Shifter for scaling and/or multiply/divide by 2n Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 9.
    What are thetypical DSP algorithms? • The Sum of Products (SOP) is the key element in most DSP algorithms: Algorithm Equation Finite Impulse Response Filter M ∑ y ( n)= ak x ( n −k ) k=0 Infinite Impulse Response Filter M N y (n) =∑a k x (n − k )+∑bk y (n − k ) k =0 k =1 Convolution N ∑ y ( n) = x ( k ) h( n −k ) k=0 Discrete Fourier Transform N −1 X ( k ) = ∑ x ( n) exp[− j ( 2π / N ) nk ] n =0 Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 10.
    Doing a SOPwith a µP Task : use a Desktop - PC and code the equation into a common C- compiler system, e.g. Microsoft Visual Studio.Net3 y = ∑data[i ] * coeff [i ] A C-Code Solution could look like this: i =0 #include <stdio.h> int data[4]={1,2,3,4}; int coeff[4]={8,6,4,2}; int main(void) { int i; int result =0; for (i=0;i<4;i++) result += data[i]*coeff[i]; printf("%i",result); return 0; } Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 11.
    Basic Operations ofa SOP • What will a Pentium be forced to do? 1. Set a Pointer1 to point to data[0] 2. Set a second Pointer2 to point to coeff[0] 3. Read data[i] into core 4. Read coeff[i] into core 5. Multiply data[i]*coeff[i] 6. Add the latest product to the previous ones 7. Modify Pointer1 8. Modify Pointer2 9. Increment I; 10.If i<3 , then go back to step 3 and continue • Steps 3 to 8 are called “6 Basic Operations of a DSP” • A DSP is able to execute all 6 steps in one single machine cycle! Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 12.
    SOP machine codeof a µP Address M-Code Assembly - Instruction 10: for (i=0;i<4;i++) 00411960 C7 45 FC 00 00 00 00 mov dword ptr [i],0 00411967 EB 09 jmp main+22h (411972h) 00411969 8B 45 FC mov eax,dword ptr [i] 0041196C 83 C0 01 add eax,1 0041196F 89 45 FC mov dword ptr [i],eax 00411972 83 7D FC 04 cmp dword ptr [i],4 00411976 7D 1F jge main+47h (411997h) 11: result += data[i]*coeff[i]; 00411978 8B 45 FC mov eax,dword ptr [i] 0041197B 8B 4D FC mov ecx,dword ptr [i] 0041197E 8B 14 85 40 5B 42 00 mov edx,dword ptr[eax*4+425B40h] 00411985 0F AF 14 8D 50 5B 42 00 imul edx,dword ptr[ecx*4+425B50h] 0041198D 8B 45 F8 mov eax,dword ptr [result] 00411990 03 C2 add eax,edx 00411992 89 45 F8 mov dword ptr [result],eax 00411995 EB D2 jmp main+19h (411969h) Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 13.
    Doing a SOPwith a DSP • Now: use a DSP-Development System and code the equation into a DSP C-compiler system, e.g. Texas Instruments Code Composer Studio 3 y = ∑data[i ] * coeff [i ] • C-Code Solution is identical: i =0 int data[4]={1,2,3,4}; int coeff[4]={8,6,4,2}; int main(void) { int i; int result =0; for (i=0;i<4;i++) result += data[i]*coeff[i]; printf("%i",result); return 0; } Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 14.
    DSP-Translation into machinecode Address MCode Assembly Instruction 0x8000 FF69 SPM 0 0x8001 8D04 0000R MOVL XAR1,#data 0x8003 76C0 0000R MOVL XAR7,#coeff 0x8005 5633 ZAPA 0x8006 F601 RPT #1 0x8007 564B 8781 || DMAC ACC:P,*XAR1+ +,*XAR7++ 0x8009 10AC ADDL ACC,P<<PM 0x800A 8D04 0000R MOVL XAR1,#y 0x800B 1E81 MOVL *XAR1,ACC Example: Texas Instruments TMS320F2812 Space : 12 Code Memory ; 9 Data Memory Execution Cycles : 10 @ 150MHz = 66 ns Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 15.
    Digital Signal Controller(DSC) Digital Signal Controller (DSC) – recall: a Microcontroller(µC) is a single chip Microcomputer with a Microprocessor(µP) as core unit. – Now: a Digital Signal Controller(DSC) is a single chip Microcomputer with a Digital Signal Processor(DSP) as core unit. – By combining the computing power of a DSP with memory and peripherals in one single device we derive the most effective solution for embedded real time control solutions that require lots of math operations. – DSC –Example: Texas Instruments C2000 family. Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 16.
    Texas Instruments DSP/DSC- TMS320 – Family Branches Portfolio C6000 C5000 High Performance ‘C’ Efficiency C2000 Power Efficient DSP Performance DSP Efficient Integration for Control DSC Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 17.
    Texas Instruments’ TMS320family • Different families and sub-families exist to support different markets. C2000 C5000 C6000 Lowest Cost Efficiency Performance & Control Systems Best MIPS per Best Ease-of-Use  Motor Control Watt / Dollar / Size  Storage  Wireless phones  Multi Channel and Multi  Digital Ctrl Systems  Internet audio players Function App's  Digital still cameras  Comm Infrastructure  Modems  Wireless Base-stations  Telephony  DSL  VoIP  Imaging  Multi-media Servers  Video Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 18.
    Roadmap of TMS320C2000™ DSC’s Software Compatible Future of Control: Improved Industrial Drive, Improved Higher performance System Density for ONET, etc. Greater integration Control Performance High-Precision Uni-processor Control for Applications from F2812 F2812 R2812 R2812 Industrial Drives to Automotive 150 MIPS 150 MIPS C2812 150 MIPS 150 MIPS F2811 F2811 150 MIPS 150 MIPS 150 MIPS R2811 R2811 F2810 F2810 150 MIPS 150 MIPS C2811 150 MIPS 150 MIPS 150 MIPS C2810 150 MIPS F2808 Multi-Function, Appliance 100 MIPS & Consumer Control F2801 F2806 100 MIPS 100 MIPS F24x F24x LF240xA LF240xA Samples December 04 C24x C24x LC240xA LC240xA In Silicon Announced Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 19.
    Broad C28x™ ApplicationBase Optical Networking Control of laser diode Digital Power Supply Printer Provides control, sensing, Print head control PFC, and other functions Paper path motor control Evaluating Other Segments Non-traditional e.g.. Musical Motor Control Instruments Many new cool applications to come Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt
  • 20.
    For more details – www.pantechsolutions.net – http://www.slideshare.net/pantechsolutions – http://www.scribd.com/pantechsolutions – http://www.youtube.com/pantechsolutions Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt

Editor's Notes