Commit 8e01ce56 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files

Endeavoring to clean the Augean stables of misc/

parent 3cdfb024
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${DIR}/common.sh
# Setup the tools in ${PREFIX}/bin
cd $DIR/../qemu-Leon3 || exit 1
cp -u qemu-Leon3/qemu-Leon3*.sh ${PREFIX}/bin/
# Add Leon simulators to PATH
PATH_CMD='export PATH=$PATH:'"${PREFIX}/bin"
UpdatePATH
......@@ -13,5 +13,6 @@ done
cd ${PREFIX}/bin/ || exit 1
[ ! -h assert-builder-ocarina.py ] && ln -s taste_orchestrator.py assert-builder-ocarina.py
# In case the '-h' above already found the symlink.
exit 0
# Add to PATH
PATH_CMD='export PATH=$PATH:'"${PREFIX}/bin"
UpdatePATH
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${DIR}/common.sh
# ELLIDISS?=/opt/Ellidiss-TASTE-linux
# taste-config
mkdir -p ${PREFIX}/bin
sed -e "s:INSTALL_PREFIX:${PREFIX}:g" taste-config.pl > taste-config.pl.tmp
cp taste-config.pl.tmp ${PREFIX}/bin/taste-config
# TASTE-Directives.asn
mkdir -p ${PREFIX}/share/taste
cp taste-directives/TASTE-Directives.asn ${PREFIX}/share/taste/TASTE-Directives.asn || exit 1
# Gnuplot
cp gnuplot/driveGnuPlotsStreams.pl ${PREFIX}/bin/taste-gnuplot-streams
# PeekPoke component
mkdir -p ${PREFIX}/share/peekpoke
mkdir -p ${PREFIX}/share/peekpoke/component
cp peek-poke/peekpoke.py ${PREFIX}/share/peekpoke/peekpoke.py
cp peek-poke/PeekPoke.glade ${PREFIX}/share/peekpoke/PeekPoke.glade
for i in DataView.aadl DataView.asn export_PeekPoke.aadl taste_probe.zip ; do \
cp peek-poke/component/$$i ${PREFIX}/share/peekpoke/component/$$i ; \
done
mkdir -p ${PREFIX}/share/config_ellidiss
cp ellidiss/*.tcl $(ELLIDISS)/config/externalTools
cp ellidiss/TASTE_IV_Properties.aadl ${PREFIX}/share/config_ellidiss
cp ellidiss/TASTE_DV_Properties.aadl ${PREFIX}/share/config_ellidiss
sudo cp ellidiss/IVConfig.ini /opt/Ellidiss-TASTE-linux/config/
mkdir -p ${PREFIX}/share/taste-types
cp taste-common-types/taste-types.asn ${PREFIX}/share/taste-types
cp -rf config-files/.kde ~/
cd git-transition/ && ./local_install.sh
ln -sf $(HOME)/.local/bin/opengeode ${PREFIX}/bin/opengeode
$(MAKE) -C qemu-Leon3 || exit 1
#!/usr/bin/perl -w
use strict;
select((select(STDOUT), $| = 1)[0]);
open DATA, "/home/assert/Demo_Simulink/binary.linux/binaries/mygui_GUI |";
my $data0 = "0";
my $data1 = "0";
while(<DATA>) {
if (/^togui::gui_in::myint\D+(\d+)/) {
print "0:$1\n";
}
elsif (/^togui::gui_in::myseq::y\D+(\d+)/) {
print "1:$1\n";
}
}
close DATA;
#!/usr/bin/perl -w
use strict;
sub usage {
print "Usage: $0 <options>\n";
print <<OEF;
where options are (in order):
NumberOfStreams How many streams to plot (windows)
Stream1_WindowSampleSize <Stream2...> This many window samples for each stream
Stream1_Title <Stream2_Title> ... Title used for each stream
Stream1_geometry <Stream2_geometry>... X and Y position in pixels from the top left
The last parameters (geometries) are of the form: WIDTHxHEIGHT+XOFF+YOFF
OEF
exit(1);
}
sub Arg {
if ($#ARGV < $_[0]) {
print "Expected parameter missing...\n\n";
usage;
}
$ARGV[int($_[0])];
}
sub main {
my $argIdx = 0;
my $numberOfStreams = Arg($argIdx++);
print "Will display $numberOfStreams Streams (in $numberOfStreams windows)...\n";
my @sampleSizes;
for(my $i=0; $i<$numberOfStreams; $i++) {
my $samples = Arg($argIdx++);
push @sampleSizes, $samples;
print "Stream ".($i+1)." will use a window of $samples samples\n";
}
my @titles;
for(my $i=0; $i<$numberOfStreams; $i++) {
my $title = Arg($argIdx++);
push @titles, $title;
print "Stream ".($i+1)." will use a title of '$title'\n";
}
my @geometries;
for(my $i=0; $i<$numberOfStreams; $i++) {
my $geometry = Arg($argIdx++);
push @geometries, $geometry;
print "Stream ".($i+1)." will use a geometry of '$geometry'\n";
}
my $terminal = "";
open GNUPLOT_TERM, "echo 'show terminal;' | gnuplot 2>&1 |";
while (<GNUPLOT_TERM>) {
if (m/terminal type is (\w+)/) {
$terminal=$1;
}
}
close GNUPLOT_TERM;
# unfortunately, the wxt terminal type does not support positioning.
# hardcode it...
$terminal = "x11";
my @gnuplots;
my @buffers;
my @xcounters;
shift @ARGV; # number of streams
for(my $i=0; $i<$numberOfStreams; $i++) {
shift @ARGV; # sample size
shift @ARGV; # miny
shift @ARGV; # maxy
shift @ARGV; # title
shift @ARGV; # geometry
local *PIPE;
my $geometry = $geometries[$i];
open PIPE, "|gnuplot -geometry $geometry" || die "Can't initialize gnuplot number ".($i+1)."\n";
select((select(PIPE), $| = 1)[0]);
push @gnuplots, *PIPE;
print PIPE "set xtics\n";
print PIPE "set ytics\n";
print PIPE "set style data linespoints\n";
print PIPE "set grid\n";
if ($numberOfStreams == 1) {
print PIPE "set terminal $terminal title '".$titles[0]."' noraise\n";
} else {
print PIPE "set terminal $terminal noraise\n";
}
print PIPE "set autoscale\n";
my @data = [];
push @buffers, @data;
push @xcounters, 0;
}
my $streamIdx = 0;
select((select(STDOUT), $| = 1)[0]);
while(<>) {
chomp;
my @parts = split /:/;
$streamIdx = $parts[0];
my $buf = $buffers[$streamIdx];
my $pip = $gnuplots[$streamIdx];
my $xcounter = $xcounters[$streamIdx];
my $title = $titles[$streamIdx];
# data buffering (up to stream sample size)
push @{$buf}, $parts[1];
#print "stream $streamIdx: ";
print $pip "set xrange [".($xcounter-$sampleSizes[$streamIdx]).":".($xcounter+1)."]\n";
if ($numberOfStreams == 1) {
print $pip "plot \"-\"\n";
} else {
print $pip "plot \"-\" title '$title'\n";
}
my $cnt = 0;
for my $elem (reverse @{$buf}) {
#print " ".$elem;
print $pip ($xcounter-$cnt)." ".$elem."\n";
$cnt += 1;
}
#print "\n";
print $pip "e\n";
if ($cnt>=$sampleSizes[$streamIdx]) {
shift @{$buf};
}
$xcounters[$streamIdx]++;
}
for(my $i=0; $i<$numberOfStreams; $i++) {
my $pip = $gnuplots[$i];
print $pip "exit;\n";
close $pip;
}
}
main;
This diff is collapsed.
--------------------------------------------------------
--! File generated by asn2aadl v1.2160: DO NOT EDIT !
--------------------------------------------------------
package DataView
public
-- No more private heap required (we use the space certified compiler)
-- Memory_Required: 0
DATA TASTE_Peek_id
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
Ada_Package_Name => "TASTE_MONITORING";
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 B;
-- name of the corresponding data type in the source file:
Type_Source_Name => "TASTE-Peek-id";
-- what kind of type is this?
assert_properties::ASN1_Basic_Type =>aINTEGER;
END TASTE_Peek_id;
DATA TASTE_Peek_id_Buffer_Max
END TASTE_Peek_id_Buffer_Max;
DATA IMPLEMENTATION TASTE_Peek_id_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TASTE_Peek_id
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Data_Model::Base_Type => (data ASSERT_Types::Stream_Element);
END TASTE_Peek_id_Buffer_Max.impl;
DATA TASTE_Peek_id_Buffer
END TASTE_Peek_id_Buffer;
DATA IMPLEMENTATION TASTE_Peek_id_Buffer.impl
-- Buffer to hold a marshalled data of type TASTE_Peek_id
SUBCOMPONENTS
Buffer : data TASTE_Peek_id_Buffer_Max.impl;
Length : data Base_Types::uint16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TASTE_Peek_id_Buffer.impl;
DATA TASTE_Monitoring_list
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
Ada_Package_Name => "TASTE_MONITORING";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 1064; suggested aligned message buffer is...
Source_Data_Size => 1064 B;
-- name of the corresponding data type in the source file:
Type_Source_Name => "TASTE-Monitoring-list";
-- what kind of type is this?
assert_properties::ASN1_Basic_Type =>aSEQUENCEOF;
END TASTE_Monitoring_list;
DATA TASTE_Monitoring_list_Buffer_Max
END TASTE_Monitoring_list_Buffer_Max;
DATA IMPLEMENTATION TASTE_Monitoring_list_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TASTE_Monitoring_list
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (1064); -- Size of the buffer
Data_Model::Base_Type => (data ASSERT_Types::Stream_Element);
END TASTE_Monitoring_list_Buffer_Max.impl;
DATA TASTE_Monitoring_list_Buffer
END TASTE_Monitoring_list_Buffer;
DATA IMPLEMENTATION TASTE_Monitoring_list_Buffer.impl
-- Buffer to hold a marshalled data of type TASTE_Monitoring_list
SUBCOMPONENTS
Buffer : data TASTE_Monitoring_list_Buffer_Max.impl;
Length : data Base_Types::uint16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TASTE_Monitoring_list_Buffer.impl;
DATA TASTE_Monitoring_value
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
Ada_Package_Name => "TASTE_MONITORING";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 20; suggested aligned message buffer is...
Source_Data_Size => 24 B;
-- name of the corresponding data type in the source file:
Type_Source_Name => "TASTE-Monitoring-value";
-- what kind of type is this?
assert_properties::ASN1_Basic_Type =>aCHOICE;
END TASTE_Monitoring_value;
DATA TASTE_Monitoring_value_Buffer_Max
END TASTE_Monitoring_value_Buffer_Max;
DATA IMPLEMENTATION TASTE_Monitoring_value_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TASTE_Monitoring_value
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (24); -- Size of the buffer
Data_Model::Base_Type => (data ASSERT_Types::Stream_Element);
END TASTE_Monitoring_value_Buffer_Max.impl;
DATA TASTE_Monitoring_value_Buffer
END TASTE_Monitoring_value_Buffer;
DATA IMPLEMENTATION TASTE_Monitoring_value_Buffer.impl
-- Buffer to hold a marshalled data of type TASTE_Monitoring_value
SUBCOMPONENTS
Buffer : data TASTE_Monitoring_value_Buffer_Max.impl;
Length : data Base_Types::uint16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TASTE_Monitoring_value_Buffer.impl;
DATA TASTE_Peek_list
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
Ada_Package_Name => "TASTE_MONITORING";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 184; suggested aligned message buffer is...
Source_Data_Size => 184 B;
-- name of the corresponding data type in the source file:
Type_Source_Name => "TASTE-Peek-list";
-- what kind of type is this?
assert_properties::ASN1_Basic_Type =>aSEQUENCEOF;
END TASTE_Peek_list;
DATA TASTE_Peek_list_Buffer_Max
END TASTE_Peek_list_Buffer_Max;
DATA IMPLEMENTATION TASTE_Peek_list_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TASTE_Peek_list
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (184); -- Size of the buffer
Data_Model::Base_Type => (data ASSERT_Types::Stream_Element);
END TASTE_Peek_list_Buffer_Max.impl;
DATA TASTE_Peek_list_Buffer
END TASTE_Peek_list_Buffer;
DATA IMPLEMENTATION TASTE_Peek_list_Buffer.impl
-- Buffer to hold a marshalled data of type TASTE_Peek_list
SUBCOMPONENTS
Buffer : data TASTE_Peek_list_Buffer_Max.impl;
Length : data Base_Types::uint16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TASTE_Peek_list_Buffer.impl;
DATA TASTE_Poke_list
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
Ada_Package_Name => "TASTE_MONITORING";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 1064; suggested aligned message buffer is...
Source_Data_Size => 1064 B;
-- name of the corresponding data type in the source file:
Type_Source_Name => "TASTE-Poke-list";
-- what kind of type is this?
assert_properties::ASN1_Basic_Type =>aSEQUENCEOF;
END TASTE_Poke_list;
DATA TASTE_Poke_list_Buffer_Max
END TASTE_Poke_list_Buffer_Max;
DATA IMPLEMENTATION TASTE_Poke_list_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TASTE_Poke_list
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (1064); -- Size of the buffer
Data_Model::Base_Type => (data ASSERT_Types::Stream_Element);
END TASTE_Poke_list_Buffer_Max.impl;
DATA TASTE_Poke_list_Buffer
END TASTE_Poke_list_Buffer;
DATA IMPLEMENTATION TASTE_Poke_list_Buffer.impl
-- Buffer to hold a marshalled data of type TASTE_Poke_list
SUBCOMPONENTS
Buffer : data TASTE_Poke_list_Buffer_Max.impl;
Length : data Base_Types::uint16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TASTE_Poke_list_Buffer.impl;
DATA TASTE_Peek_id_list
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
Ada_Package_Name => "TASTE_MONITORING";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 84; suggested aligned message buffer is...
Source_Data_Size => 88 B;
-- name of the corresponding data type in the source file:
Type_Source_Name => "TASTE-Peek-id-list";
-- what kind of type is this?
assert_properties::ASN1_Basic_Type =>aSEQUENCEOF;
END TASTE_Peek_id_list;
DATA TASTE_Peek_id_list_Buffer_Max
END TASTE_Peek_id_list_Buffer_Max;
DATA IMPLEMENTATION TASTE_Peek_id_list_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TASTE_Peek_id_list
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (88); -- Size of the buffer
Data_Model::Base_Type => (data ASSERT_Types::Stream_Element);
END TASTE_Peek_id_list_Buffer_Max.impl;
DATA TASTE_Peek_id_list_Buffer
END TASTE_Peek_id_list_Buffer;
DATA IMPLEMENTATION TASTE_Peek_id_list_Buffer.impl
-- Buffer to hold a marshalled data of type TASTE_Peek_id_list
SUBCOMPONENTS
Buffer : data TASTE_Peek_id_list_Buffer_Max.impl;
Length : data Base_Types::uint16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TASTE_Peek_id_list_Buffer.impl;
DATA TASTE_Monitoring
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
Ada_Package_Name => "TASTE_MONITORING";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 212; suggested aligned message buffer is...
Source_Data_Size => 216 B;
-- name of the corresponding data type in the source file:
Type_Source_Name => "TASTE-Monitoring";
-- what kind of type is this?
assert_properties::ASN1_Basic_Type =>aSEQUENCE;
END TASTE_Monitoring;
DATA TASTE_Monitoring_Buffer_Max
END TASTE_Monitoring_Buffer_Max;
DATA IMPLEMENTATION TASTE_Monitoring_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TASTE_Monitoring
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (216); -- Size of the buffer
Data_Model::Base_Type => (data ASSERT_Types::Stream_Element);
END TASTE_Monitoring_Buffer_Max.impl;
DATA TASTE_Monitoring_Buffer
END TASTE_Monitoring_Buffer;
DATA IMPLEMENTATION TASTE_Monitoring_Buffer.impl
-- Buffer to hold a marshalled data of type TASTE_Monitoring
SUBCOMPONENTS
Buffer : data TASTE_Monitoring_Buffer_Max.impl;
Length : data Base_Types::uint16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TASTE_Monitoring_Buffer.impl;
DATA TASTE_Peek
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
Ada_Package_Name => "TASTE_MONITORING";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 36; suggested aligned message buffer is...
Source_Data_Size => 40 B;
-- name of the corresponding data type in the source file:
Type_Source_Name => "TASTE-Peek";
-- what kind of type is this?
assert_properties::ASN1_Basic_Type =>aSEQUENCE;
END TASTE_Peek;
DATA TASTE_Peek_Buffer_Max
END TASTE_Peek_Buffer_Max;
DATA IMPLEMENTATION TASTE_Peek_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TASTE_Peek
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (40); -- Size of the buffer
Data_Model::Base_Type => (data ASSERT_Types::Stream_Element);
END TASTE_Peek_Buffer_Max.impl;
DATA TASTE_Peek_Buffer
END TASTE_Peek_Buffer;
DATA IMPLEMENTATION TASTE_Peek_Buffer.impl
-- Buffer to hold a marshalled data of type TASTE_Peek
SUBCOMPONENTS
Buffer : data TASTE_Peek_Buffer_Max.impl;
Length : data Base_Types::uint16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TASTE_Peek_Buffer.impl;
DATA TASTE_Peek_limit
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
Ada_Package_Name => "TASTE_MONITORING";
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 B;
-- name of the corresponding data type in the source file:
Type_Source_Name => "TASTE-Peek-limit";
-- what kind of type is this?
assert_properties::ASN1_Basic_Type =>aINTEGER;
END TASTE_Peek_limit;
DATA TASTE_Peek_limit_Buffer_Max
END TASTE_Peek_limit_Buffer_Max;
DATA IMPLEMENTATION TASTE_Peek_limit_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TASTE_Peek_limit
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Data_Model::Base_Type => (data ASSERT_Types::Stream_Element);
END TASTE_Peek_limit_Buffer_Max.impl;
DATA TASTE_Peek_limit_Buffer
END TASTE_Peek_limit_Buffer;
DATA IMPLEMENTATION TASTE_Peek_limit_Buffer.impl
-- Buffer to hold a marshalled data of type TASTE_Peek_limit
SUBCOMPONENTS
Buffer : data TASTE_Peek_limit_Buffer_Max.impl;
Length : data Base_Types::uint16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TASTE_Peek_limit_Buffer.impl;
end DataView;
TASTE-MONITORING DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
TASTE-Peek ::= SEQUENCE {
base-address INTEGER (0..4294967295), -- 32bits type
offset INTEGER (-2147483648..2147483647),
base-type ENUMERATED { int-32, int-64, real-single, real-double, octet-string },
nb-of-elements INTEGER (1..10), -- nb-of-elements EXCEPT for octet-string (1 element)
sample-time INTEGER (0..15) -- in seconds
}
TASTE-Peek-list ::= SEQUENCE (SIZE (0..5)) OF TASTE-Peek
TASTE-Peek-id ::= INTEGER (0..4294967295)
TASTE-Peek-id-list ::= SEQUENCE (SIZE (1..10)) OF TASTE-Peek-id
TASTE-Monitoring-value ::= CHOICE {
int-32 INTEGER (-2147483648 .. 2147483647) ,
int-64 INTEGER (-9223372036854775807 .. 9223372036854775807),
real-single REAL (-100000000000000000000000000000000000000.0 .. 100000000000000000000000000000000000000.0),
real-double REAL (-100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0 .. 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0),
octet-string OCTET STRING (SIZE (0..10))
}
-- Result: memory value
TASTE-Monitoring ::= SEQUENCE {
id TASTE-Peek-id,
values SEQUENCE (SIZE (1..10)) OF TASTE-Monitoring-value
}