problem with aadl model

77 views
Skip to first unread message

bert li

unread,
Jan 24, 2024, 6:02:51 AM1/24/24
to OSATE
I created a simple model in osate. When generating DeOS code, an error was thrown, 'process must be bound to a virtual processor...'. According to AS5506D requirements, the process component cannot contain a virtual processor component, so how should I solve it? What about this problem?
below is the aadl model:

-- process

process node_a

end node_a;


process implementation node_a.impl

subcomponents

task1: thread th1.impl;

--properties

--actual_processor_binding => (reference());

end node_a.impl;


-- processor

virtual processor vp

end vp;

virtual processor implementation vp.impl

properties

execution_time => 200ms;

period => 100ms;

end vp.impl;

processor cpurm

end cpurm;


processor implementation cpurm.impl

subcomponents

vp: virtual processor vp.impl;

properties

ARINC653::Module_Schedule => ([Partition => reference(vp);Duration => 100ms; Periodic_Processing_Start => true;]);

end cpurm.impl;

error.jpg

Brian Larson

unread,
Jan 25, 2024, 8:02:08 AM1/25/24
to OSATE
Actual_Processor_Binding, like all bindings, must be set in a system implementation within which both element being bound and the element being bound to, are within scope.  You can reach down through the hierarchy with a series of subcomponent identifiers separated by periods.

jjhudak

unread,
Jan 25, 2024, 11:31:49 AM1/25/24
to OSATE
Building on Brian's post, below is a concrete example using your model (I added a thread component which is missing in the code you posted). There are further examples of allowed and actual processor binding usage at github: https://github.com/osate/examples

To your model, I added a system component.  The system implementation specifies the subcomponents that compose the system along with the actual binding statement.
-John



system MySystem
end MySystem;

system implementation MySystem.impl
subcomponents
MyProcess: process node_a.impl;
MyProcessor: processor cpurm.impl;
properties
-- actual bindings are applied to the system implementation
-- this statement binds the process node_a.impl (including the thread, to the processor.
Actual_Processor_Binding => (reference (MyProcessor)) applies to MyProcess;
end MySystem.impl;


-- process
process node_a
end node_a;

thread th1
end th1;

thread implementation th1.impl
end th1.impl;


process implementation node_a.impl
subcomponents
task1: thread th1.impl;
end node_a.impl;

-- processor
virtual processor vp
end vp;

virtual processor implementation vp.impl
properties
execution_time => 200ms;
period => 100ms;
end vp.impl;

processor cpurm
end cpurm;

processor implementation cpurm.impl
subcomponents
vp: virtual processor vp.impl;
properties
ARINC653::Module_Schedule => ([Partition => reference (vp); Duration => 100ms;

Periodic_Processing_Start => true;]);
end cpurm.impl;

Carlos

unread,
Jul 17, 2024, 2:01:35 PM7/17/24
to OSATE

The plug-in that I am running is Check CodeGen PreRequisities for VxWorks. This was the example I used, and after correcting some other warnings that the latest  version of OSATE flags, I am still left with the following:

 
MyProcess - Process must be bound to a Virtual Processor through the property Deployment_Properties::Actual_Processor_Binding osate_group_example_MySystem_impl_Instance.aaxl2 /scm/instances Unknown Code Generation Marker




package osate_group_example

public

with ARINC653;


system MySystem

end MySystem;

memory RAM

end RAM;

memory implementation RAM.impl

end RAM.impl;


system implementation MySystem.impl

subcomponents

MyProcess: process node_a.impl;

MyProcessor: processor cpurm.impl;

RAM: memory RAM.impl;

properties

-- actual bindings are applied to the system implementation

-- this statement binds the process node_a.impl (including the thread, to the processor.

Actual_Processor_Binding => (reference (MyProcessor)) applies to MyProcess;

Deployment_Properties::Actual_Memory_Binding => (reference(RAM)) applies to MyProcess;

end MySystem.impl;


-- process

process node_a

end node_a;


thread th1

properties

timing_properties::Deadline => 50 ms;

timing_properties::Period => 100 ms;

Thread_Properties::Dispatch_Protocol=>Periodic;

end th1;


thread implementation th1.impl

end th1.impl;


process implementation node_a.impl

subcomponents

task1: thread th1.impl;


end node_a.impl;


-- processor

virtual processor vp

end vp;


virtual processor implementation vp.impl

properties

execution_time => 200ms;

period => 100ms;

end vp.impl;


processor cpurm

end cpurm;


processor implementation cpurm.impl

subcomponents

vp: virtual processor vp.impl {Programming_Properties::Source_Name=>"foo.c";};

properties


ARINC653::Module_Schedule => ([Partition => reference (vp); Duration => 100ms;

Periodic_Processing_Start => true;]);

end cpurm.impl;

end osate_group_example;

Carlos

unread,
Jul 17, 2024, 2:01:35 PM7/17/24
to OSATE
I copied this example 1:1 to one in my project and ran the VxWorks check and got the following errors:

Description Resource Path Location Type

MyProcess - Process must be bound to a Virtual Processor through the property Deployment_Properties::Actual_Processor_Binding osate_group_example_MySystem_impl_Instance.aaxl2 /scm/instances Unknown Code Generation Marker
task1 - Thread must define the property Timing_Properties::Deadline osate_group_example_MySystem_impl_Instance.aaxl2 /scm/instances Unknown Code Generation Marker
task1 - Thread must define the property Timing_Properties::Period osate_group_example_MySystem_impl_Instance.aaxl2 /scm/instances Unknown Code Generation Marker
task1 - Thread needs a Thread_Properties::Dispatch_Protocol property of 'Periodic' or 'Sporadic' osate_group_example_MySystem_impl_Instance.aaxl2 /scm/instances Unknown Code Generation Marker


I also have a similiar system that is giving the same errors. There is a problem with Actual_Processor_Binding. I tried using the Deployment_Properties package reference, but that did not help. In my other example, I have a system declaration that references a process in another package elsewhere. I can see it the scope but I still get that error above. That is why I tried the example from this thread, but perhaps that example was run under a different version.
On Thursday, January 25, 2024 at 5:31:49 PM UTC+1 jjhudak wrote:

Hugues Jérôme

unread,
Jul 18, 2024, 3:42:48 AM7/18/24
to Carlos, OSATE
Hi,

You have

Actual_Processor_Binding => (reference (MyProcessor)) applies to MyProcess;

with

MyProcessor: processor cpurm.impl;

which is a processor.

You want actual_processor_binding to point to a virtual processor. From your example, try

Actual_Processor_Binding => (reference (MyProcessor.vp)) applies to MyProcess;

Regards


--
You received this message because you are subscribed to the Google Groups "OSATE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osate+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osate/3a605b1a-c560-4bef-b93f-5f8ea09b75e0n%40googlegroups.com.

Carlos Ramos

unread,
Jul 18, 2024, 4:36:34 AM7/18/24
to Hugues Jérôme, OSATE
Hi Jerome:

I get the same warning, that is the strange part:


Actual_Processor_Binding => (reference (MyProcessor.vp)) applies to MyProcess;

All I did here was add ".vp" to MyProcessor and then instantiated the system from the outline view, and then ran that same plug-in check.

Carlos

unread,
Jul 18, 2024, 4:39:58 AM7/18/24
to OSATE
MySystem.png

Above is the generated picture of the system implementation showing the processor binding to vp virtual processor. This model still will not pass the VxWorks check. Even the other checks still raise the warning.

Hugues Jérôme

unread,
Jul 18, 2024, 5:14:06 AM7/18/24
to Carlos, OSATE
Hi,

I saw you submitted a bug report for OSATE 2.1.2. Please try again with a more recent version.

Carlos Ramos

unread,
Jul 18, 2024, 5:20:41 AM7/18/24
to Hugues Jérôme, OSATE
There seems to be no version beyond OSATE2 2.14.0.vfinal. I have to redact my bug report to correct that. I copied the wrong version.
Reply all
Reply to author
Forward
0 new messages