mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 13:27:29 -04:00
extending blackbox debug level support
This commit is contained in:
parent
db819da56d
commit
49274510ba
2 changed files with 15 additions and 17 deletions
|
@ -3,7 +3,7 @@
|
|||
show_usage()
|
||||
{
|
||||
echo "Vortex BlackBox Test Driver v1.0"
|
||||
echo "Usage: [[--clusters=#n] [--cores=#n] [--warps=#n] [--threads=#n] [--l2cache] [--l3cache] [[--driver=rtlsim|vlsim|simx] [--debug] [--scope] [--perf] [--app=vecadd|sgemm|basic|demo|dogfood] [--args=<args>] [--help]]"
|
||||
echo "Usage: [[--clusters=#n] [--cores=#n] [--warps=#n] [--threads=#n] [--l2cache] [--l3cache] [[--driver=#name] [--app=#app] [--args=#args] [--debug=#level] [--scope] [--perf] [--help]]"
|
||||
}
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
|
@ -20,7 +20,6 @@ L3=0
|
|||
DEBUG=0
|
||||
SCOPE=0
|
||||
HAS_ARGS=0
|
||||
DEBUG_LEVEL=1
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
|
@ -57,8 +56,8 @@ case $i in
|
|||
L3=1
|
||||
shift
|
||||
;;
|
||||
--debug)
|
||||
DEBUG=1
|
||||
--debug=*)
|
||||
DEBUG=${i#*=}
|
||||
shift
|
||||
;;
|
||||
--scope)
|
||||
|
@ -101,7 +100,6 @@ case $DRIVER in
|
|||
;;
|
||||
simx)
|
||||
DRIVER_PATH=$VORTEX_HOME/driver/simx
|
||||
DEBUG_LEVEL=3
|
||||
;;
|
||||
*)
|
||||
echo "invalid driver: $DRIVER"
|
||||
|
@ -140,15 +138,15 @@ echo "$CONFIGS+$DEBUG+$SCOPE" > $BLACKBOX_CACHE
|
|||
|
||||
status=0
|
||||
|
||||
if [ $DEBUG -eq 1 ]
|
||||
if [ $DEBUG -ne 0 ]
|
||||
then
|
||||
if [ $SCOPE -eq 1 ]
|
||||
then
|
||||
echo "running: DEBUG=$DEBUG_LEVEL SCOPE=1 CONFIGS="$CONFIGS" make -C $DRIVER_PATH"
|
||||
DEBUG=$DEBUG_LEVEL SCOPE=1 CONFIGS="$CONFIGS" make -C $DRIVER_PATH
|
||||
echo "running: DEBUG=$DEBUG SCOPE=1 CONFIGS="$CONFIGS" make -C $DRIVER_PATH"
|
||||
DEBUG=$DEBUG SCOPE=1 CONFIGS="$CONFIGS" make -C $DRIVER_PATH
|
||||
else
|
||||
echo "running: DEBUG=$DEBUG_LEVEL CONFIGS="$CONFIGS" make -C $DRIVER_PATH"
|
||||
DEBUG=$DEBUG_LEVEL CONFIGS="$CONFIGS" make -C $DRIVER_PATH
|
||||
echo "running: DEBUG=$DEBUG CONFIGS="$CONFIGS" make -C $DRIVER_PATH"
|
||||
DEBUG=$DEBUG CONFIGS="$CONFIGS" make -C $DRIVER_PATH
|
||||
fi
|
||||
|
||||
if [ $HAS_ARGS -eq 1 ]
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
## SimX Debugging
|
||||
|
||||
SimX cycle-approximate simulator allows faster debugging of Vortex kernels' execution.
|
||||
The recommended method to enable debugging is to pass the `--debug` flag to `blackbox` tool when running a program.
|
||||
The recommended method to enable debugging is to pass the `--debug=<level>` flag to `blackbox` tool when running a program.
|
||||
|
||||
// Running demo program on SimX in debug mode
|
||||
$ ./ci/blackbox.sh --driver=simx --app=demo --debug
|
||||
$ ./ci/blackbox.sh --driver=simx --app=demo --debug=1
|
||||
|
||||
A debug trace `run.log` is generated in the current directory during the program execution. The trace includes important states of the simulated processor (decoded instruction, register states, pipeline states, etc..). You can increase the verbosity level of the trace by changing the `DEBUG_LEVEL` variable to a value [1-5] (default is 3).
|
||||
A debug trace `run.log` is generated in the current directory during the program execution. The trace includes important states of the simulated processor (decoded instruction, register states, pipeline states, etc..). You can increase the verbosity of the trace by changing the debug level.
|
||||
|
||||
// Using SimX in debug mode with verbose level 4
|
||||
$ CONFIGS=-DDEBUG_LEVEL=4 ./ci/blackbox.sh --driver=simx --app=demo --debug
|
||||
// Using SimX in debug mode with verbose level 3
|
||||
$ ./ci/blackbox.sh --driver=simx --app=demo --debug=3
|
||||
|
||||
## RTL Debugging
|
||||
|
||||
|
@ -20,10 +20,10 @@ To debug the processor RTL, you need to use VLSIM or RTLSIM driver. VLSIM simula
|
|||
The recommended method to enable debugging is to pass the `--debug` flag to `blackbox` tool when running a program.
|
||||
|
||||
// Running demo program on vlsim in debug mode
|
||||
$ ./ci/blackbox.sh --driver=vlsim --app=demo --debug
|
||||
$ ./ci/blackbox.sh --driver=vlsim --app=demo --debug=1
|
||||
|
||||
// Running demo program on rtlsim in debug mode
|
||||
$ ./ci/blackbox.sh --driver=rtlsim --app=demo --debug
|
||||
$ ./ci/blackbox.sh --driver=rtlsim --app=demo --debug=1
|
||||
|
||||
A debug trace `run.log` is generated in the current directory during the program execution. The trace includes important states of the simulated processor (memory, caches, pipeline, stalls, etc..). A waveform trace `trace.vcd` is also generated in the current directory during the program execution. You can visualize the waveform trace using any tool that can open VCD files (Modelsim, Quartus, Vivado, etc..). [GTKwave] (http://gtkwave.sourceforge.net) is a great open-source scope analyzer that also works with VCD files.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue