Development Tools User’s Guide
265
Intel
®
IXP2400/IXP2800 Network Processors
Simulator APIs
9.3.16
XACT_clock_cycle_with_remainder
This function returns the clock cycle number (starting at 0) for the specified clock. It returns -1 if
an error occurred during routine execution. If the simulation time does not fall on a whole multiple
of the specified clock, the percentage of the time into the partial clock cycle is returned in
percent_remainder
; otherwise this argument returns 0
Synopsis
XACTAPI XACT_clock_cycle_with_remainder(
XACT_HANDLE clock_handle, double
*percent_remainder )
9.3.17
XACT_get_top_level_inst
This function can be repeatedly called to get the
cell_name/inst_name
pair names of all
cells instantiated at the top level by the "inst" command. The user supplied arguments are filled in
with the string names on each successive call. The first call must be made with "
**inst_name
== '\0'"
. Successive calls are made by supplying the strings returned from the previous call. It
is assumed that the supplied string storage is large enough to accommodate the returned string
names. The
cell_name
argument can be NULL in which case no cell name data is returned.
Synopsis
XACTAPI XACT_get_top_level_inst( char
**inst_name, char **cell_name )
Returns
TRUE when a
cell_name/inst_name
is returned
FALSE on an error or when no more name pairs can be returned
9.4
Callback Creation and Deletion Functions
9.4.1
XACT_Define_Callback_Create_Chip
Calls callback when a chip of the specified name has been called
Synopsis
XACTAPI XACT_Define_Callback_Create_Chip(
void(*fp)( char *chip_name )
)
9.4.2
XACT_Define_Callback_Init_Sim
Calls callback when the simulation has been instantiated and initialized via the "init" command
Synopsis
XACTAPI XACT_Define_Callback_Init_Sim(
void(*fp)() )
9.4.3
XACT_Define_Callback_Sim_Reset
Calls callback when the simulation has been reset via the "
sim_reset
" command
Synopsis
XACTAPI XACT_Define_Callback_Sim_Reset(
void(*fp)() )