-
Notifications
You must be signed in to change notification settings - Fork 2
/
qp_version
executable file
·72 lines (59 loc) · 1.79 KB
/
qp_version
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env bash
#
# Show current Intel Quartus Prime version
#
# Time-stamp: <2022-10-21 11:40:29>
SCRIPT_NAME=$(basename "${BASH_SOURCE##*/}")
if [ "$1" = '-h' ] || [ "$1" = '--help' ]; then
echo "Usage:"
echo " $SCRIPT_NAME [-v|--verbosity]"
echo
echo "OPTIONS:"
echo " -v|--verbosity"
echo " Show all Quartus environment variables."
exit 0
fi
if [ "$1" = "-v" ] || [ "$1" = "--verbosity" ] ; then
VERBOSITY=1
else
VERBOSITY=0
fi
qp_path_info() {
PATH2QP=$(quartus_sh --version 2>/dev/null | grep Ver)
if [ -z "$PATH2QP" ]; then
echo "WARNING! Can not find path to Quartus Prime!"
else
echo "* Quartus Prime (Standard/Pro) version:"
echo "$PATH2QP"
fi
}
qp_variables() {
echo "* Variables:"
PATH2QP=$(type quartus_sh | sed -r 's/.+is\s+//')
echo "QUARTUS_ROOTDIR_OVERRIDE: $QUARTUS_ROOTDIR_OVERRIDE"
echo "Quaruts prime shell: $PATH2QP"
echo "Nios: $SOPC_KIT_NIOS2"
if [ "$VERBOSITY" -eq 1 ]; then
echo "Quartus environment variables"
env | grep QUARTUS
fi
}
qp_jtagserver_version() {
echo "* JTAG Server:"
JS_VERSION=$(jtagserver --version 2>/dev/null | grep Ver)
JS_PATH=$(jtagserver --status 2>/dev/null | sed -r "s/[^']*//; s/'//g")
JS_STATUS=$(jtagserver --status 2>/dev/null | grep -i "^\s*server" | sed -r "s/^\s+//")
JS_CLIENT=$(jtagserver --status 2>/dev/null | grep -i "client" | sed -r "s/^\s+//")
echo "$JS_VERSION"
echo "Path: $JS_PATH"
echo "Status: $JS_STATUS; $JS_CLIENT"
}
qp_path_info
qp_variables
qp_jtagserver_version
# This is for the sake of Emacs.
# Local Variables:
# time-stamp-end: "$"
# time-stamp-format: "<%:y-%02m-%02d %02H:%02M:%02S>"
# time-stamp-start: "Time-stamp: "
# End: