Commit b09bb90a authored by Tiago Jorge's avatar Tiago Jorge
Browse files

Add Demo_CoRAMBAD_Brave_GR740_GNC to test suites.

parent 158f4c6b
......@@ -103,11 +103,21 @@ else
OUTPUTDIR=binary
fi
NO_BITFILE=""
while getopts :-: o
do
case "$o$OPTARG"
in
(-no-bitfile) NO_BITFILE="--no-bitfile";;
esac
done
cd "$CWD" && assert-builder-ocarina.py \
--fast \
$DEBUG_MODE \
--aadlv2 \
--keep-case \
$NO_BITFILE \
--interfaceView "$INTERFACEVIEW" \
--deploymentView "$DEPLOYMENTVIEW" \
-o "$OUTPUTDIR" \
......
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
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)
MyInteger::= INTEGER (-411673351.. 763937697)
-- MyReal ::= REAL (0.0 .. 10.0)
Seq3 ::= SEQUENCE (SIZE (3)) OF MyInteger
Seq4 ::= SEQUENCE (SIZE (4)) OF MyInteger
Seqout ::= SEQUENCE (SIZE (8)) OF MyInteger
In-Nested ::= SEQUENCE {
inest-a SEQUENCE (SIZE (4)) OF T-Int32,
inest-b SEQUENCE (SIZE (3)) OF T-Int32
}
Out-Nested ::= SEQUENCE {
onest-a SEQUENCE (SIZE (7)) OF T-Int32
}
-- 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
---------------------------------------------------
-- 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::Calling;
WITH interfaceview::IV::Gnc;
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_Calling : SYSTEM interfaceview::IV::Calling::Calling.others {
Taste::FunctionName => "Calling";
};
IV_Gnc : SYSTEM interfaceview::IV::Gnc::Gnc.others {
Taste::FunctionName => "Gnc";
};
gr740_partition : PROCESS deploymentview::DV::Node1::gr740_partition.others {
Taste::coordinates => "90703 54292 127086 70804";
Deployment::Port_Number => 0;
};
gr740_rcc13rc5_posix : PROCESSOR ocarina_processors_leon::gr740.rcc13rc5_posix {
Taste::coordinates => "86155 49574 131634 73163";
};
PROPERTIES
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_Calling;
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_Gnc;
Actual_Processor_Binding => (reference (gr740_rcc13rc5_posix)) APPLIES TO gr740_partition;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "80470 42834 137319 76533";
};
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 => ("/home/taste/tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
---------------------------------------------------
-- AADL2.1
-- TASTE type interfaceview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE interfaceview::IV::Calling
PUBLIC
WITH interfaceview::IV::Gnc;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_pulse
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_pulse;
SUBPROGRAM IMPLEMENTATION PI_pulse.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_pulse.others;
SUBPROGRAM RI_do_something
FEATURES
inp1 : IN PARAMETER DataView::Seq3 {
Taste::encoding => NATIVE;
};
inp2 : IN PARAMETER DataView::Seq3 {
Taste::encoding => NATIVE;
};
inp3 : IN PARAMETER DataView::Seq4 {
Taste::encoding => NATIVE;
};
outpu : OUT PARAMETER DataView::Seqout {
Taste::encoding => NATIVE;
};
innested : IN PARAMETER DataView::In_Nested {
Taste::encoding => NATIVE;
};
outnested : OUT PARAMETER DataView::Out_Nested {
Taste::encoding => NATIVE;
};
END RI_do_something;
SUBPROGRAM IMPLEMENTATION RI_do_something.others
END RI_do_something.others;
SYSTEM Calling
FEATURES
PI_pulse : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Calling::PI_pulse.others {
Taste::coordinates => "100509 56233";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 300 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "pulse";
};
RI_do_something : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Gnc::PI_do_something.others {
Taste::coordinates => "134118 68838";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "do_something";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
END Calling;
SYSTEM IMPLEMENTATION Calling.others
END Calling.others;
END interfaceview::IV::Calling;
PACKAGE interfaceview::IV::Gnc
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_do_something
FEATURES
inp1 : IN PARAMETER DataView::Seq3 {
Taste::encoding => NATIVE;
};
inp2 : IN PARAMETER DataView::Seq3 {
Taste::encoding => NATIVE;
};
inp3 : IN PARAMETER DataView::Seq4 {
Taste::encoding => NATIVE;
};
outpu : OUT PARAMETER DataView::Seqout {
Taste::encoding => NATIVE;
};
innested : IN PARAMETER DataView::In_Nested {
Taste::encoding => NATIVE;
};
outnested : OUT PARAMETER DataView::Out_Nested {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_do_something;
SUBPROGRAM IMPLEMENTATION PI_do_something.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_do_something.others;
SYSTEM Gnc
FEATURES
PI_do_something : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Gnc::PI_do_something.others {
Taste::coordinates => "185019 83379";
Taste::RCMoperationKind => protected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "do_something";
};
PROPERTIES
Source_Language => (Simulink);
Taste::Active_Interfaces => any;
END Gnc;
SYSTEM IMPLEMENTATION Gnc.others
END Gnc.others;
END interfaceview::IV::Gnc;
PACKAGE interfaceview::IV
PUBLIC
WITH interfaceview::IV::Calling;
WITH interfaceview::IV::Gnc;
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
Calling : SYSTEM interfaceview::IV::Calling::Calling.others {
Taste::coordinates => "84026 56233 134118 94530";
};
Gnc : SYSTEM interfaceview::IV::Gnc::Gnc.others {
Taste::coordinates => "185019 63827 246584 104386";
TASTE_IV_Properties::FPGA_Configurations => "modeA, modeB";
};
CONNECTIONS
Gnc_PI_do_something_Calling_RI_do_something : SUBPROGRAM ACCESS Gnc.PI_do_something -> Calling.RI_do_something {
Taste::coordinates => "134118 68838 156256 68838 156256 83379 185019 83379";
};
END interfaceview.others;
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.0";
END interfaceview::IV;
#!/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
# Set up the cache to limit the calls to ASN1SCC in DMT tools
mkdir -p .cache
export PROJECT_CACHE=$(pwd)/.cache
# 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
cd "$SKELS" && rm -f calling.zip && zip -r calling calling/* && cd $OLDPWD || exit -1
cd "$SKELS" && rm -f gnc.zip && zip -r gnc gnc/* && cd $OLDPWD || exit -1
[ ! -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
NO_BITFILE=""
while getopts :-: o
do
case "$o$OPTARG"
in
(-no-bitfile) NO_BITFILE="--no-bitfile";;
esac
done
cd "$CWD" && assert-builder-ocarina.py \
--fast \
$DEBUG_MODE \
--aadlv2 \
--keep-case \
$NO_BITFILE \
--interfaceView "$INTERFACEVIEW" \
--deploymentView "$DEPLOYMENTVIEW" \
-o "$OUTPUTDIR" \
--subC calling:"$SKELS"/calling.zip \
--subSIMULINK gnc:"$SKELS"/gnc.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
/* User code: This file will not be overwritten by TASTE. */
#include "calling.h"
#include <string.h>
#include <stdio.h>
char p_szGlobalState[] = "modeX";
#define FPGA_READY "ready"
#define FPGA_RECONFIGURING "reconfiguring"
#define FPGA_ERROR "error"
#define FPGA_DISABLED "disabled"
char globalFpgaStatus_gnc[] = FPGA_READY;
void calling_startup()
{
/* Write your initialization code here,
but do not make any call to a required interface. */
printf("\n[calling_startup] Starting up ...\n");
}
void calling_PI_pulse()
{
/* Write your code here! */
printf("\n[calling_PI_pulse] Current mode is %s\n", p_szGlobalState);
static asn1SccSeq3 in1 = {0,0,0};
static asn1SccSeq3 in2 = {1,1,1};
static asn1SccSeq4 in3 = {2,2,2,2};
static asn1SccIn_Nested inn = {{3,3,3,3}, {4,4,4}};
asn1SccSeqout out1 = {0,0,0,0,0,0,0,0};
asn1SccOut_Nested outn = {{0,0,0,0,0,0,0}};
printf("[calling_PI_pulse] Calling 'do_something'\n");
calling_RI_do_something(&in1, &in2, &in3, &inn, &out1, &outn);
printf("[calling_PI_pulse] Sent: %lld %lld %lld\n", in1.arr[0], in1.arr[1], in1.arr[2]);
printf("[calling_PI_pulse] Sent: %lld %lld %lld\n", in2.arr[0], in2.arr[1], in2.arr[2]);
printf("[calling_PI_pulse] Sent: %lld %lld %lld %lld\n", in3.arr[0], in3.arr[1], in3.arr[2], in3.arr[3]);
printf("[calling_PI_pulse] Sent: {%lld %lld %lld %lld - %lld %lld %lld}\n\n", inn.inest_a.arr[0], inn.inest_a.arr[1], inn.inest_a.arr[2], inn.inest_a.arr[3], inn.inest_b.arr[0], inn.inest_b.arr[1], inn.inest_b.arr[2]);
printf("[calling_PI_pulse] Received: %lld %lld %lld %lld %lld %lld %lld %lld\n", out1.arr[0], out1.arr[1], out1.arr[2], out1.arr[3], out1.arr[4], out1.arr[5], out1.arr[6], out1.arr[7]);
printf("[calling_PI_pulse] Received: {%lld %lld %lld %lld %lld %lld %lld}\n", outn.onest_a.arr[0], outn.onest_a.arr[1], outn.onest_a.arr[2], outn.onest_a.arr[3], outn.onest_a.arr[4], outn.onest_a.arr[5], outn.onest_a.arr[6]);
in1.arr[0]++; in1.arr[1]++; in1.arr[2]++;
in2.arr[0]++; in2.arr[1]++; in2.arr[2]++;
in3.arr[0]++; in3.arr[1]++; in3.arr[2]++; in3.arr[3]++;
inn.inest_a.arr[0]++; inn.inest_a.arr[1]++; inn.inest_a.arr[2]++; inn.inest_a.arr[3]++; inn.inest_b.arr[0]++; inn.inest_b.arr[1]++; inn.inest_b.arr[2]++;
}
/* 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_calling__
#define __USER_CODE_H_calling__
#include "C_ASN1_Types.h"
#ifdef __cplusplus
extern "C" {
#endif
void calling_startup();
void calling_PI_pulse();
extern void calling_RI_do_something(const asn1SccSeq3 *,
const asn1SccSeq3 *,
const asn1SccSeq4 *,
const asn1SccIn_Nested *,
asn1SccSeqout *,
asn1SccOut_Nested *);
#ifdef __cplusplus
}
#endif
#endif
This diff is collapsed.
#ifndef GENERATED_ASN1SCC_dataview_uniq_H
#define GENERATED_ASN1SCC_dataview_uniq_H
/*
Code automatically generated by asn1scc tool
*/
#include "asn1crt.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef asn1SccSint asn1SccT_Int32;
flag asn1SccT_Int32_Equal(const asn1SccT_Int32* pVal1, const asn1SccT_Int32* pVal2);
void asn1SccT_Int32_Initialize(asn1SccT_Int32* pVal);
#define ERR_T_INT32 1 /**/
flag asn1SccT_Int32_IsConstraintValid(const asn1SccT_Int32* pVal, int* pErrCode);
#define ERR_UPER_ENCODE_T_INT32 2 /**/
#define asn1SccT_Int32_REQUIRED_BYTES_FOR_ENCODING 4
#define asn1SccT_Int32_REQUIRED_BITS_FOR_ENCODING 32
flag asn1SccT_Int32_Encode(const asn1SccT_Int32* pVal, BitStream* pBitStrm, int* pErrCode, flag bCheckConstraints);
#define ERR_UPER_DECODE_T_INT32 3 /**/
flag asn1SccT_Int32_Decode(asn1SccT_Int32* pVal, BitStream* pBitStrm, int* pErrCode);
typedef struct {
asn1SccT_Int32 arr[4];
} asn1SccIn_Nested_inest_a;
typedef struct {
asn1SccT_Int32 arr[3];
} asn1SccIn_Nested_inest_b;
typedef struct {
asn1SccIn_Nested_inest_a inest_a;
asn1SccIn_Nested_inest_b inest_b;
} asn1SccIn_Nested;
flag asn1SccIn_Nested_inest_a_Equal(const asn1SccIn_Nested_inest_a* pVal1, const asn1SccIn_Nested_inest_a* pVal2);
flag asn1SccIn_Nested_inest_b_Equal(const asn1SccIn_Nested_inest_b* pVal1, const asn1SccIn_Nested_inest_b* pVal2);
flag asn1SccIn_Nested_Equal(const asn1SccIn_Nested* pVal1, const asn1SccIn_Nested* pVal2);
void asn1SccIn_Nested_inest_a_Initialize(asn1SccIn_Nested_inest_a* pVal);
void asn1SccIn_Nested_inest_b_Initialize(asn1SccIn_Nested_inest_b* pVal);