Add Model Instances

The next step is to create the model instances of required primitives of the systems by dragging them from the Tree View into the module. The module MyAdderModule should be open in the Model Editor window and appears as a grey square with two input ports and one output port.

Continue as follows:

  1. Go to the Tree View window.
  2. Expand the tree to MLD LibrariesSDF DomainArithmetic. You should see the primitive item AddFloat now.

    If you do not see any primitive item under the library Arithmetic, please check whether the Show Primitives toggle button is activated in the Tree Filter toolbar directly above the Tree View.

  3. Click on the AddFloat primitive item with the left mouse and drag the primitive into the grey square of the module MyAdderModule.
  4. A Select Special Primitive dialog appears. Here you can select how many input ports you want the AddFloat primitive to have. This is possible because the AddFloat primitive in the SDF domain can have an arbitrary number of input ports represented by a so-called multi-port. Such a primitive can be specialized by specifying a certain number of input ports. Such specializations are called special primitives. The AddFloat primitive has a number of such specializations, select the entry AddFloat.Input=2 and click OK.
  5. Now, you see the model instance AddFloat with two input ports and one output port in the Model Editor Window. The label reads AddFloat.Input=2#1 indicating this is model instance #1 of AddFloat.Input=2.

The next step is to add the primitive MpyConstFloat to your system. It is also located in MLD Libraries→SDF Domain→Arithmetic, drag and drop this primitive into the system Model Editor Window so that its input port is near the output port of the model instance AddFloat.Input=2#1.

You now have all the elements needed for the module. The next phase is to connect the model instances.