Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use vhdl 2008 standard in ghdl simulations #1096

Merged
merged 5 commits into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions sim/ghdl.run.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
set -e

cd $(dirname "$0")

NEORV32_RTL=${NEORV32_RTL:-../rtl}
FILE_LIST=`cat $NEORV32_RTL/file_list_soc.f`
CORE_SRCS="${FILE_LIST//NEORV32_RTL_PATH_PLACEHOLDER/"$NEORV32_RTL"}"
GHDL="${GHDL:-ghdl}"

# Prepare UART SIM_MODE output files
Expand All @@ -21,18 +17,11 @@ chmod 777 neorv32_tb.uart0_rx.out neorv32_tb.uart1_rx.out
mkdir -p build

# GHDL import
$GHDL -i --work=neorv32 --workdir=build \
$CORE_SRCS \
"$NEORV32_RTL"/processor_templates/*.vhd \
"$NEORV32_RTL"/system_integration/*.vhd \
"$NEORV32_RTL"/test_setups/*.vhd \
neorv32_tb.vhd \
sim_uart_rx.vhd \
xbus_gateway.vhd \
xbus_memory.vhd
find .. -type f -name '*.vhd' -exec \
ghdl -i --std=08 --workdir=build --ieee=standard --work=neorv32 {} \;

# GHDL analyze
$GHDL -m --work=neorv32 --workdir=build neorv32_tb
$GHDL -m --work=neorv32 --workdir=build --std=08 neorv32_tb

# GHDL run parameters
if [ -z "$1" ]
Expand All @@ -45,7 +34,7 @@ fi
echo "GHDL simulation run parameters: $GHDL_RUN_ARGS";

# GHDL run
runcmd="$GHDL -r --work=neorv32 --workdir=build neorv32_tb \
runcmd="$GHDL -r --work=neorv32 --workdir=build --std=08 neorv32_tb \
--max-stack-alloc=0 \
--ieee-asserts=disable \
--assert-level=error $GHDL_RUN_ARGS"
Expand Down
Loading