4.7.4. armul_ReadCycles

The read_cycles entry in the ARMul_MemInterface structure is a pointer to an armul_ReadCycles() function. This function must calculate the total cycle count since the simulation model reset.

You must implement this function, even if the implementation is very simple. You define the function name yourself.

Syntax

const ARMul_Cycles *armul_ReadCycles(void *handle)

where:

handle

is the value of interf->handle set in MemInit.

Return

RVISS calls this function each time RealView Debugger reads the counters. It must calculate the total cycle count and returns a pointer to the ARMul_Cycles structure that contains the cycle counts. The ARMul_Cycles structure is defined in armul_mem.h.

Usage

A model can keep count of the accesses made to it by RVISS by providing this function. The value of the CoreCycles field in ARMul_Cycles is provided by RVISS, not by the memory model. When you write this function, you must calculate the Total field, because this is the value returned when ARMul_Time() is called. See Event scheduling functions for a description of ARMul_Time().

Copyright © 2002-2007 ARM Limited. All rights reserved.ARM DUI 0207D
Non-Confidential