cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
7,944 Views
Registered: ‎09-21-2007

Software Profiler in EDK with PPC

Hi there,

I'm having some issues getting the software profiler to run properly on my embedded system.  I am fairly new to the XPS suite, and am using EDK 8.2i, with a XC2VP30 Virtex II – Pro FPGA (with 2 PPC cores).

I have a project which consists of some hardware and some firmware, which is integrated onto a custom board.  The software which I would like to profile runs on PPC_2.

I have followed a few different walkthroughs, none of which were particularly descriptive, regarding the software intrusive profiling through EDK (which essentially uses gprof). 

One of these is directly from a Xilinx senior product applications engineer: http://www.xilinx.com/xlnx/xweb/xil_tx_display.jsp?iLanguageID=1&sSecondaryNavPick=&multPartNum=1&category=&sTechX_ID=rg_root_evil&sGlobalNavPick=&BV_SessionID=@@@@0831786709.1190419171@@@@&BV_EngineID=cccdaddllkjhdiecefeceihdffhdfkf.0
(this particular example is for a microblaze application, but I have found 1 others example with identical instructions for PPC (EDK 7.1),  as well as found old posts on forums stating that people have successfully used profiling with the PPC in EDK 7.1 and 8.1. 

The actual "Help" index in XPS has some barebones information on profiling, mainly for a microblaze application, and contains far less information than the other links I have found.

All of the info I can find seems to say the same very basic things:
-enable software intrusive profiling the software platform settings (with no profile timer selected because this is for PPC)
-add the -pg flag to the compiler options of the project
-in XMD, configure profiling, for example:
     profile -config sampling_freq_hz 10000 binsize 4 profile_mem 0xF2C00000
-download the executable to the board:
     dow PPC405_2/executable.elf
-type "profile"

What is missing from these documents (and what might be the simplest part) is their particular method of downloading the hardware/software to the board.  I understand there are a few options, and I have tried every combination I can think of. 
ie) using on-chip Bram memory for the software, so that the executables are already included in the .bit file  (which is the preferred method already being used for this project).  But if I do this, do I need to "re-download" the .elf file in XMD as above?  I've tried both ways. 
ie) not using Bram for the software, and instead enabling Bram for the bootloop, so that the .bit file only contains the hardware, then downloading the .elf file through XMD, as above.

I do not get any actual "errors", but the profiling seems to be ignored in every case.
When the above command " dow PPC405_2/executable.elf" is run, I am *supposed* to receive an output which includes something like the following lines:

XMD% dow PPC405_2/executable.elf

section, .text: 0x82000000-0x82000ba8
section, .data: 0x82000ba8-0x82000bd4
section, .bss: 0x82000bd8-0x82100be8

Downloaded Program executable.elf
Setting PC with program start addr = 0x82000000
Program executable.elf being Profiled on Hardware
Initialized Profile Configurations for the Program:
---------------------------------------------------
Sampling Frequency...............10000 Hz
Histogram Bin Size...............4 Words
Memory for Profiling used from...0x83000000
Memory Used for Profiling Data...728 Bytes


But what I actually get is the same output I would get if I never issues any profile commands to begin with:

XMD% dow PPC405_2/executable.elf

section, .text: 0x82000000-0x82000ba8
section, .data: 0x82000ba8-0x82000bd4
section, .bss: 0x82000bd8-0x82100be8

Downloaded Program executable.elf
Setting PC with program start addr = 0x82000000

Then, if I pretend it worked and try running Profile anyways, it simply says:
Program executable.elf is not being Profiled on Hardware

I have verified in the log files that the executables are being compiled with the appropriate profile flags, and the library for profiling is being created.  All without errors. 



I'm starting to go nuts with this!   Has anyone else out there ever used the EDK profiler with a PPC before???   Greatly appreciative for any tips or advice.  This is my first post on this forum, so if I left out any standard information I apologize and I will try to provide anything else required. 


 

This is curious – in the official Xilinx documentation for EDK 8.1i, and EDK 6.2,  “LibXil Profile”  , in the Overview I find the following sentence, concluding the paragraph:

“Profiling is supported for the MicroBlaze processor.”

 


This certainly does not come right out and say that it is not supported for the PPC, however there seems to be at least some kind of an implication there, however ambiguous. 

 

Thank you!
Simon

0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
7,932 Views
Registered: ‎08-07-2007

Re: Software Profiler in EDK with PPC

What's your address map and what's the 'profile_mem' you specified?
0 Kudos
Highlighted
Visitor
Visitor
7,912 Views
Registered: ‎09-21-2007

Re: Software Profiler in EDK with PPC

Hi xiaofeip,
Thanks for the response.  I've now heard back from Xilinx on this problem, and the official word seems to be that profiling will not work in EDK 8.2i;  the solution being to either upgrade to 9.1, or downgrade to 8.1. 

~Simon
0 Kudos