Create a New Primitive
Proceed as follows:
- Click File from the main menu bar and choose New or click the tool button New Model.
- Choose Primitive from the Type of Model drop-down menu.
- Specify the name for your primitive by setting Logical Name to MyAdderPrimitive.
- 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.
- Choose SDF from the Modeling Domain drop-down menu.
- Enter a description for your primitive in the Description field. The description appears in the online documentation.
- 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.
- 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 ’_’.
- 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.
If you want to derive another primitive from this one, it is necessary to load it permanent.
- 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.