DSPRelated.com
Forums

Re: [c6x] Fwd: Re: How to speed up profiling

Started by Ganesh Vijayan April 30, 2004
Hi Yong,
You need to perform initialization steps for the Timer Module before you can start the module.
Also send across your code, if possible. I will try and see what is the mistake you are committing.
BTW, you needn't enable the clock. The clock is enabled through the Software only.
HTH,
Ganesh
----- Original Message -----
From: Yong Yang
To: Ganesh Vijayan
Cc: c...@yahoogroups.com ; c...@yahoogroups.com
Sent: Friday, April 30, 2004 9:45 AM
Subject: [c6x] Fwd: Re: [code-comp] How to speed up profiling

HI, ganesh
 
Do i have to enable clock as well when using TIMER_getCount()? If i enable it, the same error message (invalid CIO command) comes out.
 
Thank you
 
Yong

Note: forwarded message attached.



Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  Send an email to c...@yahoogroups.com

To Post:  Send an email to c...@yahoogroups.com

To Leave: Send an email to c...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/c6x

Other Groups: http://www.dsprelated.com





Hi, Ganesh
 
My code in main()
 
Uint32 start, stop;
CSL_cfgInit();  //initialization  function generated by CDB
TIMER_start(hTimer1);
start = TIMER_getCount(hTimer1);
 
.....//other code

stop = TIMER_getCount(hTimer1);
printf("start: %d\n", start);
printf("stop: %d\n", stop);
printf("cycles: %d\n", stop - start);
 
in videocfg_c.c generated by CDB file
 
void CSL_cfgInit()
{
    hTimer1 = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);
    TIMER_config(hTimer1, &timerCfg0);
}
 
thanks
Yong

Ganesh Vijayan <g...@emuzed.com> wrote:
Hi Yong,
You need to perform initialization steps for the Timer Module before you can start the module.
Also send across your code, if possible. I will try and see what is the mistake you are committing.
BTW, you needn't enable the clock. The clock is enabled through the Software only.
HTH,
Ganesh
----- Original Message -----
From: Yong Yang
To: Ganesh Vijayan
Cc: c...@yahoogroups.com ; c...@yahoogroups.com
Sent: Friday, April 30, 2004 9:45 AM
Subject: [c6x] Fwd: Re: [code-comp] How to speed up profiling

HI, ganesh
 
Do i have to enable clock as well when using TIMER_getCount()? If i enable it, the same error message (invalid CIO command) comes out.
 
Thank you
 
Yong

Note: forwarded message attached.



Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  Send an email to c...@yahoogroups.com

To Post:  Send an email to c...@yahoogroups.com

To Leave: Send an email to c...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/c6x

Other Groups: http://www.dsprelated.com




Hi Yong,
Did you set the configuration parameters for the module properly ? Are you using the correct CSL for the chip ?
Have you set the parameters of timercfg0 correctly ?
Perform a reset timer before you config your timer i.e. TIMER_config.
Also one more important thing is that you need to multiply the difference by 8 i.e. any output from the TIMER module is scaled down by 8. You are missing the multiplication by 8.
Kindly verify the same.
Thanks and Regards,
Ganesh
----- Original Message -----
From: Yong Yang
To: Ganesh Vijayan
Cc: c...@yahoogroups.com ; c...@yahoogroups.com
Sent: Friday, April 30, 2004 11:54 AM
Subject: Re: [c6x] Fwd: Re: [code-comp] How to speed up profiling

Hi, Ganesh
 
My code in main()
 
Uint32 start, stop;
CSL_cfgInit();  //initialization  function generated by CDB
TIMER_start(hTimer1);
start = TIMER_getCount(hTimer1);
 
.....//other code

stop = TIMER_getCount(hTimer1);
printf("start: %d\n", start);
printf("stop: %d\n", stop);
printf("cycles: %d\n", stop - start);
 
in videocfg_c.c generated by CDB file
 
void CSL_cfgInit()
{
    hTimer1 = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);
    TIMER_config(hTimer1, &timerCfg0);
}
 
thanks
Yong



Hi, Ganesh
 
I use default configuration parameters for the module , see below
 
timerCfg0
INput Clock Source(CLKSRC)              External Source
Cl;ock/Pulse Mode(CP)                          Pulse mode
Pulse Width (PWID)                                 one clock cycle
Function of TOUT(FUNC)                     General_Purse Output
  DAta Oputput(TOUT pin)                    0
  TOUT Inverter Control(INVOUT)   Uninverted
  TINP Inverter Control(INVINP)     Uninverted
Timer Operation                                       Hold
Period Value                                               0x0
Counter Value                                            0x0
Control REgister(CTL)                            0x0
Period Register(PRD)                             0x0
Counter REgister(CNT)                          0x0
 
Timer_Device1
Open Timer Device                     True
Handle                                             hTimer1
Enable Pre-INitailization        True
Pre-INitailize with                     TimerCfg0

Thanks

Yong


 
Ganesh Vijayan <g...@emuzed.com> wrote:
Hi Yong,
Did you set the configuration parameters for the module properly ? Are you using the correct CSL for the chip ?
Have you set the parameters of timercfg0 correctly ?
Perform a reset timer before you config your timer i.e. TIMER_config.
Also one more important thing is that you need to multiply the difference by 8 i.e. any output from the TIMER module is scaled down by 8. You are missing the multiplication by 8.
Kindly verify the same.
Thanks and Regards,
Ganesh
----- Original Message -----
From: Yong Yang
To: Ganesh Vijayan
Cc: c...@yahoogroups.com ; c...@yahoogroups.com
Sent: Friday, April 30, 2004 11:54 AM
Subject: Re: [c6x] Fwd: Re: [code-comp] How to speed up profiling

Hi, Ganesh
 
My code in main()
 
Uint32 start, stop;
CSL_cfgInit();  //initialization  function generated by CDB
TIMER_start(hTimer1);
start = TIMER_getCount(hTimer1);
 
.....//other code

stop = TIMER_getCount(hTimer1);
printf("start: %d\n", start);
printf("stop: %d\n", stop);
printf("cycles: %d\n", stop - start);
 
in videocfg_c.c generated by CDB file
 
void CSL_cfgInit()
{
    hTimer1 = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);
    TIMER_config(hTimer1, &timerCfg0);
}
 
thanks
Yong