This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Simple and Complex Matrix Multiplication



Hello ,

1. I am trying to understand 6678 DSP board architecture in much detail, Like Basically I want to see how datas are  transferred among registers to functional units at data path levels or registers levels.  I want to start with single or double precision simple or complex Matrix multiplication. Is there any code generation tools available on CCS or I can get some sample code to try to run. 

2. Apart from this is there any timer function available which I can use in code , I have tried with sys/time.h file  but I think it is not available on DSP, I have tried with time.h but with this as well, I  am not getting correct time of system. 

Any help will be appreciated, specially for first one. Thanks.

  • Arun,

    1) Look at the DSPLib, which is installed as part of the MCSDK: http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/latest/index_FDS.html  It has examples that use our matrix multiply instrinsic functions.

    2) If you are just trying to do time measurement, this code can be used.

    #include <stdio.h>

    #include<c6x.h>

    unsigned int t_start_l,t_start_h;
    unsigned int t_stop_l,t_stop_h;
    unsigned int t_overhead_l,t_overhead_h;

    int main(int argc, char *argv[])
    {
       int i;
       TSCL = 0;
       TSCH = 0;
       t_start_l = TSCL;
       t_start_h = TSCH;
       for (i=0; i<100000000; i++)
       {
          ;
       }
       t_stop_l = TSCL;
       t_stop_h = TSCH;
       t_overhead_l = t_stop_l - t_start_l;
       t_overhead_h = t_stop_h - t_start_h;
       printf("done, t_overhead_h = 0x%08x\tt_overhead_l=0x%08x\n",t_overhead_h,t_overhead_l);
    }
    Regards,
    Travis