Simulator hooks
Jump to navigation
Jump to search
Applications can interface with the simulation using a number of hooks defined in sniper/include/sim_api.h
. To use these, include #include <sim_api.h>
in your application and compile it with the -I${GRAPHITE_ROOT}/include
flag.
- SimRoiStart() and SimRoiEnd(): start or end the region of interest (ROI), this will start or end detailed performance simulation
- SimSetFreqMHz(proc, mhz): set the clock frequency of core
proc
tomhz
MHz - SimSetOwnFreqMHz(mhz): set the clock frequency of the core executing this function to
mhz
MHz - SimGetFreqMHz(proc), SimGetOwnFreqMHz(): retrieve the clock frequency of a specific or the current core, in MHz
- SimMarker(arg0, arg1): define a marker. Scripts register to receive a callback when these markers are executed, see Scripting
- SimUser(cmd, arg): user-defined function returning a value, see Scripting
- SimInSimulator(): return 1 when the application is being run inside Sniper, and 0 otherwise