Commit 639cf214 authored by jhugues's avatar jhugues
Browse files

* Introduce generic_bus package, to be consistent with other examples


git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-ada@2523 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 983b1cec
......@@ -5,7 +5,7 @@ package Beeper
public
with Generic_Native;
with Generic_Bus;
------------
-- DEVICE --
......@@ -14,7 +14,7 @@ public
device Beeper_Device
features
Beep : in event port { Compute_Entrypoint_Source_Text => "T.Beep"; };
PCI_Slot : requires bus access Generic_Native::Generic_Bus.impl;
PCI_Slot : requires bus access Generic_Bus::Generic_Bus.impl;
end Beeper_Device;
device implementation Beeper_Device.impl
......
package Generic_Bus
public
---------
-- BUS --
---------
-- Generic bus to model connections between processors and
-- devices. It is not used by the code generation process, so it is
-- made fully generic.
bus Generic_Bus
end Generic_Bus;
bus implementation Generic_Bus.impl
end Generic_Bus.impl;
end Generic_Bus;
package Generic_Native
-- This package models a generic native platform with one generic bus.
-- This package models a generic native platform with one generic bus.
--
-- Native platforms are GNU/Linux variants, MacOS X, Solaris, Windows,
-- ...
public
with Deployment;
with Generic_Bus;
---------------
-- PROCESSOR --
......@@ -19,7 +20,7 @@ public
processor Generic_Processor
features
eth0_tcp_ip : requires bus access Generic_Bus.impl;
eth0_tcp_ip : requires bus access Generic_Bus::Generic_Bus.impl;
-- One ethernet card, connected to the processor. It is assumed
-- later that it is used through a TCP/IP stack
......@@ -42,18 +43,4 @@ public
memory implementation Memory_Segment.impl
end Memory_Segment.impl;
---------
-- BUS --
---------
-- Generic bus to model connections between processors and
-- devices. It is not used by the code generation process, so it is
-- made fully generic.
bus Generic_Bus
end Generic_Bus;
bus implementation Generic_Bus.impl
end Generic_Bus.impl;
end Generic_Native;
\ No newline at end of file
......@@ -4,10 +4,10 @@
system delayed_connections
properties
Ocarina_Config::AADL_Files => ("beeper.aadl", "generic_native.aadl",
Ocarina_Config::AADL_Files => ("beeper.aadl", "generic_native.aadl", "generic_bus.aadl",
"software.aadl", "system_demo.aadl", "tcp_protocol.aadl");
Ocarina_Config::Generator => polyorb_hi_ada;
Ocarina_Config::Needed_Property_Sets =>
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::Deployment));
Ocarina_Config::AADL_Version => AADLv2;
......
package System_Demo
package System_Demo
-- This system combines generic native hardware, TCP/IP protocol stack
-- and some software to build a full ping demo.
......@@ -6,6 +6,7 @@ package System_Demo
public
with Deployment; -- Additional properties (provided by Ocarina)
with Generic_Bus;
with Generic_Native; -- Generic hardware
with TCP_IP_Protocol; -- TCP/IP protocol stack, as an AADL device
with Beeper; -- Beeper device
......@@ -16,15 +17,15 @@ public
------------
system The_Demo
end The_Demo;
end The_Demo;
system implementation The_Demo.impl
subcomponents
subcomponents
-- Interconnect bus. This component is shared by Node_1 and
-- Node_2 to support communication through TCP/IP protocol stack
Bus_TCP : bus Generic_Native::Generic_Bus.impl;
Bus_TCP : bus Generic_Bus::Generic_Bus.impl;
------------------------------------------------------------------
-- Node #1 hardware components
......@@ -72,11 +73,11 @@ public
-- driver.
Actual_Processor_Binding => (reference (Processor_1)) applies to Node_1;
Actual_Processor_Binding => (reference (Processor_1))
Actual_Processor_Binding => (reference (Processor_1))
applies to TCP_IP_Cnx_1;
Actual_Processor_Binding => (reference (Processor_2)) applies to Node_2;
Actual_Processor_Binding => (reference (Processor_2))
Actual_Processor_Binding => (reference (Processor_2))
applies to TCP_IP_Cnx_2;
end The_Demo.impl;
......
......@@ -5,7 +5,7 @@ package TCP_IP_Protocol
-- to be integrated with the runtime low level interface.
--
-- To configure this interface, you should use the
-- Deployment::Configuration property with the following format:
-- Deployment::Configuration property with the following format:
-- "ip <ipv4_addresse> <ipv4_port>"
--
-- e.g.
......@@ -15,7 +15,7 @@ package TCP_IP_Protocol
public
with Generic_Native;
with Generic_Bus;
------------
-- DEVICE --
......@@ -27,14 +27,14 @@ public
device TCP_IP_Device
features
Ethernet_Wire : requires bus access Generic_Native::Generic_Bus.impl;
-- Connection to the remote node
Ethernet_Wire : requires bus access Generic_Bus::Generic_Bus.impl;
-- Connection to the remote node
end TCP_IP_Device;
device implementation TCP_IP_Device.impl
properties
Implemented_As =>
Implemented_As =>
classifier (TCP_IP_Protocol::Driver_TCP_IP_Protocol.impl);
Initialize_Entrypoint => classifier (TCP_IP_Protocol::Initialize);
end TCP_IP_Device.impl;
......@@ -52,6 +52,7 @@ public
abstract implementation Driver_TCP_IP_Protocol.impl
subcomponents
receiver : thread Driver_TCP_IP_Protocol_thread_receiver.impl;
sender : subprogram Send;
end Driver_TCP_IP_Protocol.impl;
-------------
......@@ -63,19 +64,19 @@ public
-- messages.
thread Driver_TCP_IP_Protocol_thread_receiver
-- This thread is dispatched when an event is detected on the
-- real hardware. It then calls receive to handle the incoming
-- event.
properties
-- Initialize_Entrypoint
-- Initialize_Entrypoint
-- => classifier (TCP_IP_Protocol::Initialize_Receiver);
Dispatch_Protocol => Background;
end Driver_TCP_IP_Protocol_thread_receiver;
thread implementation Driver_TCP_IP_Protocol_thread_receiver.impl
calls
calls
call1 : { pspg : subprogram receive; };
end Driver_TCP_IP_Protocol_thread_receiver.impl;
......
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