DSPRelated.com
Forums

CCS clock()

Started by Imran Akthar March 5, 2004
Hi there,
I m using DM642 simulator,600MHz,CCS ver 2.2,WINDOWS 2000 OS.
I have a algorithmn and i want to check the time taken by it.
I m using clock() function and getting the result as number of
cycles taken by the algorithmn.
what i have done is
in the PROFILER->CLOCK SETUP,time taken by CPU cycles as 1.67 ns.
Pipe line adjustments as 0(default)
my algoritmn uses lot of memory read and write operations,that too
external memory(in the linker file,i have used SDRAM space for .sysmem
(heap)).
my question is
1)do i need to specify the time taken for memory read and write
in PROFILER ->CLOCK SETUP(by default ,its 0 ns).
2)regarding the clock() function,is the cycles it returns is of
my PC or the DSP simulator which m using.
also,since the return value of clock() function is in cycles,its
mentioned to use CLOCK_PER_SEC to get the time in sec.whats the value
of CLOCK_PER_SEC(is it the clock freq. of the dsp board,in my case m
using simultor having a freq of 600 MHz??).
3)also,while using the simulator,its taking lot of time,for
example,during one process,it took approximately 10 minutes of my PC
time,but the simulator results in cycles was a value less that <600
MHz,taht means ..it takes less that 1 sec time,when i want to
calculate in terms of seconds.??
if m right,then ,y the simulator takes so long time,??
and what when the algo,is put into the BOARD,will it give the
same result in terms of cycle and hence less than 1 sec??or will it
take time as was taken by my PC..that is 10 minutes..?? hope my questions are clear..??

well..m new to this CCS studio..so need help..

thanks

MA IMRAN




dear imran,

sim works very slow as compared to real-time, that 2
in a fast PC which works in GHz., anywayz as regards 2
clock, in profiler just mention clock cycle time as
1.667ns or whatever u approximate 1/600MHz as...,
also this gives only an near approximate of cpu
cycles. cud be 95% accurate. anywayz as a thumb rule
use [clock cycle read]/0.95 to get a more realistic
value.

U don hav 2 mention read and write access time
separately. just the 1/600MHz value.

don worry real-time world is much faster yet u face
realistic issues compared 2 small sim related issue.

b.o.l. for ur coding

cya,
tirthrulz.......

--- Imran Akthar <> wrote: > Hi
there,
> I m using DM642 simulator,600MHz,CCS ver
> 2.2,WINDOWS 2000 OS.
> I have a algorithmn and i want to check the time
> taken by it.
> I m using clock() function and getting the result
> as number of
> cycles taken by the algorithmn.
> what i have done is
> in the PROFILER->CLOCK SETUP,time taken by CPU
> cycles as 1.67 ns.
> Pipe line adjustments as 0(default)
> my algoritmn uses lot of memory read and write
> operations,that too
> external memory(in the linker file,i have used SDRAM
> space for .sysmem
> (heap)).
> my question is
> 1)do i need to specify the time taken for memory
> read and write
> in PROFILER ->CLOCK SETUP(by default ,its 0 ns).
> 2)regarding the clock() function,is the cycles
> it returns is of
> my PC or the DSP simulator which m using.
> also,since the return value of clock() function
> is in cycles,its
> mentioned to use CLOCK_PER_SEC to get the time in
> sec.whats the value
> of CLOCK_PER_SEC(is it the clock freq. of the dsp
> board,in my case m
> using simultor having a freq of 600 MHz??).
> 3)also,while using the simulator,its taking lot
> of time,for
> example,during one process,it took approximately 10
> minutes of my PC
> time,but the simulator results in cycles was a value
> less that <600
> MHz,taht means ..it takes less that 1 sec time,when
> i want to
> calculate in terms of seconds.??
> if m right,then ,y the simulator takes so long
> time,??
> and what when the algo,is put into the
> BOARD,will it give the
> same result in terms of cycle and hence less than 1
> sec??or will it
> take time as was taken by my PC..that is 10
> minutes..?? > hope my questions are clear..??
>
> well..m new to this CCS studio..so need help..
>
> thanks
>
> MA IMRAN > ------------------------ Yahoo! Groups Sponsor
>
> _____________________________________
> 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:
>
> To Post:
>
> To Leave:
>
> Archives: http://www.yahoogroups.com/group/code-comp
>
> More Groups: http://www.dsprelated.com
>
> Yahoo! Groups Links >

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html