Commit eb7f9976 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files
parents 4b58a492 bc743141
called.zip
called2.zip
caller.zip
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)
-- Simple types:
MyInteger ::= INTEGER (0..255)
-- MyReal ::= REAL (0.0 .. 1000.0)
-- MyBool ::= BOOLEAN
MissionPhase ::= ENUMERATED { phase1, phase2 }
FpgaConfiguration ::= ENUMERATED { confA, confB }
-- 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::caller;
WITH interfaceview::IV::called;
WITH interfaceview::IV::called2;
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_caller : SYSTEM interfaceview::IV::caller::caller.others {
Taste::FunctionName => "caller";
};
IV_called : SYSTEM interfaceview::IV::called::called.others {
Taste::FunctionName => "called";
};
IV_called2 : SYSTEM interfaceview::IV::called2::called2.others {
Taste::FunctionName => "called2";
};
gr740_partition : PROCESS deploymentview::DV::Node1::gr740_partition.others {
Taste::coordinates => "110835 68609 161127 91912";
Deployment::Port_Number => 0;
};
gr740_rcc13rc5_posix : PROCESSOR ocarina_processors_leon::gr740.rcc13rc5_posix {
Taste::coordinates => "104548 61951 167413 95241";
};
PROPERTIES
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_caller;
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_called;
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_called2;
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 => "96690 52440 175271 99997";
};
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::caller
PUBLIC
WITH interfaceview::IV::called;
WITH interfaceview::IV::called2;
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 PI_switch_state
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_switch_state;
SUBPROGRAM IMPLEMENTATION PI_switch_state.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_switch_state.others;
SUBPROGRAM RI_compute_something
FEATURES
inp : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
outp : OUT PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
END RI_compute_something;
SUBPROGRAM IMPLEMENTATION RI_compute_something.others
END RI_compute_something.others;
SUBPROGRAM RI_compute_something2
FEATURES
inp1 : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
inp2 : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
outp : OUT PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
END RI_compute_something2;
SUBPROGRAM IMPLEMENTATION RI_compute_something2.others
END RI_compute_something2.others;
SYSTEM caller
FEATURES
PI_pulse : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::caller::PI_pulse.others {
Taste::coordinates => "107872 49920";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 1000 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "pulse";
};
PI_switch_state : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::caller::PI_switch_state.others {
Taste::coordinates => "117322 49920";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 10000 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "switch_state";
};
RI_compute_something : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::called::PI_compute_something.others {
Taste::coordinates => "138264 56220";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "compute_something";
Taste::labelInheritance => "true";
};
RI_compute_something2 : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::called2::PI_compute_something2.others {
Taste::coordinates => "138264 71970";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "compute_something2";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
END caller;
SYSTEM IMPLEMENTATION caller.others
END caller.others;
END interfaceview::IV::caller;
PACKAGE interfaceview::IV::called
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_compute_something
FEATURES
inp : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
outp : OUT PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_compute_something;
SUBPROGRAM IMPLEMENTATION PI_compute_something.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_compute_something.others;
SYSTEM called
FEATURES
PI_compute_something : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::called::PI_compute_something.others {
Taste::coordinates => "157949 58425";
Taste::RCMoperationKind => protected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "compute_something";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
END called;
SYSTEM IMPLEMENTATION called.others
END called.others;
END interfaceview::IV::called;
PACKAGE interfaceview::IV::called2
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_compute_something2
FEATURES
inp1 : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
inp2 : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
outp : OUT PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_compute_something2;
SUBPROGRAM IMPLEMENTATION PI_compute_something2.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_compute_something2.others;
SYSTEM called2
FEATURES
PI_compute_something2 : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::called2::PI_compute_something2.others {
Taste::coordinates => "143308 85038";
Taste::RCMoperationKind => protected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "compute_something2";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
END called2;
SYSTEM IMPLEMENTATION called2.others
END called2.others;
END interfaceview::IV::called2;
PACKAGE interfaceview::IV
PUBLIC
WITH interfaceview::IV::caller;
WITH interfaceview::IV::called;
WITH interfaceview::IV::called2;
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
caller : SYSTEM interfaceview::IV::caller::caller.others {
Taste::coordinates => "103147 49920 138264 74014";
};
called : SYSTEM interfaceview::IV::called::called.others {
Taste::coordinates => "157949 53700 193223 78109";
TASTE_IV_Properties::FPGA_Configurations => "modeC,modeZ,modeB";
};
called2 : SYSTEM interfaceview::IV::called2::called2.others {
Taste::coordinates => "114958 85038 153854 105352";
TASTE_IV_Properties::FPGA_Configurations => "modeA";
};
CONNECTIONS
called_PI_compute_something_caller_RI_compute_something : SUBPROGRAM ACCESS called.PI_compute_something -> caller.RI_compute_something {
Taste::coordinates => "138264 56220 148106 56220 148106 58425 157949 58425";
};
called2_PI_compute_something2_caller_RI_compute_something2 : SUBPROGRAM ACCESS called2.PI_compute_something2 -> caller.RI_compute_something2 {
Taste::coordinates => "138264 71970 143308 71970 143308 85038";
};
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 caller.zip && zip -r caller caller/* && cd $OLDPWD || exit -1
cd "$SKELS" && rm -f called.zip && zip -r called called/* && cd $OLDPWD || exit -1
cd "$SKELS" && rm -f called2.zip && zip -r called2 called2/* && 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 caller:"$SKELS"/caller.zip \
--subC called:"$SKELS"/called.zip \
--subC called2:"$SKELS"/called2.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 "called.h"
#include <stdio.h>
#define FPGA_READY "ready"
#define FPGA_RECONFIGURING "reconfiguring"
#define FPGA_ERROR "error"
#define FPGA_DISABLED "disabled"
char globalFpgaStatus_called[] = FPGA_READY;
void called_startup()
{
/* Write your initialization code here,
but do not make any call to a required interface. */
printf("[called_startup] Starting up ... \n");
}
void called_PI_compute_something(const asn1SccMyInteger *IN_inp,
asn1SccMyInteger *OUT_outp)
{
printf("[called_PI_compute_something] Computing +1\n");
*OUT_outp = *IN_inp + 1;
}
/* 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_called__
#define __USER_CODE_H_called__
#include "C_ASN1_Types.h"
#ifdef __cplusplus
extern "C" {
#endif
void called_startup();
void called_PI_compute_something(const asn1SccMyInteger *,
asn1SccMyInteger *);
#ifdef __cplusplus
}
#endif
#endif
#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;
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 asn1SccUint asn1SccT_UInt32;
void asn1SccT_UInt32_Initialize(asn1SccT_UInt32* pVal);
#define ERR_T_UINT32 8 /**/
flag asn1SccT_UInt32_IsConstraintValid(const asn1SccT_UInt32* pVal, int* pErrCode);
#define ERR_UPER_ENCODE_T_UINT32 9 /**/
#define asn1SccT_UInt32_REQUIRED_BYTES_FOR_ENCODING 4
#define asn1SccT_UInt32_REQUIRED_BITS_FOR_ENCODING 32
flag asn1SccT_UInt32_Encode(const asn1SccT_UInt32* pVal, BitStream* pBitStrm, int* pErrCode, flag bCheckConstraints);
#define ERR_UPER_DECODE_T_UINT32 10 /**/
flag asn1SccT_UInt32_Decode(asn1SccT_UInt32* pVal, BitStream* pBitStrm, int* pErrCode);
typedef asn1SccSint asn1SccT_Int8;
void asn1SccT_Int8_Initialize(asn1SccT_Int8* pVal);
#define ERR_T_INT8 15 /**/
flag asn1SccT_Int8_IsConstraintValid(const asn1SccT_Int8* pVal, int* pErrCode);
#define ERR_UPER_ENCODE_T_INT8 16 /**/
#define asn1SccT_Int8_REQUIRED_BYTES_FOR_ENCODING 1
#define asn1SccT_Int8_REQUIRED_BITS_FOR_ENCODING 8
flag asn1SccT_Int8_Encode