
222
Development Tools User’s Guide
Intel® IXP2400/IXP2800 Network Processors
Foreign Model Simulation Extensions
•
Generating traffic on external busses
. Microengine software designers can use a foreign
model to assist in the design and debugging of Microengine software modules by producing
generic transactions of the Media Bus. This way, hardware residing on the Media Bus such as
a MAC device or some custom chip can be simulated. Once the software is designed, the same
foreign model interface can be used to produce the traffic typical for the application. This
assists in estimating the performance of software.
•
Intel
®
XScale
Software Module Prototyping
. The Foreign model interface can also be
used to develop the software that will run on the Intel
®
XScale
core. Even though Intel
®
XScale
core software executes on a development machine, once it interfaces to the
Transactor through the Transactor API, execution is cycle accurate. This reduces the
simulation time and allows accurate verification of interactions between Intel
®
XScale
and
Microengine software.
7.2
Integrating Foreign Models with the Transactor
A foreign model provides a mechanism by which the network processor software model
(Transactors) can be extended to include additional software models of hardware that interface
with the network processor. The way to integrate a foreign model with the appropriate Transactor is
by creating a Foreign Model Dynamic-link Library (DLL).
To activate a Foreign Model DLL, you execute the
foreign_model
command at the
Transactor’s command prompt (see
for more information about the Transactor).
If you are running the Developer’s Workbench, you specify your foreign model by selecting
Simulation->Options
then selecting the
Foreign Model
tab. The Workbench automatically
executes the appropriate
foreign_model
command for you.
When the Transactor executes the
foreign_model
command, it loads the Foreign Model DLL.
It then searches for the XACT_Proxy_Initialize function in the Foreign Model DLL. If the function
is found, the Transactor calls it to initialize a data structure that is used to dynamically bind
functions exported by the Transactor to the Foreign Model DLL. The first time the Foreign Model
DLL accesses a function that is exported by the Transactor, the data structure is modified to
dynamically bind the function to the Foreign Model DLL.
If the XACT_Proxy_Initialize function is not found, the Transactor assumes the Foreign Model
DLL was statically linked to the Transactor DLL. After the Transactor determines the type of
binding being used, it and calls the
GetForeignModelFunctions()
function in the foreign
model to get the pointers to six foreign model functions.
The Transactor calls these functions to notify the foreign model whenever the following simulation
events occur:
•
The model is initialized.
•
Before a simulation step occurs (preSim),
•
After a simulation step has completed (postSim),
•
The simulation is reset (i.e., a sim_reset command is executed),
•
The model is deleted (i.e., a sim_delete command is executed), and
•
When the Transactor exits.
The foreign model interacts with the Transactor using the Transactor API.