OpenCores
URL https://opencores.org/ocsvn/1g_ethernet_dpi/1g_ethernet_dpi/trunk

Subversion Repositories 1g_ethernet_dpi

[/] [1g_ethernet_dpi/] [trunk/] [hw/] [msim/] [process.sh] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 kuzmi4
#!/bin/bash
2
#
3
# USAGE: ./process.sh
4
# ARGs:
5
#    <none>
6
#    -clr
7
#    -reasm
8
#    -fast
9
 
10
 
11
ROOT_DIR=$PWD
12
 
13
SOLIB_DEV_NAME="test_main"
14
SOLIB_DEV_DIR="$PWD/../../sw/dev/${SOLIB_DEV_NAME}/src"
15
SOLIB_DEV_FILE="$SOLIB_DEV_DIR/${SOLIB_DEV_NAME}.so"
16
 
17
SOLIB_HOSTB_NAME="test_bfm"
18
SOLIB_HOSTB_DIR="$PWD/../../sw/dev/${SOLIB_HOSTB_NAME}"
19
SOLIB_HOSTB_FILE="$SOLIB_HOSTB_DIR/${SOLIB_HOSTB_NAME}.so"
20
 
21
#
22
# view
23
if [ "$1" == "-view" ]; then
24
 vsim -view vsim.wlf -do wave.do
25
 exit 0
26
fi
27
 
28
#
29
# clr / 2FIX!!!
30
find -type d -exec rm -rf {} +
31
rm -rf *.h
32
rm -rf *.tr
33
#rm -rf work
34
rm -rf *wlf*
35
rm -rf *.hex
36
rm -rf *.mem
37
rm -rf *.ver
38
rm -rf *.so
39
rm -rf *.log
40
rm -rf *.pcap
41
rm -rf *.vstf
42
rm -rf *.ini
43
rm -rf compile.do
44
rm -rf *transcript*
45
if [ "$1" == "-clr" ]; then
46
 exit 0
47
fi
48
 
49
#
50
# q2-chk
51
if [ ! -d ../layout/process/project_n1.ip_user_files/sim_scripts ]; then
52
echo "V-ASM:"
53
cd ../layout/
54
./process.sh -asm &> /dev/null
55
cd $ROOT_DIR
56
echo""
57
fi
58
# ublaze-bsp
59
if [ ! -d ../../sw/dev/test_main/process ]; then
60
echo "BSP-ASM:"
61
cd ../../sw/dev/test_main
62
./process.sh -bsp &> /dev/null
63
cd $ROOT_DIR
64
echo""
65
fi
66
# ublaze-app / so-lib
67
if [ ! -f $SOLIB_DEV_FILE ] || [ "$1" == "-reasm" ]; then
68
cd $SOLIB_DEV_DIR
69
cmd="make"
70
$cmd &> $ROOT_DIR/dpi-main.log || {
71
    echo "test_main MAKE failed"
72
    exit 1
73
}
74
fi
75
cd $ROOT_DIR
76
rm -rf ./${SOLIB_DEV_NAME}.so
77
cp -f $SOLIB_DEV_FILE ./
78
# host-bfm / so-lib
79
if [ ! -f $SOLIB_HOSTB_FILE ] || [ "$1" == "-reasm" ]; then
80
cd $SOLIB_HOSTB_DIR
81
cmd="make"
82
$cmd &> $ROOT_DIR/dpi-hostb.log || {
83
    echo "HOST_BFM MAKE failed"
84
    exit 1
85
}
86
fi
87
cd $ROOT_DIR
88
rm -rf ./$SOLIB_HOSTB_NAME.so
89
cp -f $SOLIB_HOSTB_FILE ./
90
 
91
# prep-var
92
export LIB_DEV_NAME=$SOLIB_DEV_NAME
93
export LIB_HOSTB_NAME=$SOLIB_HOSTB_NAME
94
 
95
# start
96
if [ "$1" == "-fast" ] || [ "$2" == "-fast" ]
97
then
98
 export FAST_SIM=1
99
 vsim -c -do start_sim.tcl
100
else
101
 export FAST_SIM=0
102
 vsim -do start_sim.tcl
103
fi
104
 
105
#
106
#Final
107
exit 0

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.