UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor sjun027
Visitor
3,861 Views
Registered: ‎03-11-2014

Mearsuring CPU usage

Hi, there

I am currently developing a system on Zynq.

I would like to measure Hardware Usage(CPU)  while developing on SDK or Plan Ahead.

 

Any reply would be appreciated

thanks.

0 Kudos
3 Replies
Scholar joelby
Scholar
3,857 Views
Registered: ‎10-05-2010

Re: Mearsuring CPU usage

Are you using an operating system on the Zynq? A CPU is always in use, unless it's in a sleep mode. If you're using an operating system, CPU usage is defined by the amount of time you spend doing something and not just waiting for the next task. Operating systems generally track these sorts of statistics for you.

0 Kudos
Visitor sjun027
Visitor
3,847 Views
Registered: ‎03-11-2014

Re: Mearsuring CPU usage

oh well i do not use os on the Zynq.
so you mean.. using some GetTime() functions between my code would give me the CPU usage?
0 Kudos
Scholar joelby
Scholar
3,832 Views
Registered: ‎10-05-2010

Re: Mearsuring CPU usage

Not quite, that'll give you the time it took to do certain functions.

 

CPU usage only makes sense in the context of a multi-tasking system (or perhaps if you're putting the CPU to sleep from time to time). It's up to you to define what is 'real' CPU usage and what is 'idle' (sitting in a busy loop, or a while(true){} loop and waiting for interrupts, etc.).