OVP Forums - A community of assistance, help, questions, and answers.
  FAQFAQ    SearchSearch      RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Log inLog in
Instruction Count and Execution time
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Ask a Question
View previous topic :: View next topic  
Author Message
ShyamShankar



Joined: 14 Jan 2015
Posts: 34
Location: Kalady

PostPosted: Thu Jun 18, 2015 7:53 pm    Post subject: Reply with quote

I am loading the .c file containing the application code(which I have given in the above thread)onto the board using the debugger in Xilinx SDK.
Yes, the Xilinx SDK does generate its own elf file.
So, could you please tell me how to use this elf file generated by Xilinx SDK in OVP?????
And also about the printf(), could you explain a bit more as to what to do in its case??
Thank You.
Back to top
View user's profile Send private message
ShyamShankar



Joined: 14 Jan 2015
Posts: 34
Location: Kalady

PostPosted: Mon Jun 22, 2015 10:30 pm    Post subject: Reply with quote

Hi,
I ran the binary file i.e. the .elf file obtained from Xilinx SDK on OVPSim.
I am getting the program to run. But it stops midway.
For example if I run the 20X20 matrix multiplication program it provides the required output matrix but doesn't give the simulation statistics nor the instruction count.
I currently don't have the ARM Cortex toolchain from codebench downloaded. Could that be an issue??? But I had generated the .elf file through compilation in Xilinx SDK so I don't think it could be a probem.
So, could someone tell me why it doesn't show the statistics of simulation???
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 1654
Location: United Kingdom

PostPosted: Mon Jun 22, 2015 11:54 pm    Post subject: Reply with quote

Is this the same simulation platform that was giving statistics previously? Statistics are only printed if the verbose flag is set.

As you are suing a different CrossCompiler toolchain and so probably a different C library, the semihosting being enabled in the platform may not be quite right. When you say you get the correct mtrix, is this because it is being printed correctly? If so, this suggests that the semihosting is working (in general). It may be that the simulation ends on symbol _exit and the semihost library expects exit ..

There are a few things you could try in order to find out what is happening
1. Set the environment variable IMPERAS_ICM_TRACE=1 and run the simualtion. This will trace the ICM API and show the fucntion calls and return
2. Attach a GDB debugger and run the software under control of a debugger to see what is happening
3. Turn on instruction tracing. I suggest use the icmTraceOnAfter to reduce the ammount of tracing to just that towards the end of simulation

2) and 3) can be done using a control file.
Set environment variable
On Linux
export IMPERAS_TOOLS=tools.ic
On Windows
set IMPERAS_TOOLS=tools.ic
In the file tools.ic (this can be any name) add the following (comment out lines not needed)
Quote:
# Turn on tracing after 1000000 instructions
--traceonafter 1000000
# start a GDB debugger attached to platform/cpu0
--gdbconsole
--debugprocessor platform/cpu0
# uncomment this line to show what is in the platform i.e. names etc
#--showoverrides
Back to top
View user's profile Send private message Visit poster's website
ShyamShankar



Joined: 14 Jan 2015
Posts: 34
Location: Kalady

PostPosted: Tue Jun 23, 2015 12:49 am    Post subject: Reply with quote

Yes, it is the same platform that provided the statistics earlier. I just changed the .elf file.
Thanks.
And I will try the steps that you have mentioned.:)
Back to top
View user's profile Send private message
ShyamShankar



Joined: 14 Jan 2015
Posts: 34
Location: Kalady

PostPosted: Tue Jun 23, 2015 1:31 am    Post subject: Reply with quote

Hi,
I wanted to mention that I did not get the OVP sim finished message after simulation. I believe it got stuck after printing out the matrix
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 1654
Location: United Kingdom

PostPosted: Tue Jun 23, 2015 1:45 am    Post subject: Reply with quote

I think there is a slight difference in the library code used at the end of simulation.
If you think about software running on a real system it never finishes, so typically the library has a spin loop after the exit function so the processor continues to execute know code.
The semihost library usually detects the execution of the exit function symbol address by the simulator and causes the simulation to end. If your library does not have an exit function or for some other reason this is not executed the simulation will appear to lock up, in fact the simulator and model are just performing the correct software instructions and 'spinning'.
If we could get hold of your example elf file I can see if this is the case, I sent a PM with this request.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Ask a Question All times are GMT - 8 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Information regarding OVP © 2008-2022 Imperas Software