diff --git a/rtl/generate_file_lists.sh b/rtl/generate_file_lists.sh index e03a3fdfe..c91738e4e 100644 --- a/rtl/generate_file_lists.sh +++ b/rtl/generate_file_lists.sh @@ -4,24 +4,29 @@ # using GHDL's elaborate option. set -e - cd $(dirname "$0") -mkdir -p ~build +# top entities +CPU_TOP=neorv32_cpu +SOC_TOP=neorv32_top +# temporary GHDL project +mkdir -p ~build ghdl -i --work=neorv32 --workdir=~build core/*.vhd core/mem/*.vhd +# CPU core only echo "Regenerating file_list_cpu.f ..." -ghdl --elab-order --work=neorv32 --workdir=~build neorv32_cpu > ~file_list_cpu.f +ghdl --elab-order --work=neorv32 --workdir=~build $CPU_TOP > ~file_list_cpu.f while IFS= read -r line; do echo "NEORV32_RTL_PATH_PLACEHOLDER/$line" done < ~file_list_cpu.f > file_list_cpu.f +# full processor/SoC echo "Regenerating file_list_soc.f ..." -ghdl --elab-order --work=neorv32 --workdir=~build neorv32_top > ~file_list_soc.f +ghdl --elab-order --work=neorv32 --workdir=~build $SOC_TOP > ~file_list_soc.f while IFS= read -r line; do echo "NEORV32_RTL_PATH_PLACEHOLDER/$line" done < ~file_list_soc.f > file_list_soc.f -rm ~file_list_cpu.f ~file_list_soc.f -rm -rf ~build +# clean-up +rm -rf ~build ~file_list_cpu.f ~file_list_soc.f