4.6. Events

ARMulator has a mechanism for broadcasting and handling events. These events consist of an event number and a pair of words. The number identifies the event. The details depends on the event.

The core ARMulator generates some example events, defined in armdefs.h. They are divided into three groups:

These events can be logged in the trace file if tracing is enabled, and trace events is turned on. Additional modules can provide new event types that will be handled in the same way. User defined events must have values between UserEvent_Base (0x100000) and UserEvent_Top (0x1FFFFF).

You can catch events by installing an event handler (see Event handler). You can raise an event by calling ARMulif_RaiseEvent() (see ARMulif_RaiseEvent).

Table 4.1. Events from the MMU and cache (not on StrongARM-110)

Event nameWord 1Word 2Event number
MMUEvent_DLineFetchMiss addressVictim address0x10001
MMUEvent_ILineFetchMiss addressVictim address0x10002
MMUEvent_WBStallPhysical address of writeNumber of words in write buffer0x10003
MMUEvent_DTLBWalkMiss addressVictim address0x10004
MMUEvent_ITLBWalkMiss addressVictim address0x10005
MMUEvent_LineWBMiss addressVictim address0x10006
MMUEvent_DCacheStallAddress causing stallAddress fetching0x10007
MMUEvent_ICacheStallAddress causing stallAddress fetching0x10008

Table 4.2. Events from the ARM processor core

Event nameWord 1Word 2Event number
CoreEvent_Reset--0x1
CoreEvent_UndefinedInstrpc valueInstruction0x2
CoreEvent_SWIpc valueSWI number0x3
CoreEvent_PrefetchAbortpc value-0x4
CoreEvent_DataAbortpc valueAborting address0x5
CoreEvent_AddrExceptnpc valueAborting address0x6
CoreEvent_IRQpc value-0x7
CoreEvent_FIQpc value-0x8
CoreEvent_Breakpointpc valueRDI_PointHandle0x9
CoreEvent_Watchpointpc valueWatch address0xA
CoreEvent_IRQSpottedpc value-0x17
CoreEvent_FIQSpottedpc value-0x18
CoreEvent_ModeChangepc valueNew mode0x19
CoreEvent_Dependencypc valueInterlock register bitmask0x20

Table 4.3. Events from the prefetch unit (ARM810 only)

Event nameWord 1Word 2Event number


PUEvent_Full

Next pc value

-

0x20001


PUEvent_Mispredict

Address of branch

-

0x20002


PUEvent_Empty

Next pc value

-

0x20003

Table 4.4. Debug events

Event nameWord 1Word 2Event number


DebugEvent_InToDebug

-

-

0x40001


DebugEvent_OutOfDebug

-

-

0x40002


DebugEvent_DebuggerChangedPC

pc

-

0x40003

Table 4.5. Config events

Event nameWord 1Word 2Event number


ConfigEvent_AllLoaded

-

-

0x50001


ConfigEvent_Reset

-

-

0x50002


ConfigEvent_VectorsLoaded

-

-

0x50003


ConfigEvent_EndiannessChanged

1 (big end) or 2 (little end)-0x50005
Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI0058D
Non-Confidential