Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
regression-suites
Commits
c3da23a9
Commit
c3da23a9
authored
Jun 05, 2018
by
Thanassis Tsiodras
Browse files
New test project for SDL used from GR740.
parent
ba1b0ec8
Changes
10
Hide whitespace changes
Inline
Side-by-side
Demo_RTEMS_SDL/DataView.acn
0 → 100644
View file @
c3da23a9
TASTE-Dataview DEFINITIONS ::= BEGIN
-- In this ACN model, you can specify custom binary encoding rules for
-- your data types. For example if you require a specific memory layout
-- for a record, or need to add padding fields, define endianness, etc.
-- you can do that with ACN. Refer to the ACN user manual for details.
-- TASTE-Boolean []
END
Demo_RTEMS_SDL/DataView.asn
0 → 100644
View file @
c3da23a9
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
TASTE-Boolean ::= BOOLEAN
-- ASN.1 Type definitions must start with an uppercase
-- Field names in records (SEQUENCE) must start with a lowercase
-- Underscores are not allowed: use dash (hyphen)
-- Simple types:
-- MyInteger ::= INTEGER (0..255)
-- MyReal ::= REAL (0.0 .. 1000.0)
-- MyBool ::= BOOLEAN
-- MyEnum ::= ENUMERATED { hello, world, how-are-you }
-- Complex types:
-- MySeq ::= SEQUENCE {
-- input-data MyInteger,
-- output-data MyInteger,
-- validity ENUMERATED { valid, invalid }
-- }
--
-- MyChoice ::= CHOICE {
-- a BOOLEAN,
-- b MySeq
-- }
--
-- MySeqOf ::= SEQUENCE (SIZE (2)) OF MyEnum
--
-- MyOctStr ::= OCTET STRING (SIZE (3))
--
-- -- You can also declare constants
-- myVar MySeqOf ::= { hello, world }
END
Demo_RTEMS_SDL/DeploymentView.aadl
0 → 100644
View file @
c3da23a9
---------------------------------------------------
-- AADL2.1
-- TASTE type deploymentview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE deploymentview::DV::Node1
PUBLIC
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS gr740_partition
END gr740_partition;
PROCESS IMPLEMENTATION gr740_partition.others
END gr740_partition.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::SDL_Function;
WITH interfaceview::IV::C_Function;
WITH ocarina_processors_leon;
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_SDL_Function : SYSTEM interfaceview::IV::SDL_Function::SDL_Function.others {
Taste::FunctionName => "SDL_Function";
};
IV_C_Function : SYSTEM interfaceview::IV::C_Function::C_Function.others {
Taste::FunctionName => "C_Function";
};
gr740_partition : PROCESS deploymentview::DV::Node1::gr740_partition.others {
Taste::coordinates => "112791 80644 159958 108809";
Deployment::Port_Number => 0;
};
gr740_rtems412_posix : PROCESSOR ocarina_processors_leon::gr740.rtems412_posix {
Taste::coordinates => "106895 72597 165854 112832";
};
PROPERTIES
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_SDL_Function;
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_C_Function;
Actual_Processor_Binding => (reference (gr740_rtems412_posix)) APPLIES TO gr740_partition;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "99525 61101 173224 118580";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
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;
Demo_RTEMS_SDL/InterfaceView.aadl
0 → 100644
View file @
c3da23a9
---------------------------------------------------
-- AADL2.1
-- TASTE type interfaceview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE interfaceview::IV::SDL_Function
PUBLIC
WITH interfaceview::IV::C_Function;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_pulse
END PI_pulse;
SUBPROGRAM IMPLEMENTATION PI_pulse.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_pulse.others;
SUBPROGRAM RI_dosomething_unpro
FEATURES
a : IN PARAMETER DataView::T_UInt32 {
Taste::encoding => NATIVE;
};
END RI_dosomething_unpro;
SUBPROGRAM IMPLEMENTATION RI_dosomething_unpro.others
END RI_dosomething_unpro.others;
SUBPROGRAM RI_doSomething_spo
FEATURES
a : IN PARAMETER DataView::T_UInt32 {
Taste::encoding => UPER;
};
END RI_doSomething_spo;
SUBPROGRAM IMPLEMENTATION RI_doSomething_spo.others
END RI_doSomething_spo.others;
SUBPROGRAM PI_setanswer
FEATURES
a : IN PARAMETER DataView::T_UInt32 {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_setanswer;
SUBPROGRAM IMPLEMENTATION PI_setanswer.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_setanswer.others;
SYSTEM SDL_Function
FEATURES
PI_pulse : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::SDL_Function::PI_pulse.others {
Taste::coordinates => "103150 59684";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 1000 ms;
Taste::InterfaceName => "pulse";
};
RI_dosomething_unpro : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::C_Function::PI_dosomething_unpro.others {
Taste::coordinates => "129760 65984";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "dosomething_unpro";
Taste::labelInheritance => "true";
};
RI_doSomething_spo : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::C_Function::PI_doSomething_spo.others {
Taste::coordinates => "129760 77009";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "doSomething_spo";
Taste::labelInheritance => "true";
};
PI_setanswer : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::SDL_Function::PI_setanswer.others {
Taste::coordinates => "129760 84884";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "setanswer";
};
PROPERTIES
Source_Language => (SDL);
Taste::Active_Interfaces => any;
END SDL_Function;
SYSTEM IMPLEMENTATION SDL_Function.others
END SDL_Function.others;
END interfaceview::IV::SDL_Function;
PACKAGE interfaceview::IV::C_Function
PUBLIC
WITH interfaceview::IV::SDL_Function;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_dosomething_unpro
FEATURES
a : IN PARAMETER DataView::T_UInt32 {
Taste::encoding => NATIVE;
};
END PI_dosomething_unpro;
SUBPROGRAM IMPLEMENTATION PI_dosomething_unpro.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_dosomething_unpro.others;
SUBPROGRAM PI_doSomething_spo
FEATURES
a : IN PARAMETER DataView::T_UInt32 {
Taste::encoding => UPER;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_doSomething_spo;
SUBPROGRAM IMPLEMENTATION PI_doSomething_spo.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_doSomething_spo.others;
SUBPROGRAM RI_setanswer
FEATURES
a : IN PARAMETER DataView::T_UInt32 {
Taste::encoding => NATIVE;
};
END RI_setanswer;
SUBPROGRAM IMPLEMENTATION RI_setanswer.others
END RI_setanswer.others;
SYSTEM C_Function
FEATURES
PI_dosomething_unpro : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::C_Function::PI_dosomething_unpro.others {
Taste::coordinates => "152122 68031";
Taste::RCMoperationKind => unprotected;
Taste::InterfaceName => "dosomething_unpro";
};
PI_doSomething_spo : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::C_Function::PI_doSomething_spo.others {
Taste::coordinates => "152122 75906";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "doSomething_spo";
};
RI_setanswer : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::SDL_Function::PI_setanswer.others {
Taste::coordinates => "152122 83781";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "setanswer";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
END C_Function;
SYSTEM IMPLEMENTATION C_Function.others
END C_Function.others;
END interfaceview::IV::C_Function;
PACKAGE interfaceview::IV
PUBLIC
WITH interfaceview::IV::SDL_Function;
WITH interfaceview::IV::C_Function;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SYSTEM interfaceview
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
END interfaceview;
SYSTEM IMPLEMENTATION interfaceview.others
SUBCOMPONENTS
SDL_Function : SYSTEM interfaceview::IV::SDL_Function::SDL_Function.others {
Taste::coordinates => "82675 59684 129760 97478";
};
C_Function : SYSTEM interfaceview::IV::C_Function::C_Function.others {
Taste::coordinates => "152122 61731 199680 102674";
};
CONNECTIONS
C_Function_PI_dosomething_unpro_SDL_Function_RI_dosomething_unpro : SUBPROGRAM ACCESS C_Function.PI_dosomething_unpro -> SDL_Function.RI_dosomething_unpro {
Taste::coordinates => "129760 65984 140941 65984 140941 68031 152122 68031";
};
C_Function_PI_doSomething_spo_SDL_Function_RI_doSomething_spo : SUBPROGRAM ACCESS C_Function.PI_doSomething_spo -> SDL_Function.RI_doSomething_spo {
Taste::coordinates => "129760 77009 140941 77009 140941 75906 152122 75906";
};
SDL_Function_PI_setanswer_C_Function_RI_setanswer : SUBPROGRAM ACCESS SDL_Function.PI_setanswer -> C_Function.RI_setanswer {
Taste::coordinates => "152122 83781 140941 83781 140941 84884 129760 84884";
};
END interfaceview.others;
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.0";
END interfaceview::IV;
Demo_RTEMS_SDL/build-script.sh
0 → 100755
View file @
c3da23a9
#!/bin/bash -e
# This script will build your TASTE system.
# You should not change this file as it was automatically generated.
# If you need additional preprocessing, there are three hook files
# that you can provide and that are called dring the build:
# user_init_pre.sh, user_init_post.sh and user_init_last.sh
# These files will never get overwritten by TASTE.'
# 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
1
]
;
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
# Set Debug mode by default
DEBUG_MODE
=
--debug
# 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
=
"./"
# Check if Dataview references existing files
mono
$(
which taste-extract-asn-from-design.exe
)
-i
"
$INTERFACEVIEW
"
-j
/tmp/dv.asn
# Generate code for OpenGEODE function sdl_function
cd
"
$SKELS
"
/sdl_function
&&
opengeode
--toAda
sdl_function.pr system_structure.pr
&&
cd
$OLDPWD
cd
"
$SKELS
"
&&
rm
-f
sdl_function.zip
&&
zip sdl_function sdl_function/
*
&&
cd
$OLDPWD
cd
"
$SKELS
"
&&
rm
-f
c_function.zip
&&
zip c_function c_function/
*
&&
cd
$OLDPWD
[
!
-z
"
$CLEANUP
"
]
&&
rm
-rf
binary
*
if
[
-f
ConcurrencyView.pro
]
then
ORCHESTRATOR_OPTIONS+
=
" -w ConcurrencyView.pro "
elif
[
-f
ConcurrencyView_Properties.aadl
]
then
ORCHESTRATOR_OPTIONS+
=
" -w ConcurrencyView_Properties.aadl "
fi
if
[
-f
user_init_post.sh
]
then
echo
-e
"
${
INFO
}
Executing user-defined post-init script"
source
user_init_post.sh
fi
if
[
-f
additionalCommands.sh
]
then
source
additionalCommands.sh
fi
if
[
!
-z
"
$USE_POHIC
"
]
then
OUTPUTDIR
=
binary.c
ORCHESTRATOR_OPTIONS+
=
" -p "
elif
[
!
-z
"
$USE_POHIADA
"
]
then
OUTPUTDIR
=
binary.ada
else
OUTPUTDIR
=
binary
fi
cd
"
$CWD
"
&&
assert-builder-ocarina.py
\
--fast
\
$DEBUG_MODE
\
--aadlv2
\
--keep-case
\
--interfaceView
"
$INTERFACEVIEW
"
\
--deploymentView
"
$DEPLOYMENTVIEW
"
\
-o
"
$OUTPUTDIR
"
\
--subAda
sdl_function:
"
$SKELS
"
/sdl_function.zip
\
--subC
c_function:
"
$SKELS
"
/c_function.zip
\
$ORCHESTRATOR_OPTIONS
if
[
-f
user_init_last.sh
]
then
echo
-e
"
${
INFO
}
Executing user-defined post-build script"
source
user_init_last.sh
fi
Demo_RTEMS_SDL/c_function/c_function.c
0 → 100644
View file @
c3da23a9
/* User code: This file will not be overwritten by TASTE. */
#include
"c_function.h"
#include
<stdio.h>
void
c_function_startup
()
{
puts
(
"[c_function_startup]"
);
/* Write your initialization code here,
but do not make any call to a required interface. */
}
void
c_function_PI_dosomething_unpro
(
const
asn1SccT_UInt32
*
IN_a
)
{
printf
(
"[c_function_PI_dosomething_unpro] Received %lld
\n
"
,
*
IN_a
);
}
void
c_function_PI_doSomething_spo
(
const
asn1SccT_UInt32
*
IN_a
)
{
asn1SccT_UInt32
data
=
*
IN_a
+
1
;
printf
(
"[c_function_PI_doSomething_spo] Received %lld, sending %lld
\n
"
,
*
IN_a
,
data
);
c_function_RI_setanswer
(
&
data
);
}
Demo_RTEMS_SDL/c_function/c_function.h
0 → 100644
View file @
c3da23a9
/* This file was generated automatically: DO NOT MODIFY IT ! */
/* Declaration of the functions that have to be provided by the user */
#ifndef __USER_CODE_H_c_function__
#define __USER_CODE_H_c_function__
#include
"C_ASN1_Types.h"
#ifdef __cplusplus
extern
"C"
{
#endif
void
c_function_startup
();
void
c_function_PI_dosomething_unpro
(
const
asn1SccT_UInt32
*
);
void
c_function_PI_doSomething_spo
(
const
asn1SccT_UInt32
*
);
extern
void
c_function_RI_setanswer
(
const
asn1SccT_UInt32
*
);
#ifdef __cplusplus
}
#endif
#endif
Demo_RTEMS_SDL/sdl_function/dataview-uniq.asn
0 → 100644
View file @
c3da23a9
TASTE-BasicTypes DEFINITIONS ::=
BEGIN
-- Set of TASTE predefined basic types
T-Int32 ::= INTEGER (-2147483648 .. 2147483647)
T-UInt32 ::= INTEGER (0 .. 4294967295)
T-Int8 ::= INTEGER (-128 .. 127)
T-UInt8 ::= INTEGER (0 .. 255)
T-Boolean ::= BOOLEAN
END
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
TASTE-Boolean ::= BOOLEAN
-- ASN.1 Type definitions must start with an uppercase
-- Field names in records (SEQUENCE) must start with a lowercase
-- Underscores are not allowed: use dash (hyphen)
-- Simple types:
-- MyInteger ::= INTEGER (0..255)
-- MyReal ::= REAL (0.0 .. 1000.0)
-- MyBool ::= BOOLEAN
-- MyEnum ::= ENUMERATED { hello, world, how-are-you }
-- Complex types:
-- MySeq ::= SEQUENCE {
-- input-data MyInteger,
-- output-data MyInteger,
-- validity ENUMERATED { valid, invalid }
-- }
--
-- MyChoice ::= CHOICE {
-- a BOOLEAN,
-- b MySeq
-- }
--
-- MySeqOf ::= SEQUENCE (SIZE (2)) OF MyEnum
--
-- MyOctStr ::= OCTET STRING (SIZE (3))
--
-- -- You can also declare constants
-- myVar MySeqOf ::= { hello, world }
END
Demo_RTEMS_SDL/sdl_function/sdl_function.pr
0 → 100644
View file @
c3da23a9
/* CIF PROCESS (250, 150), (150, 75) */
process sdl_function;
/* CIF TEXT (1359, 136), (323, 336) */
-- Text area for declarations and comments
dcl myVal t_UInt32 := 0;
/* CIF ENDTEXT */
/* CIF START (656, 216), (70, 35) */
START;
/* CIF PROCEDURECALL (557, 271), (268, 35) */
call writeln ('[SDL] Startup - Is this printing?');
/* CIF NEXTSTATE (656, 321), (70, 35) */
NEXTSTATE Wait;
/* CIF state (1142, 201), (96, 35) */
state wait_answer;
/* CIF input (1124, 256), (131, 29) */
input setanswer(myVal);
/* CIF PROCEDURECALL (1079, 305), (221, 35) */
call dosomething_unpro (myVal+42);
/* CIF NEXTSTATE (1154, 355), (70, 35) */
NEXTSTATE Wait;
endstate;
/* CIF state (943, 173), (70, 35) */
state Wait;
/* CIF input (943, 228), (70, 35) */
input pulse;
/* CIF output (887, 283), (182, 35) */
output doSomething_spo (myVal);
/* CIF NEXTSTATE (930, 338), (96, 35) */
NEXTSTATE wait_answer;
endstate;
endprocess sdl_function;
\ No newline at end of file
Demo_RTEMS_SDL/sdl_function/system_structure.pr
0 → 100644
View file @
c3da23a9
/* CIF Keep Specific Geode ASNFilename 'dataview-uniq.asn' */
USE Datamodel;
SYSTEM sdl_function;
SIGNAL pulse;
/* CIF Keep Specific Geode PARAMNAMES a */
SIGNAL setanswer (T_UInt32);
PROCEDURE dosomething_unpro COMMENT '#c_predef';
FPAR
IN a T_UInt32;
EXTERNAL;
/* CIF Keep Specific Geode PARAMNAMES a */
SIGNAL doSomething_spo (T_UInt32);
CHANNEL c
FROM ENV TO sdl_function WITH pulse,setanswer;
FROM sdl_function TO ENV WITH doSomething_spo;
ENDCHANNEL;
BLOCK sdl_function;
SIGNALROUTE r
FROM ENV TO sdl_function WITH pulse,setanswer;
FROM sdl_function TO ENV WITH doSomething_spo;
CONNECT c and r;
PROCESS sdl_function REFERENCED;
ENDBLOCK;
ENDSYSTEM;
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.