262
Development Tools User’s Guide
Intel
®
IXP2400/IXP2800 Network Processors
Simulator APIs
9.3.5
XACT_get_state_value
This function gets the value of the state corresponding to the transactor handle. Note that the value
pointer is assumed to point to an array of unsigned ints large enough to accommodate the value of
the state element. Thus, the array length must be equal to (
state_width/32) +
((state_width % 32) ? 1 : 0)
If the specified handle corresponds to an element of an array that is currently uninitialized (e.g. an
uninitialized memory location), or is currently invalid (e.g. the state of a tristate node that was not
driven), the return status is set to -1 and the returned value is unpredictable.
Synopsis
XACTAPI XACT_get_state_value(XACT_HANDLE
state_handle, unsigned int *value)
Returns
1 if function is successful
0 if function is unsuccessful
9.3.6
XACT_get_state_field
This function behaves analogously to
XACT_get_state_value()
except that it gets the value
of the specified bit field rather than the value of the state.
Synopsis
XACTAPI XACT_get_state_field( XACT_HANDLE
state_handle, unsigned int *value, int msb, int
lsb )
Returns
1 if specified bit-field is valid
0 if specified bit-field is invalid
9.3.7
XACT_get_array_state_value
This function behaves the same as
XACT_get_state_value
, except that the handle must
correspond to an array state, and a valid array index must be specified. If the specified handle
corresponds to an element of an array that is currently uninitialized (e.g. an uninitialized memory
location), the return status is set to -1 and the returned value is unpredictable. If the specified
handle was associated to a particular element of an array, its predefined array index is ignored for
the purpose of this call.
Synopsis
XACTAPI XACT_get_array_state_value( XACT_HANDLE
state_handle, int array_index, unsigned int
*value )
Synopsis
XACTAPI XACT_get_fifo_state_value( XACT_HANDLE
fifo_handle, int fifo_index, unsigned int *value
)
Returns
1 if valid data is returned
-1 if the addressed entry contains invalid data
0 indicating an access failure.