Create a New Primitive

Proceed as follows:

  1. Click File from the main menu bar and choose New or click the tool button New Model.
  2. Choose Primitive from the Type of Model drop-down menu.
  3. Specify the name for your primitive by setting Logical Name to MyAdderPrimitive.
  4. Click the button next to the Library field to browse available libraries. Select MySubLibrary in the selection dialog and press OK. If you choose a library that is Read only, an error message will be displayed.
  5. Choose SDF from the Modeling Domain drop-down menu.
  6. Enter a description for your primitive in the Description field. The description appears in the online documentation.
  7. It is possible to derive a primitive from another primitive to inherit its interface including ports, parameters, a.s.o as well as its function to extend the derived primitives with additional interface elements and functions. For this example we will not derive from any other primitives.
  8. The Physical Name field is set automatically when you click in the next input field. If not given manually, the physical name is derived from logical name by replacing all characters different from letter, digit, or ’_’ with an ’_’.
  9. The Load Mode option Dynamic means the primitive is compiled and reloaded before every simulation. That is, changes made to the primitive will take effect immediatly when the system is recompiled for the next simulation run. Load Mode Permanent on the other hand means that once a primitive is compiled and loaded, e.g., for the first simulation run, changes will not take effect until you re-entered Simulation Mode.
  10. If you want to derive another primitive from this one, it is necessary to load it permanent.

  11. Click the OK button to create the primitive. When creation of the primitive is finished, the new primitive model will open automatically in a new Model Editor window.

A primitive model has been created and you now need to define its functionality.