cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
1,026 Views
Registered: ‎05-29-2018

How to monitor the load and memory usage of a microBlaze

Jump to solution

Hello,

 

I want to monitor the load and memory usage of a microBlaze. Is there an already existing tool to do that? Maybe the MicroBlaze Debug Module?

I am new to the whole topic microBlaze and FPGA in general. Therefore, I am overwhelmed by the amount of available documentation. So it is quite possible, that I missed a helpful document. Every hint is welcome.

 

Best regards,

Sebastian

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Scholar
Scholar
1,203 Views
Registered: ‎04-13-2015

Re: How to monitor the load and memory usage of a microBlaze

Jump to solution

@vettse1

 

For the CPU loading, if you are not using an RTOS,

you have to instrument your code to mark and use a timer/counter for each "busy" vs "idle" section of your code.

Only you knows the difference between busy and idle code.

If you using an RTOS, this info should be available.

 

For the memory usage, if you are thinking about peak usage of stack, heap, real buffer use, etc...

It's again code instrumentation, albeit much more complex than the code instrumentation.

 

 

 

View solution in original post

0 Kudos
5 Replies
Highlighted
Moderator
Moderator
1,011 Views
Registered: ‎09-12-2007

Re: How to monitor the load and memory usage of a microBlaze

Jump to solution

When you compile in the SDK this should tell you the size of the application. 

 

If you have the elf, you can use the mb-size <path to elf> command to get this.

You can run this command from the XSDK shell.

 

 

0 Kudos
Highlighted
Visitor
Visitor
1,009 Views
Registered: ‎05-29-2018

Re: How to monitor the load and memory usage of a microBlaze

Jump to solution

Thank you very much.

I was not clear enough. We want to monitor the load and dynamic memory usage, while the is microBlaze running our code. We want to know how much RAM our code is using and how long the microBlaze is actually working and how long idling.

 

 

0 Kudos
Highlighted
Moderator
Moderator
997 Views
Registered: ‎09-12-2007

Re: How to monitor the load and memory usage of a microBlaze

Jump to solution

Not sure if this is possible while running the code. You can get the map file (this will tell you how much memory each section requires):

https://forums.xilinx.com/t5/Embedded-Processor-System-Design/Microblaze-linker-generating-Map-file/td-p/403477

 

You can also profile you application:

http://www.wiki.xilinx.com/How+to+profile+Microblaze+application

0 Kudos
Highlighted
Scholar
Scholar
1,204 Views
Registered: ‎04-13-2015

Re: How to monitor the load and memory usage of a microBlaze

Jump to solution

@vettse1

 

For the CPU loading, if you are not using an RTOS,

you have to instrument your code to mark and use a timer/counter for each "busy" vs "idle" section of your code.

Only you knows the difference between busy and idle code.

If you using an RTOS, this info should be available.

 

For the memory usage, if you are thinking about peak usage of stack, heap, real buffer use, etc...

It's again code instrumentation, albeit much more complex than the code instrumentation.

 

 

 

View solution in original post

0 Kudos
Highlighted
Visitor
Visitor
956 Views
Registered: ‎05-29-2018

Re: How to monitor the load and memory usage of a microBlaze

Jump to solution

Thanks to the two of you for your suggestions.

 

@stephenm 

The Map file is an output of the linker, so the dynamical RAM usage could not be monitored this way. Nevertheless, it might be useful for me. Also profiling is interesting, but not what I am looking for at the moment.

 

@ericv

I am using a standalone BSP and yes I am thinking about peak usage of stack, heap, real buffer use, etc.. So unfortunately, I have to come up with something on my own. I have asked just in case there is something simpler.

0 Kudos