-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscriptsim.sh
More file actions
executable file
·87 lines (59 loc) · 1.54 KB
/
scriptsim.sh
File metadata and controls
executable file
·87 lines (59 loc) · 1.54 KB
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
73
74
75
76
77
78
79
80
81
#!/bin/bash
echo -e "Welcome \n \n"
flagmulti=2;
while getopts ":a :s:" opt; do
case $opt in
a) flagmulti=1 ;;
s) flagmulti=0
inserito=$OPTARG ;;
\?) echo "Invalid option -$OPTARG"
exit ;;
:) echo "ERROR : Option -$OPTARG requires an argument."
exit ;;
esac
done
if [ $flagmulti = 2 ] ; then
echo -e "\n \n help: \n \n ARGUMENTS OR OPTIONS MISSING \n \n -a : automatic loading of all the files in the working directory \n -s <name_file> : loading of a single file <name_file> in the working directory \n \n"
exit ;
fi
echo "write the name of the TOP module (no extension)"
read top
echo "select the language (v / vhd)"
flag=0
while [ $flag = 0 ]; do
read lin
if [ $lin = v ] ; then
comp=xvlog
flag=1;
elif [ $lin = vhd ]; then
comp=xvhdl
flag=1;
else echo "non corretto riprova"
fi;
done
if [ $flagmulti = 1 ] ; then
echo -e " \n \n caricamento multiplo... \n \n "
$comp -nolog ${PWD}/*.$lin ;
elif [ $flagmulti = 0 ] ; then
echo -e " \n \n caricamento singolo... \n \n $OPTARG "
$comp -nolog ${PWD}/$inserito ;
fi
#if [ $flagmulti = 1 ] || [ $flagmulti = 0 ] ; then
xelab $top --debug all
xsim work.$top -gui
echo "do you want to remove .log,.web,.jou? (y/n)"
flagrisp=0
while [ $flagrisp = 0 ]; do
read risp
if [ $risp = y ] ; then
rm -rf ${PWD}/*.log ${PWD}/*.jou ${PWD}/*.pb ${PWD}/*.wdb xsim.dir
flagrisp=1;
echo -e " \n \n bye bye (deleted)"
elif [ $risp = n ]; then
echo -e " \n \n bye bye"
flagrisp=1;
else echo "answer not admitted"
fi;
done
#else echo -e "\n \n" ;
#fi