Previous Up Next

Chapter 1  Example 1: algorithm, architecture, and adequation

1.1  The main algorithm


Figure 1.1: Algorithm / New Algorithm Window

From the principal window, choose the File / Save as option and save your first application under a new folder (e.g. my_tutorial) with the name example1.

Choose Algorithm / New Algorithm Window (cf. figure 1.1). It opens the edition window for algorithm definitions.

1.1.1  Definition of a sensor


Figure 1.2: Define Sensor


Figure 1.3: Name of the new sensor


Figure 1.4: Sensor definition window


Figure 1.5: Contextual menu → Add port


Figure 1.6: Create Port


Figure 1.7: Sensor definition window after output port created

To create an input sensor definition:

1.1.2  Definition of an actuator

To create an output actuator definition:

1.1.3  Definition of a function

To create a computation function definition:

1.1.4  Definition of the main algorithm


Figure 1.8: Contextual menu → Set As Main Definition


Figure 1.9: Drag and drop input definition


Figure 1.10: Create References to input


Figure 1.11: Main algorithm after references to sensor created


Figure 1.12: Main algorithm of the Example 1

To create an AlgorithmMain function definition:

1.2  An architecture with one operator

1.2.1  Definition of an operator


Figure 1.13: Operator definition window

To create an Uinout operator definition:

1.2.2  Definition of the main architecture


Figure 1.14: Architecture / Define Architecture


Figure 1.15: Edit / Reference Operator


Figure 1.16: Architecture with one operator

To create an ArchiOneOperator architecture definition:

The architecture looks like the figure 1.16.

1.3  An architecture with a SAM point-to-point comunication medium

1.3.1  Definition of operators

To create Uin and Uout definitions:

1.3.2  Definition of a medium


Figure 1.17: Type of a communication medium

To create a MediumSamPointToPoint medium definition:

1.3.3  Definition of the main architecture

To create an ArchiSamPointToPoint architecture definition:

1.3.4  Connections between the operators and the medium


Figure 1.18: Architecture with two operators and a SAM point-to-point communication medium

In the main architecture window, to create a connection between the u1 operator and the medium_sampp medium, point the cursor on the port x of the operator, middle click, and drag it to the communication medium. It draws an edge between the operator and the communication medium. After creating the other connection, the main architecture looks like the figure 1.18.

1.4  An architecture with a SAM multipoint medium

To create an ArchiSamMultiPoint architecture definition:

The architecture looks like the figure 1.19


Figure 1.19: Architecture with three operators and a SAM multipoint communication medium

1.5  An architecture with a RAM medium

To create the ArchiRam architecture definition:


Figure 1.20: Architecture with three operators and a RAM comunication medium

The architecture looks like the figure 1.20.

1.6  The adequation

1.6.1  Without constraint

Define the architecture with three operators and a medium of type SAM MultiPoint (cf. 1.4) as main architecture (Edit / Set As Main Architecture).

From the principal window, choose Adequation / Launch Adequation, then choose Adequation / Display schedule.

It opens the schedule window (cf. figure 1.21) in which you can see the schedule of the algorithm on the architecture and the schedule of the different inter-operator communications on the medium.


Figure 1.21: Schedule

1.6.2  With constraints

To contraint the ArchiSamMultiPoint architecture:

From the principal window, choose File / Close. In the dialog window, click on the Save button.


Previous Up Next