cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
achintha.avin
Visitor
Visitor
2,743 Views
Registered: ‎09-13-2016

Access performance counters in bare metal mode

Hi,

 

I'm using a zedboard which uses xilinx Zynq®-7000 SOC and having a dual core cortex-A9 processor.

 

So what I am interested in is running some benchmark C programs on top of the cortex-A9 processor and observe information like cycle count, branch mispredictions, cache hit/miss count  etc.

 

For the purpose I need to view the performance counters. But I'm running the applications bare metal without an OS.

I saw some of the documents here and here saying how to access performance counters when you have an OS running.

 

Can anyone explain how can I view above details in xilinx SDK 2015.3 ?

 

I have followed this tutorial to build a project on vivado 2015.3, and it uses AXI performance monitor and some traffic generator IP cores. At the end they have given a code snippet to be run on the processor using SDK. 

But  that doesn't show the information I need such as branch misprediction count and all.

 

Can someone suggest me a code so that I can view above details in bare metal? 

Here is the example_code given by xilinx.

 

Or else any other method such as using ARM's DS-5 would be welcome.

 

Thanks

 

 

 

0 Kudos
2 Replies
muzaffer
Teacher
Teacher
2,697 Views
Registered: ‎03-31-2012

I am not sure where the confusion comes from but neither of the link you post assume an OS is used. The first one is definitely using SDK only and the second just shows code which can be compiled on bare-metal easily.
In the first case, continuous monitoring & graphing needs the system to be in debug mode but this is not necessary if you just want to get the results. You can send the values you obtain in your bare-metal setup to a separate host for visualization if necessary.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
achintha.avin
Visitor
Visitor
2,670 Views
Registered: ‎09-13-2016

Hi,

 

But in SDK 2015.3 I dont find an option called 'Performance Counters' under show view. This version doesn't have that option?

Or else is there other option I can use in SDK 2015.3?

 

On the other hand can you please give me the instructions to compile and run the code in 2nd link. I'm quite new to this.

A tutorial would also be fine.

 

Thanks

0 Kudos