Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [app4mc-dev] Greetings, New Sub

Dear Harald,

Thanks a lot for the answers. I appreciate it, and wish you a good christmas.

Still few things are unclear to me:

1. How to model and use local variables inside runnable?
a. I thought that LocalModelLabels could be used for that but from your reply I understand that these are mainly used for conditions on switches, loops, etc.
b. Should I use Labels for that? If yes, then how to model some basic arithmetic operations, such as var3 = var1 + var2;

2. How to model the read and write of a data from component port, to use it inside a runnable?
a. E.g. int myLocalVar = readDataFromPort(port)
b. I thought that SenderReceiverCommunication (SRC) can be used for that.
i. In Amalthea metamodel, SRC points to Label, but not to port. Interestingly, in APP4MC, it is possible to specify the Port for reading/writing, which would make sense to me. I guess there is some inconsistency. You said there is no relation between components and behavior. However, in app4mc, there is. 

For example, based on these questions. I am thinking that SR communication gets data from port and assign it to a Label (and vice versa). And If I add a new element to meta-model, to make an assignment from label to local mode label(and vice versa). Then I can define behavior using Local Mode Labels and local conditions, arithmetic operations as value sources. What do you think? 

Thank you and wish you a productive day.

Best regards,

Ibrahim Özcan

On Fri, Dec 16, 2022, 09:08 Mackamul Harald (CR/ADX1.2) via app4mc-dev <app4mc-dev@xxxxxxxxxxx> wrote:

Hello Ibrahim,

 

I got the mails but it is a busy time before Christmas.

First comments below.

 

Best regards

Harald

From: app4mc-dev <app4mc-dev-bounces@xxxxxxxxxxx> On Behalf Of Ibrahim Özcan

> I could not find a way to manipulate the Labels that SenderReceiverRead or LabelAccess(Read) inside the runnable. 

 

> And I still could not understand how is SenderReceiver Read/Write related to component's ports. 

 

Currently there is no direct connection between the Component Model and the Software Model.

The Component Model describes an architectural view with (hierarchical) components, ports and connections (with interfaces).
This model can be used to generate code that represents this structure.

The Software Model describes the dynamic (runtime) aspects of the software.

On this level we are dealing with activation and execution of functions (ISRs, Tasks, Runnables) and their communication behaviour.

This input is used by the “timing” simulators: APP4MC.sim or commercial tools like (Vector) Timing Architects Toolsuite or (Inchron) ChronSim.

 

> 2.) My second question is about “Labels”, “Local (Global) Mode Labels”, and the overall dataflow.

 

Labels are the variables that are used in the software of an embedded system.

In the design of the AMALTHEA model we wanted to make clear that this is an abstract model and we do not handle the values of the variables (in the timing simulation).

Therefore there is no possibility to set values or manipulate the content.

We are able to express (high level) data dependencies/data propagation via function parameters and label accesses.

This is the only representation of a data flow.

 

Mode Labels are used to describe different modes/states of the system: e.g. if there is a different behaviour for initialization / regular execution / error case / …

In addition it can be used to describe a specific (custom) scheduling strategy via NumericModes.

 

Hope that distinction helps.

 

On Mon, Dec 12, 2022, 12:06 Ibrahim Özcan <ibrahimbell35@xxxxxxxxx> wrote:

I have currently two questions: 

 

1.) First one is about “Sender Receiver Communication(SRC)” which is an abstract activity graph item, and SR read and write generalize this. (SR_Meta_Model in attachments). This item has a relationship with component ports (App4mc_SRC in attachments). I could not understand the exact relation between SR_Read/Write and Component’s port, and It is not specified in the meta-models. For example: SR_Read reads a label as Label Access (access Type: read) do. My first question is could you please specify the relationship in terms of the Amalthea meta-model language? 

 

I am interested in Sender Receiver Read/Write because I want to be able to show the relationship (in terms of data flow) between a runnable and the component which includes the runnable. 

 

 

2.) My second question is about “Labels”, “Local (Global) Mode Labels”, and the overall dataflow. Labels are abstract memory elements and later Mapping Model maps them to a physical memory in HW Model. SR_Read/Write and LabelsAccess(Read/Write) reads and writes labels. So, Runnables have a way to access data in memory. 

 

The user is able to define switches and switch entries (decision paths), put conditions(local mode label condition) on each entry. The user is able to assign a value of local mode label to global mode label and vice versa. 

 

However, I could not find a way to use the value of a Label which is read by either SR_Read or LabelAccess (Read). I can use local Mode Labels(like local variables defined in a function) but cannot show a dataflow from Label to Local Mode Label.

 

I could not find an example where a runnable manipulates the Label which it reads. Only thing I can show is that the runnable reads and writes data.

 

However, what happens to the data that is read and also what do LabelAccess(Write) SR_Write actually write? They write into a label (abstract memory element) but exactly “what” do they write into that label? 

 

I am sorry for the poor technical explanation since I am new to the most of the things.

 

Thank you very much.

 

Best,

Ibrahim

_______________________________________________
app4mc-dev mailing list
app4mc-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/app4mc-dev

Attachment: IMG-20221216-WA0001.jpg
Description: JPEG image

Attachment: IMG-20221216-WA0000.jpg
Description: JPEG image


Back to the top