Commit e4ed68a0 authored by yoogx's avatar yoogx

* Add testsuite for Python

parent 3c4aec84
AADL_VERSION=-aadlv2
OCARINA_FLAGS=-z
export LD_LIBRARY_PATH=$HOME/local/ocarina/lib:/Users/hugues/local/gnat-gpl-2013/lib:$LD_LIBRARY_PATH:/Users/hugues/local/gnat-gpl-2013/lib/gnatcoll/relocatable:/Users/hugues/local/gnat-gpl-2013/lib/gcc/x86_64-apple-darwin12.2.0/4.7.4/rts-native/adalib
export PYTHONPATH=$HOME/local/ocarina/include/ocarina/runtime/python:/Users/hugues/local/ocarina/lib:$PYTHONPATH
export OCARINA_PATH=$HOME/local/ocarina
-- This AADL model illustrates how to conduct schedulability analysis
-- using Cheddar, and then code generation of periodic tasks.
--
-- Two periodic tasks run in parrallel, without interaction. Tasks
-- parameters allows RMA analysis
--
-- $Id: rma.aadl 7042M 2010-03-30 07:55:51Z (local) $
package RMAAadl
public
with Deployment;
-----------------
-- Subprograms --
-----------------
subprogram Hello_Spg_1
properties
source_language => (Ada95);
source_name => "Hello.Hello_Spg_1";
end Hello_Spg_1;
subprogram Hello_Spg_2
properties
source_language => (Ada95);
source_name => "Hello.Hello_Spg_2";
end Hello_Spg_2;
-------------
-- Threads --
-------------
thread Task
end Task;
thread implementation Task.impl_1
calls
MyCalls : {
P_Spg : subprogram Hello_Spg_1;
};
properties
Dispatch_Protocol => periodic;
Period => 1000 ms;
Compute_Execution_time => 0 ms .. 3 ms;
Deadline => 1000 ms;
Source_Stack_Size => 13952 Bytes;
end Task.impl_1;
thread implementation Task.impl_2
calls
MyCall : {
P_Spg : subprogram Hello_Spg_2;
};
properties
Dispatch_Protocol => periodic;
Period => 500ms;
Dispatch_Offset => 100 ms;
Compute_Execution_time => 0 ms .. 3 ms;
Deadline => 500 ms;
Source_Stack_Size => 13952 Bytes;
end Task.impl_2;
---------------
-- Processor --
---------------
processor cpurm
properties
Deployment::Execution_Platform => LEON_ORK;
end cpurm;
processor implementation cpurm.impl
properties
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
end cpurm.impl;
---------------
-- Processes --
---------------
process node_a
end node_a;
process implementation node_a.impl
subcomponents
Task1 : thread Task.impl_1;
Task2 : thread Task.impl_2;
end node_a.impl;
------------
-- System --
------------
system rma
end rma;
system implementation rma.ERC32
subcomponents
node_a : process node_a.impl;
cpu_rm : processor cpurm.impl;
properties
Actual_Processor_Binding => (reference (cpu_rm)) applies to node_a;
end rma.ERC32;
end RMAAadl;
#! /usr/bin/python
from ocarina import *;
def main ():
'''Test function'''
for backends in Backends:
print(backends);
load("rma.aadl"); # load a file
load("deployment.aadl"); # load a file
analyze(); # analyze models
instantiate("rma.erc32"); # instantiate
generate (Backends.polyorb_hi_ada);
if __name__ == "__main__":
main ()
sys.exit (0); # exit
################################################################################
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment