OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sim/] [simple/] [ghdl.run.sh] - Blame information for rev 64

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 64 zero_gravi
#!/usr/bin/env bash
2
 
3
set -e
4
 
5
cd $(dirname "$0")
6
 
7
echo "Tip: Compile application with USER_FLAGS+=-DUART[0/1]_SIM_MODE to auto-enable UART[0/1]'s simulation mode (redirect UART output to simulator console)."
8
 
9
# Prepare simulation output files for UART0 and UART 1
10
# - Testbench receiver log file (neorv32.testbench_uart?.out)
11
# - Direct simulation output (neorv32.uart?.sim_mode.[text|data].out)
12
for uart in 0 1; do
13
  for item in \
14
    testbench_uart"$uart" \
15
    uart"$uart".sim_mode.text \
16
    uart"$uart".sim_mode.data; do
17
    touch neorv32."$item".out
18
    chmod 777 neorv32."$item".out
19
  done
20
done
21
 
22
GHDL="${GHDL:-ghdl}"
23
 
24
$GHDL -m --work=neorv32 --workdir=build neorv32_tb_simple
25
 
26
GHDL_RUN_ARGS="${@:---stop-time=10ms}"
27
echo "Using simulation runtime args: $GHDL_RUN_ARGS";
28
 
29
runcmd="$GHDL -r --work=neorv32 --workdir=build neorv32_tb_simple \
30
  --max-stack-alloc=0 \
31
  --ieee-asserts=disable \
32
  --assert-level=error $GHDL_RUN_ARGS"
33
 
34
if [ -n "$GHDL_DEVNULL" ]; then
35
  $runcmd >> /dev/null
36
else
37
  $runcmd
38
fi
39
 
40
cat neorv32.uart0.sim_mode.text.out | grep "CPU TEST COMPLETED SUCCESSFULLY!"

powered by: WebSVN 2.1.0

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