Skip to content

Commit 267521a

Browse files
committed
Merge branch 'develop'
2 parents bd33f1e + 023dc47 commit 267521a

File tree

1,285 files changed

+5922
-166021
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,285 files changed

+5922
-166021
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,22 @@ cache:
2525
- $HOME/build64
2626

2727
before_install:
28-
- if [ ! -d "$TOOLDIR" ] || [ -z "$(ls -A $TOOLDIR)" ] || [ "$(cat "$TOOLDIR/version.txt")" != "v0.3" ]; then
28+
- if [ ! -d "$TOOLDIR" ] || [ -z "$(ls -A $TOOLDIR)" ] || [ "$(cat "$TOOLDIR/version.txt")" != "v0.4" ]; then
2929
rm -rf $TOOLDIR;
3030
mkdir -p $TRAVIS_BUILD_DIR/build && cd $TRAVIS_BUILD_DIR/build;
3131
../configure --tooldir=$TOOLDIR;
3232
ci/toolchain_install.sh --all;
3333
echo "v0.3" > "$TOOLDIR/version.txt";
34+
else
35+
echo "using existing tooldir build";
3436
fi
3537
- if [ ! -d "$HOME/third_party" ] || [ -z "$(ls -A $HOME/third_party)" ] || [ "$(cat "$HOME/third_party/version.txt")" != "v0.2" ]; then
3638
cd $TRAVIS_BUILD_DIR;
3739
make -C third_party > /dev/null;
3840
echo "v0.2" > "third_party/version.txt";
3941
cp -rf third_party $HOME;
4042
else
43+
echo "using existing third_party build";
4144
cp -rf $HOME/third_party $TRAVIS_BUILD_DIR;
4245
fi
4346

@@ -50,6 +53,7 @@ install:
5053
echo "$TRAVIS_COMMIT" > version.txt;
5154
cp -rf $TRAVIS_BUILD_DIR/build$XLEN $HOME;
5255
else
56+
echo "using existing build for commit $TRAVIS_COMMIT";
5357
cp -rf $HOME/build$XLEN $TRAVIS_BUILD_DIR;
5458
fi
5559

Makefile.in

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,41 +22,40 @@ clean:
2222
$(MAKE) -C runtime clean
2323
$(MAKE) -C tests clean
2424

25-
clean-all:
26-
$(MAKE) -C hw clean
27-
$(MAKE) -C sim clean
28-
$(MAKE) -C kernel clean
29-
$(MAKE) -C runtime clean
30-
$(MAKE) -C tests clean-all
31-
3225
# Install setup
33-
KERNEL_LIB_DST = $(PREFIX)/kernel/lib$(XLEN)
34-
RUNTIME_LIB_DST = $(PREFIX)/runtime/lib
3526
KERNEL_INC_DST = $(PREFIX)/kernel/include
27+
KERNEL_LIB_DST = $(PREFIX)/kernel/lib$(XLEN)
3628
RUNTIME_INC_DST = $(PREFIX)/runtime/include
29+
RUNTIME_LIB_DST = $(PREFIX)/runtime/lib
3730

3831
KERNEL_HEADERS = $(wildcard $(VORTEX_HOME)/kernel/include/*.h)
32+
KERNEL_LIBS = $(wildcard kernel/*.a)
3933
RUNTIME_HEADERS = $(wildcard $(VORTEX_HOME)/runtime/include/*.h)
34+
RUNTIME_LIBS = $(wildcard runtime/*.so)
4035

4136
INSTALL_DIRS = $(KERNEL_LIB_DST) $(RUNTIME_LIB_DST) $(KERNEL_INC_DST) $(RUNTIME_INC_DST)
4237

4338
$(INSTALL_DIRS):
4439
mkdir -p $@
4540

41+
$(KERNEL_INC_DST)/VX_types.h: hw/VX_types.h | $(KERNEL_INC_DST)
42+
cp $< $@
43+
4644
$(KERNEL_INC_DST)/%.h: $(VORTEX_HOME)/kernel/include/%.h | $(KERNEL_INC_DST)
4745
cp $< $@
4846

4947
$(RUNTIME_INC_DST)/%.h: $(VORTEX_HOME)/runtime/include/%.h | $(RUNTIME_INC_DST)
5048
cp $< $@
5149

52-
$(KERNEL_LIB_DST)/libvortex.a: kernel/libvortexrt.a | $(KERNEL_LIB_DST)
50+
$(KERNEL_LIB_DST)/%.a: kernel/%.a | $(KERNEL_LIB_DST)
5351
cp $< $@
5452

55-
$(RUNTIME_LIB_DST)/libvortex.so: runtime/stub/libvortex.so | $(RUNTIME_LIB_DST)
53+
$(RUNTIME_LIB_DST)/%.so: runtime/%.so | $(RUNTIME_LIB_DST)
5654
cp $< $@
5755

5856
install: $(INSTALL_DIRS) \
59-
$(KERNEL_HEADERS:$(VORTEX_HOME)/kernel/include/%=$(KERNEL_INC_DST)/%) \
57+
$(KERNEL_INC_DST)/VX_types.h \
58+
$(KERNEL_HEADERS:$(VORTEX_HOME)/kernel/include/%=$(KERNEL_INC_DST)/%) \
6059
$(RUNTIME_HEADERS:$(VORTEX_HOME)/runtime/include/%=$(RUNTIME_INC_DST)/%) \
61-
$(KERNEL_LIB_DST)/libvortex.a \
62-
$(RUNTIME_LIB_DST)/libvortex.so
60+
$(KERNEL_LIBS:kernel/%=$(KERNEL_LIB_DST)/%) \
61+
$(RUNTIME_LIBS:runtime/%=$(RUNTIME_LIB_DST)/%)

ci/blackbox.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ then
193193

194194
if [ $REBUILD -eq 1 ] || [ "$CONFIGS+$DEBUG+$SCOPE" != "$LAST_CONFIGS" ];
195195
then
196-
make -C $DRIVER_PATH clean > /dev/null
196+
make -C $DRIVER_PATH clean-driver > /dev/null
197197
echo "$CONFIGS+$DEBUG+$SCOPE" > $BLACKBOX_CACHE
198198
fi
199199
fi
@@ -232,11 +232,11 @@ then
232232
if [ $HAS_ARGS -eq 1 ]
233233
then
234234
echo "running: VORTEX_RT_PATH=$TEMPDIR OPTS=$ARGS make -C $APP_PATH run-$DRIVER > $LOGFILE 2>&1"
235-
VORTEX_RT_PATH=$TEMPDIR OPTS=$ARGS make -C $APP_PATH run-$DRIVER > $LOGFILE 2>&1
235+
DEBUG=1 VORTEX_RT_PATH=$TEMPDIR OPTS=$ARGS make -C $APP_PATH run-$DRIVER > $LOGFILE 2>&1
236236
status=$?
237237
else
238238
echo "running: VORTEX_RT_PATH=$TEMPDIR make -C $APP_PATH run-$DRIVER > $LOGFILE 2>&1"
239-
VORTEX_RT_PATH=$TEMPDIR make -C $APP_PATH run-$DRIVER > $LOGFILE 2>&1
239+
DEBUG=1 VORTEX_RT_PATH=$TEMPDIR make -C $APP_PATH run-$DRIVER > $LOGFILE 2>&1
240240
status=$?
241241
fi
242242

@@ -257,11 +257,11 @@ then
257257
if [ $HAS_ARGS -eq 1 ]
258258
then
259259
echo "running: OPTS=$ARGS make -C $APP_PATH run-$DRIVER > $LOGFILE 2>&1"
260-
OPTS=$ARGS make -C $APP_PATH run-$DRIVER > $LOGFILE 2>&1
260+
DEBUG=1 OPTS=$ARGS make -C $APP_PATH run-$DRIVER > $LOGFILE 2>&1
261261
status=$?
262262
else
263263
echo "running: make -C $APP_PATH run-$DRIVER > $LOGFILE 2>&1"
264-
make -C $APP_PATH run-$DRIVER > $LOGFILE 2>&1
264+
DEBUG=1 make -C $APP_PATH run-$DRIVER > $LOGFILE 2>&1
265265
status=$?
266266
fi
267267
fi

ci/regression.sh

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,37 @@ set -e
1919
# clear blackbox cache
2020
rm -f blackbox.*.cache
2121

22+
split_file() {
23+
if [[ $# -ne 2 ]]; then
24+
echo "Usage: $0 <filename> <start_with>"
25+
return 1
26+
fi
27+
input_file="$1"
28+
start_with="$2"
29+
if [[ ! -r "$input_file" ]]; then
30+
echo "Error: File '$input_file' is not readable or does not exist."
31+
return 1
32+
fi
33+
count=0
34+
output_file=""
35+
while IFS= read -r line; do
36+
if [[ $line == $start_with* ]]; then
37+
count=$((count + 1))
38+
output_file="$input_file.part$count"
39+
> "$output_file" # ensure empty
40+
fi
41+
if [[ -n "$output_file" ]]; then
42+
echo "$line" >> "$output_file"
43+
fi
44+
done < "$input_file"
45+
46+
if [[ $count -eq 0 ]]; then
47+
echo "No lines starting with '$start_with' were found in '$input_file'."
48+
fi
49+
}
50+
51+
###############################################################################
52+
2253
unittest()
2354
{
2455
make -C tests/unittest run
@@ -102,6 +133,9 @@ opencl()
102133
make -C tests/opencl run-simx
103134
make -C tests/opencl run-rtlsim
104135

136+
./ci/blackbox.sh --driver=simx --app=lbm --warps=8
137+
./ci/blackbox.sh --driver=rtlsim --app=lbm --warps=8
138+
105139
echo "opencl tests done!"
106140
}
107141

@@ -125,25 +159,39 @@ cluster()
125159
echo "clustering tests done!"
126160
}
127161

128-
debug()
162+
test_csv_trace()
129163
{
130-
echo "begin debugging tests..."
131-
132164
# test CSV trace generation
133165
make -C sim/simx clean && DEBUG=3 make -C sim/simx > /dev/null
134166
make -C sim/rtlsim clean && DEBUG=3 CONFIGS="-DGPR_RESET" make -C sim/rtlsim > /dev/null
135167
make -C tests/riscv/isa run-simx-32im > run_simx.log
136168
make -C tests/riscv/isa run-rtlsim-32im > run_rtlsim.log
137-
./ci/trace_csv.py -trtlsim run_rtlsim.log -otrace_rtlsim.csv
138-
./ci/trace_csv.py -tsimx run_simx.log -otrace_simx.csv
139-
diff trace_rtlsim.csv trace_simx.csv
169+
split_file run_simx.log "Running "
170+
split_file run_rtlsim.log "Running "
171+
for file in ./run_simx.log.part*; do
172+
if [[ -f "$file" ]]; then
173+
file2="${file//simx/rtlsim}"
174+
if [[ -f "$file2" ]]; then
175+
./ci/trace_csv.py -tsimx $file -otrace_simx.csv
176+
./ci/trace_csv.py -trtlsim $file2 -otrace_rtlsim.csv
177+
diff trace_rtlsim.csv trace_simx.csv
178+
else
179+
echo "File $file2 not found."
180+
fi
181+
fi
182+
done
140183
# restore default prebuilt configuration
141184
make -C sim/simx clean && make -C sim/simx > /dev/null
142185
make -C sim/rtlsim clean && make -C sim/rtlsim > /dev/null
186+
}
143187

188+
debug()
189+
{
190+
echo "begin debugging tests..."
191+
test_csv_trace
144192
./ci/blackbox.sh --driver=opae --cores=2 --clusters=2 --l2cache --debug=1 --perf=1 --app=demo --args="-n1"
145193
./ci/blackbox.sh --driver=simx --cores=2 --clusters=2 --l2cache --debug=1 --perf=1 --app=demo --args="-n1"
146-
./ci/blackbox.sh --driver=opae --cores=1 --scope --app=basic --args="-t0 -n1"
194+
./ci/blackbox.sh --driver=opae --cores=1 --scope --app=demo --args="-n1"
147195

148196
echo "debugging tests done!"
149197
}
@@ -189,12 +237,10 @@ config()
189237
CONFIGS="-DISSUE_WIDTH=4 -DNUM_LSU_BLOCK=4 -DNUM_LSU_LANES=4" ./ci/blackbox.sh --driver=simx --app=vecaddx
190238

191239
# custom program startup address
192-
make -C tests/regression/dogfood clean-all
240+
make -C tests/regression/dogfood clean-kernel
193241
STARTUP_ADDR=0x40000000 make -C tests/regression/dogfood
194-
CONFIGS="-DSTARTUP_ADDR=0x40000000" ./ci/blackbox.sh --driver=simx --app=dogfood
195-
CONFIGS="-DSTARTUP_ADDR=0x40000000" ./ci/blackbox.sh --driver=rtlsim --app=dogfood
196-
make -C tests/regression/dogfood clean-all
197-
make -C tests/regression/dogfood
242+
./ci/blackbox.sh --driver=simx --app=dogfood
243+
./ci/blackbox.sh --driver=rtlsim --app=dogfood
198244

199245
# disabling M & F extensions
200246
make -C sim/rtlsim clean && CONFIGS="-DEXT_M_DISABLE -DEXT_F_DISABLE" make -C sim/rtlsim > /dev/null

0 commit comments

Comments
 (0)