Intel IXP2400 User Manual

Network processors
Table of Contents

Advertisement

Quick Links

®
Intel
IXP2400/IXP2800 Network
Processors
Development Tools User's Guide
March 2004
Order Number:
278733-011

Advertisement

Table of Contents
loading

Summary of Contents for Intel IXP2400

  • Page 1 ® Intel IXP2400/IXP2800 Network Processors Development Tools User’s Guide March 2004 Order Number: 278733-011...
  • Page 2: Revision History

    No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. Except as provided in Intel's Terms and Conditions of Sale for such products, Intel assumes no liability whatsoever, and Intel disclaims any express or implied warranty, relating to sale and/or use of Intel products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right.
  • Page 3: Table Of Contents

    ® Intel IXP2400/IXP2800 Network Processors Contents Introduction......................17 About this Document ......................17 Intended Audience......................17 Related Documents ......................17 Developer Workbench .................... 19 Overview........................... 19 About the Graphical User Interface (GUI) ................ 20 2.2.1 About Windows, Toolbars, and Menus ................. 20 2.2.2...
  • Page 4 Compilation Errors ......................53 The Linker ........................54 2.8.1 Customizing Linker Settings..................54 2.8.2 Building and Rebuilding a Project ................. 57 Configuring the IXP2400 Simulation Environment ............58 2.9.1 IXP2400 Clock Frequencies..................58 2.9.2 IXP2400 Memory ......................59 2.9.3 IXP2400 MSF Device Configuration ................61 2.9.4...
  • Page 5 ® Intel IXP2400/IXP2800 Network Processors 2.12.2 Creating and Editing an ATM Data Stream ..............94 2.12.3 Creating and Editing a Custom Ethernet TCP/IP Data Stream ........95 2.12.4 Creating and Editing an Ethernet IP Data Stream ............97 2.12.5 Creating and Editing an Ethernet TCP/IP Data Stream ..........98 2.12.6 Creating and Editing a PPP TCP/IP Data Stream............
  • Page 6 ® Intel IXP2400/IXP2800 Network Processors 2.13.10.1 Breakpoint Properties Dialog Box................ 131 2.13.10.2 Setting Breakpoints in Hardware Mode ............... 132 2.13.10.3 About Breakpoint Markers ................... 132 2.13.10.4 Inserting and Removing Breakpoints..............134 2.13.10.5 Enabling and Disabling Breakpoints..............135 2.13.10.6 Changing Breakpoint Properties................135 2.13.10.7 About Multi-Microengine Breakpoint Support ............
  • Page 7 ® Intel IXP2400/IXP2800 Network Processors 2.13.19 Packet Simulation Status .................... 169 2.14 Running in Batch Mode ....................170 Performance Monitoring Unit................173 Introduction........................173 PMU Limitations ......................173 Sampling Modes......................173 3.3.1 Time Based Sampling ....................174 3.3.1.1 Point Sampling..................... 174 3.3.1.2...
  • Page 8 ® Intel IXP2400/IXP2800 Network Processors 6.5.1 Uca Source File (*.uc) Example .................. 204 6.5.2 Uca Output File (*.list) Example .................. 205 6.5.3 .map File Example ...................... 205 Memory Segment Usage....................206 Microcode Object File (UOF) Format ................207 6.7.1 File Header........................207 6.7.2...
  • Page 9 ® Intel IXP2400/IXP2800 Network Processors 6.8.23 dbg_Tloc ........................219 6.8.24 dbg_RlocTab ....................... 219 6.8.25 dbg_Lmloc........................219 6.8.26 dbg_Liverange ......................219 6.8.27 dbg_Range........................220 6.8.28 dbg_InstOprnd ......................220 Foreign Model Simulation Extensions ..............221 Overview......................... 221 Integrating Foreign Models with the Transactor ............. 222 Foreign Model Dynamic-Link Library (DLL)..............
  • Page 10 ® Intel IXP2400/IXP2800 Network Processors 8.3.33 show_clocks........................ 245 8.3.34 sim_delete........................245 8.3.35 sim_reset........................246 8.3.36 time ..........................246 8.3.37 trace ..........................246 8.3.38 type ..........................247 8.3.39 ubreak ......................... 247 8.3.40 unforce ........................248 8.3.41 version......................... 248 8.3.42 watch........................... 248 C Interpreter ........................
  • Page 11 ® Intel IXP2400/IXP2800 Network Processors 9.4.3 XACT_Define_Callback_Sim_Reset ................265 9.4.4 XACT_Define_Callback_Sim_Delete ................266 9.4.5 XACT_Define_Callback_Restore ................266 9.4.6 XACT_Define_Callback_Sim_In_Progress ..............266 9.4.7 XACT_Define_Callback_Default_Go_Clock_Domain ..........266 9.4.8 XACT_Define_Callback_State_Transition ..............266 9.4.9 XACT_Define_Cancel_Callback_State_Transition ............. 267 9.4.10 XACT_Cancel_State_Transition_Callback..............267 9.4.11 XACT_Define_Handle_Invalidation_Callback ............. 267 9.4.12 XACT_Define_Callback_Output_Message ..............
  • Page 12 IXP2400 and IXP2800 Transactor States ............... 281 Transactor States for PCI Pins ..................285 Developer Workbench Shortcuts ..................289 Introduction........................289 Intel XScale® Core Memory Bus Functional Model ............295 Summary of APIs ......................295 C.1.1 XACT_IO API ......................296 C.1.2...
  • Page 13 Network Connections Property Page - IXP2800 ..........76 CBUS Connections Property Page - IXP2800 ............77 Packet Simulation Options Property Sheet- General Tab ........79 Packet Simulation Options Dialog Box (IXP2400 and IXP2800) - Traffic Interface Logging....................81 Packet Simulation Options (IXP2400 IXP2800) - Stop Control Tab....82 Packet Simulation Options (IXP2400 and IXP2800) - The Traffic Assignment Tab ........................
  • Page 14 Linker Command Line Options................202 Transactor Optional Switches ................231 Transactor Command ..................231 XACT API Functions ..................258 IXP2400 Transactor States for QDR and MSF Pins ......... 281 IXP2800 Transactor States for QDR and MSF Pins ......... 283 Development Tools User’s Guide...
  • Page 15 ® Intel IXP2400/IXP2800 Network Processors IXP2400 Transactor States for PCI PIns............285 IXP2800 Transactor States for PCI PIns............287 Developer Workbench Shortcuts—Files ............289 Developer Workbench Shortcuts—Projects .............290 Developer Workbench Shortcuts—Edit............290 Developer Workbench Shortcuts—Bookmarks ..........291 Developer Workbench Shortcuts—Breakpoints ..........291 Developer Workbench Shortcuts—Builds ............292 Developer Workbench Shortcuts—Debug ............292...
  • Page 17: Introduction

    - Describes the Transactor internal states. • Appendix B, “Developer Workbench Shortcuts” - Contains a listing and description of commonly used shortcuts. • Appendix C, “Intel XScale® Core Memory Bus Functional Model” - Describes the Intel  XScale Bus Functional Model. •...
  • Page 18  Intel Intel IXP2400/IXP2800 Microengine C Compiler LIBC Library Reference Manual - Contains a modified subset of standard C Library functions supported on the IXP2400 and IXP2800 Network Processors  Intel IXP2400 Network Processor Hardware Reference Manual -Contains detailed hardware technical information about the IXP2400 Network Processor for designers.
  • Page 19: Developer Workbench

    Developer Workbench Overview The Developer Workbench is an integrated development environment for assembling, compiling, linking, and debugging microcode that runs on the IXP2400 and IXP2800 Network Processor Microengines. Features: Important Workbench features include: • Source level debugging. • Debug-only project creation mode.
  • Page 20: About The Graphical User Interface (Gui)

    IXP2400/IXP2800 Network Processors Developer Workbench Developer Workbench Revision Information: To determine the revision: • On the Help menu, click About Developer Workbench. The About Developer Workbench information box appears displaying the revision of your Developer Workbench. About the Graphical User Interface (GUI)
  • Page 21: Hiding And Showing Windows And Toolbars

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 2. Floating Window, Tool Bar, and Menu Bar Floating Toolbar Title Bar Floating Menu 2.2.2 Hiding and Showing Windows and Toolbars Form the View menu, you can toggle the visibility of the following windows in the Workbench’s...
  • Page 22: Customizing Toolbars And Menus

    IXP2400/IXP2800 Network Processors Developer Workbench To toggle the visibility of a dockable window, select or clear the window’s name on the View menu. If a window is visible, you can hide it by clicking the button in either the upper-right or upper- left corner of the window.
  • Page 23: Renaming Toolbars

    IXP2400/IXP2800 Network Processors Developer Workbench 2.2.3.2 Renaming Toolbars You can rename toolbars that you have created. To rename a toolbar: 1. On the Tools menu, click Customize. The Customize dialog box appears. 2. Click the Toolbars tab. 3. Select the desired toolbar in the Toolbars list.
  • Page 24: Customizing Menus

    IXP2400/IXP2800 Network Processors Developer Workbench 2.2.3.5 Customizing Menus You can change the appearance of the main menu or you can put menus on toolbars. Main Menu Appearance: To change the order of the main menu items: 1. On the Tools menu, click Customize.
  • Page 25: Gui Toolbar Configurations

    The Workbench will display only the GUI components that are relevant to the selected processor type. The processor family cannot be changed once a project is created; i.e. you cannot change your project from an IXP2400 processor to an IXP2800 processor, or vice versa. The processor types supported by the workbench are: •...
  • Page 26 IXP2400/IXP2800 Network Processors Developer Workbench To create a new project: 1. On the File menu, click New Project. The New Project dialog box appears. 2. Type the name of the new project in the Project name box. 3. Specify a folder where you want to store the project in the Location box.
  • Page 27: Debug-Only Projects

    IXP2400/IXP2800 Network Processors Developer Workbench Caution: Once a project is created as Debug only, it cannot be converted to a standard, Workbench buildable project. Neither can an existing standard project be converted to Debug only. 8. When you are finished, click OK to create the project.
  • Page 28: Opening A Project

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 3. Specify Debug-only UOF Files Dialog Box 2.3.2 Opening a Project To open an existing standard project: 1. On the File menu, click Open Project. The Open Project dialog box appears. 2. Browse to the folder that contains the project file (*.dwp) for the project you want to open.
  • Page 29: Closing A Project

    IXP2400/IXP2800 Network Processors Developer Workbench Note: You do not have the option of saving the project in a different folder. 2.3.4 Closing a Project To close a project: • On the File menu, click Close Project. If there are any modified but unsaved files in the opened project, you are asked if you want to save these changes.
  • Page 30: About The Project Workspace

    IXP2400/IXP2800 Network Processors Developer Workbench About the Project Workspace The project workspace is a dockable window where you access and modify project files. It consists of three tabbed windows: FileView ThreadView InfoView To select a window, click its tab. •...
  • Page 31: About Threadview

    1, with a maximum of 16 Microengines in each cluster. For the IXP2800, there are eight Microengines per cluster, with addresses 0 - 7 and 16 - 23. For the IXP2400, there are four Microengines per cluster, with addresses 0 - 3 and 16 - 19.
  • Page 32: About Infoview

    IXP2400/IXP2800 Network Processors Developer Workbench 2.4.3 About InfoView InfoView provides access to documentation as part of the Software Developer’s Kit (SDK). To view a document, double-click its name or icon. This invokes Adobe Acrobat Reader*, which then displays the document. A copy of Acrobat Reader is provided on the distribution CD-ROM.
  • Page 33: Opening Files

    IXP2400/IXP2800 Network Processors Developer Workbench 2.5.2 Opening Files To open an file for viewing or editing, do one of the following: • On the File menu, click Open, and select a file from the Open dialog box, or Click the button on the File toolbar, or If the file is in your project, double-click the file name in FileView.
  • Page 34: Saving Copies Of Files

    IXP2400/IXP2800 Network Processors Developer Workbench The Save As dialog appears. The current name of the file appears in the File Name box. 2. Type a new name in the File Name box and click Save. Note that the old file remains in the folder but will not have edits that you have made. The new name appears in the title bar.
  • Page 35: Printing Files

    IXP2400/IXP2800 Network Processors Developer Workbench Open Windows Selection: At the bottom of the Windows menu is a list of the first nine windows that you opened. Click any one of these windows to make it the active window. If you opened more than nine windows, click More Windows.
  • Page 36: Inserting Into And Removing Files From A Project

    IXP2400/IXP2800 Network Processors Developer Workbench 7. Select the number of copies in the Copies area. 8. Click Print. 2.5.9 Inserting Into and Removing Files from a Project 2.5.9.1 Inserting Files Into a Project You can insert Assembler source files, Compiler source files, and script files into a project.
  • Page 37: Go To Line

    IXP2400/IXP2800 Network Processors Developer Workbench • Whether or not to automatically indent a new line to the same column as the first non- whitespace character in the previous line Figure 4. Configure Tabs Dialog Box 2.5.10.2 Go To Line The Workbench allows for navigating directly to a specified line within an opened document or thread window.
  • Page 38: Bookmarks And Errors/Tags

    IXP2400/IXP2800 Network Processors Developer Workbench 2.5.11 Bookmarks and Errors/Tags You can mark your place in a file using bookmarks. Table 8 lists the tools to manipulate bookmarks in your files. Bookmarks You can find errors in your files using the Error/Tag tools listed in the tables below.
  • Page 39: About Fonts And Syntax Coloring

    IXP2400/IXP2800 Network Processors Developer Workbench The results of the search are displayed in the Find In Files 1 (or 2) tab of the Output window. For each occurrence of the search string that is found, the file name, line number, and line of text are displayed.
  • Page 40: About Macros

    IXP2400/IXP2800 Network Processors Developer Workbench • Clear Automatic to enable the color selection controls. Then select a color for the item you selected. Continue this procedure for any other items that you want to change. • To change fonts, click Choose Font to select a different font for display.
  • Page 41: Root Files And Dependencies

    • Fonts and syntax colors in a source file, see Section 2.5.13.  For details, refer to the Intel IXP2400/IXP2800 Network Processor Programmer’s Reference Manual. 2.6.1 Root Files and Dependencies The executable image for a Microengine is generated by a single invocation of the Assembler that produces an output ‘.list’...
  • Page 42: General Build Settings

    IXP2400/IXP2800 Network Processors Developer Workbench 2.6.2.1 General Build Settings The following settings, on the General tab, apply to the compiler as well as the assembler. Specifying Preprocessor Definitions: Use the Preprocessor definitions edit box to enter preprocessor definitions that will be applied to all microengine list file assembles and compiles in the project.
  • Page 43: Specifying Assembler Options

    IXP2400/IXP2800 Network Processors Developer Workbench • button to delete an included path from the list. • button to move an included path up the list. • button to move an included path down the list. Absolute versus Relative Paths: Regardless of whether the path information is entered in an absolute or relative format, it is automatically converted to a relative format.
  • Page 44 IXP2400/IXP2800 Network Processors Developer Workbench Root files: The Root File list provides a read-only list of all of the .uc and .h files in the project. Select a file to designate it as the root file for the .list file.
  • Page 45: Invoking The Assembler

    IXP2400/IXP2800 Network Processors Developer Workbench Automatically spill GPRs: Select Automatically spill GPRs to instruct the Assembler to spill GPR Contents to local memory in the event that there are too many registers to fit in the available number of GPRs.
  • Page 46: Assembly Errors

    IXP2400/IXP2800 Network Processors Developer Workbench Results: The results of an assembly appear in the Build tab of the Output window, which appears automatically. You can control the amount of detail provide in the results. On the Build menu, click Verbose Output to toggle between getting detailed results and summary results.
  • Page 47: The Microengine C Compiler

    IXP2400/IXP2800 Network Processors Developer Workbench The Microengine C Compiler The Workbench contains a C Compiler to compile C source code into microcode for the Microengines. The Microengine C Compiler is a general purpose Compiler but the C language used for the Microengines is limited. Refer to the Microengine C Compiler Language Support Reference Manual for information on the functions and intrinsics designed for use with the network processors.
  • Page 48: Adding C Source Files To Your Project

    IXP2400/IXP2800 Network Processors Developer Workbench 2.7.1 Adding C Source Files to Your Project After creating and saving C source files, you need to add them to your project. To do this: 1. On the Project menu, click Insert Compiler Source Files.
  • Page 49: Selecting The Target .List File

    IXP2400/IXP2800 Network Processors Developer Workbench • button to move an included path down the list. 2.7.2.2 Selecting the target .list File When you compile your C source file, the result can become a .list file. You must select the name of the .list file.
  • Page 50: Selecting C Object Files To Compile

    IXP2400/IXP2800 Network Processors Developer Workbench 2.7.2.4 Selecting C Object Files to Compile The C Compiler in the Workbench can compile one or more C object files into one .list file. You must select the object files that you want to compile.
  • Page 51: Deleting A Target .List Or .Obj File

    IXP2400/IXP2800 Network Processors Developer Workbench 2.7.2.7 Deleting a Target .list or .obj File To delete a target .list or .obj file from the project: 1. Select the file from the list in the Output to target .list and .obj files box.
  • Page 52 IXP2400/IXP2800 Network Processors Developer Workbench Self Writing to a neighbor register will write to the neighbor register in the same Microengine as the one executing the instruction. Warning level: Print only errors. 1, 2, or 3 (default) Print only errors and warnings.
  • Page 53: Saving Build Settings

    IXP2400/IXP2800 Network Processors Developer Workbench Additional compiler options: Here you can enter additional command line options that can not be implemented by normal GUI controls. See Chapter 5, “Microengine C Compiler” for complete list of options. 2.7.2.9 Saving Build Settings The Build Settings dialog box works with a copy of the build settings in the project.
  • Page 54: The Linker

    IXP2400/IXP2800 Network Processors Developer Workbench In all cases, the window containing the source file is put on top of the document windows and becomes the active document. If the source file isn't already open, it opens. A blue arrow in the left margin marks lines containing errors. Only one error at a time is marked.
  • Page 55 IXP2400/IXP2800 Network Processors Developer Workbench You do not have to type the .uof extension—the Workbench adds it for you. Typing it does no harm. 4. Click Select. Microengine .list file selection The project has one or more .list file(s) generated using the Assembler or Compiler.
  • Page 56 To fill the unused microstore: 1. Select Fill with default pattern (0xe000010000). 0xe000010000 for the IXP2400, IXP2800 network processors. 2. Click Fill with custom pattern and type a 10 character hex pattern to be used. Make sure the number begins with “0x.”...
  • Page 57: Building And Rebuilding A Project

    IXP2400/IXP2800 Network Processors Developer Workbench Header file generation Selecting Generate a header file causes the Linker to produce a C language *.h file with the same filename as the linked *.uof file. The defined symbols are set to values based on how the Linker allocated memory for the reserved memory variables.
  • Page 58: Configuring The Ixp2400 Simulation Environment

    Press Alt + F7. Configuring the IXP2400 Simulation Environment To configure the simulation environment for an IXP2400 project, select System Configuration from the Simulation menu. You can set or change configuration values in the following property pages depending on the Chip Family you have selected: •...
  • Page 59: Ixp2400 Memory

    Figure 7). There are some variations on the screen depending on which network processor is being configured. For the IXP2400 the following simulator conditions apply: • No SRAM channel can exceed 64 MB, so the Part count option of 2 becomes unavailable if the Part size is 64.
  • Page 60: Ixp2400 Memory Options

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 7. IXP2400 Memory Options Development Tools User’s Manual...
  • Page 61: Ixp2400 Msf Device Configuration

    If no device is currently configured, only the Create Device... button will be available. The Delete Device and Edit Port... buttons become active when devices are configured for selection. Figure 8. IXP2400 MSF Device Configuration Device Creation To create a device: 1.
  • Page 62: The Create Media Bus Device Dialog Box For Csix

    2. Select the device type from those available on the Select device type... scrolling list. Supported device types for IXP2400: SPHY, x32MPHY4, x16MPHY32, x32MPHY32, and CS1X. The IXP2400 architecture also supports connecting two devices with different restrictions. The Device parameters and Default port parameters areas will display default values once you select the device type.
  • Page 63: The Create Media Bus Device Dialog Box For X32Mphy16

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 10. The Create Media Bus Device Dialog Box for x32MPHY16 The Default port parameters section is divided into Receive and Transmit areas. You may edit these characteristics, which are: Data rate (Mbits/sec) Specifies the rate at which data is taken from the network and inserted into the port’s receive (Rx) buffer and the rate at which data is taken from...
  • Page 64 IXP2400/IXP2800 Network Processors Developer Workbench Low water mark See High water mark, below. High water mark If flow control is enabled, the high water mark is used to determine if the device is “Hungry” or “Satisfied”. If the number of bytes in the Tx buffer is between the low and high water marks, then the device tells the network processor that it is Hungry.
  • Page 65: Ixp2400 Network Connections

    Connect to transmit side of chip. The user must select which chip and what protocol to use for the connection. For the IXP2400, the protocols are POS3 and CSIX. Similarly, the transmit side can be connected to the receive side of another chip in the project by selecting Connect to receive side of chip.
  • Page 66: Network Connections Property Page - Ixp2400

    IXP2400/IXP2800 Network Processors Developer Workbench For the IXP2400, the Workbench displays the property page shown in Figure 12. When two devices are connected, the 32-bit bus is considered to be split into two 16-bit busses – a lower and an upper bus. Only an x16MPHY32 device can be connected to the lower bus and only an SPHY device with 1x16 or 2x8 bus mode can be connected to the upper bus Figure 12.
  • Page 67: Ixp2400 Cbus Connections

    2. Select the chip to which you want to make connections in the pull down boxes. 3. When you have finished click OK. Figure 13 displays the CBUS Connections property page. Figure 13. CBUS Connections Property Page - IXP2400 Development Tools User’s Manual...
  • Page 68: Configuring The Ixp2800 Simulation Environment

    The values shown in the following figure are the default values. The complete description of clock  frequencies, ratios, can be found in the Intel IXP2800 Network Processor Hardware Reference  Manual. Clock and MSF CSRs can be found in the Intel IXP2400/IXP2800 Network Processor Programmer’s Reference Manual. Development Tools User’s Manual...
  • Page 69: Ixp2800 Memory

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 14. Clock Frequencies for the IXP2800 2.10.2 IXP2800 Memory The Memory tab on the System Configuration property sheet supports the configuration of simulator memory (see Figure 15). There are some variations on the screen depending on which network processor is being configured.
  • Page 70: Ixp2800 Memory Options

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 15. IXP2800 Memory Options Development Tools User’s Manual...
  • Page 71: Ixp2800 Msf Device Configuration

    IXP2400/IXP2800 Network Processors Developer Workbench 2.10.3 IXP2800 MSF Device Configuration The MSF Device Configuration tab on the System Configuration property page supports the configuration of media and switch fabric interfaces (see Figure 16). You have the following options on this tab: •...
  • Page 72: The Create Media Bus Device Dialog Box For Spi-4

    IXP2400/IXP2800 Network Processors Developer Workbench 2. Select the device type from those available on the Select device type... scrolling list, for example, SPI4 or CSIX for the IXP2800. Supported device types for IXP2800 A1, A2 and B0: SPI4 and CSIX.
  • Page 73: The Create Media Bus Device Dialog Box For Csix

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 18. The Create Media Bus Device Dialog Box for CSIX Note: If you select SPI4 as the device type, the Create Media Bus Device dialog box will display the defaults for the controls shown in...
  • Page 74 IXP2400/IXP2800 Network Processors Developer Workbench Maximum burst 1 This value is the maximum number of 16 byte blocks that the Tx FIFO can accept when the FIFO Status channel indicates a “Starving” condition. Enable Tx flow control This check box enable Tx flow control training between the SPI4 device and the network processor.
  • Page 75: Port Characteristics Edit Port Dialog Box

    IXP2400/IXP2800 Network Processors Developer Workbench Note that no bytes are actually stripped or appended to the packet data. Instead, the number of extra bytes are added into the calculation of data rate at the network. Device Removal: To remove a device from the project: 1.
  • Page 76: Ixp2800 Network Connections

    IXP2400/IXP2800 Network Processors Developer Workbench 2.10.4 IXP2800 Network Connections After you have configured the packet simulation with devices and ports and created or imported data streams, you need to specify the connections to the media/switch fabric for each chip in your project.
  • Page 77: Ixp2800 Cbus Connections

    IXP2400/IXP2800 Network Processors Developer Workbench Similarly, the transmit side can be connected to the receive side of another chip in the project by selecting Connect to receive side of chip. To connect a device to either side, the user selects Connect to device then selects the desired device in the combo box.
  • Page 78: Packet Simulation

    IXP2400/IXP2800 Network Processors Developer Workbench 2.11 Packet Simulation The Workbench provides packet simulation of Media bus devices as well as simulation of network traffic. To simulate devices and network traffic you need to: 1. Configure the devices on the media bus using the System Configuration menu (or busses if you have multiple Network Processor chips).
  • Page 79: General Options

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 22. Packet Simulation Options Property Sheet- General Tab 2.11.1 General Options In the Packet Simulation Options property sheet (see Figure 22), Under the General tab: • Run unbounded (infinite wire speed). Enable Run unbounded (infinite wire speed) to have data always ready to be received by the Network Processor and to have the ports always ready to receive data from the Network Processor.
  • Page 80: Traffic Interface Logging

    IXP2400/IXP2800 Network Processors Developer Workbench — Media bus cycles per frame—this represents the average number of cycles between frames. For ATM streams, a cell is considered to be a frame. For each port, the Workbench starts counting cycles for the receive rate calculation when the port asserts start-of-packet (SOP) for the first packet received by the Network Processor after the user starts debugging or resets statistics.
  • Page 81: Packet Simulation Options Dialog Box (Ixp2400 And Ixp2800) - Traffic Interface Logging

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 23. Packet Simulation Options Dialog Box (IXP2400 and IXP2800) - Traffic Interface Logging If there is more than one chip in your system configuration, select the chip for which you want to specify Traffic Interface Logging: There are three general options available: •...
  • Page 82: Stop Control

    If there is more than one chip in your system configuration, select the chip for which you want to specify stop control. Figure 24. Packet Simulation Options (IXP2400 IXP2800) - Stop Control Tab Development Tools User’s Manual...
  • Page 83: Traffic Assignment

    IXP2400/IXP2800 Network Processors Developer Workbench There are two general options. The options are: • Enable Stop simulation if a receive overflow occurs to control whether or not the Workbench stops the simulation when a receive overflow occurs. • Enable Stop simulation if a transmit underflow occurs to control whether or not the Workbench stops the simulation when a transmit underflow occurs.
  • Page 84: Packet Simulation Options (Ixp2400 And Ixp2800) - The Traffic Assignment Tab

    If no input is assigned, the area is blank. Figure 25. Packet Simulation Options (IXP2400 and IXP2800) - The Traffic Assignment Tab To assign the port input: 1.
  • Page 85: Assign Input To Port - Datastreams

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 26. Assign Input to Port - DataStreams Figure 27. Assign Input to Port - Network Traffic Select one of the radio buttons to set how you want to supply input data for the port’s receive...
  • Page 86 IXP2400/IXP2800 Network Processors Developer Workbench • All data streams associated with the project along with their type are displayed in the List of all data streams list box. • The streams that are assigned to the port are displayed in the list box labeled Assigned streams.
  • Page 87: Assign Output From Port

    IXP2400/IXP2800 Network Processors Developer Workbench PDU#2 Cell#3 PDU#3 Cell#1 For non-ATM streams, the sequential and interleaved choices are identical. When you have completed assigning streams and specifying the packet selection method, click OK to apply your choices and return to the Traffic Assignment dialog box.
  • Page 88: Manage Nts Plug-Ins

    IXP2400/IXP2800 Network Processors Developer Workbench 2.11.5 Manage NTS Plug-ins The Manage NTS Plug-ins tab is for managing Network Traffic Simulation plug-ins (see Figure 29). You can create, edit, or delete a Network Traffic Simulator plug-in. A Network Traffic Simulator consists of a unique name and a DLL file name for sending and/or receiving port traffic.
  • Page 89: Network Traffic Simulation Dlls

    IXP2400/IXP2800 Network Processors Developer Workbench 1. To add a new Network Traffic Simulator Plug-in click the New... button and the Manage NTS Plug-in pop up appears. Specify the name and click OK. The name then appears in the Select Network Traffic DLL pulldown box.
  • Page 90: Data Streams

    IXP2400/IXP2800 Network Processors Developer Workbench Note: See the file for the contents of the port configuration data structures that are PortConfigData.h passed to these initialization functions. As the simulation progresses, the PacketSim DLL calls function whenever a byte GetNextByte() of data is required on a receive port. In addition to the byte of data, the NTS DLL must also return a flag indicating whether the byte is the last byte (EOP) in the frame/cell.
  • Page 91: Define Network Traffic - Data Stream Dialog Box

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 30. Define Network Traffic - Data Stream Dialog Box Figure 31. Create Stream Pop-up Data Stream Deletion: To delete a data stream: 1. On the Simulation menu, click Data Streams..The Data Streams dialog box appears (see Figure 30).
  • Page 92: Creating And Editing A Pos Ip Data Stream

    IXP2400/IXP2800 Network Processors Developer Workbench The Import Stream dialog box appears. 3. Browse to the desired folder and select one or more stream files (.strm). 4. Click OK to import the selected files. Data Stream Copy: Copying a data stream then editing the copy gives you a quick way to create a new data stream that is similar to an existing data stream.
  • Page 93 IXP2400/IXP2800 Network Processors Developer Workbench 5. Click Continue. The Custom Header Size dialog box appears. 6. Type the number of bytes to be in the custom header. 7. Click OK. The POS IP dialog box appears. 8. Type a new name in the Stream name box if you want to change it.
  • Page 94: Creating And Editing An Atm Data Stream

    IXP2400/IXP2800 Network Processors Developer Workbench 6. Click Delete Frame to delete the selected frame. 7. Click the Up and Down arrows to change the order of the frames. 8. Click OK when done. 2.12.2 Creating and Editing an ATM Data Stream An ATM Protocol Data Unit (PDU) comprises the unsegmented components of ATM data: •...
  • Page 95: Creating And Editing A Custom Ethernet Tcp/Ip Data Stream

    IXP2400/IXP2800 Network Processors Developer Workbench The IP Packet Pool dialog box appears. Go to Section 2.12.7 to create the IP packet pool. 8. Click Create Packet(s) to create a PDU(s) for each packet in the selected pool. 9. Click IP Header to specify IP Header information (see Section 2.12.9).
  • Page 96 IXP2400/IXP2800 Network Processors Developer Workbench To create one or more frames: 1. Click Create Frame(s). 2. Click Custom Header. 3. Type the data for the custom header in the Custom header box. 4. Click Ethernet Header (go to Section 2.12.8).
  • Page 97: Creating And Editing An Ethernet Ip Data Stream

    IXP2400/IXP2800 Network Processors Developer Workbench 2.12.4 Creating and Editing an Ethernet IP Data Stream Create: 1. On the Simulation menu, click Data Streams..The Data Streams dialog box appears. 2. Click Create Stream. The Create Stream dialog box appears. 3. Type the name of the stream in the Stream name box.
  • Page 98: Creating And Editing An Ethernet Tcp/Ip Data Stream

    IXP2400/IXP2800 Network Processors Developer Workbench 5. Click Edit Frame(s) to edit the: — Ethernet Header (go to Section 2.12.8) — IP Header (see Section 2.12.9) — Data Payload (go to Section 2.12.11) 6. Click Delete Frame to delete the selected frame.
  • Page 99: Creating And Editing A Ppp Tcp/Ip Data Stream

    IXP2400/IXP2800 Network Processors Developer Workbench 12. Browse to the folder where you want to save the file. 13. Click Save. 14. In the Data Streams dialog box, click OK. Edit: To edit an Ethernet TCP/IP data stream: 1. On the Simulation menu, click Data Streams..
  • Page 100 IXP2400/IXP2800 Network Processors Developer Workbench 4. Click TCP Header (go to Section 2.12.10). 5. Click Data Payload (go to Section 2.12.11). 6. Click PPP Trailer 7. Specify the frame size in the Frame size (in bytes) area (see Section 2.12.12).
  • Page 101: Creating An Ip Packet Pool

    IXP2400/IXP2800 Network Processors Developer Workbench 2.12.7 Creating an IP Packet Pool In the ATM data stream, you can create IP Packet Pools. Do the following: 1. Create an ATM data stream. 2. Create a PDU. 3. In the Create AAL5 PDU dialog box, click Multiple packets from pool in the lower-left corner.
  • Page 102: Specifying An Ethernet Header

    IXP2400/IXP2800 Network Processors Developer Workbench 5. Click on the name of the pool. 6. Click Create. 7. If done, click Close. The ATM Stream dialog box appears. 8. Click OK. 2.12.8 Specifying an Ethernet Header 1. Create an Ethernet IP data stream (see Section 2.12.4) or an Ethernet TCP/IP data stream (see...
  • Page 103: Specifying A Tcp Header

    IXP2400/IXP2800 Network Processors Developer Workbench 4. Enter values directly into the boxes. — If you want the packet length to be automatically computed based on the length of the encapsulated payload, select Computed next to the Packet length box. Otherwise, the value you enter will be used without modification.
  • Page 104: Specifying Frame Size

    Using the Workbench, you can debug microcode either in Simulation mode or in Hardware mode (using the Development platform or compatible hardware). When in Simulation mode, the Transactor provides debugging support to the Workbench. In Hardware mode, the Microengine Debug Library (debug_2000.a) running as part of an Intel ® XScale core application program communicates with the Workbench and relays debugging operations between the Workbench and the Microengines.
  • Page 105: Simulation And Hardware Mode Features

    IXP2400/IXP2800 Network Processors Developer Workbench Table 1. Simulation and Hardware Mode Features Feature Simulation Hardware System Configuration Starting and Stopping Debug Command Line Interface Script Files Command Scripts Thread Windows • Display Microword Address • Instruction Markers • View Instructions...
  • Page 106: Local Simulation Debugging With A Local Foreign Model

    2.13.1 Local Simulation Debugging with a Local Foreign Model The IXP2400 and IXP2800 Transactors support connecting multiple foreign model DLLs. The Workbench allows you to specify an unlimited list of DLL file paths for foreign model DLLs. For each DLL, you can specify an unlimited number of instantiations.
  • Page 107: Local Simulation Debugging With A Remote Foreign Model

    2.13.1.1 Local Simulation Debugging with a Remote Foreign Model Running IXP2400 or IXP2800 network processors using a remote foreign model is the same as running them with a local foreign model because the DLL controls the location of the foreign model.
  • Page 108: Portmapper

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.1.3 Portmapper Portmapper is automatically installed as part of the IXA SDK installation process. To ensure that Portmapper is installed and running: 1. On the Window’s task bar, click Start, point to Settings, and then click Control Panel.
  • Page 109: Marking Instructions For The Network Processor

    IXP2400/IXP2800 Network Processors Developer Workbench By default, the stage 4 instruction is marked as the current instruction. It is highlighted by horizontal black lines above and below it. The thread window is automatically scrolled so that the current instruction marker is visible when execution stops.
  • Page 110: Changing The Colors For Execution State

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.3.2 Changing the Colors for Execution State To customize the colors used to indicate the execution state: 1. On the Simulation menu, click Options. The Simulation Options dialog box appears. 2. Click the Colors tab.
  • Page 111: Using Imported Variable Data

    Microengine C compiler. These define a variable that can then be associated with an integer value  at load time. On hardware, this association is done by an Intel XScale application. In simulation, this association is done through an imported variable data (.ivd) file that gets processed by the loader.
  • Page 112: Using Imported Variable Data At Startup In Simulation Mode

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 33. Using Imported Variable Data at Startup in Simulation Mode Figure 34. Using Imported Variable Data at Startup in Hardware Mode Development Tools User’s Manual...
  • Page 113: Exporting The Startup Script

    — Assume microcode is already loaded and microengines are running. (Don’t reset the microengines and don’t load the microcode.) This option causes the Workbench to connect only to the debug library on the Intel ® XScale core.
  • Page 114: The Command Line Interface

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.6 The Command Line Interface The command line interface (CLI) comprises: A read-only scrollable text area for reporting the results of the command. A prompt indicating command- line status. A single-line text edit control for entering commands.
  • Page 115: Thread Windows

    IXP2400/IXP2800 Network Processors Developer Workbench 4. In the box on the right, enter the Transactor commands you wish to have executed, just as you would enter them on the Transactor command line. 5. In the Script name box, enter the name you want associated with the command script. This name will be displayed in the tool tip and fly-by text when you position the mouse cursor over the corresponding command script toolbar button.
  • Page 116 IXP2400/IXP2800 Network Processors Developer Workbench Whether or not you can select an option depends on the current thread window configuration. For example: • If you have one or no thread window open, then all options are allowed. • If you have two thread windows open, you cannot select option (a).
  • Page 117: Thread Window Controls

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.8.2 Thread Window Controls Assembled Thread Windows: If a thread is in a Microengine whose list file is generated by the Assembler, then its thread window displays a 'list' view. This represents flattened code for the entire microstore, as contained in the .list file.
  • Page 118: The Compiled Thread Window

    IXP2400/IXP2800 Network Processors Developer Workbench Collapse macros (see Section 2.13.8.7). Note: Not all buttons are available in hardware mode. Compiled Thread Windows: Compiler thread windows look the same as Assembler thread windows but have some differences. Display options are similar (see Section 2.13.8.1).
  • Page 119: Tracking The Active Thread

    IXP2400/IXP2800 Network Processors Developer Workbench Step Into (see Section 2.13.9.4). Step Out (see Section 2.13.9.5). Step Over (see Section 2.13.9.3). Run to Cursor (see Section 2.13.8.4). Toggle View (see Section 2.13.8.5). Note: Unlike the assembled thread window, you cannot expand or collapse the display in a compiled thread window in list view.
  • Page 120: Activating Thread Windows

    IXP2400/IXP2800 Network Processors Developer Workbench To do this: 1. Click the button in the Thread window. 2.13.8.6 Activating Thread Windows Once microcode is loaded, you can directly access the execution state of all the threads in the project. To explicitly activate a thread window, do this: 1.
  • Page 121: Displaying, Expanding, And Collapsing Macros (Assembled Threads Only)

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.8.7 Displaying, Expanding, and Collapsing Macros (Assembled Threads Only) By default, all macros are collapsed. A green triangle to the left of the instruction indicates that the instruction is a fully collapsed macro (see Figure 37).
  • Page 122: Displaying And Hiding Instruction Addresses

    IXP2400/IXP2800 Network Processors Developer Workbench Macro Expansion: To expand a collapsed macro: 1. Right-click on the triangle or anywhere on the instruction line. 2. Click Expand Macro One Level, or, Click Expand Macro Fully. Macro Collapse: You can only fully collapse an expanded macro, not one level at a time. To do this: 1.
  • Page 123: Instruction Markers

    IXP2400/IXP2800 Network Processors Developer Workbench Note: The displaying of instruction addresses affects all thread windows and is saved as a global option which is in effect across all projects. 2.13.8.9 Instruction Markers During a typical debugging session, thread windows display several types of instruction markers.
  • Page 124: Document And Thread Window History

    IXP2400/IXP2800 Network Processors Developer Workbench Same Instruction in More Than One Pipeline Stage: It is possible, due to branching, for the same instruction to be in more than one pipeline stage. In this case, the Pipe Stage marker on that instruction will have multiple arrowheads filled in, possibly with different colors.
  • Page 125: Run Control

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.9 Run Control Run Control lets you govern execution of the Microengines. Different control operations are available from the Workbench depending on whether you are in Simulation or Hardware mode (see Table In Simulation mode, the Workbench...
  • Page 126: Stepping Over

    IXP2400/IXP2800 Network Processors Developer Workbench • In the Run Control window, select the thread’s entry from the list under the Step button. Note: Stepping microengines is not supported when debugging hardware. 2.13.9.3 Stepping Over Step Over allows you to execute as many machine cycles as it takes complete the current line in the thread window.
  • Page 127: Executing Multiple Cycles

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.9.6 Executing Multiple Cycles All Microengines: To run for a specified number of cycles in all Microengines, regardless of which threads are running: 1. Select All threads in the list under the Go for button.
  • Page 128: Stopping Execution

    IXP2400/IXP2800 Network Processors Developer Workbench Press F5. Microcode execution stops only if a breakpoint is reached or if you manually stop execution (see Section 2.13.9.10). 2.13.9.10 Stopping Execution To stop microcode execution at any time: On the Debug menu, click Run Control, then click Stop, or...
  • Page 129: About Breakpoints

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.10 About Breakpoints In the source view, when you set a breakpoint on a line, a breakpoint marker appears on that line and a breakpoint is set on the first instruction that it generates. In the list view, it is possible to set breakpoints on multiple lines that are generated by the same C source line.
  • Page 130: Inline Function Breakpoints In Source And List Views

    IXP2400/IXP2800 Network Processors Developer Workbench Soft Breakpoint Support: The Workbench supports soft breakpoints, which are inserted into assembler code using the ctx_arb[bpt] instruction and into Microengine C code using the _assert macro, which in turn inserts a ctx_arb[bpt] instruction. When this instruction is executed, the Workbench is notified and displays a message box indicating where the breakpoint occurred, i.e., the chip, Microengine,...
  • Page 131: Breakpoint Properties Dialog Box

    The name of the chip containing the breakpoint being tested. Microengine The number of the Microengine (that is, 0-15 for the IXP2800, 0-7 for the IXP2400) where the breakpoint is assigned. Instruction Address The PC address. Thread window line numberList view line number.
  • Page 132: Setting Breakpoints In Hardware Mode

    You can set breakpoints in Hardware mode with the following restrictions: ® • Each breakpoint you insert causes the Debug library in the Intel XScale core to place a breakpoint routine in unused Control Store space within the Microengines. Consequently, the number of breakpoints you can insert will be limited by the size of your microcode image.
  • Page 133 IXP2400/IXP2800 Network Processors Developer Workbench all contexts breakpoint Enabled in all threads in Microengine. all contexts breakpoint Disabled in all threads in Microengine. some contexts breakpoint Set and enabled in this thread but not set in all threads in the Microengine.
  • Page 134: Inserting And Removing Breakpoints

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.10.4 Inserting and Removing Breakpoints To insert a breakpoint in a Microengine: 1. Open a thread window for one of the threads in the Microengine. 2. Place the insertion cursor on the line where you wish to insert the breakpoint.
  • Page 135: Enabling And Disabling Breakpoints

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.10.5 Enabling and Disabling Breakpoints To enable or disable breakpoints on code locations, do the following: 1. Place the insertion cursor on the line at which you wish to enable/disable a breakpoint. 2. On the Debug menu, click Breakpoint, then click Enable/Disable, or Click the button on the Debug toolbar.
  • Page 136 IXP2400/IXP2800 Network Processors Developer Workbench A list box displays the Microengines that meet the following criteria: • The Microengine is in the same chip as the Microengine that contains the thread whose window was clicked in. • The Microengine has code loaded in it and the code was generated using the same source file that generated the line of code that was clicked on.
  • Page 137: Displaying Register Contents

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 40. Multi-Microengine Breakpoint Dialog Box 2.13.11 Displaying Register Contents When program execution is stopped, you can display register contents directly from instruction context in a thread window. To do this: 1. Position the cursor over the register symbol.
  • Page 138: Data Watch

    IXP2400/IXP2800 Network Processors Developer Workbench Register History: To go along with the thread history, the Workbench will record register history. The values for all GPRs, transfer registers and neighbor registers in each Microengine will be remembered for the same cycle extents as thread history. The information displayed in a thread window datatip (the “pop-up”...
  • Page 139: Data Watches In C Thread Windows

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.12.1 Data Watches in C Thread Windows In C thread windows, data watches can be set for C variables by right-clicking on the variable in the thread window and selecting Set Data Watch for:<variable_name>. If the Data Watch window is not visible, go to Section 2.13.12.
  • Page 140: Watching Control And Status Registers And Pins

    ® Intel IXP2400 /IXP2800 Network Processor Programmer’s Reference Manual. If your project contains multiple chips, you are prompted to select which chip’s register to watch. Similarly, if the register is Microengine-based, you are prompted to select which Microengine register to watch.
  • Page 141: Watching General Purpose And Transfer Registers

    IXP2400/IXP2800 Network Processors Developer Workbench 1. Click Add Watch or right-click in the Data Watch window and click Add Watch from the shortcut menu. The Add Data Watch dialog box appears. 2. Click the category of named element that you want listed.
  • Page 142: Deleting A Data Watch

    IXP2400/IXP2800 Network Processors Developer Workbench Note: The Workbench will only display a data value for a register being watched when it is in range. If the physical register associated with a symbolic register gets re-used and goes out of range, the Workbench will display a data value along with (?).
  • Page 143: Changing A Data Watch

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.12.6 Changing a Data Watch To change a data watch: 1. Right-click the watch to be changed in the Data Watch window and select Edit Name on the shortcut menu, or Select the data watch whose name you want to change, then, on the Debug menu, click Data Watch, then click Edit Name, or Double-click the name to be changed.
  • Page 144: Memory Watch

    IXP2400/IXP2800 Network Processors Developer Workbench Set: To break execution on a changed data value: 1. Right-click the name or value of the state and click Set Break On Change on the shortcut menu, or click the name or value of the state.
  • Page 145: Entering A New Memory Watch

    IXP2400/IXP2800 Network Processors Developer Workbench Subwindows: The Memory Watch window comprises three subwindows, one for each memory type. Each memory type has a check box at the top of the Memory Watch window to control visibility of the subwindow. Each subwindow contains a multicolumn tree. The first column contains the range of the location(s) being watched, e.g.
  • Page 146: Adding A Memory Watch

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.13.2 Adding a Memory Watch To add a memory watch: 1. Click Add Watch at the top of the Memory Watch window, Right-click in the name or value column window and click Add Watch on the shortcut menu.
  • Page 147: Changing The Memory Watch Value Radix

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.13.6 Changing the Memory Watch Value Radix To select whether memory values are displayed in decimal or hexadecimal: 1. Right-click anywhere in the Memory Watch window. 2. Click Hexadecimal Data on the shortcut menu to display values in hexadecimal format or clear it to display in decimal format.
  • Page 148: The Execution Coverage Window

    IXP2400/IXP2800 Network Processors Developer Workbench The microcode that is loaded in that Microengine appears in the code window. This display is the same as is shown in the thread window. Figure 41. The Execution Coverage Window Execution Count: The number to the left of each instruction displays the number of times each instruction was executed.
  • Page 149: Changing Execution Count Ranges And Colors

    IXP2400/IXP2800 Network Processors Developer Workbench By default, the execution counts are the total for Execution count (10<>50) all contexts in the Microengine. You can see the execution counts for any subset of contexts by Address selecting or clearing the check boxes beneath the Microengine list.
  • Page 150: Miscellaneous Controls

    IXP2400/IXP2800 Network Processors Developer Workbench Moves the marker to the previous instruction that has an execution count that is greater than 0. You can also double-click an instruction in the code window or an address in the bar graph window and the marker moves to that instruction.
  • Page 151: Displaying Statistics

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.15.1 Displaying Statistics To display Performance Statistics: Stop debugging (if necessary). 2. On the Simulation menu, click Statistics. The Performance Statistics information box appears. 3. Click the Summary tab. The Summary page shows the percentage of time that each Microengine and memory unit is active and the rate that this activity represents.
  • Page 152: Save Packet Simulation Stats To A File

    IXP2400/IXP2800 Network Processors Developer Workbench 4. To print the statistics to a .csv file, click the Save Stats to File button. The Performance Simulation Stats Dialog box displays (see Figure 43). Enter the filename and press OK to save the statistics. The data will be output to a .csv file that can be read by a text editor or imported to Microsoft* Excel spreadsheet.
  • Page 153: Performance Statistics - Microenginetab

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 44. Performance Statistics - MicroengineTab 6. Click the All tab. The All statistics page displays as shown in Figure The All statistics page allows you to look at all of the statistics gathered by the Transactors. By default, all available statistics titles are listed in the top list box.
  • Page 154: Resetting Statistics

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 45. Performance Statistics - All Tab 2.13.15.2 Resetting Statistics By default, statistics are gathered starting at cycle 1 of a simulation. However, you can reset the statistics at any time. The statistics are then gathered from the current cycle forward.
  • Page 155: History Window

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 46. History Window The History window does not display each thread on a separate line by default. It displays all threads in a Microengine on the same line. To display the threads separately: 1. Right-click the Microengine whose threads you want to display.
  • Page 156: Displaying The History Window

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.16.1 Displaying the History Window • On the View menu, click Debug Windows, then select History, or Click the button on the View toolbar. This toggles visibility of the History window. You must be in debug mode to view history.
  • Page 157: Thread Display Property Page

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.16.5 Thread Display Property Page The Thread Display property page allows for convenient hiding/showing of threads, code labels and references from the Customize Thread History property sheet. A checked box next to an item means that item gets displayed. An unchecked box means that the item is hidden.
  • Page 158: Displaying Reference History

    IXP2400/IXP2800 Network Processors Developer Workbench 1. In the History window, click Customize. The Customize Thread History dialog box appears. 2. Click the Code Labels tab. 3. In the Select Microengine box is a list of all the Microengines in the project. Click a Microengine to display all the labels in the microcode associated with that Microengine.
  • Page 159 IXP2400/IXP2800 Network Processors Developer Workbench There are five instances when reference history is displayed: 1. A thread issues a command and no signaling occurs. 2. A thread issues a command and gets signaled. The reference line under the issuing thread shows the referenced component and displays the markers for all the reference events that occurred.
  • Page 160 IXP2400/IXP2800 Network Processors Developer Workbench Displayed at the cycle when the unit signals the thread that the reference is completed. For DRAM references, there are two signals. If they occur simultaneously, the arrow is filled grey. Shown from the reference line to the thread’s history line at the cycle when the thread consumes the signal.
  • Page 161: Queue History

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 49. Customize History 2.13.16.8 Queue History You can control whether or not a specific queue’s history is displayed. This allows you to limit the display to only those queues that you are interested in. By default, all queues are displayed.
  • Page 162: Queue Status

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.17 Queue Status The queue status window provides current and historical information on the contents of the five queue groups: DRAM, SRAM, MSF Interface, SHAC and Microengines. • To display the Queue Status window, on the View menu, click Debug Windows, then click Queue Status, or Click the button on the View toolbar.
  • Page 163: Queue Status History

    IXP2400/IXP2800 Network Processors Developer Workbench Instruction Cross-reference: If you right-click a reference and click Go To Instruction on the shortcut menu, the Workbench opens the appropriate thread window and displays the microcode instruction that issued the reference. A purple marker in the left margin of the thread window marks the instruction. The reference is also highlighted with the same marker in the queue status window.
  • Page 164: Changing Thread History Colors

    IXP2400/IXP2800 Network Processors Developer Workbench 2. Click Insert/Remove Breakpoint on the shortcut menu. To change a breakpoint’s properties: 1. Right-click the queue name. 2. Click Breakpoint Properties on the shortcut menu. The Queue Breakpoint dialog box reappears where you can change properties or click Remove to remove the breakpoint.
  • Page 165: Displaying The History Legend

    IXP2400/IXP2800 Network Processors Developer Workbench 2.13.17.4 Displaying the History Legend To see a legend of the thread history colors and the reference event markers, click the Legend button in the History window. The Thread History Legend dialog box appears. This legend displays information about the following: •...
  • Page 166: History Collecting

    IXP2400/IXP2800 Network Processors Developer Workbench The thread history window contains a cycle marker which marks a particular cycle count using a vertical dashed line cutting across all displayed history lines (see image at left). The cycle count at the cycle marker’s position is reported in the box located between the right and...
  • Page 167: Thread Status

    IXP2400/IXP2800 Network Processors Developer Workbench typical reference design. For low performance hosts, a more reasonable setting is 100,000 cycles. Note: These options must be specified before you start debugging. If you are already in debug mode, these selections are disabled.
  • Page 168: The Thread Status Window

    IXP2400/IXP2800 Network Processors Developer Workbench • To display the Thread Status window, on the View menu, click Debug Windows, then click Thread Status (see Figure 52), or Click the button on the View toolbar. Figure 52. The Thread Status Window In each Microengine, an arrow appears to the left of the thread that is currently executing or that is scheduled to resume execution when the Microengine resumes execution.
  • Page 169: Packet Simulation Status

    IXP2400/IXP2800 Network Processors Developer Workbench The value that you type in must be an integer. 2.13.19 Packet Simulation Status The Packet Simulation Status window provides static or snapshot information on the status of packet traffic in your project. (see Figure 53).
  • Page 170: Running In Batch Mode

    IXP2400/IXP2800 Network Processors Developer Workbench Figure 54. Save Packet Simulation Stats to a File 2.14 Running in Batch Mode Workbench Batch Files: A Workbench batch file is an ASCII text file. • The first line must contain the complete path for a Workbench project file, for example, c:\mydir\router.dwp.
  • Page 171 IXP2400/IXP2800 Network Processors Developer Workbench 2. Type c:\ixp2800\bin\DevWorkbench.exe @test.bat in the Open box. 3. Click OK. Windows launches the Workbench and executes the batch file test.bat. Development Tools User’s Manual...
  • Page 173: Performance Monitoring Unit

    The macro and its associated parameters define how the PMU counters are configurd. Note: The PMU interface is adapted from an existing Intel software tool, so some of the controls and concepts do not apply to the IXP2400/IXP2800 network processors.
  • Page 174: Time Based Sampling

    Performance Monitoring Unit The Performance Monitoring Unit (PMU) supports time and random based sampling for the IXP2400 and IXP2800 network processors. The sampling modes describe the method by which the supported performance counters are read (or sampled). Time based sampling (TBS) is the most understood and therefore, most common sampling method in use today.
  • Page 175: Window Sampling

    ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit 3.3.1.2 Window Sampling Window sampling is used to circumvent sampling overhead cost when small sampling windows are required when high-resolution data is desired, as is normally the case for instantaneous bandwidth measurements. The sampling window programmed small (<100µs), and then a period rate is set in order to space the samples out over the workload.
  • Page 176: Pmu Graphical User Interface (Gui)

    ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit The random number generator used in RBS is a 16-bit Linear Feedback Shift Registers (LFSR). The equation used for determining the average period produced is as follows: Period = ½ (2 )/F + W...
  • Page 177: Canned Analysis Property Sheet

    ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit 3.4.1 Canned Analysis Property Sheet The Canned Analysis property page is shown in Figure 58. This tab is used for executing a previously defined test. The experiment’s parameters are captured in a Canned Analysis Data (.cad) file.
  • Page 178: Sampling Method Property Pages

    ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit Table 3. Canned Analysis Property Page Entries and Buttons Type Description Load the Canned Analysis Data File. When you load a CAD file, it modifies the Canned Analysis property page and the associated sampling method tab (EBS or TBS).
  • Page 179: Time-Based Sampling Property Page

    ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit Figure 59. Time-Based Sampling Property Page Table 4. TBS Property Page Entries and Buttons Type Description The Output File field is used to select where the sampled data file should be placed.
  • Page 180 ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit Table 4. TBS Property Page Entries and Buttons Type Description Selection of the Sampling Mode enables either Normal or High Speed sampling. Only Sampling Mode high-speed sampling is currently supported (see Section 3.3).
  • Page 181: Random Based Sampling (Rbs)

    ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit 3.4.2.2 Random Based Sampling (RBS) The RBS tab (see Figure 60.) is used to configure, save and run random based sampling tests. Figure 60. Random Based Sampling Property Page Table 5. RBS Property Page Entries and Buttons...
  • Page 182 ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit Table 5. RBS Property Page Entries and Buttons Type Description Ring 0 Control Not supported Minimize This will minimize the PMU window during the run. Selection of the Sampling Mode enables either Normal or High Speed sampling. Only...
  • Page 183: Sampling Macros Dialog

    ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit 3.4.3 Sampling Macros Dialog The Sampling Macro selection dialog is displayed by depressing the Macros… button on the TBS or RBS property pages. The macro type is selected with the Category: pull down menu. Two sampling categories are supported: •...
  • Page 184: Monitor Sampling Macro

    ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit 3.4.3.1 Monitor Sampling Macro The Monitor sampling macro (see Figure 62) is the simplest and most commonly used macro. Monitors describe increment events. The monitor can either count the number of times that the event occurs or the duration of the event, based on the Duration check box.
  • Page 185: Threshold Sampling Macro

    ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit 3.4.3.2 Threshold Sampling Macro Threshold macros are closely related to Monitors. They are used to count the number of times or the duration that a monitor met some specified condition (typically equal to a constant). Threshold macros use two counters.
  • Page 186: Sampling Considerations

    Close the Sampling Macros dialog box and cancel all changes. 3.4.3.3 Sampling Considerations The PMU logic in the IXP2400 and IXP2800 causes the counting of the number of occurrences of 2X events (see Section 3.2) to behave in a non-intuitive fashion. In particular, if the event lasts only one cycle, then it is counted as one occurrence.
  • Page 187: Output Formats

    ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit Figure 64. Event Selection Dialog Box Output Formats The PMU output file format is implied by the output file extension selected on the TBS and RBS property pages. For example, selecting .csv gives you a Comma-Separated Value format output file, while selecting .pcd gives you a raw Performance Counter Data format output file.
  • Page 188 ® Intel IXP2400/IXP2800 Network Processors Performance Monitoring Unit CSV output format: This format is a text output format that is particularly suited for being imported into a spreadsheet. The output format is similar to: $PLATFORM$ CAD Filename filename Target String describing target...
  • Page 189: Assembler

    Assembler This chapter provides information on running the Assembler. Background information on the ® Assembler functions appears in the Intel IXP2400 /IXP2800 Network Processor Programmer’s Reference Manual. Assembly Process This section describes how to invoke the Assembler and the steps that it goes through in processing a microcode file.
  • Page 190 ® Intel IXP2400/IXP2800 Network Processors Assembler Note: Note that the two optimization options are independent of each other; in other words any combination can be specified The default, disabled, avoids having the assembler add code that the programmer did not specify.
  • Page 191: Assembler Steps

    ® Intel IXP2400/IXP2800 Network Processors Assembler In Windows environments, the Assembler may also be invoked through the Workbench (see Section 2.6 for more information on running the assembler in the the Developers Workbench). 4.1.2 Assembler Steps As shown in Figure 65, invoking the Assembler results in a two-step process composed of a preprocessor step and an Assembler step.
  • Page 192: Case Sensitivity

    To deal with this issue, the user can specify a type and range of revisions for which they want their microcode assembled. This is done using the -ixp2400, -ixp2800, -ixp2xxx, -REVISION_MIN, and -REVISION_MAX command line options. For simplicity, the - REVISION option can be used to set the minimum and maximum to the same value.
  • Page 193: Microengine C Compiler

    Microengine C Compiler The Microengine supports microcode compiled from C language code to support the Microengines and their threads. You can create the C code using the DWB GUI or any suitable text editor. You can then compile and link the code using the GUI or the Compiler command line. This chapter explains the subset of the C language supported by the Microengine C Compiler and the extensions to the language to support the unique features of the processor.
  • Page 194: Supported Option Switches

    Overrides the base name of the .ind file. -FI<file> Forces inclusion of file. -Gx2400 Specifies the target processor: IXP2400 and IXP2800. IXP2800 is the -Gx2800 default. The compiler adds -DIXP2400 and -DIXP2800 respectively. Path(s) to include files, prepended before path(s) specified in -I path[;path2...]...
  • Page 195 ® Intel IXP2400/IXP2800 Network Processors Microengine C Compiler Table 8. Supported uccl CLI Option Switches (Continued) (Sheet 2 of 4) Switch Definition Calls the microengine image linker (ucld) after successful compilation, passing any specified linker options. The default linker options are: “-u 0...
  • Page 196 ® Intel IXP2400/IXP2800 Network Processors Microengine C Compiler Table 8. Supported uccl CLI Option Switches (Continued) (Sheet 3 of 4) Switch Definition Specifies the number of contexts compiled to run; defaults to 4, or 8 if - -Qnctx=<1,2,3,4, 5, 6,7, 8>...
  • Page 197 ® Intel IXP2400/IXP2800 Network Processors Microengine C Compiler Table 8. Supported uccl CLI Option Switches (Continued) (Sheet 4 of 4) Switch Definition Selects the alternative storage areas ("spill regions") chosen when variables cannot be allocated to general-purpose or transfer registers: (LM=local memory, NN=next neighbor registers) n=0: LM (most preferred) ->...
  • Page 198: Compiler Steps

    ® Intel IXP2400/IXP2800 Network Processors Microengine C Compiler Compiler Steps The .list file contains three types of elements: microwords, directives, and comments. Microwords consist of an opcode and arguments and generate a microword in the .list file. Directives pass information to the Linker and generally do not generate microwords. Comments are ignored in the assembly process.
  • Page 199: Case Sensitivity

    ® Intel IXP2400/IXP2800 Network Processors Microengine C Compiler Case Sensitivity The C language code as well as the command line switches are case sensitive. Development Tools User’s Guide...
  • Page 201: Linker

    The Linker is used to link microcode images. Microcode images are generated by the microcode ® ® complier or Assembler, whereas application objects are generated by a Intel XScale C/C++ Compiler. The method is C/C++ Compiler independent. Shared address pointers are bound ...
  • Page 202: Microengine Image Linker (Ucld)

    Microengine images (*.list) generated by the Assembler, (uca), or by the Compiler (uC), and combines them into a single object that is loadable by the core ® ® image, running on the Intel XScale core processor, utilizing Microengine Loader Library (UcLo) functions.
  • Page 203: Generating A Microengine Application

    An application is physically comprised of two parts: a Microengine image and a core image. Microengine images are microinstructions that run on the Microengine and are created using the ® ® uca and ucld tools. Core image runs on the Intel XScale core processor and is created using the ARM Compiler/Assembler and Linker tools.
  • Page 204: Microengine Assignment

    ® Intel IXP2400/IXP2800 Network Processors Linker String name of the external variable as declared in the uca source file variable_name (*.uc). An integer 0 or 1 indicating the lower or upper respective 16 bits of the highLow_flag external 32-bit address.
  • Page 205: Uca Output File (*.List) Example

    ® Intel IXP2400/IXP2800 Network Processors Linker 6.5.2 Uca Output File (*.list) Example .entry common_code 0 .thread_type 0123 service .image_name test .%import_var rbuf common_code 1 <16:0:0> .%import_var rbuf common_code 2 <31:16:16> 10<31:16:16> 21<31:16:16> .%import_var rswap common_code 3 <16:0:0> .%import_var rswap common_code 4 <31:16:16>...
  • Page 206: Memory Segment Usage

    ® Intel IXP2400/IXP2800 Network Processors Linker 0x000002a0 SRAM0 !_powers$5 0x00000000 LMEM !_meNum 0x00000160 SRAM0 !_llpowers$5 0x00000000 LMEM !_ctxNum 0x000002f0 SRAM0 !??_C@_01A@?6?$AA@ 0x000002f8 SRAM0 !??_C@_01A@?5?$AA@ Image ImportVar Uninitialized Value =================================================== test_c rbuf Memory Segment Usage The following example shows a sample of the memory segment usage.
  • Page 207: Microcode Object File (Uof) Format

    ® Intel IXP2400/IXP2800 Network Processors Linker Microcode Object File (UOF) Format The Microcode Object File consists of a file-header and one of more sections called file-chunks. Each fileChunk is identified by a unique ID in the fileChunkHdr section of the fileHdr. A typical UOF will consisted of a UOF_OBJS file-chunk, and an optional DBG_OBJS file-chunk.
  • Page 208: Uof Object Chunk Header

    ® Intel IXP2400/IXP2800 Network Processors Linker 4 bytes: CPU family type -- IXP2400=2, IXP2800=4. This is a resolution of all the cpuType cpu types from images (list files). minCpuVers 2 bytes: The minimum CPU revision that the UOF will run on.
  • Page 209: Memory Initialization Value Attributes

    ® Intel IXP2400/IXP2800 Network Processors Linker addr 4 bytes: The start address of memory to initialize with the byte-values. numBytes 4 bytes; Number of bytes of consisting of the values. numValAttr 4 bytes: The number of value attributes 6.7.2.5 Memory Initialization Value Attributes This object-chunk, of type uof_memValAttr_T, describes the attributes of memory initialization values.
  • Page 210: Uof_Gtid

    The cxt field will be either 4, or 8 to indicate the context mode. All other fields are unsued. cpuType 4 bytes: CPU family type -- IXP2400=2, IXP2800=4 maxVer 2 bytes: The maximum cpu version on which the image can run.
  • Page 211: Uof_Codepage

    ® Intel IXP2400/IXP2800 Network Processors Linker 4 bytes: Offset from the object to the register/symbol initialization table initRegSymTab (uof_initRegSymTab_T). reserved2 4 bytes: Reserved for future use. micro store pages = NumOfPages * sizeof(uof_codePage_T) contiguous bytes of code pages. 6.7.2.10 uof_codePage This structure, of type uof_codePage_T, is a container of related items.
  • Page 212: Uof_Neighreg

    ® Intel IXP2400/IXP2800 Network Processors Linker 6.7.2.13 uof_neighReg Structure is same format as uof_uwordFixup_T. 6.7.2.14 uof_neighRegTab This table, of type uof_neighRegTab_T, contains numEntries for the fixup-register definitions uof_meReg_T. The register definitions must immediately follow this table in the file. 4 bytes: Number of table entries...
  • Page 213: Uof_Initregsymtab

    ® Intel IXP2400/IXP2800 Network Processors Linker 6.7.2.20 uof_initRegSymTab This table, of type uof_initRegSymTab_T, contains numEntries of the register/ symbol initializations uof_initRegSym_T. The register/symbol initialization must immediately follow this table in the file numEntries 4 bytes: Number of table entries. Table entries = NumEntries * sizeof(uof_initRegSym_T) contiguous bytes of objects.
  • Page 214: Debug Object Chunk Header

    ® Intel IXP2400/IXP2800 Network Processors Linker cpuType 4 bytes: Alway zero minCpuVers 4 bytes: Always zero maxCpuVers 4 bytes: Always zero MaxChunks 2 bytes: maximum objects that can be contained in a DBG_OBJ chunk. NumChunks 2 bytes: number of chunks currently being used.
  • Page 215: Dbg_Symtab

    ® Intel IXP2400/IXP2800 Network Processors Linker 6.8.6 dbg_SymTab This debut_object chunk of type dbg_SymTab_T contains objects of type dbg_Symb_T. numEntries 2 bytes: The number of objects in the table. Table entries = NumEntries * sizeof(dbg_Symb_T) contiguous bytes of objects. 6.8.7 dbg_SrcTab This debug object chunk of type dbg_SrcTab_T contains objects of type dbg_Source_T.
  • Page 216: Dbg_Label

    ® Intel IXP2400/IXP2800 Network Processors Linker srcTabSize 4 bytes: Byte size of the Source-line table. regTabOffset 4 bytes: Register table offset from beginning of the debug object. lblTabOffset 4 bytes: Label table offset from the beginning of the debug object.
  • Page 217: Dbg_Type

    ® Intel IXP2400/IXP2800 Network Processors Linker name 4 bytes: Symbol name string-table offset. scope 1 byte: Scope -- global=0, local=1. 1 byte: uof_ValLocTyp: SRAM_MEM_ADDR, DRAM_MEM_ADDR, region SCRATCH_MEM_ADDR. reserved 2 bytes: Reserved for future use. addr 4 bytes: Symbol memory location.
  • Page 218: Dbg_Enumvalue

    ® Intel IXP2400/IXP2800 Network Processors Linker numValues 2 bytes: Number of values. reserved 2 bytes: Reserved for future use. valueOffset 4 bytes: Offset to dbg_EnumValue_T. 6.8.18 dbg_EnumValue Describes the enumeration value. name 4 bytes: Enum value name debug string-table offset.
  • Page 219: Dbg_Sloc

    ® Intel IXP2400/IXP2800 Network Processors Linker name 4 bytes: Variable name offset to string-table. type 2 bytes: Type to refe. reserved 1 byte: Reserved for future use. locType 1 byte: Location type:- Ucld VarLocType locOffest 4 bytes: Offset to dbg_Sloc_T, dbg_Tloc_T, dbg_RlocTab_T, or dbg_Lmloc_T 6.8.22...
  • Page 220: Dbg_Range

    ® Intel IXP2400/IXP2800 Network Processors Linker symName 4 bytes: Spill—symbol name (sram$tls). numRanges 2 bytes: Number of ranges. ambiguous 1 byte: the location may or many not contain valid value reserved 1 byte: Reserved for future use. rangeOffset 4 bytes: Offset to dbg_Range_T.
  • Page 221: Foreign Model Simulation Extensions

    Foreign Model Simulation Extensions Foreign Model simulation extensions are useful tools for simulating external hardware devices, and for developing software.They extend the Transactor capabilities, which are cycle and data accurate software models of the network processors. Section 7.1 provides an overview of how foreign models are used. Section 7.2 describes how to integrate foreign models with Transactors.
  • Page 222: Integrating Foreign Models With The Transactor

    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.
  • Page 223: Foreign Model Dynamic-Link Library (Dll)

    If you want to call the Transactor API from your foreign model, you must include xact_vmod.h in your source files. If and you want to statically bind your foreign model to a specific Transactor DLL, you must link against the appropriate Transactor library file (e.g., IXP2400.lib or IXP2800.lib), depending on which network processor you will be simulateing.
  • Page 224: Dll Sample Code

    In your foreign model code you can access any of the transactor API functions that are defined in xact_vmod.h. To do this, you must include xact_vmod.h in your source files and you must link against IXP2800.lib or IXP2400.lib, depending on which chip type you will be simulating.
  • Page 225 Intel® IXP2400/IXP2800 Network Processors Foreign Model Simulation Extensions // by each function so the instance generating the console messages is uniquely identifiable // allow room for up to 255 foreign models! static char *INIT_STRING[255] = {0}; static char *MODEL_NAME[255] = {0};...
  • Page 226 Intel® IXP2400/IXP2800 Network Processors Foreign Model Simulation Extensions uses: modifies: int foreign_model_pre_sim( int model_instance_num ) XACT_printf( "(instance_num = %u)(instance_name = %s) foreign_model_pre_sim called\n", model_instance_num, MODEL_NAME[model_instance_num] // Example showing how to get the handle to a model state and examine its value.
  • Page 227 Intel® IXP2400/IXP2800 Network Processors Foreign Model Simulation Extensions int foreign_model_exit( int model_instance_num ) XACT_printf( "(instance_num = %u)(instance_name = %s) foreign_model_exit called\n", model_instance_num, MODEL_NAME[model_instance_num] return(1); /*----------------------------------------------------------------- foreign_model_reset This function will be called just prior to the simulator executing a sim_reset command. The routine allows the foreign model to perform required reset actions.
  • Page 228 Intel® IXP2400/IXP2800 Network Processors Foreign Model Simulation Extensions delete [] INIT_STRING[model_instance_num]; INIT_STRING[model_instance_num] = 0; return(1); /*----------------------------------------------------------------- GetVmodForeignModelFunctions This function is exported as the sole entry point into the DLL version of this package. The transactor calls it in order to get the foreign model entry points.
  • Page 229: Transactor

    IXP2400 and IXP2800 network processors without relying on the hardware. Z state is not explicitly modeled; instead tristate nodes automatically flag floating error when 1 or more bus bits float for a period greater than the user-specified float threshold.
  • Page 230: Invoking The Transactor

    Intel IXP2400/IXP2800 Network Processors Transactor // Set the clocks. Note that the parameters vary for the IXP2400 // and IXP2800 // Uncomment one of the following function calls depending on // the network processor. Use of both will not work in the // Transactor.
  • Page 231: Transactor Commands

    ® Intel IXP2400/IXP2800 Network Processors Transactor Table 10. Transactor Optional Switches Prints basic help information then exits the program. Indicates that the program is intended to run in batch /b script_file_name1 ... mode. Using this option means that one or more script files are expected to be specified.
  • Page 232: Define

    ® Intel IXP2400/IXP2800 Network Processors Transactor Table 11. Transactor Command (Sheet 2 of 2) Command Name Command Type Section Simulation 8.3.14 go_thread 8.3.15 8.3.16 goto Simulation 8.3.17 goto_addr 8.3.18 help Miscellaneous 8.3.19 init Initialization 8.3.20 inst 8.3.21 load_ixc 8.3.22 Debugging 8.3.23...
  • Page 233: Undef

    ® Intel IXP2400/IXP2800 Network Processors Transactor macro_name If the macro_name has arguments associated with it, the arguments are substituted into the macro_text whenever the corresponding formal argument name matches a token of the macro_text. comma_separated_macro_arguments When a macro has substitutable arguments, three preprocessor operators may be applied to modify the resulting string.
  • Page 234: Benchmark

    ® Intel IXP2400/IXP2800 Network Processors Transactor 8.3.4 benchmark Format: benchmark Definition: Prints the current CPU and sets a flag the first time it is called. On the subsequent invocation it prints the end CPU time and the total time elapsed.
  • Page 235: Deposit

    ® Intel IXP2400/IXP2800 Network Processors Transactor connect top_level_net_name top_level_instantiated_pin name [top_level_instantiated_pin_name ...] Definition: Permits a dynamic connection between instances by the creation of nets and assigning names to these nets. Example: The following snippet of simulator code creates two instantiations (InstA and InstB), and sets up several port connections and an instantiation-to-instantiation connection: int MSB = 191;...
  • Page 236: Dir

    ® Intel IXP2400/IXP2800 Network Processors Transactor /force[=n[:prim_clk_name]]Applies a force to the state after depositing the value. “n” represents the number of clock cycles for which the force remains in effect; if not specified, then it is forced indefinitely until it is removed by an “unforce”...
  • Page 237: Exit

    ® Intel IXP2400/IXP2800 Network Processors Transactor Any predefined simulation state or user defined state that holds a state_spec numeric value. See Appendix A for more details on states. The bit_range spec has the same form as the index_range. If it is not bit_range specified, the whole field is assumed.
  • Page 238: Foreign_Model

    ® Intel IXP2400/IXP2800 Network Processors Transactor In the example below, a state variable is first examined, and its value is subsequently changed. Then the variable is forced, after which another state change is attempted --- unsuccessfully. Finally, the variable is unforced, and subsequently its value is successfully changed.
  • Page 239: Go_Thread

    ® Intel IXP2400/IXP2800 Network Processors Transactor 8.3.14 Format: go |/silent| |/clk_domain| |cycle_count| Definition: Simulates the number of clock cycles in a given clock domain specified by “cycle_count”. If no cycle_count is given, “cycle_count” defaults to 1. If the cycle_count is specified as -1, simulation will continue indefinitely until a simulation break event occurs due to an error or assertion of the sim.halt variable.
  • Page 240: Goto_Addr

    ® Intel IXP2400/IXP2800 Network Processors Transactor goto |clk| |/silent| cycle_target Definition: The goto command simulates up until the specified target cycle number has been reached. You can specify what primary clock input to use to measure the target cycle number; otherwise the goto command will use the current default clock (set by the set_default_go_clock command) to determine the target cycle.
  • Page 241: Init

    ® Intel IXP2400/IXP2800 Network Processors Transactor inst load_ixc load_meta logical path profile remove root_init set_bus_stats set_clock set_default_go_clk set_default_goto_filter set_float_threshold show_clocks sim_delete sim_reset time trace type ubreak unforce version watch Example: > help examine Get help on the examine command. 8.3.20...
  • Page 242: Load_Ixc

    ® Intel IXP2400/IXP2800 Network Processors Transactor 8.3.22 load_ixc Format: load_ixc [useq_spec | ustore_stats_name] ucode_file_name Definition: “load_ixc” loads and validates all microcode in the control store. The control store can either be specified directly by name, or by using the chip/useq format used in other commands such as “set_default_goto_filter”.
  • Page 243: Path

    ® Intel IXP2400/IXP2800 Network Processors Transactor (2) The following Simulator calls illustrate how to define a logical, list it, and delete it: >>> logical newtestdir = "c:\test\subtest" >>> logical newtestdir Logical: newtestdir = ""c:\test\subtest"" >>> logical newtestdir = >>> logical newtestdir No logical, "newtestdir", exists.
  • Page 244: Root_Init

    ® Intel IXP2400/IXP2800 Network Processors Transactor 8.3.28 root_init Format: root_init Definition: This command instantiates, and then initializes, the root cell. this command works only when no previous cell has been instantiated. 8.3.29 set_clock Format: set_clock |/silent| primary_clk_name high_time low_time [starting_offset]...
  • Page 245: Set_Float_Threshold

    ® Intel IXP2400/IXP2800 Network Processors Transactor set_default_goto_filter chip_inst_name (useq_thrd_spec ...) Definition: Specifies the default combination of microsequencers and threads that will apply to the “goto_addr” and “ubreak” commands if this specification is not explicitly included with these commands. One or more useq_thrd _spec specifications may be included within the useq_thrd_spec parentheses delimited by spaces.
  • Page 246: Sim_Reset

    ® Intel IXP2400/IXP2800 Network Processors Transactor Deletes the entire instantiated simulation model and all associated model states. Memory for all simulation states is freed by this command. A new model maybe instantiated (via the inst command) and initialized (via the init command) after executing this command.
  • Page 247: Type

    ® Intel IXP2400/IXP2800 Network Processors Transactor The index_range specification (delimited by []) can be a single C index_range numeric expression or 2 numeric expressions separated by a “:” to indicate the inclusive range formed between the two numbers. Closing A trace file may be closed using the “close” command. All trace files are automatically closed when the simulator is exited, or when the restore command is executed.
  • Page 248: Unforce

    ® Intel IXP2400/IXP2800 Network Processors Transactor the ubreakpoint to unconditionally stop simulation. The typedef designation for the C-interpreted callback function must be: int func_name( string chip_name, int me_num, int ctx_num, int PC ); The typedef designation for the imported callback function must be: int func_name( char *chip_name, int me_num, int ctx_num, int PC );...
  • Page 249: C Interpreter

    ® Intel IXP2400/IXP2800 Network Processors Transactor The second watch format is recognized as a C function call. It is designed to allow the user to specify some arbitrarily complex action to occur on some arbitrarily complex set of conditions. The watch defines a watch state of the specified name that looks for state transitions for each of the specified state names after each simulation event completes.
  • Page 250: C Macros Supported

    ® Intel IXP2400/IXP2800 Network Processors Transactor All multi-line C statements such as if, while, for, #if, and #ifndef must contain only C statements. Consider the following script files (a.ind and b.ind): Contents of a.ind: #ifndef A @b.ind printf("a.ind\n"); #endif Contents of b.ind: printf("b.ind\n");...
  • Page 251: Simulation Switches

    ® Intel IXP2400/IXP2800 Network Processors Transactor a 128-bit vector called foo; "vect( expr ) foo;" defines a vector, foo, of width specified by the C expression. Like model states, bit field specifications may be made by appending a one or two- argument function list.
  • Page 252: Predefined C Functions

    ® Intel IXP2400/IXP2800 Network Processors Transactor — 40 print the error, increment sim.error_count and halt simulation and command line/script file execution if any is in progress — 100 print the error, increment sim.error_count, halt all execution and then exit the simulator.
  • Page 253 ® Intel IXP2400/IXP2800 Network Processors Transactor fprintf( file_name, fmt, ... ): Analogous to the C command fprintf, except that the first argument is a file name, not a file pointer. If the log file corresponding to the file name was not previously open, it is automatically opened by this call.
  • Page 254: Error Handling

    ® Intel IXP2400/IXP2800 Network Processors Transactor • C "int" =11 • User-Defined=12 • Vector=13 • User-Defined Function=14 • Macro=15 • Internal=24 • Statistic=16 • Watch=17 • Model Artifact=18 • Constant=19 • Imported=20 • Ubreak=21 • Statistic=22 • String=23 system( char *shell_cmd ): Implements the C "system" function which passes a shell command to the OS or executing shell.
  • Page 255: Printing Statistics From The Transactor

    ® Intel IXP2400/IXP2800 Network Processors Transactor The user can write his/her own error handler that allows some user control over the handling of specific error messages. If the user defines the function: int on_error( string str ); // in the interpreter int on_error( char *str );...
  • Page 256 ® Intel IXP2400/IXP2800 Network Processors Transactor chip_name chip instance name stat_type 1: for all statistic objects 0x100: for sram statistic objects 0x200: for dram statistic objects 0x300: for shac statistic objects 0x400: for msf statistic objects 0x500: for pci statistic objects...
  • Page 257: Simulator Apis

    Simulator APIs This section describes the information comprising the XACT API. If you plan to access this API via a foreign model dll, include the header file xact_vmod.h. Foreign Model API The following 6 routines must be supplied in a foreign model dll. Note that they do not have to be exported because the transactor obtains their addresses by calling GetVmodForeignModelFunctions(): 9.1.1...
  • Page 258: For_Mod_Reset

    ® Intel IXP2400/IXP2800 Network Processors Simulator APIs Function Prototype int for_mod_exit( int model_instance_num ) 9.1.5 FOR_MOD_RESET This routine will be called just after resetting the simulator. The routine allows the foreign model to reset itself to stay in sync with the simulator...
  • Page 259 ® Intel IXP2400/IXP2800 Network Processors Simulator APIs Table 12. XACT API Functions (Continued) (Sheet 2 of 3) Function Name Function Description XACT_alloc_user_sim_state Creates a user-specified simulation state Tests the current simulation time to see if it XACT_start_of_cycle corresponds to the time when the specified clock...
  • Page 260: State Name Reference Routines

    ® Intel IXP2400/IXP2800 Network Processors Simulator APIs Table 12. XACT API Functions (Continued) (Sheet 3 of 3) Function Name Function Description Initializes the command line parsing done by XACT_init_gui_console XACT_gui_execute_command Executes a command line in a gui (e.g. Developer XACT__gui_execute_command...
  • Page 261: Xact_Get_Handle

    ® Intel IXP2400/IXP2800 Network Processors Simulator APIs 9.3.2 XACT_get_handle This function returns a handle to a transactor state, based on a transactor state name. If a handle corresponding to the specified state exists and is currently valid, it will be returned; otherwise, a unique handle will be created and returned.
  • Page 262: Xact_Get_State_Value

    ® 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.
  • Page 263: Xact_Set_State_Value

    ® Intel IXP2400/IXP2800 Network Processors Simulator APIs 9.3.8 XACT_set_state_value This function sets 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.
  • Page 264: Xact_Handle Xact_Alloc_User_Sim_State

    ® Intel IXP2400/IXP2800 Network Processors Simulator APIs Returns 1 if the state was created 0 if the state pre-existed as a non-integer, non-user-defined state -1 if the state pre-existed as a previously defined user-defined integer state */ 9.3.12 XACT_HANDLE XACT_alloc_user_sim_state This function creates a user-specified simulation state.
  • Page 265: Xact_Clock_Cycle_With_Remainder

    ® Intel IXP2400/IXP2800 Network Processors Simulator APIs 9.3.16 XACT_clock_cycle_with_remainder This function returns the clock cycle number (starting at 0) for the specified clock. It returns -1 if an error occurred during routine execution. If the simulation time does not fall on a whole multiple of the specified clock, the percentage of the time into the partial clock cycle is returned in percent_remainder;...
  • Page 266: Xact_Define_Callback_Sim_Delete

    ® Intel IXP2400/IXP2800 Network Processors Simulator APIs 9.4.4 XACT_Define_Callback_Sim_Delete Calls callback when the simulation has been destroyed via the "sim_delete" command Synopsis XACTAPI XACT_Define_Callback_Sim_Delete( void(*fp)() ) 9.4.5 XACT_Define_Callback_Restore Calls callback when the simulation state has been reloaded via the "restore" command...
  • Page 267: Xact_Define_Cancel_Callback_State_Transition

    ® Intel IXP2400/IXP2800 Network Processors Simulator APIs 9.4.9 XACT_Define_Cancel_Callback_State_Transition Define the callback to cancel any further state transition callbacks when the specified state changes. NOTE: this callback must be defined prior to calling XACT_Define_Callback_State_Transition() above. This callback will be called if the transactor deletes the state associated with the HANDLE.
  • Page 268: Xact_Define_Callback_Get_Console_Input

    ® Intel IXP2400/IXP2800 Network Processors Simulator APIs Synopsis XACTAPI XACT_Define_Callback_Set_Prompt( void(*fp)( char *prompt_str ) ) 9.4.14 XACT_Define_Callback_Get_Console_Input This function registers the callback necessary for the transactor console function to fetch console input from an external source. This callback should be defined prior to invoking...
  • Page 269: Xact_Register_Console_Function_W_Arrayed_Args

    ® Intel IXP2400/IXP2800 Network Processors Simulator APIs • number of (char *) args is <= 3 number of (int) args is <= 5SynopsisXACTAPI XACT_register_console_function_w_arrayed_args( char *function_name,int (*function_ptr)( char **, unsigned int * ),int num_char_ptr_args,int num_uint_args ) Returns 1 if function is successful, 0 otherwise.
  • Page 270: Xact_Init_Gui_Console

    ® Intel IXP2400/IXP2800 Network Processors Simulator APIs 9.5.9 XACT_init_gui_console Initializes the command line parsing done by XACT_gui_execute_command(), i.e., clears outstanding line continuation, nested curly braces, nested conditional directives, etc. Synopsis XACTAPI XACT_init_gui_console() 9.5.10 XACT_gui_execute_command Executes a command line in a gui (e.g., Developer Workbench) environment. Command line status, such as line continuation, conditional directives, etc., is maintained between calls.
  • Page 271: Xact_Exit_Transactor

    ® Intel IXP2400/IXP2800 Network Processors Simulator APIs 9.5.14 XACT_exit_transactor This function forces termination of the transactor after the next input command has been received Synopsis XACTAPI XACT_exit_transactor() 9.5.15 XACT_CTRL_C_SWITCH This function enables or disables the transactor CTRL-C function. By default, this function is enabled.
  • Page 273: Transactor States

    Transactor States About States The Transactor contains internal states that define the overall state of the model. The states documented in this chapter can be accessed through the Workbench command line interface using either built-in C functions or transactor access functions. Hardware states, certain CSRs, and transactor states for QDR and MSF pins are available in this appendix.
  • Page 274: Hardware States

    ® Intel IXP2400/IXP2800 Network Processors Transactor States Hardware States A.3.1 Chip Reference This command allows you to assign the chip to the functions described in Appendix A.3.2 through Appendix A.3.7. set_default_chip(chip_name) Sets the default chip. A.3.2 SRAM SRAM memory. For all of the following functions, you must use address values that are 32-bit aligned.
  • Page 275: Dram

    ® Intel IXP2400/IXP2800 Network Processors Transactor States init_scratch_from_file(filename) Use to initialize Scratchpad content from file. Format is hex_addr value pair on each line. A.3.4 DRAM DRAM memory. For all of the following functions, you must use address values that are 32-bit aligned.
  • Page 276: Tbuf

    ® Intel IXP2400/IXP2800 Network Processors Transactor States A.3.6 TBUF Media Switch Fabric interface Transmit buffer. Functions: set_tbuf(addr, data) Use to write to TBUF memory. get_tbuf(addr) Use to read TBUF content changes. watch_tbuf(addr) Use to watch for TBUF content changes. watch_tbuf_function({code} or function( ), addr) Use to watch for TBUF content changes and then execute code or call function.
  • Page 277: Microengine Registers

    A.4.8, the parameter me is the Microengine number. Valid me numbers for the IXP2400 are: 0x00 - 0x03 and 0x10 - 0x13. Valid me numbers for the IXP2800 are: 0x00 - 0x07 and 0x10 - 0x17. For the range of valid local memory locations, refer to either the IXP2400/IXP2800 Programmer’s Reference Manual, as...
  • Page 278: Gpr B Bank

    ® Intel IXP2400/IXP2800 Network Processors Transactor States A.4.3 GPR B bank B Bank General Purpose register within a Microengine. Functions: set_gpb(me, addr, data) Use to write to GPR Bin the Microengine. get_gpb(me, addr) Use to read GPR Bin the Microengine.
  • Page 279: Transfer Register D In

    ® Intel IXP2400/IXP2800 Network Processors Transactor States content changes and then execute code or call function. check_swr(me, addr, expect) Use to compare S Transfer register Out with an expected value. dump_swr(me) Use to display the S Transfer Out register’s content.
  • Page 280: Next Neighbor Registers

    ® Intel XScale Memory Map Access ® The following functions are used to access locations within the Intel XScale memory mapping of the network processors. See the IXP2400/IXP2800 Programmer’s Reference Manual for detailed information. For the IXP2400 and IXP2800: ®...
  • Page 281: Ixp2400 And Ixp2800 Transactor States

    The lower_address and upper_address denote the range in the sram memory map to use for an external model. Table 1. IXP2400 Transactor States for QDR and MSF Pins (Sheet 1 of 3) Datasheet Transactor State Names Description...
  • Page 282 ® Intel IXP2400/IXP2800 Network Processors Transactor States Table 1. IXP2400 Transactor States for QDR and MSF Pins (Continued) (Sheet 2 of 3) Datasheet Transactor State Names Description Signal Name chip_name.QDRn_WPS_L[1:0] Sn_WPE_L[1:0] Output Write Port Enable Address. Depending on the operating chip_name.QDRn_A_H[23:0]...
  • Page 283: Ixp2800 Transactor States For Qdr And Msf Pins

    ® Intel IXP2400/IXP2800 Network Processors Transactor States Table 1. IXP2400 Transactor States for QDR and MSF Pins (Continued) (Sheet 3 of 3) Datasheet Transactor State Names Description Signal Name chip_name.MSPA_TXSOF_WMT01H TXSOF[1:0] Output chip_name.MSPA_TXEOF_WMT23H TXEOF[3:2] Output chip_name.MSPA_TXEOF_WMT01H TXEOF[1:0] Output chip_name.MSPA_TXERR_WMT23H TXERR[3:2] Output chip_name.MSPA_TXERR_WMT01H...
  • Page 284 ® Intel IXP2400/IXP2800 Network Processors Transactor States Table 2. IXP2800 Transactor States for QDR and MSF Pins (Continued) (Sheet 2 of 3) Datasheet Transactor State Names Description Signal Name chip_name.QDRn_C_H[1:0] Sn_C[1:0] Positive and negative output clocks to Output SRAM. chip_name.QDRn_C_L[1:0] Sn_C_L[1:0] Echo clocks.
  • Page 285: Transactor States For Pci Pins

    Otherwise, the network processor will consider any pin with a previously deposited active value to be asserted. Table 3. IXP2400 Transactor States for PCI PIns (Sheet 1 of 2) Datasheet Transactor State Name Description...
  • Page 286 ® Intel IXP2400/IXP2800 Network Processors Transactor States Table 3. IXP2400 Transactor States for PCI PIns (Continued) (Sheet 2 of 2) Datasheet Transactor State Name Description Signal Name chip_name.pci_cluster.pci_pad_arch.bfm_write_PCI_AD_H PCI_AD_H[63:0] input chip_name.pci_cluster.pci_pad_arch.bfm_read_PCI_CBE_L PCI_CBE_L[7:0] output chip_name.pci_cluster.pci_pad_arch.bfm_write_PCI_CBE_L PCI_CBE_L[7:0] input chip_name.pci_cluster.pci_pad_arch.bfm_read_PCI_DSEL_L PCI_DSEL_L output chip_name.pci_cluster.pci_pad_arch.bfm_write_PCI_DSEL_L...
  • Page 287: Ixp2800 Transactor States For Pci Pins

    ® Intel IXP2400/IXP2800 Network Processors Transactor States Table 4. IXP2800 Transactor States for PCI PIns (Sheet 1 of 2) Datasheet Signal Transactor State Name Description Name chip_name.PCI_CLK PCI_CLK input chip_name.pads.IXP_BFM_PCI_ACK64_L PCI_ACK64_L output chip_name.pads.BFM_IXP_PCI_ACK64_L PCI_ACK64_L input chip_name.pads.IXP_BFM_PCI_AD_H PCI_AD_H[63:0] output chip_name.pads.BFM_IXP_PCI_AD_H PCI_AD_H[63:0] input chip_name.pads.IXP_BFM_PCI_CBE_L...
  • Page 288 ® Intel IXP2400/IXP2800 Network Processors Transactor States Table 4. IXP2800 Transactor States for PCI PIns (Continued) (Sheet 2 of 2) Datasheet Signal Transactor State Name Description Name chip_name.pads.BFM_IXP_PCI_STOP_L PCI_STOP_L input chip_name.pads.IXP_BFM_PCI_TRDY_L PCI_TRDY_L output chip_name.pads.BFM_IXP_PCI_TRDY_L PCI_TRDY_L input Development Tools User’s Guide...
  • Page 289: Developer Workbench Shortcuts

    Developer Workbench Shortcuts Introduction In the Developer Workbench there are at least three ways to initiate an action: • A menu command • A keyboard shortcut • A toolbar button The following tables summarize most these tools. Table 5. Developer Workbench Shortcuts—Files Button Keyboard Menu...
  • Page 290: Developer Workbench Shortcuts-Projects

    ® Intel IXP2400/IXP2800 Network Processors Developer Workbench Shortcuts Table 6. Developer Workbench Shortcuts—Projects Button Keyboard Menu Action Reference ALT+F+W File, New Project Create a new project. Section 2.3.1. ALT+F+R File, Open Project Open a project. Section 2.3.2. ALT+F+V File, Save Project Save project.
  • Page 291: Developer Workbench Shortcuts-Bookmarks

    ® Intel IXP2400/IXP2800 Network Processors Developer Workbench Shortcuts Table 7. Developer Workbench Shortcuts—Edit (Sheet 2 of 2) Button Keyboard Menu Action Reference ALT+E+I Edit, Find in Files Find in text files. Section 2.5.12. In the Replace dialog box, replace the items...
  • Page 292: Developer Workbench Shortcuts-Builds

    ® Intel IXP2400/IXP2800 Network Processors Developer Workbench Shortcuts Table 10. Developer Workbench Shortcuts—Builds Button Keyboard Menu Action Reference CTRL+F7 Build, Assemble Assemble. Section 2.6.3. CTRL+SHIFT+F7 Build, Compile Compile. Section 2.7.3. Build, Build Link. Section 2.9. ALT+F7 Build, Rebuild Rebuild. Section 2.9.
  • Page 293: Developer Workbench Shortcuts-View

    ® Intel IXP2400/IXP2800 Network Processors Developer Workbench Shortcuts Table 12. Developer Workbench Shortcuts—Run Control (Sheet 2 of 2) Button Keyboard Menu Action Reference Debug, Run Control, SHIFT+F10 Step Microengines. Section 2.13.9.2. Step Microengines Debug, Run Control, CTRL+SHIFT+F12 Reset. Section 2.13.9.11, .
  • Page 295: C Intel Xscale® Core Memory Bus Functional Model

    XACT_IO and the other is CMB_IO.  The XACT_IO API is a set of C functions that could be linked to emulate the Intel XScale transactions through a non-simulation event, i.e. the API provides means to query/change transactor state directly, without any simulation cycles.
  • Page 296: Xact_Io Api

    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.
  • Page 297: Simintenableirq / Simintenablefiq / Simintdisableirq / Simintdisablefiqcmbintenableirq / Cmbintenablefiq / Cmbintdisableirq / Cmbintdisablefiq

    ® Intel IXP2400/IXP2800 Network Processors Intel XScale® Core Memory Bus Functional Model int simIntConnectFIQ(char *chip_name, unsigned int intVector, void (*isrPtr)(unsigned int data), unsigned int userData) where: chip_name: name of the instantiated IXP2800/IXP2400 instance, intVector: 0..31 in correspond to the interrupt vector defined in the EAS( CSR description, chapter 5, section 5.10),...
  • Page 298: Additional Cmb_Io Api

    C.1.6 Additional CMB_IO API  The CMB_IO API also provides several routines that emulate the Intel XScale load, store, and swap bus operations. The cmbRead32 and cmbWrite32 routines are similar to the simRead32 and simWrite32 routines except that the cmbXXXX routines return a request-id and the operation is completed when cmbSetCb callback occurs, after the appropriate simulation delay.
  • Page 299: Cmbsetcb

    SWP/SWPB instructions.  The cmbSwapWrite32 is used if no read back is needed for Atomic operation. Intel XScale send a write(store) command with the alias address but without XSOCBI_LOCK asserted. In this case the callback for the cmbSwapWrite32 will not wait for read data to be returned, but occur as soon as the request is acknowledged.
  • Page 300: Cmbbfmread32 / Cmbbfmwrite32

    Intel XScale® Core Memory Bus Functional Model  Note: The Issue I/O Request signal is asserted by the Intel XScale core when a data cache request is for a memory region with C=0 and B=0 (Uncachable and Unbufferable). The CMB BFM API does not...
  • Page 301: Enums

    ® Intel IXP2400/IXP2800 Network Processors Intel XScale® Core Memory Bus Functional Model 2: 4-byte, 3: 8-byte, 4: 12-byte, 5: 16-byte and 6 :32-byte, byteEnable: mask bit for each byte (1: byte enable, 0: byte masked), data: pointer to write data...
  • Page 303: Pci Bus Functional Model

    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.
  • Page 304: Calling Console Functions From Another Foreign Model

    ® Intel IXP2400/IXP2800 Network Processors PCI Bus Functional Model Of course, an additional set parameter line would be necessary for a device that supports both IO and memory space. When the device is connected, the chip name must be passed to the function.
  • Page 305 ® Intel IXP2400/IXP2800 Network Processors PCI Bus Functional Model script. 3. The return value of the console functions are normally zero as they cannot be returned to the caller (Workbench). In cases where there are return values, they are intended to be used by C-Inter- preter expressions in an IND script or by a C program via the exported C-API.
  • Page 306 ® Intel IXP2400/IXP2800 Network Processors PCI Bus Functional Model #ifndef DLLIMPEX #define DLLIMPEX __declspec(dllimport) #endif The pci_define_device function defines a PCI slave or master device @param device_id: A unique integer used to identify the device in subse- quent function calls.
  • Page 307 ® Intel IXP2400/IXP2800 Network Processors PCI Bus Functional Model DLLIMPEX int pci_set_param(int device_id, int io_memory, int start_addr, int size); The pci_connect_device function connects a device to the PCI on a specific chip. The normal sequence of initialization is as follows.
  • Page 308 ® Intel IXP2400/IXP2800 Network Processors PCI Bus Functional Model It provides a backdoor mechanism to read memory contents from the device. Address should fall on 32-bit dword boundaries. Those that do not will be rounded to the corresponding dword. example, for address 2, dword 0 (bytes 0-3) will be returned.
  • Page 309 ® Intel IXP2400/IXP2800 Network Processors PCI Bus Functional Model int data); The pci_slave_write function writes to a slave device's mem- ory. ONLY 32-bit data and address are supported. It provides a backdoor mechanism to initialize memory loca- tions in the device.
  • Page 310 ® Intel IXP2400/IXP2800 Network Processors PCI Bus Functional Model DLLIMPEX int pci_set_error_level(int level); Register a callback function from another DLL so that any accesses to slave devices by the IXP can be notified. Each PCI bus transaction will trigger one callback.
  • Page 311: Spi4 Bus Functional Model

    SPI4 Bus Functional Model 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). 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.
  • Page 312: Console Functions

    ® Intel IXP2400/IXP2800 Network Processors SPI4 Bus Functional Model Console Functions The SPI4 BFM supports the concept of a device/port as devised by the IXP2800 development tool (WB). This concept allows for single instantiation of SPI4 BFM via a transactor command, foreign_model, to handle multiple logical spi4 devices in the simulation environment.
  • Page 313: E.3.1.2Spi4_Set_Device_X_Param/Spi4_Set_Port_X_Param

    ® Intel IXP2400/IXP2800 Network Processors SPI4 Bus Functional Model E.3.1.2 spi4_set_device_X_param/spi4_set_port_X_param The spi4_set_device_X_param/spi4_set_port_X_param sets the value of the specified parameter of the specified spi4 device/port. int spi4_set_device_rx_param(int device_id, int param_id, int param_value) int spi4_set_port_rx_param(int device_id, int port_num, int param_id, int param_value)
  • Page 314: E.3.1.3Spi4_Create_Device

    ® Intel IXP2400/IXP2800 Network Processors SPI4 Bus Functional Model E.3.1.3 spi4_create_device The spi4_create_device instantiates a new spi4 device with the assigned device_id. int spi4_create_device(int device_id, where: device_id: unique device id for the device E.3.1.4 spi4_connect_device The spi4_connect_device sets the connection between the specified spi4 device and the specified chip (ixp2800).
  • Page 315: Simulation Control

    ® Intel IXP2400/IXP2800 Network Processors SPI4 Bus Functional Model E.3.2 Simulation Control The simulation control functions are: • spi4_set_device_stop_control (see Section E.3.2.1) • spi4_set_port_stop_control (see Section E.3.2.1) • spi4_set_sim_options (see Section E.3.2.2) E.3.2.1 spi4_set_X_stop_control The spi4_set_X_stop_control sets simulation control over the specified spi4 device/port.
  • Page 316: Flow Control

    ® Intel IXP2400/IXP2800 Network Processors SPI4 Bus Functional Model E.3.3 Flow Control The flow control functions are: • spi4_set_rx_fc_info (see Section E.3.3.1) • spi4_set_tx_fc_info (see Section E.3.3.1) • spi4_set_rx_calendar (see Section E.3.3.1) • spi4_set_tx_calendar (see Section E.3.3.1) E.3.3.1 spi4_set_rx_fc_info/spi4_set_tx_fc_info/spi4_set_rx_calendar /...
  • Page 317: E.3.4 Statistical Information Access

    ® Intel IXP2400/IXP2800 Network Processors SPI4 Bus Functional Model int calendar_length int index int calendar where: device_id unique device id for each device calendar_length MSF/Tx calendar length (the latest spi4_bfm uses the transactor XACT_IO interface to retrieve this information automatically once the...
  • Page 318: E.3.4.2Spi4_Get_Rx_Buffer_Byte/ Spi4_Get_Tx_Buffer_Byte And Spi4_Get_Rx_Buffer_Int32/Spi4_Get_Tx_Buffer_Int32

    ® Intel IXP2400/IXP2800 Network Processors SPI4 Bus Functional Model int spi4_get_receive_stats_cycle(int device_id, int port_num) int spi4_get_transmit_stats_packet(int device_id, int port_num) int spi4_get_transmit_stats_byte(int device_id, int port_num) int spi4_get_transmit_stats_cycle(int device_id, int port_num) where: device_id: unique device id for each device port_num port in the specified device E.3.4.2...
  • Page 319: E.4 C-Api

    ® Intel IXP2400/IXP2800 Network Processors SPI4 Bus Functional Model E.3.4.3 spi4_get_rx_clock_cycle/spi4_get_tx_cycle_count The spi4_get_rx_clock_cycle/spi4_get_tx_cycle_count returns the spi4_bfm cycle count for reference. int spi4_get_rx_clock_cycle(int device_id, int port_num) int spi4_get_tx_clock_cycle(int device_id, int port_num) where: device_id: unique device id for each device port_num port in the specified device E.3.4.4...
  • Page 320 ® Intel IXP2400/IXP2800 Network Processors SPI4 Bus Functional Model unsigned char *buffer, int buffer_size) SPI4_WMAC_API int GetReceiveStats(int device_id, int port_num, int& num_packets_received, int& num_bytes_received, int& num_bytes_cycles) SPI4_WMAC_API int GetTransmitStats(int device_id, int port_num, int& num_packets_received, int& num_bytes_received, int& num_bytes_cycles) SPI4_WMAC_API bool GetRxClockCycle(int device_id, int port_num, unsigned int&...

This manual is also suitable for:

Ixp2800

Table of Contents