Commit d4b87c85 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fix RTDS demo

parent a4a67181
PACKAGE deploymentview::DV
PUBLIC
WITH Deployment;
WITH Taste;
WITH interfaceview::IV;
WITH ocarina_processors_x86;
---------------------------------------------------
-- TASTE Deployement View
-- AADL2.1
-- TASTE type deploymentview
--
-- generated code: do not edit
---------------------------------------------------
----------------------
-- ProcessorBoards --
----------------------
SYSTEM obj113_obj113
END obj113_obj113;
PROCESS demo_obj133
END demo_obj133;
PROCESS IMPLEMENTATION demo_obj133.others
END demo_obj133.others;
MEMORY obj143_obj143
END obj143_obj143;
MEMORY IMPLEMENTATION obj143_obj143.others
END obj143_obj143.others;
SYSTEM IMPLEMENTATION obj113_obj113.others
SUBCOMPONENTS
demo_obj133 : PROCESS demo_obj133.others
{ Taste::Coordinates => "769 424 1611 1232";
Deployment::Port_Number => 0;};
my_rtds_system_obj318 : SYSTEM interfaceview::IV::my_rtds_system
{ Taste::Coordinates => "832 545 1094 828" ;};
mygui_obj359 : SYSTEM interfaceview::IV::mygui
{ Taste::Coordinates => "1175 527 1462 782" ;};
mysyncfunction_obj400 : SYSTEM interfaceview::IV::mysyncfunction
{ Taste::Coordinates => "917 920 1257 1204" ;};
obj123_obj123 : PROCESSOR ocarina_processors_x86::x86.linux
{ Taste::Coordinates => "707 369 1681 1317"; };
obj143_obj143 : MEMORY obj143_obj143.others
{ Taste::Coordinates => "1474 291 1759 431"; };
PROPERTIES
-- Connexion des CPUs aux process/drivers
Actual_Processor_Binding => (reference (obj123_obj123)) applies to demo_obj133;
Taste::APLC_Binding => (reference(demo_obj133)) APPLIES TO my_rtds_system_obj318;
Taste::APLC_Binding => (reference(demo_obj133)) APPLIES TO mygui_obj359;
Taste::APLC_Binding => (reference(demo_obj133)) APPLIES TO mysyncfunction_obj400;
Actual_Memory_Binding => (reference (obj143_obj143)) applies to demo_obj133;
END obj113_obj113.others;
--------------
-- Devices--
--------------
PACKAGE deploymentview::DV::Node1
PUBLIC
-----------
-- Buses --
-----------
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS demo
END demo;
-----------------
-- Root System --
-----------------
PROCESS IMPLEMENTATION demo.others
END demo.others;
SYSTEM deploymentview
END deploymentview;
END deploymentview::DV::Node1;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
-- The processor boards
obj113_obj113 : SYSTEM obj113_obj113.others
{ Taste::Coordinates => "584 258 1816 1363"; };
-- The devices
-- The buses
-- The IV systems
interfaceview_obj54 : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::my_rtds_system;
WITH interfaceview::IV::mygui;
WITH interfaceview::IV::mysyncfunction;
WITH ocarina_processors_x86;
WITH deploymentview::DV::Node1;
WITH Taste;
WITH Deployment;
WITH interfaceview::IV;
WITH TASTE_DV_Properties;
SYSTEM Node1
END Node1;
SYSTEM IMPLEMENTATION Node1.others
SUBCOMPONENTS
IV_my_rtds_system : SYSTEM interfaceview::IV::my_rtds_system::my_rtds_system.others {
Taste::FunctionName => "my_rtds_system";
};
IV_mygui : SYSTEM interfaceview::IV::mygui::mygui.others {
Taste::FunctionName => "mygui";
};
IV_mysyncfunction : SYSTEM interfaceview::IV::mysyncfunction::mysyncfunction.others {
Taste::FunctionName => "mysyncfunction";
};
demo : PROCESS deploymentview::DV::Node1::demo.others {
Taste::coordinates => "112034 71158 143077 100402";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "108154 62802 146957 104580";
};
PROPERTIES
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_my_rtds_system;
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_mygui;
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_mysyncfunction;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO demo;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "103304 50865 151807 110548";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::Coordinates => "0 0 2970 2100";
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.0";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("../../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
---------------------------------------
-- copied aadl libraries
-- TASTE requirement
-- Do not edit below this line
---------------------------------------
package ocarina_drivers_rasta_1553
public
with Deployment;
subprogram spg_1553_controller_rasta
properties
Source_Language => C;
Source_Name => "__po_hi_c_driver_1553_rasta_controller";
end spg_1553_controller_rasta;
subprogram spg_1553_poller_rasta_terminal
properties
Source_Language => C;
Source_Name => "__po_hi_c_driver_1553_rasta_terminal_poller";
end spg_1553_poller_rasta_terminal;
subprogram spg_1553_sender_rasta_controller
properties
Source_Language => C;
Source_Name => "__po_hi_c_driver_1553_rasta_sender_controller";
end spg_1553_sender_rasta_controller;
subprogram spg_1553_sender_rasta_terminal
properties
Source_Language => C;
Source_Name => "__po_hi_c_driver_1553_rasta_sender_terminal";
end spg_1553_sender_rasta_terminal;
subprogram spg_1553_init_rasta_controller
properties
Source_Language => C;
Source_Name => "__po_hi_c_driver_1553_rasta_init_controller";
end spg_1553_init_rasta_controller;
subprogram spg_1553_init_rasta_terminal
properties
Source_Language => C;
Source_Name => "__po_hi_c_driver_1553_rasta_init_terminal";
end spg_1553_init_rasta_terminal;
thread if1553_poller
end if1553_poller;
thread implementation if1553_poller.rasta_terminal
calls
mycall : {
pspg : subprogram spg_1553_poller_rasta_terminal;
};
properties
Period => 2000ms;
Dispatch_Protocol => Periodic;
end if1553_poller.rasta_terminal;
thread if1553_controller
end if1553_controller;
thread implementation if1553_controller.rasta
calls
mycall : {
pspg : subprogram spg_1553_controller_rasta;
};
properties
Period => 4000ms;
Dispatch_Protocol => Periodic;
end if1553_controller.rasta;
abstract if1553_driver
properties
Deployment::Version => "0.1beta";
Deployment::Help => "Write your ASN.1 configuration here";
end if1553_driver;
abstract implementation if1553_driver.rasta_terminal
subcomponents
receiver_rasta_1553 : thread if1553_poller.rasta_terminal;
sender : subprogram spg_1553_sender_rasta_terminal;
end if1553_driver.rasta_terminal;
abstract implementation if1553_driver.rasta_controller_sender_only
subcomponents
-- controller : thread if1553_controller.rasta;
-- This thread (controller) should be a poller thread that
-- gives orders to the terminal nodes to send/receive data.
-- It should also specify the communication policy (when a terminal
-- is authorized to send/receive data).
-- We don't specify poller and receiver since this controller
-- is just a node that sends data to a single other node.
sender : subprogram spg_1553_sender_rasta_controller;
end if1553_driver.rasta_controller_sender_only;
end ocarina_drivers_rasta_1553;
package ocarina_drivers_rtems_ne2000
public
with Deployment;
subprogram init
properties
Source_Language => C;
Source_Name => "__po_hi_driver_rtems_ne2000_init";
end init;
thread poller
end poller;
thread implementation poller.i
calls
mycall : {
pspg : subprogram spg_poller;
};
properties
Period => 1000ms;
Dispatch_Protocol => Periodic;
end poller.i;
subprogram spg_poller
properties
Source_Language => C;
Source_Name => "__po_hi_driver_rtems_ne2000_poller";
end spg_poller;
subprogram spg_sender
properties
Source_Language => C;
Source_Name => "__po_hi_driver_sockets_send";
end spg_sender;
abstract driver
properties
Deployment::Version => "0.1beta";
Deployment::Help => "Write your ASN.1 configuration here";
end driver;
abstract implementation driver.i
subcomponents
-- receiver : thread eth_sockets_ne2000_rtems_poller.i;
sender : subprogram spg_sender;
end driver.i;
end ocarina_drivers_rtems_ne2000;
package ocarina_drivers_leon_serial
public
with Deployment;
with ocarina_buses;
with ocarina_drivers;
subprogram spg_serial_poller_leon
properties
Source_Language => C;
Source_Name => "__po_hi_c_driver_serial_leon_poller";
end spg_serial_poller_leon;
subprogram spg_serial_sender_leon
properties
Source_Language => C;
Source_Name => "__po_hi_c_driver_serial_leon_sender";
end spg_serial_sender_leon;
subprogram spg_serial_init_leon
properties
Source_Language => C;
Source_Name => "__po_hi_c_driver_serial_leon_init";
end spg_serial_init_leon;
subprogram spg_serial_init_leon_sender
properties
Source_Language => C;
Source_Name => "__po_hi_c_driver_serial_leon_init_sender";
end spg_serial_init_leon_sender;
thread serial_poller
end serial_poller;
thread implementation serial_poller.leon
calls
mycall : {
pspg : subprogram spg_serial_poller_leon;
};
properties
Period => 1000ms;
Dispatch_Protocol => Periodic;
end serial_poller.leon;
abstract serial_driver
properties
Deployment::Configuration_Type => classifier (ocarina_drivers::configuration_type_serial);
Deployment::Version => "0.1beta";
Deployment::Help => "Write your ASN.1 configuration here";
end serial_driver;
abstract implementation serial_driver.leon
subcomponents
receiver_leon_serial : thread serial_poller.leon;
sender : subprogram spg_serial_sender_leon;
end serial_driver.leon;
abstract implementation serial_driver.leon_sender
subcomponents
sender : subprogram spg_serial_sender_leon;
end serial_driver.leon_sender;
end ocarina_drivers_leon_serial;
package Generic_Native
-- 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 --
---------------
-- Generic_Processor is the basic description of a processor with
-- one bus to connect an ethernet adapter. This ethernet adapter is
-- used through the TCP_IP_Device defined in TCP_IP_Protocol
-- package.
processor Generic_Processor
features
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
end Generic_Processor;
processor implementation Generic_Processor.impl
properties
Deployment::Execution_Platform => Native;
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
Priority_Range => 0 .. 255;
end Generic_Processor.impl;
------------
-- MEMORY --
------------
memory Memory_Segment
end Memory_Segment;
memory implementation Memory_Segment.impl
end Memory_Segment.impl;
end Generic_Native;
package ocarina_buses
public
bus generic_bus
end generic_bus;
bus implementation generic_bus.i
end generic_bus.i;
bus dummy_bus
end dummy_bus;
bus implementation dummy_bus.i
end dummy_bus.i;
bus ip
end ip;
bus implementation ip.pohic
end ip.pohic;
bus implementation ip.i
subcomponents
asn : virtual bus asn1.i;
pohic : virtual bus pohi.c;
pohiada : virtual bus pohi.ada;
end ip.i;
bus implementation ip.pohiada
end ip.pohiada;
bus spacewire
end spacewire;
bus implementation spacewire.generic
end spacewire.generic;
bus serial
end serial;
bus implementation serial.generic
end serial.generic;
----------------------
-- Virtual buses --
----------------------
virtual bus raw
end raw;
virtual bus implementation raw.i
end raw.i;
virtual bus asn1
end asn1;
virtual bus implementation asn1.i
end asn1.i;
virtual bus pohi
end pohi;
virtual bus implementation pohi.c
end pohi.c;
virtual bus implementation pohi.ada
end pohi.ada;
end ocarina_buses;
package ocarina_drivers_generic_keyboard
public
with Base_Types;
with Deployment;
subprogram spg_generic_keyboard_init
properties
Source_Language => C;
Source_Name => "__po_hi_driver_generic_keyboard_init";
end spg_generic_keyboard_init;
thread keyboard_poller
features
key_pressed : out data port Base_Types::Integer;
end keyboard_poller;
thread implementation keyboard_poller.i
calls
mycall : {
pspg : subprogram spg_generic_keyboard_poller;
};
connections
parameter pspg.key_pressed -> key_pressed;
properties
Period => 100ms;
Dispatch_Protocol => Periodic;
end keyboard_poller.i;
subprogram spg_generic_keyboard_poller
features
key_pressed : out parameter Base_Types::Integer;
properties
Source_Language => C;
Source_Name => "__po_hi_driver_generic_keyboard_poller";
end spg_generic_keyboard_poller;
abstract generic_keyboard_driver
features
key_pressed : out data port Base_Types::Integer;
properties
Deployment::Version => "0.1beta";
Deployment::Help => "Write your ASN.1 configuration here";
end generic_keyboard_driver;
abstract implementation generic_keyboard_driver.i
subcomponents
keyboard_receiver : thread keyboard_poller.i;
connections
port keyboard_receiver.key_pressed -> key_pressed;
end generic_keyboard_driver.i;
end ocarina_drivers_generic_keyboard;
package GRUART
-- This package models a UART-based protocol layer for the
-- PolyORB-HI/Ada AADL runtime, based on the GRUART chipset from
-- AEROFlex Gaisler. It defines the subprograms and threads to be
-- integrated with the runtime low level interface.
--
-- To configure this interface, you should use the
-- Deployment::Configuration property with the following format:
-- "serial DEVICE BAUDS DATA_BITS PARITY STOP_BIT"
--
-- e.g.
--
-- uart : device GRUART::GRUART_Device
-- {Deployment::Configuration => "serial /dev/ttyS0 9600 8 N 1"
--
public
with Deployment;
with GR_CPCI_X4CV;
with Generic_Bus;
------------
-- DEVICE --
------------
-- The main entrypoint for this package is this device, it relies
-- on the 'Implement_As' feature that defines its full
-- specification.
device GRUART_Device
features
DB9_Wire : requires bus access Generic_Bus::Generic_Bus.impl;
-- Connection to the remote node
end GRUART_Device;
device implementation GRUART_Device.impl
properties
Implemented_As =>
classifier (GRUART::Driver_GRUART_Protocol.impl);
Initialize_Entrypoint => classifier (GRUART::Initialize);
end GRUART_Device.impl;
------------
-- DRIVER --
------------
-- In AADLv2, we can model the actual implementation of a driver
-- using an abstract component.
abstract Driver_GRUART_Protocol
properties
Deployment::Configuration_Type
=> classifier (ocarina_drivers::configuration_type_serial);
Deployment::Version => "0.1beta";
Deployment::Help => "Write your ASN.1 configuration here";
end Driver_GRUART_Protocol;