As with all hierarchical modules, you can define common model properties of a primitive using the Property Editor Window. The following list explains the important properties for primitives. You can find a complete list of all common properties in the Modeling Guide.
You can use this property to define a string of additional compiler options such as additional include search paths.
Defines a primitive to derive from. The primitive inherits all ports, parameters and shared model elements such as Events, Memories and Resources from the selected primitive. Used to generate the derivedfrom item in the primitive source code.
This field is normally filled in automatically. This is necessary, if you want to use composite data types (data structures) for model elements like parameters, ports and shared model elements (see Import Libraries). You have to import the libraries before you can use the relevant data structure types.
You can use this property to define objects (shared libraries, static libraries or object files) from external libraries. This enables usage of external functionality within your primitive or system.
Defines the load mode. You can select the load mode as dynamic or permanent.
If you select load mode dynamic, a shared library containing the primitive code is created on loading. This shared library is linked dynamically to the simulation process so the primitive can be reloaded after changes are made to it without re-entering simulation mode
In contrast, by selecting load mode permanent, the primitive is linked to the simulation process when entering simulation mode as is the case with built-in primitives (MLDesigner Libraries). Changes to permanently loaded Primitives or Probes only take effect after re-entering simulation mode.
It only makes sense to set the load mode to permanent if you are going to create new primitives derived from the permanently loaded primitive. In such cases the permanently loaded primitive is known as the base primitive.