
Development Tools User’s Guide
311
SPI4 Bus Functional Model
E
This chapter describes two Application Program Interfaces (APIs) supported through the IXP2800
SPI4 Bus Function Model (BFM) - which simulates the SPI4 protocol, OIF-SPI4-02.0, through the
transactor Foreign Model Interface (FMI).
E.1
Overview
The SPI4 BFM is invoked by the IXP2800 transactor through the foreign_model transactor
command and synchronized with the same event control logic as the transactor.
The SPI4 BFM, spi4_bfm.dll, provides function calls for users to configure and access FIFO status
either through extended console functions or a C-API. The extended console functions are
recognized by the C-interpreter embedded in the transactor, such that the programmer can invoke
these functions through transactor scripts or by typing them into the transactor command line. The
C-API is used mainly for an external software component, such as the Developers Workbench, to
use the SPI4 BFM through C functions.
E.2
SPI4 BFM Help
To access additional information about the SPI4 BFM:
spi4_help();
This command prints out all supported console functions. The
commands are:
spi4_help, spi4_help_fn, spi4_define_device,
spi4_set_device_rx_param, spi4_set_port_rx_param,
spi4_set_device_tx_param, spi4_set_port_tx_param,
spi4_create_device, spi4_connect_device, spi4_enable_device,
spi4_enable_port, spi4_set_device_stop_control,
spi4_set_port_stop_control, spi4_set_sim_options, spi4_get_tx_stat
spi4_version, spi4_set_network_log, spi4_get_receive_stats_packet,
spi4_get_receive_stats_byte, spi4_get_receive_stats_cycle,
spi4_get_transmit_stats_packet, spi4_get_transmit_stats_byte,
spi4_get_transmit_stats_cycle, spi4_get_rx_buffer_byte,
spi4_get_rx_buffer_int32, spi4_get_tx_buffer_byte,
spi4_get_tx_buffer_int32, spi4_get_rx_clock_cycle
spi4_get_tx_clock_cycle, spi4_reset_stat, spi4_debug_log
spi4_help_fn(fn_name);
This command prints out the argument list and a brief explanation of the
specified function. For example:
spi4_help_fn("spi4_define_device");
spi4_define_device(string device_type, int device_id, int num_ports)
device_type: any string
device_id: unique device id
num_ports: # of ports
1