ping.aadl 3.1 KB
Newer Older
jdelange's avatar
jdelange committed
1
2
3
4
5
6
--  This model completes the PING example by adding deployment
--  information.
--
--  In this deployment, two nodes are defined, one task per node.
--
--  $Id: ping.aadl 401 2007-06-07 15:04:01Z hugues $
7
package PING::packetStore
jdelange's avatar
jdelange committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
public
  with Software;
  with Deployment;
  with ocarina_drivers;
  with ocarina_buses;

---------------
-- Processor --
---------------

processor the_processor
properties
  Deployment::location           => "127.0.0.1";
  Deployment::Execution_Platform => Native;
  Priority_Range                 => 0 .. 255;
  Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
end the_processor;

---------
-- Bus --
---------

bus Ethernet_Bus
properties
  Deployment::Transport_API => BSD_Sockets;
end Ethernet_Bus;

---------------
-- Processes --
---------------

process A
features
  Out_Port : out event data port Software::Simple_Type;
end A;

process implementation A.Impl
subcomponents
  Pinger        : thread Software::P.Impl;
jdelange's avatar
jdelange committed
47
  produce_pkts  : thread software::packet_producer.i;
jdelange's avatar
jdelange committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
connections
  port Pinger.Data_Source -> Out_Port;
end A.Impl;

process B
features
  In_Port  : in event data port Software::Simple_Type;
end B;

process implementation B.Impl
subcomponents
  Ping_Me        : thread Software::Q.Impl;
connections
  port In_Port -> Ping_Me.Data_Sink;
end B.Impl;

64
65
66
67
68
69
70
71
72
73
74
75
process singleProcess
end singleProcess;

process implementation singleProcess.Impl
subcomponents
  Pinger        : thread Software::P.Impl;
  produce_pkts  : thread software::packet_producer.i;
  Ping_Me        : thread Software::Q.Impl;
connections
  port Pinger.Data_Source -> Ping_Me.Data_Sink;
end singleProcess.Impl;

jdelange's avatar
jdelange committed
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
------------
-- System --
------------

system PING
end PING;

system implementation PING.Impl
subcomponents
  Node_A : process A.Impl;
  Node_B : process B.Impl;

  Device_A : device ocarina_drivers::generic_sockets_ip.pohic
    {Source_Text => ("devicesconf.c");};
  Device_B : device ocarina_drivers::generic_sockets_ip.pohic
    {Source_Text => ("devicesconf.c");};

  CPU_A : processor the_processor;
  CPU_B : processor the_processor;
  the_bus : bus ocarina_buses::ip.i;
connections
  bus access the_bus -> Device_A.link;
  bus access the_bus -> Device_B.link;

  port Node_A.Out_Port -> Node_B.In_Port
    {Actual_Connection_Binding => (reference (the_bus));};
properties
  actual_processor_binding => reference (CPU_A) applies to Node_A;
  actual_processor_binding => reference (CPU_B) applies to Node_B;
  actual_processor_binding => (reference (CPU_A)) applies to Device_A;
  actual_processor_binding => (reference (CPU_B)) applies to Device_B;
end PING.Impl;

109
110
system implementation PING.local
subcomponents
yoogx's avatar
yoogx committed
111
  node_a : process singleProcess.Impl;
112
113
  CPU_A : processor the_processor;
properties
yoogx's avatar
yoogx committed
114
  actual_processor_binding => reference (CPU_A) applies to node_a;
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
end PING.local;

system implementation PING.Xenomai
   extends PING.local
properties
  Deployment::Execution_Platform => linux32_xenomai_native applies to CPU_A;
end PING.Xenomai;

system implementation PING.RTEMS
   extends PING.local
properties
   Deployment::Execution_platform => LEON_RTEMS applies to CPU_A ;
end PING.RTEMS;

end PING::packetStore;