mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
remove some obsolete scripts
This commit is contained in:
parent
3f74f036ea
commit
3397bca19b
5 changed files with 0 additions and 8571 deletions
|
@ -1,146 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Rewrite Git history
|
||||
#
|
||||
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
||||
# @copyright 2017, Institute for Automation of Complex Power Systems, EONERC
|
||||
# @license GNU General Public License (version 3)
|
||||
#
|
||||
# VILLASnode
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
||||
#git filter-branch --tree-filter "find . -type f -print0 | xargs -0 sed -i 's/subdomainA\.example\.com/subdomainB.example.com/g'" -- --all
|
||||
|
||||
#git filter-branch \
|
||||
# --index-filter 'git rm --cached --ignore-unmatch COPYING' \
|
||||
# --index-filter 'git rm --cached --ignore-unmatch COPYING.md' \
|
||||
# --index-filter 'git rm --cached --ignore-unmatch LICENSE' \
|
||||
# --index-filter 'git rm --cached --ignore-unmatch LICENSE.md' -- --all
|
||||
|
||||
git filter-branch --force --prune-empty \
|
||||
--tag-name-filter cat \
|
||||
--index-filter 'git rm --cached --ignore-unmatch COPYING.md' \
|
||||
--tree-filter ~/workspace/rwth/villas/remove_lgpl.sh \
|
||||
--env-filter '
|
||||
CORRECT_NAME="Steffen Vogel"
|
||||
CORRECT_EMAIL="stvogel@eonerc.rwth-aachen.de"
|
||||
|
||||
OLD_EMAIL="noreply@github.com"
|
||||
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_COMMITTER_NAME="$CORRECT_NAME"
|
||||
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_AUTHOR_NAME="$CORRECT_NAME"
|
||||
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
|
||||
OLD_EMAIL="StVogel@eonerc.rwth-aachen.de"
|
||||
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_COMMITTER_NAME="$CORRECT_NAME"
|
||||
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_AUTHOR_NAME="$CORRECT_NAME"
|
||||
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
|
||||
OLD_EMAIL="steffen.vogel@rwth-aachen.de"
|
||||
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_COMMITTER_NAME="$CORRECT_NAME"
|
||||
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_AUTHOR_NAME="$CORRECT_NAME"
|
||||
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
|
||||
OLD_EMAIL="post@steffenvogel.de"
|
||||
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_COMMITTER_NAME="$CORRECT_NAME"
|
||||
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_AUTHOR_NAME="$CORRECT_NAME"
|
||||
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
|
||||
CORRECT_NAME="Umar Farooq"
|
||||
CORRECT_EMAIL="ufarooq@eonerc.rwth-aachen.de"
|
||||
|
||||
OLD_EMAIL="UFarooq@eonerc.rwth-aachen.de"
|
||||
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_COMMITTER_NAME="$CORRECT_NAME"
|
||||
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_AUTHOR_NAME="$CORRECT_NAME"
|
||||
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
|
||||
OLD_EMAIL="umar.farooq@rwth-aachen.de"
|
||||
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_COMMITTER_NAME="$CORRECT_NAME"
|
||||
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_AUTHOR_NAME="$CORRECT_NAME"
|
||||
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
|
||||
CORRECT_NAME="Marija Stevic"
|
||||
CORRECT_EMAIL="mstevic@eonerc.rwth-aachen.de"
|
||||
|
||||
OLD_EMAIL="mstevic@users.noreply.github.com"
|
||||
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_COMMITTER_NAME="$CORRECT_NAME"
|
||||
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_AUTHOR_NAME="$CORRECT_NAME"
|
||||
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
|
||||
OLD_EMAIL="marija.stevic@eonerc.rwth-aachen.de"
|
||||
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_COMMITTER_NAME="$CORRECT_NAME"
|
||||
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_AUTHOR_NAME="$CORRECT_NAME"
|
||||
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
|
||||
OLD_EMAIL="msv@E098.eonerc.rwth-aachen.de"
|
||||
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_COMMITTER_NAME="$CORRECT_NAME"
|
||||
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_AUTHOR_NAME="$CORRECT_NAME"
|
||||
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
|
||||
OLD_EMAIL="msv@E250.eonerc.rwth-aachen.de"
|
||||
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_COMMITTER_NAME="$CORRECT_NAME"
|
||||
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]; then
|
||||
export GIT_AUTHOR_NAME="$CORRECT_NAME"
|
||||
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
|
||||
fi
|
||||
' -- --all
|
|
@ -1,200 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
Author: Daniel Krebs <github@daniel-krebs.net>
|
||||
Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
|
||||
License: GNU General Public License (version 3)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
from lxml import etree
|
||||
import zipfile
|
||||
import sys
|
||||
import re
|
||||
import json
|
||||
|
||||
whitelist = [
|
||||
[ 'xilinx.com', 'ip', 'axi_timer' ],
|
||||
[ 'xilinx.com', 'ip', 'axis_switch' ],
|
||||
[ 'xilinx.com', 'ip', 'axi_fifo_mm_s' ],
|
||||
[ 'xilinx.com', 'ip', 'axi_dma' ],
|
||||
[ 'acs.eonerc.rwth-aachen.de', 'user', 'axi_pcie_intc' ],
|
||||
[ 'acs.eonerc.rwth-aachen.de', 'user', 'rtds_axis' ],
|
||||
[ 'acs.eonerc.rwth-aachen.de', 'hls' ],
|
||||
[ 'acs.eonerc.rwth-aachen.de', 'sysgen' ],
|
||||
[ 'xilinx.com', 'ip', 'axi_gpio' ],
|
||||
[ 'xilinx.com', 'ip', 'axi_bram_ctrl' ]
|
||||
]
|
||||
|
||||
# List of VLNI ids of AXI4-Stream infrastructure IP cores which do not alter data
|
||||
# see PG085 (AXI4-Stream Infrastructure IP Suite v2.2)
|
||||
axi_converter_whitelist = [
|
||||
[ 'xilinx.com', 'ip', 'axis_subset_converter' ],
|
||||
[ 'xilinx.com', 'ip', 'axis_clock_converter' ],
|
||||
[ 'xilinx.com', 'ip', 'axis_register_slice' ],
|
||||
[ 'xilinx.com', 'ip', 'axis_data_fifo' ],
|
||||
[ 'xilinx.com', 'ip', 'axis_dwidth_converter' ],
|
||||
[ 'xilinx.com', 'ip', 'axis_register_slice' ]
|
||||
]
|
||||
|
||||
opponent = {
|
||||
'MASTER' : ('SLAVE', 'TARGET'),
|
||||
'SLAVE' : ('MASTER', 'INITIATOR'),
|
||||
'INITIATOR' : ('TARGET', 'SLAVE'),
|
||||
'TARGET' : ('INITIATOR', 'MASTER')
|
||||
}
|
||||
|
||||
def port_trace(root, signame, idx):
|
||||
pass
|
||||
|
||||
def port_find_driver(root, signame):
|
||||
pass
|
||||
|
||||
def bus_trace(root, busname, type, whitelist):
|
||||
module = root.xpath('.//MODULE[.//BUSINTERFACE[@BUSNAME="{}" and (@TYPE="{}" or @TYPE="{}")]]'.format(busname, type[0], type[1]))
|
||||
|
||||
vlnv = module[0].get('VLNV')
|
||||
instance = module[0].get('INSTANCE')
|
||||
|
||||
if vlnv_match(vlnv, whitelist):
|
||||
return instance
|
||||
elif vlnv_match(vlnv, axi_converter_whitelist):
|
||||
next_bus = module[0].xpath('.//BUSINTERFACE[@TYPE="{}" or @TYPE="{}"]'.format(opponent[type[0]][0], opponent[type[0]][1]))
|
||||
next_busname = next_bus[0].get('BUSNAME')
|
||||
|
||||
return bus_trace(root, next_busname, type, whitelist)
|
||||
else:
|
||||
raise TypeError('Unsupported AXI4-Stream IP core: %s (%s)' % (instance, vlnv))
|
||||
|
||||
def vlnv_match(vlnv, whitelist):
|
||||
c = vlnv.split(':')
|
||||
|
||||
for w in whitelist:
|
||||
if c[:len(w)] == w:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print('Usage: {} path/to/*.hwdef'.format(sys.argv[0]))
|
||||
print(' {} path/to/*.xml'.format(sys.argv[0]))
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
# read .hwdef which is actually a zip-file
|
||||
zip = zipfile.ZipFile(sys.argv[1], 'r')
|
||||
hwh = zip.read('top.hwh')
|
||||
except:
|
||||
f = open(sys.argv[1], 'r')
|
||||
hwh = f.read()
|
||||
|
||||
# parse .hwh file which is actually XML
|
||||
try:
|
||||
root = etree.XML(hwh)
|
||||
except:
|
||||
print('Bad format of "{}"! Did you choose the right file?'.format(sys.argv[1]))
|
||||
sys.exit(1)
|
||||
|
||||
ips = {}
|
||||
|
||||
# find all whitelisted modules
|
||||
modules = root.find('.//MODULES')
|
||||
for module in modules:
|
||||
instance = module.get('INSTANCE')
|
||||
vlnv = module.get('VLNV')
|
||||
|
||||
# Ignroing unkown
|
||||
if not vlnv_match(vlnv, whitelist):
|
||||
continue
|
||||
|
||||
ips[instance] = {
|
||||
'vlnv' : vlnv,
|
||||
'irqs' : { },
|
||||
'ports' : { }
|
||||
}
|
||||
|
||||
# find PCI-e module to extract memory map
|
||||
pcie = root.find('.//MODULE[@MODTYPE="axi_pcie"]')
|
||||
mmap = pcie.find('.//MEMORYMAP')
|
||||
for mrange in mmap:
|
||||
instance = mrange.get('INSTANCE')
|
||||
|
||||
if instance in ips:
|
||||
ips[instance]['baseaddr'] = int(mrange.get('BASEVALUE'), 16);
|
||||
ips[instance]['highaddr'] = int(mrange.get('HIGHVALUE'), 16);
|
||||
|
||||
# find AXI-Stream switch port mapping
|
||||
switch = root.find('.//MODULE[@MODTYPE="axis_switch"]')
|
||||
busifs = switch.find('.//BUSINTERFACES')
|
||||
for busif in busifs:
|
||||
if busif.get('VLNV') != 'xilinx.com:interface:axis:1.0':
|
||||
continue
|
||||
|
||||
busname = busif.get('BUSNAME')
|
||||
name = busif.get('NAME')
|
||||
type = busif.get('TYPE')
|
||||
|
||||
r = re.compile('(M|S)([0-9]+)_AXIS')
|
||||
m = r.search(name)
|
||||
|
||||
port = int(m.group(2))
|
||||
|
||||
ep = bus_trace(root, busname, opponent[type], whitelist)
|
||||
|
||||
if ep in ips:
|
||||
ips[ep]['ports'][type.lower()] = port
|
||||
|
||||
# find Interrupt assignments
|
||||
intc = root.find('.//MODULE[@MODTYPE="axi_pcie_intc"]')
|
||||
intr = intc.xpath('.//PORT[@NAME="intr" and @DIR="I"]')[0]
|
||||
concat = root.xpath('.//MODULE[@MODTYPE="xlconcat" and .//PORT[@SIGNAME="{}" and @DIR="O"]]'.format(intr.get('SIGNAME')))[0]
|
||||
ports = concat.xpath('.//PORT[@DIR="I"]')
|
||||
|
||||
for port in ports:
|
||||
name = port.get('NAME')
|
||||
signame = port.get('SIGNAME')
|
||||
|
||||
# Skip unconnected IRQs
|
||||
if not signame:
|
||||
continue
|
||||
|
||||
r = re.compile('In([0-9+])')
|
||||
m = r.search(name)
|
||||
|
||||
irq = int(m.group(1))
|
||||
ip = root.xpath('.//MODULE[.//PORT[@SIGNAME="{}" and @DIR="O"]]'.format(signame))[0]
|
||||
|
||||
instance = ip.get('INSTANCE')
|
||||
vlnv = ip.get('VLNV')
|
||||
|
||||
port = ip.xpath('.//PORT[@SIGNAME="{}" and @DIR="O"]'.format(signame))[0]
|
||||
irqname = port.get('NAME')
|
||||
|
||||
if instance in ips:
|
||||
ips[instance]['irqs'][irqname] = irq
|
||||
|
||||
# Find BRAM storage depths (size)
|
||||
brams = root.xpath('.//MODULE[@MODTYPE="axi_bram_ctrl"]')
|
||||
for bram in brams:
|
||||
instance = bram.get('INSTANCE')
|
||||
|
||||
width = bram.find('.//PARAMETER[@NAME="DATA_WIDTH"]').get('VALUE')
|
||||
depth = bram.find('.//PARAMETER[@NAME="MEM_DEPTH"]').get('VALUE')
|
||||
|
||||
size = int(width) * int(depth) / 8
|
||||
|
||||
if instance in ips:
|
||||
ips[instance]['size'] = int(size)
|
||||
|
||||
print(json.dumps(ips, indent=2))
|
File diff suppressed because it is too large
Load diff
|
@ -1,34 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Remove LGPL licence from all files
|
||||
#
|
||||
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
||||
# @copyright 2017, Institute for Automation of Complex Power Systems, EONERC
|
||||
# @license GNU General Public License (version 3)
|
||||
#
|
||||
# VILLASnode
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
||||
#sed -i -e '/@license GNU Lesser General Public License/d' \
|
||||
# -e '/This application is free software;/,+12d' \
|
||||
# -e '/ * VILLASnode - connecting real-time simulation equipment/,+1d' $1
|
||||
|
||||
find . \( -name "*.c" -or -name "*.h" -or -name "Dockerfile*" -or -name "Makefile*" -or -name "*.conf" -or -name "*.sh" -or -name "*.js" \) \
|
||||
-not -path thirdparty \
|
||||
-not -path build \
|
||||
-exec test -e {} \; \
|
||||
-print0 | xargs -0 \
|
||||
sed -i -e '/@license GNU Lesser General Public License v2.1/,/Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA/d'
|
|
@ -1,72 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Report metrics to an InfluxDB.
|
||||
#
|
||||
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
||||
# @copyright 2017, Institute for Automation of Complex Power Systems, EONERC
|
||||
# @license GNU General Public License (version 3)
|
||||
#
|
||||
# VILLASnode
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
##################################################################################
|
||||
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "Usage: $0 measurement_name field1=value1 field2=value2 ... -- tag1=tag1value tag2=tag2value"
|
||||
echo "Example: $0 builds success=true warnings=235 time=123 -- branch=master comitter=stv0g"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
HOST=${INFLUXDB_HOST:-localhost}
|
||||
PORT=${INFLUXDB_PORT:-8086}
|
||||
DB=${INFLUXDB_DATABASE:-builds}
|
||||
|
||||
CURL_OPTS="-i -XPOST"
|
||||
|
||||
if [ -n "${INFLUXDB_USER}" -a -n "${INFLUXDB_PASSWORD}" ]; then
|
||||
CURL_OPTS+=" -u ${INFLUXDB_USER}:${INFLUXDB_PASSWORD}"
|
||||
fi
|
||||
|
||||
function join_by {
|
||||
local IFS="$1"
|
||||
shift
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
search() {
|
||||
local i=0;
|
||||
for str in ${@:2}; do
|
||||
if [ "$str" = "$1" ]; then
|
||||
echo $i
|
||||
return
|
||||
else
|
||||
((i++))
|
||||
fi
|
||||
done
|
||||
echo ""
|
||||
}
|
||||
|
||||
I=$(search "--" $@)
|
||||
|
||||
if [ -n "$I" ]; then
|
||||
TAGS=",$(join_by , ${@:(($I+2))})"
|
||||
VALUES=${@:2:(($I-1))}
|
||||
else
|
||||
VALUES=${@:2}
|
||||
fi
|
||||
|
||||
MEASUREMENT=$1
|
||||
TS=$(date +%s%N)
|
||||
|
||||
curl ${CURL_OPTS} "http://${HOST}:${PORT}/write?db=${DB}" --data-binary "${MEASUREMENT}${TAGS} ${VALUES} ${TS}"
|
Loading…
Add table
Reference in a new issue