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
how can monitoring at run-time the instructions executed

 
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Ask a Question
View previous topic :: View next topic  
Author Message
YoudD



Joined: 15 Mar 2021
Posts: 22

PostPosted: Tue Nov 16, 2021 12:33 am    Post subject: how can monitoring at run-time the instructions executed Reply with quote

I wonder how can I implement it that monitoring at run-time the instructions executed by a target CPU.Whenever an instruction is fetched from the memory ,I can get the instruction.Then let me perform the necessary processing of these instructions and then hand them over to the CPU to execute.
Thank you!
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


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

PostPosted: Tue Nov 16, 2021 2:05 am    Post subject: Reply with quote

You can add callbacks onto the bus or memory that can be used to detect accesses and determine the data. Please see the monitoring functions in the OP API.
Back to top
View user's profile Send private message Visit poster's website
YoudD



Joined: 15 Mar 2021
Posts: 22

PostPosted: Wed Nov 17, 2021 5:32 am    Post subject: Reply with quote

DuncGrah wrote:
You can add callbacks onto the bus or memory that can be used to detect accesses and determine the data. Please see the monitoring functions in the OP API.


Thank you!And now if I want to know which type of instruction I'm monitoring (such as addition, subtraction, multiplication), which function should I use?
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


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

PostPosted: Wed Nov 17, 2021 6:45 am    Post subject: Reply with quote

I am afraid there is no function available in the OP or VMI APIs that allow an instruction to be decoded. The instruction decode information is all embeded in the processor models.
There are functions that allow instruction attributes to be extracted e.g. registers accessed etc. However, OVPsim does not support these.
Back to top
View user's profile Send private message Visit poster's website
YoudD



Joined: 15 Mar 2021
Posts: 22

PostPosted: Wed Nov 17, 2021 6:26 pm    Post subject: Reply with quote

DuncGrah wrote:
I am afraid there is no function available in the OP or VMI APIs that allow an instruction to be decoded. The instruction decode information is all embeded in the processor models.
There are functions that allow instruction attributes to be extracted e.g. registers accessed etc. However, OVPsim does not support these.

If I just want to get the assembly or binary code of the instruction which I monitoring,can I do that?
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


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

PostPosted: Thu Nov 18, 2021 1:03 am    Post subject: Reply with quote

There are OP API functions that allow you to monitor accesses.
You will get the data of the transaction provided in the callback, so the instruction binary on an instruction fetch. Please review the OP API monitor functions.
Also take a look at the example Examples/SimulationControl/monitoringAccesses, other similar examples and the descriptions in the document doc/ovp/Simulation_Control_of_Platforms_and_Modules_User_Guide.pdf.
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
Page 1 of 1

 
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