+ All Categories
Home > Documents > Teja NP - amyxamyx.org/samples/UserGuide.pdfTeja NP User’s Guide Application Organization Teja...

Teja NP - amyxamyx.org/samples/UserGuide.pdfTeja NP User’s Guide Application Organization Teja...

Date post: 25-Jan-2021
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
104
Teja Technologies, Inc. Company Confidential Teja NP Software Development Platform User’s Guide Release 3.1.0 May 9, 2003
Transcript
  • Teja NPSoftware Development Platform

    User’s Guide

    Release 3.1.0 May 9, 2003

    Teja Technologies, Inc. Company Confidential

  • Copyright © 2003 Teja Technologies, Inc. All Rights Reserved.

    This software is the property of Teja Technologies, Inc. It is furnished under a specific licensing agreement. It may be used or copied only under terms of the licensing agreement.

    Teja™ is a trademark of Teja Technologies, Inc.

    Microsoft®, Windows®, Windows® 2000, Windows® NT, Windows® XP, and Visual C++® are registered trademarks of Microsoft Corporation.

    Tornado® and VxWorks® are registered trademarks of Wind River Systems, Inc.

    Linux™ is a trademark of Linus Torvalds.

    Red Hat® is a registered trademark of Red Hat, Inc.

    MontaVista® is a registered trademark of MontaVista Software Inc.

    Intel® and Pentium® are registered trademarks of Intel Corporation.

    For more information, contact [email protected]

    ii Company Confidential Teja Technologies, Inc.

  • Contents

    1 Graphical Application Development Environment1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1

    1.1.1 Design Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21.2 Application Organization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3

    1.2.1 Model Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31.2.1.1 BuildAndRunPreferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31.2.1.2 Default . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31.2.1.3 Packaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3

    1.2.2 Backup Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-51.2.3 Code Subdirectory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5

    1.2.3.1 IXP2000 Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-61.2.3.2 XScale Processor Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-71.2.3.3 Microblock Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-81.2.3.4 Scriptfiles Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-81.2.3.5 Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-81.2.3.6 Doc Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-81.2.3.7 Exports Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-91.2.3.8 Web Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9

    1.3 Using the Teja NP Graphical Application Design Environment . . . . . . . . . . . . . . . . . . . . . . . 1-91.3.1 Top-Level Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9

    1.3.1.1 File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-91.3.1.2 Edit Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-101.3.1.3 Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-111.3.1.4 Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11

    1.3.2 Software Library Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-121.3.2.1 Keyboard Editing Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-121.3.2.2 Teja Class Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-121.3.2.3 Class Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-131.3.2.4 Naming Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-141.3.2.5 Use of Multibyte Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-141.3.2.6 Alert Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-141.3.2.7 Component Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28

    1.3.3 SW Architecture Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-381.3.3.1 Adding a New Software Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-391.3.3.2 Multiplicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-391.3.3.3 Adding Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-411.3.3.4 Moving Graphic Elements in Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-431.3.3.5 Memory Pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-431.3.3.6 Memory Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-441.3.3.7 Threads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-441.3.3.8 Output Event Recipients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-461.3.3.9 Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-461.3.3.10 Add Software Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-481.3.3.11 Software Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-48

    1.3.4 Hardware Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-491.3.4.1 Adding a New Hardware Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-501.3.4.2 Building a Hardware Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-51

    Teja Technologies, Inc. Company Confidential iii

  • Teja NP User’s Guide Contents

    1.3.5 Hardware Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-551.3.5.1 Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-561.3.5.2 Selecting Channel Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-571.3.5.3 Setting Custom Implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-59

    1.3.6 Exporting Hardware Mappings to New Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-611.4 Starting Teja NP from the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-62

    2 Building Your Program2.1 Building Programs in the Control Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

    2.1.1 Setting Build Preferences for Your Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22.1.2 Generating Code for Your Program and Compiling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-62.1.3 Running Your Program to Generate a Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7

    2.2 Building Programs in the Data Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-72.2.1 Setting Build Preferences for Your Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-72.2.2 Generating Code for Your Program and Assembling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8

    2.3 Building Applications Manually. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-92.3.1 Linux, Windows, and VxWorks Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-92.3.2 Microsoft Windows 2000 Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10

    2.3.2.1 Visual C++ Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-102.4 VxWorks Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10

    2.4.1 Integration Using Tornado II. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-102.4.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-102.4.1.2 Tornado/VxWorks integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-102.4.1.3 Tornado II Auto-Project Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11

    2.4.2 Importing a Project into Tornado . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-112.4.3 Building the BSP for the Intel IXDP 2400

    Development Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-112.4.3.1 Build the New Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-122.4.3.5 Apply Teja Changes to sysLib.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14

    2.5 MontaVista Linux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-202.5.1 Requirements :. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-202.5.2 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-202.5.3 Building Teja Applications for MontaVista Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-212.5.4 Building Microengine Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-212.5.5 Loading and Debugging Microengine Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21

    3 Debugging3.1 Overview of the Teja NP Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

    3.1.1 Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13.1.2 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

    3.2 Setting Build Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13.3 Starting the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

    3.3.1 Show History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-43.3.2 Debug Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5

    3.3.2.1 Opening a Debug Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-53.3.2.2 Dumping Data into a Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-63.3.2.3 Interactive Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6

    3.3.3 Debugging with TejaNP + Workbench. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-83.3.3.1 Setting Build Preferences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-83.3.3.2 Starting the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8

    iv Company Confidential Teja Technologies, Inc.

  • Contents Teja NP User’s Guide

    3.3.3.3 Show History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-83.3.3.4 Dumping Data into a Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-83.3.3.5 Program Execution and Further Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-83.3.3.6 Modifying Files When Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9

    Teja Technologies, Inc. Company Confidential v

  • Teja NP User’s Guide Contents

    vi Company Confidential Teja Technologies, Inc.

  • Chapter 1Graphical Application

    Development Environment

    1.1 IntroductionThis chapter describes the Teja NP Graphical Application Development Environment. User Interface Organization

    When a new project is started or a project under development is first loaded, the main window appears as shown below.

    • The left pane displays, in folder fashion, a list of items pertinent to the active work flow ele-ment.

    • The right pane displays a graphic representation of the active work flow element.

    • The five tabs at the bottom of the screen activate windows for application work flow.

    Teja Technologies, Inc. Company Confidential 1-1

  • Introduction Teja NP User’s Guide

    1.1.1 Design FlowThe Teja NP Graphical Application Development Environment organization is based on the work flow for application development.

    • Software Library

    • Software Architecture

    • Hardware Architecture

    • Hardware Mapping

    • Build

    The design flow elements are activated by five tabs in the lower left corner of the main screen:

    SW Libraries Define classes representing the logic of the application.

    Software Architecture Design Add all software elements of the application. Software ele-ments are categorized in three groups:1. Aux instances, component instances, memory pools2. Threads, memory spaces3. Event dependencies, channelsMapping between objects of group 1 and objects of group 2 is also defined in this window. Mapping is done as follows:• Aux instances and memory pools map to memory spaces/

    threads• Component instances map to threads

    Hardware Archicture Design Describe the hardware architecture for which the application is being developed. The elements used in hardware architecture design are chips, memory banks, and buses.

    Hardware Mapping Map software elements to hardware elements as follows:• Threads are mapped to processors• Memory spaces are mapped to memory banks• Channels are mapped to channel implementations• Instances and/or memory pools can be mapped to custom

    implementations (optional)

    Build Provide parameters to the code generators and compilers to build the application. Each set of Build preferences refers to a hardware mapping (an application can have more than one hardware mapping.

    1-2 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Application Organization

    1.2 Application OrganizationThe first time you save a new Teja NP project, Teja NP creates the application directory structure within the selected top level directory. All project-related files are saved in this directory.

    A top-level project_name directory contains the subdirectories shown above, plus the Teja NP project file, named project_name.tjp. Project (.tjp) files are asso-ciated with the Teja NP Graphical Application Design tool; double-clicking a .tjp file will invoke Teja NP.

    1.2.1 Model FilesThe models subdirectory contains all the other files associated with the graphical model of an application.

    1.2.1.1 BuildAndRunPreferencesThe BuildAndRunPreferences directory contains the files with build preference settings, one file for each hardware configuration. Build preference files have the extension .tjf; for example, tiptop_2400_prefs.tjf.

    1.2.1.2 DefaultThe default directory contains all the classes for the application, plus files that describes the graphi-cal layout of the software architectures and files that describe the graphical layout of the hardware architectures.

    • Teja class files have the extension .tlc; for example, PacketDescriptor.tjc.

    • Software architecture files have the extension .tjs; for example, tiptop_swarch.tjs.

    • Hardware architecture files have the extension .tjh; for example, ixp2400_pentium.tjh.

    1.2.1.3 PackagingYou can save the classes for your project in a directory of your choosing, if you wish. To do so, simply precede the class name with the name of your package when saving a class; for example, my_package.NewComponent_0. Teja NP will then create a directory named my_package in the

    Teja Technologies, Inc. Company Confidential 1-3

  • Application Organization Teja NP User’s Guide

    project_name\models directory and place your class in it. Note that software architectures and hardware architectures can also be packaged

    Dependency checking is performed when an object is saved in a package, and all the associations per-tinent to the object are saved as well. This permits a package to be treated like a library, from which any or all items can be imported into other projects. Any single item, such as one class, imported into another project brings with it all the associations necessary to make it functional..

    HardwareMappings. The HardwareMappings directory contains files representing the hardware mappings for a project. Hardware mapping files have the extension .tjm; for example, tiptop_2400.tjm.

    Intel. Predefined hardware configurations are supplied with Teja NP as Chip Support Packages (CSPs), identified by the name of the device manufacturer. The Intel directory contains hardware configurations for the Intel IXP2400, IPX2800, and Pentium processors.

    1-4 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Application Organization

    1.2.2 Backup FilesThe Backups subdirectory contains copies of the project model files described in the preceding sec-tion.

    Whenever you save an open project, a copy of the project files, as they existed before the changes made during the current session, is placed in the Backups subdirectory, identified by date and time. The most recent five saves are backed up in this way.

    In the event that your working project files become corrupted or damaged, you can simply replace the contents of the models subdirectory, including the .tjp project file, with a copy from the Backups subdirectory.

    1.2.3 Code SubdirectoryThe Code subdirectory contains all the files that are created when code for a Teja NP project is gener-ated and compiled. The code files are organized according to the chosen build preference, and then by processor under the build preference. In the example shown below, code was generated and com-piled for two separate sets of build preferences—tiptop_2400 (which runs on the IXP2400 Transac-tor) and tiptop_simulation (which runs on the Pentium processor in the development host).

    Teja Technologies, Inc. Company Confidential 1-5

  • Application Organization Teja NP User’s Guide

    1.2.3.1 IXP2000 FilesFiles associated with the IXP2000 (in this example, the tiptop_2400 preferences) are stored in subdi-rectories, one for each microengine used, and one for the X-Scale processor on the IXP2400 NPU. The top-level files for the IXP2400 code are as illustrated below:

    File Description_I.c A C file containing a representation of the .uof file as a C

    array. It allows creation of a C program to load the binary code to the microengines without accessing a file (as opposed to I.uof).

    I.uof Microcode binary file to be loaded into the specific chip; the result of running the assembler and linker. It contains the code for each microengine.

    teja_constants.h Constants used by the generated code and shared by the contol plane and data plane processors, such as class ids, instance ids, etc.

    teja_memory_map_ixp2400_I.h Data used by the generated code: memory addresses of instances and memory pools.

    .dwg IXP2400 Developer Workbench file

    .dwo IXP2400 Developer Workbench Options File

    .dwp IXP2400 Developer Workbench Project File

    .dwt IXP2400 Developer Workbench fileumake.bat Makefile for microcode generation

    1-6 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Application Organization

    The files generated for each of the microengines are the same, except for the microengine designation:

    1.2.3.2 XScale Processor FilesGenerated files for the XScale processor are placed in the XScale directory:

    The C subdirectory contains all the C files generated for application instances mapped to the XScale processor. The _VC++ directory contains a Visual C Studio project file, .dsp.

    File Descriptionixp2400_I_ue0.list Intermediate or complementary file generated by the

    assembler.ixp2400_I_ue0.uc Assembler main source file, per microengine.ixp2400_I_ue0.uci Intermediate or complementary file generated by the

    assembler.ixp2400_I_ue0.ucp Intermediate or complementary file generated by the

    assembler.teja_channel_ue0.uc Assembler source file containing code for channels used

    by microengine 0.teja_memory_map_ixp2400_I_ue0.h Data used by the generated code: microengine-specific

    addresses in local memory.teja_mempool_ue0.uc Assembly source file containing code for memory pools

    used by microengine 0.

    Teja Technologies, Inc. Company Confidential 1-7

  • Application Organization Teja NP User’s Guide

    1.2.3.3 Microblock FilesTeja Components can be exported from a Teja NP application as microblocks that are fully compati-ble with Intel Portability Framework specifications (see the Teja NP Technical Reference Manual, Chapter 5, “Microblocks.” These exported microblock files are placed in the code\microblocks directory.

    1.2.3.4 Scriptfiles DirectoryThe scriptfiles directory contains the script files (.ind) used by the Intel Developer Workbench to initialize memory, registers, and data.

    1.2.3.5 Data FilesThe data directory contains the Teja NP logfiles (.tlf) that are generated when an application is exe-cuted.

    1.2.3.6 Doc FilesThe doc directory contains the Teja NP-generated documentation for an application—the HTML files that are created when you choose Gener-ate HTML Docs from the Build menu for a set of preferences. The HTML documentation for an application can be viewed by opening the index.html file in the selected doc directory.

    1-8 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    1.2.3.7 Exports FilesThe exports directory contains the Teja NP-generated files for an application when you choose File -> Export as TejaC in the main window. Selected elements are exported as text (.txt) files.

    1.2.3.8 Web FilesThe web directory contains the files associated with a Teja NP web server.

    1.3 Using the Teja NP Graphical Application Design Environment

    1.3.1 Top-Level Menus

    1.3.1.1 File Menu

    New Project. Opens the workspace for a new project.

    Open Project. Opens an existing Teja project file with the extension .tjp.

    Recent Projects. Displays a list of the projects most recently opened.

    Import Class. Lets you import classes from another Teja project into the working project; looks for files with the extension .tlc. Classes may be imported from either the \default directory (where all classes, software architectures, and hardware architectures are stored by default), or from a package.

    Save. Saves the working project to disk.

    Save as. Saves the working project to disk under another name.

    Export as Teja C. Saves the code for the selected project elements as a text file. The code is saved in the export directory for the project; for example C:\Teja\Teja2.2\Tutorials\TipTop\exports\default

    Teja Technologies, Inc. Company Confidential 1-9

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    Current Project. Lets you switch the workspace among open projects.

    Close. Closes the working project; prompts for Save if changes have been made.

    Exit. Exits the Teja NP Designer; prompts for Save if changes have been made.

    Keyboard shortcuts for the File Menu.

    1.3.1.2 Edit Menu

    Copy. Copies a selected item in the left pane.

    Paste. Pastes the item copied from the left pane into the left pane.

    Target Language Header Code. If you need to use legacy functions or other functions that are not defined in the Teja NP tool, you can either specify an include file or the body or prototype of those functions, together with any constants required.

    Target Language Source Code. If you need to use legacy functions or other functions that are not defined in the Teja NP tool, you can either specify an include file or the body or prototype of those functions, together with any constants required.

    Generated Files Header. Lets you add header comment information, such as ownership or copy-right, to a generated file.

    Event Labels. Lets you add, delete, or edit event labels.

    Info. Lets you rename the project.

    Keyboard shortcuts for the Edit Menu.

    Menu Item ShortcutNew Project Ctrl+NOpen Project Ctrl+OImport Class Ctrl+ISave Ctrl+SSave as... Ctrl+AClose Ctrl+WExit Ctrl+X

    Menu Item ShortcutCopy Ctrl+CPaste Ctrl+V

    1-10 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    1.3.1.3 Search

    Find In Project. Lets you search all or selected portions of the working project for project elements. When you click on Find In Project, a search window opens.

    Choose the desired Target Element and Search Location, and click OK.

    Keyboard shortcuts for the Search Menu.

    1.3.1.4 Tools

    Create Distributions. Eases the creation of new projects by exporting classes associated with selected hardware mappings in an existing project to a new project. Create Distributions is explained in more detail in Section 1.3.6 “Exporting Hardware Mappings to New Projects” on page 1-61.

    Info... Ctrl+10

    Menu Item ShortcutFind in project... Ctrl+F

    Menu Item Shortcut

    Teja Technologies, Inc. Company Confidential 1-11

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    Import Microblocks. Opens the Import Microblocks dialog window. Importing microblocks is dis-cussed in more detail in the Teja NP Technical Reference Manual, Section 5.3 “Importing Microblocks.”

    Transactor Statistics. Runs a tool that executes generated code on the Transactor, using Transactor libraries; displays statistics on program execution.

    1.3.2 Software Library WindowThe Software Library Window is where you create the classes that you use in your application.

    To activate the Software Library Window, click the SW Library tab at the bottom of the screen.

    The left pane shows the system classes (green type) and the class hierarchy for the application. All classes derive from TejaClass. System classes cannot be edited or mod-ified.

    Right-clicking on a class will display a menu that lets you open the editor for that class, add a subclass, or delete a class. The class editor can also be opened by double-clicking a class.

    1.3.2.1 Keyboard Editing FunctionsThe following keyboard actions apply to the use of editor windows:

    • Press the Enter key on a selected item in a tree to open its editor.

    • Press the Enter key on a selected editable item in a list to open its editor (for example, an action or a process prefs).

    • Press the Delete key to delete editable items in a list (for example, the function editor).

    1.3.2.2 Teja Class DescriptionsFollowing is a brief description of the Teja system classes. The system classes are discussed in greater detail in Chapter 4, “The TejaNP Application Programming Interface,” sections 4.2.2 and following.

    TejaClass. TejaClass is the root of the Teja framework. It does not have any data fields or member functions, and it is abstract (so it cannot be instantiated but it can be subclassed). Its subclasses are used to model pure data structures, without any Teja overhead, which means that there is no extra functionality inherited from the superclass.

    TejaAux. TejaAux is the root class of data structures with some Teja overhead. It derives from Teja-Class, but it adds fields and functionality, so its subclasses are not pure data structures as TejaClass subclasses.

    TejaEvent. TejaEvent is used as a synchronous multicast structured message to be exchanged among components in the same thread. The multicast group of receivers can be changed dynamically using

    1-12 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    the output event recipient API of TejaComponent. The API also allows users to set up the event label and the sender id field of the event (which is usually filled with the unique component id of the sender). TejaEvent derives from TejaAux so all functions that apply to TejaAux can be used with TejaEvent and its subclasses too (except the new/delete and setup/release functions).

    Teja Alert. TejaAlert is used as an asynchronous unicast structured message to be exchanged between two components in the same or in different threads, possibly across a network. The API also allows users to set up the receiver component id of the alert (to indicate which component should get the message) and to inspect the sender thread id (to know which thread the alert originated from). TejaAlert derives from TejaEvent so all functions that apply to TejaEvent can be used with TejaAlert and its subclasses too (except the new/delete and setup/release functions).

    Teja Component. TejaComponent is the root class of all state machine based classes. It derives from TejaAux so all functions that apply to TejaAux can be used with TejaComponent and its subclasses too (except the new/delete and setup/release functions). It is an abstract class, so it can't be instanti-ated directly but it can be subclassed.

    Teja WebServer. Teja NP Web servers are special Web servers that enable normal Web browsers or other Web-based applications to be used as Teja NP clients. They operate as a message format transla-tion interface between Teja NP threads and those applications.

    TejaString. TejaString implements a dynamic string that grows automatically when new data is appended to it. It is used to perform efficient I/O on files, sockets, or other TejaString objects that can be used as files. Each time a TejaString object is read from as a file, it updates its internal access position so that its behavior is the same as that of a file. Writing to a TejaString doesn't change the access position: new data is appended to the end of the string. TejaString inherits from TejaAux so all functions that apply to TejaAux can be used with TejaString and its subclasses too (except the new/delete and setup/release functions).

    TejaQueue. The TejaQueue class inherits from the TejaAux class so all functions that apply to TejaAux can be used with TejaQueue and its subclasses too (except the new/delete and setup/release functions). It provides thread safe enqueue and dequeue API functions for storing and accessing TejaAux instances in a first-in-first-out fashion.

    TejaMutex. TejaMutex provides cross-platform mutex handling. It derives from TejaAux so all func-tions that apply to TejaAux can be used with TejaMutex and its subclasses too (except the new/delete and setup/release functions). TejaMutexes can be either recursive or non recursive, depending on which constructor was used to create them.

    TejaDevice. TejaDevice provides input/output functions for memory-mapped devices; can be used with external hardware devices such as search engines or TCAMs.

    1.3.2.3 Class EditorsClasses are added or modified using class editors. The same editor is used for all the classes except TejaComponent and its subclasses.

    The editor for the TejaComponent class is peculiar to its class, and will be demonstrated separately.

    Teja Technologies, Inc. Company Confidential 1-13

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    1.3.2.4 Naming ObjectsThe names of all objects in Teja NP must start with an alphabetic character, [a-z | A-Z]. Object names can then contain digits 0-9, underscore ( _ ), and, in the names of classes and software and hardware architectures, period ( . ).

    1.3.2.5 Use of Multibyte CharactersMultibyte characters—Chinese, Kanji, or Korean characters—will be accepted in any field and saved in the project model files. However, it is likely that these multibyte characters would not be accepted by compilers or assemblers.

    • Use only ASCII characters for variable names, constant names, or any other program elements.

    • Multibyte characters may be used in Description fields and will be output as HTML documen-tation.

    1.3.2.6 Alert EditorThe editor used for the TejaAlert class is also used for all other classes except TejaComponent..

    • The Editor tab displays a folder view of an alert’s properties.

    • The Text tab displays the code that the folder view represents.

    • To edit an existing class, double-click its name.

    • To add a new subclass, right-click its parent class, then choose Add....

    1-14 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    Adding a new subclass. Right-click the parent class under which the new subclass is to be added. A New [Class] information window opens.

    • Assign a name to the new class.

    • The Superclass is set by default. You can change the superclass using the drop-down menu on that field.

    • Add a description of what it does.

    You can import other classes into a new class in either of two ways:

    • If the class name is known or you want to import a template class, click Add.

    Select the added class name (Class0, Class 1, ...) and edit its name in the field at the bottom of the window; press Enter to record the change.

    • Click Browse to choose one or more classes from the class hierarchy for the current project. Any imported class name can be edited as needed.

    Teja Technologies, Inc. Company Confidential 1-15

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    To import a class, click the Imported Classes tab, then click Browse. A window showing the class hierarchy for the project opens.

    • In the Class Hierarchy window, choose the class you want to import, then click Ok.

    • When you have added all the required classes, click Ok in the Imported Classes window.

    Drop-down menus. There are two drop-down menus available in the Class Editor: Files and Edit. Using the Files menu or the indicated keystrokes, you can save changes to your application and con-tinue working, save changes and close the editor, or close the editor (and abandon changes).

    Print... Prints the code for the alert (active only in Text view).

    Page Setup... Set up paper size and margins for printing.

    Export Text View. Saves the content of the Text view as a UNIX-style text file. The file is saved in an export\default directory in the project file directory; for example:

    C:\Teja\Teja2.2\Tutorials\TipTop\exports\default\routes.txt

    Apply changes. Apply the changes you’ve made to model file in memory.

    Apply changes & Close. Apply the changes you’ve made to the saved model file and close the Alert Editor.

    Close. Close the Alert Editor but do not apply changes to the saved model.

    1-16 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    The Edit menu allows for the inclusion of header or source code in the code that’s generated for the application.

    Copy. Places a copy of the selected item or text on the clipboard. Copy works in both Editor and Text views of the Alert Editor.

    Paste. Inserts a copy of the content on the clipboard under the selected Editor item. The text view is not editable.

    Clicking Target Lanugage Header Code or Target Language Source Code causes an edit window for the chosen item to open.

    If you need to use legacy functions or other functions that are not defined in Teja NP software, you can either specify an include file or the body or prototype of those functions, together with any con-stants required.

    Constants. Right-click on the Constants folder to open a new constant editor.

    • Give the new constant a name.

    Teja Technologies, Inc. Company Confidential 1-17

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    • Choose its type from the drop-down list.

    • Assign a value to the constant.

    • Select whether this constant will be early binding or late binding.

    - Early binding constants are the same for every instantiation of the class.

    - Late binding constants are assigned at the time of instantiation.

    • Add a description of what the constant is and what it’s used for.

    • Click Ok to add the constant to the application; click Cancel to abandon it.

    Variables. To add a new variable, right-click the Variables folder to open a new variable editor..

    Standard Variables

    • Choose the variable Type from the drop-down list.

    • Assign a Name to the variable.

    • Indicate its Size, where applicable. If the size of the variable is determined by its type, the Size field will be greyed out.

    • Select the variable’s Multiplicity.

    • Indicate whether the variable belongs to a standard Teja Type Class or a user-defined class.

    • I/O Type pertains to inner components. See “Inner Components” on page 1-31.

    1-18 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    • Add a Description of what the variable is and what it’s used for.

    Functions. Standard read and write functions are presented by default.

    • Choose Default to use the default read and write functions; can be used only with standard vari-ables.

    • Choose Omit to omit the variable from read and write functions (can be used with either stan-dard or user-defined variables).

    • Choose Edit to add your own read and write functions for user-defined variables. The default read and write functions cannot be used with user-defined variables.

    Variable definition. First choose whether the variable is a Teja base type or a type you wish to define yourself (for example, legacy structure or structure pointer types).

    The Type menu lists several types supported by Teja NP in a native manner. The TEJA_INT32 and TEJA_U_INT32 types are guaranteed to occupy 32 bits irrespective of the underlying compiler or pro-cessor. The packed bitfields, uint_0 through uint_31 are laid out in a compiler-independent manner as follows:

    Variables are included in packed bitfields in their entirety. They do not wrap around word boundaries. Variables are added to a 32-bit word, beginning at the MSB, until either all variables have been accom-modated or the sum of the lengths of the variables is greater than 32. If the sum of the lengths of the variables is greater than 32, then variables beginning with the one that cannot be accommodated is placed in the next 32-bit word, and the same method of adding variables is repeated, and appropriate accessors are generated for the variables.

    Defining a variable of type uint_0 forces the next variable into a new packed bitfield.

    The variable may be one of the following types:

    Single Valued Stores one element of the indicated type. The size field is ignored.

    TejaArray Stores a dynamically changing array of values, each of the indicated type. The size field is used to indicate the initial size of the dynamic array, and the increments in which to allocate larger sizes of the array.

    TejaArray* Pointer to a set variable defined elsewhere. The size field is ignored for set reference vari-ables.

    Array Store a fixed array of values, each of the indicated type. The size field indicates the size of the array.

    v1 10 bits

    v2 6 bits

    v3 11 bits

    v4 13 bits v4 etc.

    v1 v2 v3 pad0

    Packed Bitfield 1

    Packed Bitfield 2

    31

    MSB LSB

    Teja Technologies, Inc. Company Confidential 1-19

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    For variables of user-defined types, you will need to provide read and write functions for serializing the variable. When you select User Defined as the Type Class, fields for read and write functions, including skeleton code, will be displayed. Refer to the Technical Reference Manual for explanations of teja_read and teja_write functions and the TejaString API.

    Functions. Right-click the Functions folder, then click Add Function... to open the Function Editor.

    In the Info window,

    • Type in a Name for the new function.

    • Select its Return Type, if any, from the drop-down menu.

    • To add parameters for the function, Click Add.

    Type in a Name for the new parameter.

    Click int to display a drop-down menu of variable types; choose the desired type.

    • To remove a parameter, highlight the parameter to be removed, then click Remove.

    • Type in a Description of the new function.

    • Click the Body tab.

    1-20 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    In the Body window,

    • Click Add Var to add local variables as described in the section on variables above.

    Teja Technologies, Inc. Company Confidential 1-21

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    • Click Add Link to add local links.

    Select the Type of the object being linked to.

    Assign a Name to the local link.

    Assign a Size value if the multiplicty is array or a Click value if the multiplicity is TejaArray or TejaArray*.

    Select the variable’s Multiplicity.

    I/O Type pertains to inner components. See “Inner Components” on page 1-31.

    Add a Description of the link.

    1-22 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    • Add the actions that will take place in the function. Clicking the Action button opens a list of structured actions from which to select:

    Structured actions are actions that can be added to the body of functions, transitions, constructors, and the destructor of classes.Reset Fieldvar_or_par = (var_or_par_type) new_valueResets the value of var_or_par (class variable, local variable, or a function parameter) to new_value. Also permits the casting of new_value to var_or_par_type (the type of var_or_par).Invoke Function

    Provides the means for invoking a function within a function.SendAlertvar = teja_send_alert(channel, comp_id,

    alert)var = teja_send_alert_with_thread

    (channel, comp_id, thread_id, alert)

    Sends alert from this instance to a component (with the id number comp_id) through channel. If channel has more than one consumer (recipient component) and the consumers run on different threads, it is necessary to specify the thread (using its id number thread_id) on which the destination component runs. A value of -1 for comp_id in channel implementations with multiple consumers means any component; a value of -1 for thread_id in channel implementations with multiple consumer threads means any thread.Make/Break Connectionteja_make_connection(channel)teja_break_connection(channel)

    Before the first sendAlert on channel the connection on channel must be opened by invok-ing teja_make_connection(channel). When the connection to channel is no longer needed, it should be broken by invoking teja_break_connection(channel).Update Output Event Recipientsfrom_link -> add_event_recipient(event, to_link)from_link -> remove_event_recipient(event, to_link)

    This action modifies the set of dependecies that determine how an event is propagated. The add_event_recipient action allows a new dependency to be added to the set. The depen-dency establishes that each time the component that from_link points to broadcasts an event with label event, the component that to_link points to receives that event.

    The remove_event_recipient action removes a dependecy from the set.

    The set of recipient components for a sender component and the event label depend on the history of add_event_recipient and remove_event_recipient called.New Alertnew_alert = new Alert(event, params) in mem_space

    Teja Technologies, Inc. Company Confidential 1-23

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    This action creates an instance of class Alert. It is allocated from mem_space and is initialized according to the constructor for Alert.New Data Structurenew_data = new Class (params) in mem_space

    This action creates an instance of class Class. It is allocated from mem_space and is initialized according to the constructor for Class.New Componentnew_com = new Component (params)

    This action creates an instance of class Component. It is initialized according to the constructor for Component and is allocated from the same memory space from which the class that con-tains this action is allocated.New TejaArrayarray = new TejaArray(click)

    This action creates an instance of TejaArray. click defines the number of elements to preallo-cate each time an element is added to an already full array.Setup Data Structureint_var = Class::setup(link, params)

    This action initializes the instance pointed to by link, invoking the constructor for Class. The returned value int_var indicates whether the setup succeeded or not.Setup Eventint_var = Event::setup(link, event, params)

    This action initializes the instance pointed to by link, invoking the constructor for Event. The returned value int_var indicates whether the setup succeeded or not.Setup Alertint_var = Alert::setup(link, event, params)

    This action initializes the instance pointed to by link, invoking the constructor for Alert The returned value int_var indicates whether the setup succeeded or not.Returnreturn EXPR

    This action cannot be invoked from a transition. It returns the control of the execution to the caller. It can return an expression.Deletedelete EXPR (virtual)Class::delete EXPR (not virtual)

    This action invokes the destructor and frees the memory used by the instance referred by EXPR.

    If the delete is virtual, the destructor invoked is the one of actual class of the instance pointed by EXPR.

    If the delete is not virtual the destructor invoked is the one of Class.ReleaseClass::release EXPR

    1-24 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    This action invokes the destructor of Class on the instance referred by EXPR, but it does not free the memory.Whilewhile (condition){

    Inserts code to open a while statement.Ifif (condition){

    Inserts code to open an if statement.Else If- else if (condition){

    Inserts code for else if continuation of an if statement.Else- else {

    Inserts code for else continuation of an if statement.End Block}

    Inserts end bracket for any of the conditional statements above.Continue

    Called within a loop; causes execution to skip to the next iteration of the loopBreak

    Called within a loop; causes execution to exit the loop.CodeBox

    Provides the means to add native code to the action.

    About code boxes. The operator TejaName must be used to reference a Teja variable or constant in a code box, with this syntax:

    In generated assembly code, names of Teja variables and constants are emitted in a modified form. Using in code boxes causes variable to be emitted in the same way.

    Teja Technologies, Inc. Company Confidential 1-25

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    Constructors. One or more constructors can be defined for each class. The constructor named default is always defined for each class—it cannot be deleted or renamed.

    To add a new constructor, right-click the Constructors folder in the Alert Editor and choose Add Con-structor.... Assign a Name to the new constructor.

    Using constructors. When placing multiple static instances within a memory space or server, caution must be exercised because of the way in which constructors are called. Multiple static instances in a memory space or server are initialized in two steps.

    1. The memory in which the instances are located is allocated sequentially for all instances.

    2. Constructors are called sequentially on the instances allocated in step 1.

    This means that care must be taken when writing a class constructor code because the order in which the constructors are called in static instances cannot be assumed: in other words, it's not safe to refer to fields of other instances from within the constructor because those fields may not have been initial-ized yet. Note that referring to fields of other instances is unsafe only in the constructor: member functions, destructor, and transitions are not affected by this issue. Therfore, accessing the fields of another instance at initialization time can be done safely in an initialization transition or function, which can be executed at the beginning.

    Example of unsafe constructor: Suppose that class A has a constructor that receives a parameter pointing to class B: B * b. The following code in the constructor of A is not safe:int i;i = b->int_var_in_b;

    1-26 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    However, initializing a local link with a pointer to another instance is always safe because the memory in which the other instance resides has been allocated before any constructor is called (step 1 above is performed on all instances before step 2 is perfomed on any instance).

    Example of safe constructor: Suppose class A has a constructor that receives a parameter pointing to class B: B * b. The following code in the constructor of A is safe:B * local_b;local_b = b;

    To modify the default constructor, double-click default.

    Once the Constructor Editor is open, the steps are the same for a new constructor as for modifying the default constructor.

    Under the Info tab:

    • In the Constructor Declaration area, click Add to add a new parameter. Select the parameter Type from the drop-down menu; assign a Name to the new parameter.

    • To remove a parameter, highlight the parameter to be removed, then click Remove.

    • In the Superclass Constructor Invocation area, choose the Name of the superclass from the drop-down menu.

    • Assign values to the listed parameters.

    • Fill in a Description of what’s being done in the constructor

    Teja Technologies, Inc. Company Confidential 1-27

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    Under the Body tab:.

    • Add local variables and links as described under Functions above.

    • Add Actions as described under Functions above.

    You can also right-click on any of the Alert properties to add a new one.

    1.3.2.7 Component EditorTo add a new component, right-click TejaComponent and choose Add subclass....

    A Component Editor for the new component opens, along with a New Component Info window. Infor-mation for the new component is filled in as described in Section “Adding a new subclass.” on page 1-15.

    1-28 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    In the Editor view, the left pane displays a folder-style list of the elements of the component; the right pane displays the graphic view of the component (state machine)—discrete states (circles) and transi-tions (directed lines).

    The Text view displays the code that the model represents.

    The File and Text menus in the Component Editor are the same as those for other classes; see Section “Drop-down menus.” on page 1-16. You can also use toolbar icons to copy text and to paste

    text .

    The View menu provides features for working with the graphic view of the model.

    • Choose Set Zoom Factor to change the size of the graphic image. Noninteger zoom values are permitted.

    • Choose Set Grid to determine the grid spacing.

    • Choose Show Grid to turn the grid display on and off.

    • Choose Snap to Grid to turn the snap feature on and off.

    Teja Technologies, Inc. Company Confidential 1-29

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    In the Component Editor, constants, variables, links, functions, and constructors applicable to the class are added in the same way as described in preceding sections.

    Rate Variables. To add a new rate variable, right-click the Rate Variables folder and choose Add Rate Variable ... .

    • Assign a Name to the rate variable.

    • Provide a Description of its use.

    • Assign a Default Rate for the rate variable.

    Discrete States. To add a new discrete state, click the discrete state icon in the tool bar. When

    the cursor is in the editor pane of the Component Editor, it will change to its add discrete state form. Locate the cursor where you want the discrete state to be, and click. You can add as many discrete states as you wish. When you’re through adding discrete states, click the select icon in the tool

    bar.

    To move a discrete state, just drag it to where you want it to be.

    1-30 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    Double-click the discrete state (with the select cursor) to open the Discrete State Editor..

    • Assign a Name to the discrete state.

    • Choose a Color for the discrete state, if you wish.

    • Indicate whether or not this is a Transient state (one transition from the state is always taken).

    • Check the Initial State box if this is the state in which the component will begin execution. A component must have a valid initial state. The initial state is indicated by a small green arrow.

    • Indicate whether the state is private, input, or output.

    • Add a Description of its purpose.

    • Select the order in which you want the transitions to take place.

    Inner Components. Inner components provide the means to create simple components that can be used to create more complex components. Once an inner component has been created, it can be reused—as an instance of InnerComponent—as an element in any other component (outer compo-nent).

    Teja Technologies, Inc. Company Confidential 1-31

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    Creating an inner component. To be used as an inner component, a component must have at least one state of type input or output.

    • An input state (S1 in the example above, outlined in magenta) cannot have incoming transitions within the inner component. An input state will receive transitions externally.

    • An output state (S2 in the component example above, outlined in blue) cannot have outgoing transitions within the inner component. An output state will transmit transitions externally.

    1-32 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    • Variables and links in an inner component can be designated as input, output, input and output, or neither input nor output.

    Using inner components. To place an inner component into an outer component, click the Add Inner Component button in the tool bar. When the cursor is in the editor pane of the Component Edi-

    tor, it will change to its add inner component form. Place the cursor where you wish to locate the

    Teja Technologies, Inc. Company Confidential 1-33

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    inner component, and click. You can add as many inner components as the outer component requires. When you’re through adding inner components, click the select button in the tool bar.

    The scope of the expressions that can be assigned to constructor parameters and late-binding con-stants is the outer component.

    The constructor of an inner component is invoked after the outer component’s constructor. If a com-ponent contains more than one inner component, the order in which the constructors for the inner component are invoked is not specified, but all of them are invoked after the outer component’s con-structor.

    An inner component’s functions can be invoked in the outer component, with the following syntax: inner_name.my_fun().

    Inside any transition of an outer component, you can write assignments such as inner_name.input_field = expression, where

    • inner_name is the name of an inner component within the outer component.• input_field is an input field contained in the inner component.• expression may contain fields of the outer component. If the transition is outgoing from an

    inner component, expression may also contain output fields of that inner component.

    Transitions. To add a new transition, click the add transition button in the tool bar. When the

    cursor is in the editor pane of the Component Editor, it will change to its add transition form. Locate the cursor inside the from (initial) state. Click and hold, then drag the cursor to the to a point inside

    1-34 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    the to (end) state and release. You can add as many transitions as you wish. When you’re through adding transitions, click the select button in the tool bar.

    To reshape a transtion, select it, then drag the handles (little red boxes) until the transition has the desired shape.

    Double-click a transition to open the Transition Editor.

    Under the Info tab:

    • Assign a Name to the transition.

    • On the From drop-down menu, choose the discrete state from which the transition is exiting.

    • On the To drop-down menu, choose the discrete state to which the transition is going.

    • On the Type drop-down menu, choose the means by which the transition is triggered: Internally_Triggered, Alert_Triggered, Event_Triggered, or Alert_Event_Triggered.

    • If the transition is alert or event triggered, on the Input Event Label drop-down menu, choose the triggering event. If you want the transition to be taken whenever any alert is received, choose *, the star-event.

    • Select a Color for the transition, if you wish.

    • Add a description of what takes place during the transition.

    • Choose the Guard type.

    - For a boolean guard, type in the boolean expression for the guard.

    Teja Technologies, Inc. Company Confidential 1-35

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    - For a threshold guard choose a rate variable, an operator (greater than or less than) and type in the threshold value.

    - For a function guard type in the body of the guard function.

    • Choose the Output Event type. If you are creating a New Output Event, click Edit Event.

    • In the Output Event Editor:

    - Choose the Class of the output event.

    - Choose the Constructor for the output event.

    - Choose the Event label.

    - In the Constructor Initialization area, assign a value to the constructor.

    1-36 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    Under the Body tab:

    • Add Local Variables and Links and Functions as described in Section “Functions.” on page 1-20.

    Teja Technologies, Inc. Company Confidential 1-37

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    1.3.3 SW Architecture WindowTo open an existing sofware architecture, click the SW Architecture tab at the bottom of the screen, expand the SW Architecture folder, then double-click the name of the software architecture you wnat to open.

    The Software Architecture Window is where you create the software elements of the application. Software elements are categorized in three groups:

    1. Aux instances, component instances, memory pools

    2. Threads, memory spaces

    3. Event dependencies, channels

    Mapping between objects of group 1 and objects of group 2 is also defined in this window. Mapping is done as follows:

    • Aux instances and memory pools map to memory spaces/threads

    • Component instances map to threads

    1-38 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    1.3.3.1 Adding a New Software ArchitectureTo begin constructing a new software architecture, right-click the SWArchitecture folder in the left pane and choose Add SW Architecture.

    • Assign a Software Arch Name.

    • Add a Description of what this software archicture does.

    • Click OK.

    Note that you can create more than one software architecture using the classes defined in the Software Library.

    A software architecture can be saved to a package by inserting the name of the package followed by a period in front of the software architecture name; for example .swarch1. Software architectures cannot, however, be imported into another project individually. They can be imported only as part of a complete application.

    1.3.3.2 MultiplicityDefinition. Multiplicity is a feature of the Teja NP Application Development Environ-ment that creates multiple instances of a class automatically. The multiplicity of an instance (when multiplicity is greater than 1) is shown in the software architecture with the number of instances at the upper right corner of the instance icon.

    Rules for use. The use of multiplicity is subject to three rules:

    1. A noncomponent instance of multiplicity N mapped to a memory space is an array.

    2. If a component instance of multiplicity N is mapped to a single thread, all instances of the compo-nent will run in the same thread.

    3. If a component instance of multiplicity N is mapped to threads created with multiplicity, the num-ber of threads must be equal to the number of component instances. In this case, instance[ i ] is mapped to thread[ i ].

    Teja Technologies, Inc. Company Confidential 1-39

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    Making software connections with multiplicity. Software connections between multiple instances are linked as described the following paragraphs. General information about software connections is included in Section 1.3.3.3 “Adding Instances” on page 1-41.

    The operator multindex(), which enables automatic linking between multiple instances, simplifies making software connections with multiplicity.

    1. Instance a has multiplicity n and instance b does not have multiplicity; l is a late-binding constant of type link or a constructor parameter, and T is a thread.

    In this case, all a link to the same b, and all instances run in the same thread.

    a[ i ]·l = b

    2. Instance a has multiplicity n and instance b has multiplicity m; l is a late-binding constant of type link or a constructor parameter, and T is a thread.

    In this case, a may be linked to b by means of any valid integer expression, and all instances run in the same thread.

    a[ i ]·l = b[]

    The integer expression intexp can contain the operator multindex(). If multindex is used, then each instance a[ i ] is linked to its counterpart instance b[ i ].

    a[ i ]·l = b[multindex()]; a[ i ]·l = b[ i ]

    When the multiplicity of instance a is not equal to the multiplicity of instance b, all instances must be running in the same thread in order to use multindex() with late-binding constants.

    3. Instance a and instance b both have multiplicity n; l is a late-binding constant of type link or a constructor parameter, and T is a thread also of multiplicity n.

    In this case, a may be linked to b by means on the operator multindex(). If multindex() is used, then each instance a[ i ] is linked to its counterpart b[ i ], and both instances run in thread T[ i ].

    a[ i ]·l = b[multindex()]; a[ i ]·l = b[ i ]

    a bln

    T

    a bln

    T

    m

    a bln

    Tn

    n

    1-40 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    1.3.3.3 Adding InstancesAux instances. To add an aux instance, click the Add Aux Instance icon in the tool bar. When

    the cursor is in the editor pane of the Software Architecure window, it will change to its add aux instance form. Locate the cursor where you want the instance to appear and click once. You can add as many aux instances as you like. When you’re through adding aux instances, click the select ico-n in the tool bar. To relocate an aux instance, select it, then drag it to the desired location.

    Double-click an aux instance to open the Aux Instantiation Editor.

    • Assign a Name to the aux instance.

    • Choose the Class of the instance from the drop-down menu. Note that constructor parame-ters and constants associated with the class are filled in in the Constructor Initialization and Constants areas.

    • Choose the Constructor that will be used from the drop-down menu.

    • Indicate the Multiplicity of the instance.

    • Assign values for Constructor Initialization and Constants.

    • Click OK.

    You can also open the class editor for an aux instance by Shift double-clicking the instance.

    Component instances. To add a component instance, click the Add Component Instance

    icon in the tool bar. When the cursor is in the editor pane of the Software Architecure window, it

    will change to its add component instance form. Locate the cursor where you want the instance to

    Teja Technologies, Inc. Company Confidential 1-41

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    appear and click once. You can add as many component instances as you like. When you’re through adding component instances, click the select icon in the tool bar. To relocate a component

    instance, select it, then drag it to the desired location.

    Double-click a component instance to open the Component Instantiation Editor.

    • Assign a Name to the component instance.

    • Choose the Class of the instance from the drop-down menu. Note that constructor parame-ters and constants associated with the class are filled in in the Constructor Initialization and Constants areas.

    Constructor parameters or constants of type link or channel in the selected class are repre-sented by small grey boxes, called link anchors, on the perimeter of the instance. If you place the tip of the select cursor in a link anchor, a pop-up identifying the constant with which that anchor is associated will appear.

    You can initialize a link by creating a software connection from the link anchor to another instance when the link anchor is of type link or to a channel when the link anchor is of type channel. This is discussed in more detail in Section 1.3.3.10 “Add Software Connections” on page 1-48 and Section 1.3.3.9 “Channels” on page 1-46.

    • Choose the Constructor that will be used from the drop-down menu.

    • Indicate the Multiplicity of the instance.

    • Assign values for Constructor Initialization and Constants.

    1-42 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    If you assign values to constructor parameters or constants of type link or channel, software connections will be drawn from the appropriate link anchor on the component instance to the specified link (solid blue arrow) or channel (dashed blue arrow). Conversely, if you leave those variable fields empty and create a software connection to initialize a link, the values will be filled in.

    • Click OK.

    You can also open the class editor for an component instance by Shift double-clicking the instance.

    1.3.3.4 Moving Graphic Elements in GroupsGraphic elements in both the Software Architecture window and in Component Editors can be moved in groups.

    • To select a group of graphic elements, hold down the Shift key and drag the cursor to select ele-ments in a rectangular pattern, or hold down the Shift key and click on the elements you want to select.

    • To deselect an individual element in a group, hold down the Ctrl key and click the element.

    • To move grouped elements, hold down Shift key, place the cursor on one of the selected ele-ments, and drag the group.

    1.3.3.5 Memory PoolsMemory pools, which contain a number of nodes and have an associated set of classes, are mapped to memory spaces. Memory pools do not have a graphic representation in the software architecture.

    To add a memory pool, right-click the Memory Pool folder in the software architecture tree and choose Add Memory Pool....

    • Assign a Name to the memory pool.

    Teja Technologies, Inc. Company Confidential 1-43

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    • Assign a Node Size to the memory pool, if you wish to do so. If a node size is not specified, it will be determined automatically on the basis of the associated classes.

    • Indicate the required Number of Nodes.

    • Add classes that will be associated with the memory pool. Click Browse, then choose the desired class in the Class Hierarchy window and click Ok. To remove an associated class, select the class name on the list, then click Remove.

    1.3.3.6 Memory SpacesA memory space identifies a region of memory within a memory bank; memory banks are specified when Hardware Architecture is defined. Memory pools and aux instances can be mapped to memory spaces (see Section 1.3.3.11 “Software Mapping” on page 1-48). Memory spaces do not have a graphic representation in the software architecture.

    To add a memory space, right-click the Memory Space folder in the software architecture tree and choose Add Memory Space....

    • Assign a MemorySpace Name.

    • Add a description of the use of the memory space.

    • Click OK.

    1.3.3.7 ThreadsThreads are created and instances are mapped to them in the Software Archictecture editor. The pro-cessor on which they run is specified in Hardware Mapping. Threads do not have a graphic represen-tation in the software architecture.

    1-44 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    To create a new thread, right-click the Threads folder in the software archicture tree and select Add Thread....

    • Assign a Name to the thread.

    • Add a Description of what the thread does.

    • Insert Init Code and Shutdown Code for the thread if required.

    • Click OK.

    Teja Technologies, Inc. Company Confidential 1-45

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    1.3.3.8 Output Event RecipientsUse the Output Event Recipient editor to direct an event from one component to another component running in the same thread. To add an output event recipient, right-click the Output Event Recipient folder in the software architecture tree and select Add Output Recipient....

    • From the drop-down menu in the Event Causing Component area, choose the component From which the event will be sent.

    • From the drop-down menu in the Event Responding Component area, choose the component To which the event will be sent.

    • From the drop-down menu in the Event Name area, choose the class of the Propagated Event to be sent.

    • Click OK.

    1.3.3.9 ChannelsA channel is an abstraction of alert-delivery media that receives alerts from producer components and transmits them to consumer components. A channel can have multiple producers and multiple consum-ers. To make use of a channel, you place a graphical representation of the channel in the software architecture diagram and initialize links to and from it by adding software connections.

    To add a channel to the software architecture, click the channel icon in the tool bar. When the

    cursor is in the editor pane of the Software Architecture window, it will change to its add channel form. Locate the cursor where you want the channel to appear and click once. You can add as many channels as you like. When you’re through adding channels, click the select icon in the tool bar.

    To relocate a channel, select it, then drag it to the desired location.

    1-46 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    Double-click a channel to open the Channel Editor.

    • Assign a Name to the channel.

    • Add a Description of what the channel’s used for.

    • Specify the channel’s Consumers.

    - In the Consumers area, click Add.

    - From the pop-up menu, select the consumer component.

    - Click Add again to specify another consumer.

    • Click Set RX Alert to associate an alert with the selected consumer of the channel.

    • Click Set RX Memspace to associate a memory space with the selected consumer of a channel.

    • Clear RX Memory removes selected associations set with Set RX Alert and Set RX Memspace.

    • Click OK.

    If you add consumers in the Channel Editor, software connections (dashed blue arrows for channels) will be drawn from the channel to the consumer in the graphical representation of the software archi-tecture.

    Teja Technologies, Inc. Company Confidential 1-47

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    1.3.3.10 Add Software ConnectionsA software connection is a graphical means of initializing constructor parameters or variables of type link or channel. When a software connection is drawn, values are inserted in the constructor or instance in which they are used.

    To create a software connection, click the Add Software Connection icon in the tool bar. When

    the cursor is in the editor pane of the Software Architecure window, it will change to its add software connection form.

    Locate the cursor in the link anchor for the variable you want to initialize. When the cursor is over the link anchor, a pop-up identifying the constant with which that anchor is associated will appear.

    Click and drag the cursor to the instance or channel representing the value of the constant. A faint blue line follows the cursor. Release the mouse button when the cursor is in the target instance or channel. A blue arrow representing the software connection appears.

    You can also add consumers to a channel with the software connection tool. Locate the cursor in a channel, then click and drag the cursor to the consumer component instance.

    • You can add as many software connections as you like. When you’re through adding software

    connections, click the select icon in the tool bar.

    To remove or change a software connection:

    • Click in the head of a software connection arrow, then click the delete icon in the tool bar.

    1.3.3.11 Software MappingThe Software Mapping Editor is used to map

    • noncomponent instances and memory pools to threads or memory spaces

    • component instances to threads

    1-48 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    To open the Software Mapping Editor, double-click Software Mapping in the left pane of the Software Architecture window.

    The first time you invoke the Sofware Mapping Editor after laying out a software archicture, the Instances column will contain the names of all the instances in the software architecture and the Threads/Memory Spaces column will be blank.

    To map threads and memory spaces to instances:

    • Click in the Threads/Memory Spaces column next to the instance you want to map. A drop-down menu will appear.

    • For noncompenent instances, select the name of the desired thread or memory space.

    • For component instances, select the name of the desired thread.

    • Click OK.

    1.3.4 Hardware ArchitectureThe HW Architecture Window is where you select the hardware architecture for your application, to which you map the software architecture you created in the SW Architecture Window.

    To activate the Harware Architecture window, click the HW Architecture tab at the bottom of the screen.

    Teja Technologies, Inc. Company Confidential 1-49

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    1.3.4.1 Adding a New Hardware ArchitectureThe easiest way to add a new hardware architecture, whether you are expanding an existing application or creating a new one, is to select one of the Chip Support Packages (CSPs) that are supplied with Teja NP. To do this, right-click the HW Architecture folder in the left pane. From the pop-up menu that appears, choose Import HW Architecture:

    The Select a hardware architecture dialog box appears, with a list of available hardware architectures. You can also browse to select a hardware architecture from another application or from a package.

    Choose an architecture from the list, then click Ok.

    Note that you can also use this pop-up menu to add an architecture (that is, open an editor in which you can create your own architecture) or to remove an architecture.

    If, for example, intel.pentium.PentiumBoard were chosen, the Pentium board architecture would be added to the list of hardware architectures included in the project.

    1-50 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    Double-clicking the intel.pentium.PentiumBoard icon would cause the hardware architecture for the Pentium to be displayed in the HW Architecture Editor:

    The Pentium board shows four of the elements that make up a hardware architecture:

    • The Pentium chip itself, represented as a green rectangle labeled pentium.

    • A memory bank, represented as a gray rectangle labeled os_mem.

    • Two buses, represented as yellow arrows, one connecting the chip to memory (os_bus), the other the PCI bus (pci_bus).

    Buses like the PCI bus that end in broken lines rather than arrows are exported buses; that is, this architecture is an inner architecture, and a PCI bus in another architecture can be connected to this architecture.

    • Connections between the chip and the buses and the memory bank and the buses. These are represented as bidirectional black arrows.

    You can inspect and set properties for any hardware architecture.

    • Double-click on a chip, memory space, or bus to open its properties window.

    • Shift + double-click on a chip to open its internal architecture.

    To change the name of a hardware architecture, choose Edit -> HW Architecture Info... in the Hardware Architecture Editor and modify the name as desired. To save a hardware architecture to a package, insert the package name followed by a period in front of the hardware architecture name; for example .Arch4.

    1.3.4.2 Building a Hardware ArchitectureWhile it is recommended that you import one of the hardware architectures supplied with Teja NP, situations may arise in which you must build your own hardware architecture. You do this in the HW Architecture Editor, which consists of two panes, a left-hand pane showing a tree diagram of the vari-

    Teja Technologies, Inc. Company Confidential 1-51

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    ous hardware architecture elements, and a right-hand pane in which you build the actual architecture itself:

    The tree diagram in the left-hand pane displays:

    • Elements that you can add to your hardware architecture (chips, buses, memory banks, and inner architectures).

    • Elements that you can observe inside chips when you open them to examine their architecture (processors, logic).

    The editor also contains a main menu and a toolbar containing a set of buttons with which you can add and manipulate components in your hardware architecture.

    The main menu contains the following commands:

    File

    Print Print the contents of the right-hand pane of the HW Architecture Editor.

    Page Setup... Opens a dialog box in which you can design the appearance of the printed page.

    Apply changes Save changes you have made in the right-hand pane of the HW Architecture Editor.Apply Changes does not save to disk. To save to disk, you must choose File -> Save from the Teja NP main menu, or press Ctrl+S.

    1-52 Company Confidential Teja Technologies, Inc.

  • Teja NP User’s Guide Using the Teja NP Graphical Application Design Environment

    The HW Architecture Editor toolbar contains the following buttons:

    Apply changes & Close Save changes you have made in the right-hand pane of the HW Architecture Editor and close the editor.Apply Changes & Close does not save to disk. To save to disk, you must choose File -> Save from the Teja NP main menu, or press Ctrl+S.

    Close Close the the right-hand pane of the HW Architecture Editor without applying changes.

    View

    Set Zoom Factor... Open a dialog box in which you set the ratio by which the zoom fea-ture increases or decreases the size of an element.

    Set Grid... Set the size of the grid.

    Show Grid Toggle visible grid on and off.

    Snap to Grid Toggle on or off whether elements in the hardware architecture align with the grid.

    Edit

    HW Architecture Info... Opens a dialog box in which you can give your hardware architec-ture a name and write a description of its various components.

    Selection button: Selects an element for subsequent operations.

    Add Bus button: Click the button, then click in the right-hand pane to open a Select bus type list box from which you can choose a type of bus to add to your hardware architecture and give it a name.

    Add Chip button: Click the button, then click in the right-hand pane to open a Select chip type list box from which you can choose a type of chip (processor) to add to your hardware architecture and give it a name.

    Add Memory Bank button: Click the button, then click in the right-hand pane to open a Select mem-ory bank type list box from which you can choose a type of memory bank to add to your hardware architecture and give it a name.

    Add Inner Architecture button: Click the button, then click in the right-hand pane to open a Select an hardware architecture list box from which you can choose architectures to add as internal architec-tures to your hardware architecture; for example, you could build a line card, name it, and save it so that it appears in the left-hand pane tree diagram. Then you can use this inner architecture to create a rack of line cards.

    Add Connection button: Adds a connection between two components, for example a chip and a bus, or a bus and a memory bank. Click the icon on the first element, then drag it to the second. If the two ele-ments are not compatible, you receive an error message to this effect.

    Set Zoom button: Opens a dialog box in which you set the ratio by which the zoom feature increases or decreases the size of an element. Same as choosing View -> Set Zoom Factor from the editor’s main menu.

    Teja Technologies, Inc. Company Confidential 1-53

  • Using the Teja NP Graphical Application Design Environment Teja NP User’s Guide

    Notice that as soon as you have added the element to your hardware architecture, it appears in the tree diagram in the left-hand pane of the editor.Note: The elements available from the Select...type list boxes depend on the CSPs included

    with your Teja NP software.

    Naming the Elements in Your Hardware Architecture: As you create each element in your hardware architecture, it is a good idea to give it a descriptive name, keeping in mind the software element or elements that you are going to map to it. For example, if your architecture requires a DRAM memory bank for ingress and an DRAM memory bank for egress, create two memory banks of type DRAM and name them dram_in and dram_out. You can either name your hardware architecture elements in the list box from which you select them, or you can click the Select button, then double-click the ele-ment to open its property dialog box.

    Inspecting and Changing the Properties of a Hardware A


Recommended