![Intel IXP2400 User Manual Download Page 296](http://html1.mh-extra.com/html/intel/ixp2400/ixp2400_user-manual_2071795296.webp)
296
Development Tools User’s Guide
Intel
®
IXP2400/IXP2800 Network Processors
Intel XScale® Core Memory Bus Functional Model
C.1.1
XACT_IO API
There are ten API functions exported from the XACT_IO. Among the ten API functions, two
functions are programmed to support write/read to the IXP2800/IXP2400 Intel XScale
32-bit
address space, six functions are devised to support interface for handling interrupt requests, and
two functions are provided for sanity check.
C.1.2
simRead32 / simWrite32
These two functions are provided to read/write to any 32-bit address space. The address mapping is
programmed according to the
IXP2400/IXP2400 Network Processor Programmer’s Reference
Manual
.
int
simRead32
(char
chip_name,
unsigned int
addr,
unsigned int *
data
)
int
simWrite32
(char
*chip_name
,
unsigned int
addr
,
unsigned int
data
)
where:
chip_name
:
name of the instantiated IXP2800/IXP2400 instance,
addr
:
32-bit Intel XScale
address,
data
:
write data or pointer to return read data (*data),
return
value:
1 for success, -1 for fail
C.1.3
simIntConnect / simIntEnable / simIntDisable
cmbIntConnect/cmbIntEnable/cmbIntDisable
The simIntXXX functions are XACT_IO API, embedded in the Transactor (both IXP2800 and
IXP2400), and the cmbIntXXX functions are CMB_IO API which is supported by the Intel
XScale
/gasket BFM. Both sets of API are function calls that handle Intel XScale
/gasket
interrupts. The difference is in the implementation.
The XACT_IO handles the interrupt service by registering a CSR watch state to transactor, which
in turn calls the service routine when the interrupt CSR state is changed.
In contrast, the CMB_IO implements the same set of routines by checking the IRQ/FIQ pins on
Intel XScale/CMB BFM. The service routines will be called when the BFM detects that the
respective pin is asserted.
simIntConnectIRQ/simIntConnectFIQ
provide interface for user program to register a callback
function to be invoked once the interrupt status gets changed.
int
simIntConnectIRQ
( char
*chip_name
,
unsigned int
intVecto
r,
void (*
isrPtr
)(unsigned int
data
),
unsigned int
usrData
)