OVP Forums - A community of assistance, help, questions, and answers.
|
View previous topic :: View next topic |
Author |
Message |
YoudD
Joined: 15 Mar 2021 Posts: 22
|
Posted: Tue Nov 16, 2021 12:33 am Post subject: how can monitoring at run-time the instructions executed |
|
|
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 |
|
 |
DuncGrah OVP Technologist

Joined: 27 Feb 2008 Posts: 1646 Location: United Kingdom
|
Posted: Tue Nov 16, 2021 2:05 am Post subject: |
|
|
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 |
|
 |
YoudD
Joined: 15 Mar 2021 Posts: 22
|
Posted: Wed Nov 17, 2021 5:32 am Post subject: |
|
|
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 |
|
 |
DuncGrah OVP Technologist

Joined: 27 Feb 2008 Posts: 1646 Location: United Kingdom
|
Posted: Wed Nov 17, 2021 6:45 am Post subject: |
|
|
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 |
|
 |
YoudD
Joined: 15 Mar 2021 Posts: 22
|
Posted: Wed Nov 17, 2021 6:26 pm Post subject: |
|
|
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 |
|
 |
DuncGrah OVP Technologist

Joined: 27 Feb 2008 Posts: 1646 Location: United Kingdom
|
Posted: Thu Nov 18, 2021 1:03 am Post subject: |
|
|
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 |
|
 |
|
|
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
|