-
Notifications
You must be signed in to change notification settings - Fork 0
/
setenv.sourceme
106 lines (83 loc) · 2.37 KB
/
setenv.sourceme
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#---- SESSION CONFIGURATION -----------------------------------------------------------------------
# Root folder
ORGANA_ROOT=${PWD}
# Market location
TATOOINE_ROOT=${ORGANA_ROOT}/tatooine
# Scripts location
ORGANA_SCRIPTS=${TATOOINE_ROOT}/scripts
#---- COLORED OUTPUT CONFIGURATION ----------------------------------------------------------------
# Set regular colors for ORGANA session
BLACK='\033[0;30m'
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
WHITE='\033[0;37m'
# Set bold colors for ORGANA session
BBLACK='\033[1;30m'
BRED='\033[1;31m'
BGREEN='\033[1;32m'
BYELLOW='\033[1;33m'
BBLUE='\033[1;34m'
BPURPLE='\033[1;35m'
BCYAN='\033[1;36m'
BWHITE='\033[1;37m'
# Background
ONBLACK='\033[40m'
ONRED='\033[41m'
ONGREEN='\033[42m'
ONYELLOW='\033[43m'
ONBLUE='\033[44m'
ONPURPLE='\033[45m'
ONCYAN='\033[46m'
ONWHITE='\033[47m'
# Set color off
COLOROFF='\033[0m'
#---- UTILITIES -----------------------------------------------------------------------------------
# Aliases and wrappers
function get_simulator {
# Modelsim by default
simulator=modelsim
# Unless configuration from user overrides it
if [ -e "config.ini" ]
then
set -o allexport
source config.ini
set +o allexport
fi
}
# Run an OOTBTB simulation. This is the most basic simulation for any design
# and it uses user-written testbench files
function runsim {
get_simulator
info "Running an OOTBTB simulation using \"${simulator}\""
source ${ORGANA_SCRIPTS}/runsim.${simulator}
}
# Launch a COCOTB-based verification run. This makes use of COCOTB Makefiles
# and creates coverage as well
function runver {
get_simulator
info "Launching a COCOTB verification run using \"${simulator}\""
make -f ${ORGANA_SCRIPTS}/Makefile.${simulator} coverage
}
function runclean {
get_simulator
warn "Cleaning previous run"
source ${ORGANA_SCRIPTS}/runclean.${simulator}
}
function info {
echo -e "${BLUE}info: ${1}${COLOROFF}"
}
function warn {
echo -e "${YELLOW}warn: ${1}${COLOROFF}"
}
function erro {
echo -e "${RED}erro: ${1}${COLOROFF}"
}
function plain {
echo -e "${COLOROFF}info: ${1}"
}
#---- TAIL MESSAGE --------------------------------------------------------------------------------
echo -e "${ONBLUE}${BWHITE}Welcome to the ORGANA design and verification environment${COLOROFF}"