Pci Bus Functional Model; Loading The Bfm; Initializing The Bfm; Creating A Device - Intel IXP2400 User Manual

Network processors
Table of Contents

Advertisement

PCI Bus Functional Model

The PCI Bus Functional Model allows simulation of the PCI unit in the network processor, as a
master issuing commands to a PCI slave devices modeled by the PCI BFM.
The PCI BFM functions like any other BFM: it is loaded through the "foreign_model" command
and it implements a set of console functions for access. This section will give an overview to the
usage of the PCI BFM—more information can be found in the pciconfx.h header file.
D.1

Loading the BFM

The PCI BFM can be loaded into the transactor via the Workbench Simulation Options – Foreign
Model tab. If the transactor is run on the command line without the Workbench, it can be loaded
manually on the command line or in an IND script.
To load the BFM from the transactor command line, use the foreign_model command:
foreign_model pci_bfm2400.dll <name>
The parameter name can be any valid identifier. This line will load the DLL into the transactor; for
the IXP2800, simply substitute pci_bfm2800 for pci_bfm2400.
D.2

Initializing the BFM

The PCI BFM will initialize its console functions and internal variables during the transactor
initialization phase. When running under the Workbench, initialization is automatically performed
when a debugging session is started. When running on the command line console mode without the
Workbench, calling @init_IXP2400 or @init_IXP2800 on the command line will lead to the
initialization of the transactor and BFM. This init sequence must be called before any of the
console functions are registered.
D.3

Creating a Device

The general procedure for instantiating a device consists of defining the device, setting its
attributes, and connecting the device. These are normally done in an IND script. In the following
example, MODE is defined as 1, indicating that the device is a slave—currently only slave devices
are supported.
pci_define_device(iDevId, MODE);
pci_set_param(iDevId, MEM_SPACE, iMemBase, iMemRange);
pci_connect_device(sr_chip_name, iDevId);
Development Tools User's Guide
D
303

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ixp2800

Table of Contents