Commit 8e59fa10 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update Demo_Spacewire

parent d2aafeee
---------------------------------------------------
-- AADL2.0
-- TASTE
--
--
---------------------------------------------------
PACKAGE deploymentview::DV::leoncentral
PUBLIC
WITH ocarina_buses;
WITH ocarina_drivers;
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS mypart
END mypart;
PROCESS IMPLEMENTATION mypart.others
END mypart.others;
DEVICE spw
EXTENDS ocarina_drivers::rasta_spacewire
FEATURES
link : REFINED TO REQUIRES BUS ACCESS ocarina_buses::spacewire.generic {
Taste::coordinates => "171 94";
};
PROPERTIES
Taste::Interface_Coordinates => "169 114" APPLIES TO link;
Deployment::Configuration => "{devname ""/dev/grspwrasta0"", nodeaddr 22, corefreq 30000, clockdiv 0}";
Deployment::Config => "/home/assert/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/drivers/configuration/spacewire.asn";
Deployment::Version => "0.1beta";
END spw;
DEVICE IMPLEMENTATION spw.others
EXTENDS ocarina_drivers::rasta_spacewire.pohic
END spw.others;
END deploymentview::DV::leoncentral;
PACKAGE deploymentview::DV::leonfinal
PUBLIC
WITH ocarina_buses;
WITH ocarina_drivers;
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS my2ndPart
END my2ndPart;
PROCESS IMPLEMENTATION my2ndPart.others
END my2ndPart.others;
DEVICE spw
EXTENDS ocarina_drivers::rasta_spacewire
FEATURES
link : REFINED TO REQUIRES BUS ACCESS ocarina_buses::spacewire.generic {
Taste::coordinates => "210 78";
};
PROPERTIES
Taste::Interface_Coordinates => "219 114" APPLIES TO link;
Deployment::Configuration => "{devname ""/dev/grspwrasta0"", nodeaddr 10, corefreq 30000, clockdiv 0}";
Deployment::Config => "/home/assert/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/drivers/configuration/spacewire.asn";
Deployment::Version => "0.1beta";
END spw;
DEVICE IMPLEMENTATION spw.others
EXTENDS ocarina_drivers::rasta_spacewire.pohic
END spw.others;
END deploymentview::DV::leonfinal;
PACKAGE deploymentview::DV
PUBLIC
WITH ocarina_processors_leon;
WITH deploymentview::DV::leoncentral;
WITH deploymentview::DV::leonfinal;
WITH ocarina_buses;
WITH Taste;
WITH Deployment;
WITH interfaceview::IV;
WITH TASTE_DV_Properties;
SYSTEM leoncentral
FEATURES
spw_spw : REQUIRES BUS ACCESS ocarina_buses::spacewire.generic;
END leoncentral;
SYSTEM IMPLEMENTATION leoncentral.others
SUBCOMPONENTS
IV_pingee1 : SYSTEM interfaceview::IV::pingee1.others {
Taste::coordinates => "123 28 167 38";
Taste::FunctionName => "pingee1";
};
mypart : PROCESS deploymentview::DV::leoncentral::mypart.others {
Taste::coordinates => "118 20 172 42";
Deployment::Port_Number => 0;
};
leoncpu : PROCESSOR ocarina_processors_leon::leon.rtems_posix {
Taste::coordinates => "113 14 178 46";
};
spw : DEVICE deploymentview::DV::leoncentral::spw.others {
Taste::coordinates => "120 85 180 94";
};
CONNECTIONS
spw_spw_link : BUS ACCESS spw_spw -> spw.link;
PROPERTIES
Taste::APLC_Binding => (reference (mypart)) APPLIES TO IV_pingee1;
Actual_Processor_Binding => (reference (leoncpu)) APPLIES TO mypart;
Actual_Processor_Binding => (reference (leoncpu)) APPLIES TO spw;
END leoncentral.others;
SYSTEM leonfinal
FEATURES
spw_spw : REQUIRES BUS ACCESS ocarina_buses::spacewire.generic;
END leonfinal;
SYSTEM IMPLEMENTATION leonfinal.others
SUBCOMPONENTS
IV_pingee2 : SYSTEM interfaceview::IV::pingee2.others {
Taste::coordinates => "216 25 266 36";
Taste::FunctionName => "pingee2";
};
my2ndPart : PROCESS deploymentview::DV::leonfinal::my2ndPart.others {
Taste::coordinates => "213 19 269 39";
Deployment::Port_Number => 0;
};
leoncpu : PROCESSOR ocarina_processors_leon::leon.rtems_posix {
Taste::coordinates => "209 12 278 51";
};
spw : DEVICE deploymentview::DV::leonfinal::spw.others {
Taste::coordinates => "210 73 277 89";
};
CONNECTIONS
spw_spw_link : BUS ACCESS spw_spw -> spw.link;
PROPERTIES
Taste::APLC_Binding => (reference (my2ndPart)) APPLIES TO IV_pingee2;
Actual_Processor_Binding => (reference (leoncpu)) APPLIES TO my2ndPart;
Actual_Processor_Binding => (reference (leoncpu)) APPLIES TO spw;
END leonfinal.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
leoncentral : SYSTEM leoncentral.others {
Taste::coordinates => "109 8 183 98";
};
leonfinal : SYSTEM leonfinal.others {
Taste::coordinates => "205 4 284 109";
};
spw : BUS ocarina_buses::spacewire.generic {
Taste::coordinates => "159 114 237 134";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
CONNECTIONS
obj7839 : BUS ACCESS spw -> leoncentral.spw_spw {
Taste::coordinates => "172 94 172 104 170 104 170 114";
};
obj7928 : BUS ACCESS spw -> leonfinal.spw_spw {
Taste::coordinates => "210 79 205 79 205 111 220 111 220 114";
};
PROPERTIES
Actual_Connection_Binding => (reference (spw)) APPLIES TO interfaceview.obj521;
Taste::Coordinates => "170 120 185 125" APPLIES TO interfaceview.obj521;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 594 420";
Taste::version => "1.3.19";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("../../../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
......@@ -80,7 +80,7 @@ WITH Taste;
PROPERTIES
Taste::Coordinates => "0 0 297 210";
Taste::dataView => ("DataView");
Taste::dataViewPath => ("dataview.aadl");
Taste::dataViewPath => ("DataView.aadl");
END interfaceview::IV;
......
#!/bin/bash
taste-update-data-view || exit 1
rm -f pinger.zip
zip pinger pinger/*
rm -f pingee1.zip
zip pingee1 pingee1/*
rm -f pingee2.zip
zip pingee2 pingee2/*
rm -f finalpingee.zip
zip finalpingee finalpingee/*
[ ! -z "$CLEANUP" ] && rm -rf binary.mixed.pohic/
assert-builder-ocarina.py \
-f \
-p -g\
# This script will build your TASTE system (by default with the C runtime).
# You should not change this file as it was automatically generated.
# If you need additional preprocessing, create a file named 'user_init_pre.sh'
# and/or 'user_init_post.sh - They will never get overwritten.'
# Inside these files you may set some environment variables:
# C_INCLUDE_PATH=/usr/include/xenomai/analogy/:$C_INCLUDE_PATH
# unset USE_POHIC
CWD=$(pwd)
if [ -t 0 ] ; then
COLORON="\e[1m\e[32m"
COLOROFF="\e[0m"
else
COLORON=""
COLOROFF=""
fi
INFO="${COLORON}[INFO]${COLOROFF}"
if [ -f user_init_pre.sh ]
then
echo -e "${INFO} Executing user-defined init script"
source user_init_pre.sh
fi
# Use PolyORB-HI-C runtime
USE_POHIC=1
# Detect models from Ellidiss tools v2, and convert them to 1.3
INTERFACEVIEW=InterfaceView.aadl
grep "version => \"2" InterfaceView.aadl >/dev/null && {
echo -e "${INFO} Converting interface view from V2 to V1.3"
TASTE --load-interface-view InterfaceView.aadl --export-interface-view-to-1_3 __iv_1_3.aadl
INTERFACEVIEW=__iv_1_3.aadl
};
if [ -z "$DEPLOYMENTVIEW" ]
then
DEPLOYMENTVIEW=DeploymentView.aadl
fi
# Detect models from Ellidiss tools v2, and convert them to 1.3
grep "version => \"2" "$DEPLOYMENTVIEW" >/dev/null && {
echo -e "${INFO} Converting deployment view from V2 to V1.3"
TASTE --load-deployment-view "$DEPLOYMENTVIEW" --export-deployment-view-to-1_3 __dv_1_3.aadl
DEPLOYMENTVIEW=__dv_1_3.aadl
};
SKELS="./"
# Update the data view with local paths
taste-update-data-view
cd "$SKELS" && rm -f pingee1.zip && zip pingee1 pingee1/* && cd $OLDPWD
cd "$SKELS" && rm -f pingee2.zip && zip pingee2 pingee2/* && cd $OLDPWD
[ ! -z "$CLEANUP" ] && rm -rf binary*
if [ -f ConcurrencyView.pro ]
then
ORCHESTRATOR_OPTIONS+=" -w ConcurrencyView.pro "
fi
if [ ! -z "$USE_POHIC" ]
then
OUTPUTDIR=binary.c
ORCHESTRATOR_OPTIONS+=" -p "
elif [ ! -z "$USE_POHIADA" ]
then
OUTPUTDIR=binary.ada
else
OUTPUTDIR=binary
fi
if [ -f user_init_post.sh ]
then
echo -e "${INFO} Executing user-defined init script"
source user_init_post.sh
fi
cd "$CWD" && assert-builder-ocarina.py \
--fast \
--debug \
--aadlv2 \
--keep-case \
--interfaceView interfaceview.aadl \
--deploymentView deploymentview.aadl \
-o binary.mixed.pohic \
--subC pingee1:pingee1.zip \
--subC pingee2:pingee2.zip
--interfaceView "$INTERFACEVIEW" \
--deploymentView "$DEPLOYMENTVIEW" \
-o "$OUTPUTDIR" \
--subC pingee1:"$SKELS"/pingee1.zip \
--subC pingee2:"$SKELS"/pingee2.zip \
$ORCHESTRATOR_OPTIONS
--------------------------------------------------------
--! File generated by asn2aadl v2.0.3: DO NOT EDIT !
--------------------------------------------------------
package DataView
public
with Data_Model;
with Taste;
with Base_Types;
with Deployment;
-- No more private heap required (we use the space certified compiler)
-- Memory_Required: 0
DATA Simulink_Tunable_Parameter
PROPERTIES
TASTE::Ada_Package_Name => "TASTE-Directives";
Type_Source_Name => "Simulink-Tunable-Parameter";
Deployment::ASN1_Module_Name => "TASTE-Directives";
END Simulink_Tunable_Parameter;
DATA Timer
PROPERTIES
TASTE::Ada_Package_Name => "TASTE-Directives";
Type_Source_Name => "Timer";
Deployment::ASN1_Module_Name => "TASTE-Directives";
END Timer;
DATA TASTE_Directive
PROPERTIES
TASTE::Ada_Package_Name => "TASTE-Directives";
Type_Source_Name => "Taste-directive";
Deployment::ASN1_Module_Name => "TASTE-Directives";
END TASTE_Directive;
data Stream_Element_Buffer
-- Root type for buffer elements
properties
Data_Model::Data_Representation => Character;
end Stream_Element_Buffer;
DATA TM_T
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("~/tool-src/testSuites/Demo_SpaceWire_2RASTA/dataview.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 260; suggested aligned message buffer is...
Source_Data_Size => 264 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "TM-T";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSTRING;
END TM_T;
DATA TM_T_Buffer_Max
END TM_T_Buffer_Max;
DATA IMPLEMENTATION TM_T_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TM_T
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (264); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END TM_T_Buffer_Max.impl;
DATA TM_T_Buffer
END TM_T_Buffer;
DATA IMPLEMENTATION TM_T_Buffer.impl
-- Buffer to hold a marshalled data of type TM_T
SUBCOMPONENTS
Buffer : data TM_T_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TM_T_Buffer.impl;
DATA Action_T
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("~/tool-src/testSuites/Demo_SpaceWire_2RASTA/dataview.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 264; suggested aligned message buffer is...
Source_Data_Size => 264 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "Action-T";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aCHOICE;
END Action_T;
DATA Action_T_Buffer_Max
END Action_T_Buffer_Max;
DATA IMPLEMENTATION Action_T_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Action_T
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (264); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Action_T_Buffer_Max.impl;
DATA Action_T_Buffer
END Action_T_Buffer;
DATA IMPLEMENTATION Action_T_Buffer.impl
-- Buffer to hold a marshalled data of type Action_T
SUBCOMPONENTS
Buffer : data Action_T_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END Action_T_Buffer.impl;
DATA T_Boolean
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("~/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 1; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Boolean";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aBOOLEAN;
END T_Boolean;
DATA T_Boolean_Buffer_Max
END T_Boolean_Buffer_Max;
DATA IMPLEMENTATION T_Boolean_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Boolean
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Boolean_Buffer_Max.impl;
DATA T_Boolean_Buffer
END T_Boolean_Buffer;
DATA IMPLEMENTATION T_Boolean_Buffer.impl
-- Buffer to hold a marshalled data of type T_Boolean
SUBCOMPONENTS
Buffer : data T_Boolean_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Boolean_Buffer.impl;
DATA TC_T
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("~/tool-src/testSuites/Demo_SpaceWire_2RASTA/dataview.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 268; suggested aligned message buffer is...
Source_Data_Size => 272 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "TC-T";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSEQUENCE;
END TC_T;
DATA TC_T_Buffer_Max
END TC_T_Buffer_Max;
DATA IMPLEMENTATION TC_T_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TC_T
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (272); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END TC_T_Buffer_Max.impl;
DATA TC_T_Buffer
END TC_T_Buffer;
DATA IMPLEMENTATION TC_T_Buffer.impl
-- Buffer to hold a marshalled data of type TC_T
SUBCOMPONENTS
Buffer : data TC_T_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TC_T_Buffer.impl;
DATA My_Real
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("~/tool-src/testSuites/Demo_SpaceWire_2RASTA/dataview.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 13; suggested aligned message buffer is...
Source_Data_Size => 16 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "My-Real";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aREAL;
END My_Real;
DATA My_Real_Buffer_Max
END My_Real_Buffer_Max;
DATA IMPLEMENTATION My_Real_Buffer_Max.impl
-- Buffer to hold a marshalled data of type My_Real
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (16); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END My_Real_Buffer_Max.impl;
DATA My_Real_Buffer
END My_Real_Buffer;
DATA IMPLEMENTATION My_Real_Buffer.impl
-- Buffer to hold a marshalled data of type My_Real
SUBCOMPONENTS
Buffer : data My_Real_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END My_Real_Buffer.impl;
DATA T_UInt8
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("~/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 8; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-UInt8";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_UInt8;
DATA T_UInt8_Buffer_Max
END T_UInt8_Buffer_Max;
DATA IMPLEMENTATION T_UInt8_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_UInt8
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_UInt8_Buffer_Max.impl;
DATA T_UInt8_Buffer
END T_UInt8_Buffer;
DATA IMPLEMENTATION T_UInt8_Buffer.impl
-- Buffer to hold a marshalled data of type T_UInt8
SUBCOMPONENTS
Buffer : data T_UInt8_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_UInt8_Buffer.impl;
DATA My_Integer
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("~/tool-src/testSuites/Demo_SpaceWire_2RASTA/dataview.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 8; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "My-Integer";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END My_Integer;
DATA My_Integer_Buffer_Max
END My_Integer_Buffer_Max;
DATA IMPLEMENTATION My_Integer_Buffer_Max.impl
-- Buffer to hold a marshalled data of type My_Integer
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END My_Integer_Buffer_Max.impl;
DATA My_Integer_Buffer
END My_Integer_Buffer;
DATA IMPLEMENTATION My_Integer_Buffer.impl
-- Buffer