Datasheet

ARMulator Reference
4-14 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI0058D
4.3.2 Model initialization
The
BEGIN_INIT()
and
END_INIT()
macros form the start and finish of the initialization
function for the model. The initialization function is called:
during ARMulator initialization
whenever a new image is downloaded from the debugger.
The following local variables are provided in the initialization function:
bool coldboot
TRUE
if ARMulator is initializing,
FALSE
if a new image is being downloaded from
the debugger.
YourModelState *state
A pointer to the private state data structure. Memory for this is allocated and
cleared by the initialization macro, and the predefined data fields are initialized.
In the initialization function, your model must:
initialize any private data
install any callbacks.
4.3.3 Model finalization
The
BEGIN_EXIT()
and
END_EXIT()
macros form the start and finish of the finalization
function for the model. The finalization function is called when ARMulator is closing
down.
The following local variable is provided in the finalization function:
YourModelState *state
Your model must de-install any callbacks in the finalization function.
The
END_EXIT()
macro frees memory allocated for state.