Commit b230e6bf authored by yoogx's avatar yoogx

* Add basic SMP example for AIR

parent b94997d7
......@@ -72,65 +72,66 @@ dnl may, one day, be edited automatically to remove
dnl some entries.
AC_OUTPUT([
Makefile
examples/Makefile
examples/air/Makefile
examples/air/hello/Makefile
examples/air/ping/Makefile
examples/adiru/Makefile
examples/ahrs_discovery/Makefile
examples/aocs/Makefile
examples/aram/Makefile
examples/ardupilot/Makefile
examples/arinc653_annex/Makefile
examples/arinc653_annex/example_1/Makefile
examples/arinc653_annex/example_2/Makefile
examples/asl/Makefile
examples/behavior_annex/Makefile
examples/car/Makefile
examples/crazyflie/Makefile
examples/data_modeling_annex/Makefile
examples/fcs/Makefile
examples/flow_analysis/Makefile
examples/fms/Makefile
examples/isr/Makefile
examples/line_follower/Makefile
examples/memory/Makefile
examples/mixin/Makefile
examples/mjpeg/Makefile
examples/mosart/Makefile
examples/multicore/Makefile
examples/paparazzi/Makefile
examples/pathfinder_system/Makefile
examples/perseus/Makefile
examples/producer_consumer/Makefile
examples/radar/Makefile
examples/rap/Makefile
examples/rap_code/Makefile
examples/ravenscar/Makefile
examples/rma/Makefile
examples/redundancy/Makefile
examples/robot/Makefile
examples/robot_ba/Makefile
examples/rosace/Makefile
examples/round_robin/Makefile
examples/satellite/Makefile
examples/stm32discovery_ada/Makefile
examples/time_triggered/Makefile
examples/units/Makefile
examples/uxv/Makefile
examples/uxv/emaxxv2/Makefile
examples/uxv/minirocket/Makefile
examples/uxv/quadrirotorv0/Makefile
examples/uxv/quadrirotorv1/Makefile
examples/uxv/traxsterv3/Makefile
examples/voter/Makefile
examples/pacemaker/Makefile
examples/doors/Makefile
src/Makefile
src/aadl/Makefile
src/property_set/Makefile
src/real/Makefile
Makefile
examples/Makefile
examples/air/Makefile
examples/air/hello/Makefile
examples/air/ping/Makefile
examples/air/smp01/Makefile
examples/adiru/Makefile
examples/ahrs_discovery/Makefile
examples/aocs/Makefile
examples/aram/Makefile
examples/ardupilot/Makefile
examples/arinc653_annex/Makefile
examples/arinc653_annex/example_1/Makefile
examples/arinc653_annex/example_2/Makefile
examples/asl/Makefile
examples/behavior_annex/Makefile
examples/car/Makefile
examples/crazyflie/Makefile
examples/data_modeling_annex/Makefile
examples/fcs/Makefile
examples/flow_analysis/Makefile
examples/fms/Makefile
examples/isr/Makefile
examples/line_follower/Makefile
examples/memory/Makefile
examples/mixin/Makefile
examples/mjpeg/Makefile
examples/mosart/Makefile
examples/multicore/Makefile
examples/paparazzi/Makefile
examples/pathfinder_system/Makefile
examples/perseus/Makefile
examples/producer_consumer/Makefile
examples/radar/Makefile
examples/rap/Makefile
examples/rap_code/Makefile
examples/ravenscar/Makefile
examples/rma/Makefile
examples/redundancy/Makefile
examples/robot/Makefile
examples/robot_ba/Makefile
examples/rosace/Makefile
examples/round_robin/Makefile
examples/satellite/Makefile
examples/stm32discovery_ada/Makefile
examples/time_triggered/Makefile
examples/units/Makefile
examples/uxv/Makefile
examples/uxv/emaxxv2/Makefile
examples/uxv/minirocket/Makefile
examples/uxv/quadrirotorv0/Makefile
examples/uxv/quadrirotorv1/Makefile
examples/uxv/traxsterv3/Makefile
examples/voter/Makefile
examples/pacemaker/Makefile
examples/doors/Makefile
src/Makefile
src/aadl/Makefile
src/property_set/Makefile
src/real/Makefile
])
AC_MSG_NOTICE(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%)
......
SUBDIRS= hello ping
SUBDIRS= hello ping smp01
EXTRA_DIST=$(srcdir)/README.md
......
AADL_SOURCES = $(srcdir)/smp01.aadl
AADL_ROOT = smp01.impl
OTHER_FILES =
CLEANDIRS = smp01_impl
CLEANFILES =
include $(srcdir)/../../Makefile.common
AVAILABLE_TARGETS= parse-aadl air_conf
package SMP01
-- This example demonstrates how to bind one partition to all cores
-- of a processor
public
with Deployment;
with ARINC653;
with Processors::SPARC;
-----------------
-- Subprograms --
-----------------
subprogram Hello_Spg_1
properties
Source_Language => (C);
Source_Name => "user_Hello_Spg_1";
Source_Text => ("hello.c");
end Hello_Spg_1;
-------------
-- Threads --
-------------
thread Task
end Task;
thread implementation Task.impl_1
calls
Mycalls: {
P_Spg : subprogram Hello_Spg_1;
};
properties
Priority => 100;
Dispatch_Protocol => Periodic;
Period => 100 ms;
Compute_Execution_time => 0 ms .. 3 ms;
end Task.impl_1;
-------------
-- Process --
-------------
process node_a
end node_a;
process implementation node_a.impl
subcomponents
Task1 : thread Task.impl_1;
end node_a.impl;
---------------
-- Processor --
---------------
virtual processor partition_runtime
end partition_runtime;
virtual processor implementation partition_runtime.i
end partition_runtime.i;
processor CPU extends Processors::SPARC::Leon4
properties
Deployment::Execution_Platform => AIR;
end CPU;
processor implementation CPU.impl extends Processors::SPARC::Leon4.impl
subcomponents
-- Definition of the software partition as a subcomponent
P0 : virtual processor partition_runtime.i
{ Deployment::Execution_Platform => AIR;
ARINC653::Partition_Identifier => 0;
ARINC653::Partition_Name => "P0";
};
-- Note: through the extends mechanism, this processor also embeddeds
-- the 4 phyiscal cores.
properties
ARINC653::Module_Major_Frame => 1 sec;
ARINC653::Module_Schedule =>
( [Partition => reference (P0);
Duration => 300 ms;
Periodic_Processing_Start => true;]
);
end CPU.impl;
memory myram end myram;
memory segment end segment;
memory implementation segment.i
end segment.i;
memory implementation myram.stram
properties
Base_Address => 40000000;
Byte_Count => 16#400000#;
end myram.stram;
memory implementation myram.sdram
subcomponents
segment1 : memory segment.i {Base_Address => 40100000; Byte_Count => 16#400000#;};
properties
Base_Address => 40000000;
Byte_Count => 16#400000#;
end myram.sdram;
------------
-- System --
------------
system smp01
end smp01;
system implementation smp01.impl
subcomponents
node_a : process node_a.impl;
cpu : processor CPU.impl;
mem : memory myram.sdram;
properties
Actual_Processor_Binding => (reference (cpu.p0)) applies to node_a;
Actual_Processor_Binding =>
(reference (CPU.Core_1), reference (CPU.Core_2),
reference (CPU.Core_3), reference (CPU.Core_4))
applies to CPU.P0;
Actual_Memory_Binding => (reference (mem.segment1)) applies to Node_A;
end smp01.impl;
end SMP01;
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