Skip to content

Commit

Permalink
[rtl] minor cleanup of file list setup
Browse files Browse the repository at this point in the history
  • Loading branch information
stnolting committed Aug 4, 2024
1 parent 8c2177f commit 6672eb6
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions rtl/generate_file_lists.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6672eb6

Please sign in to comment.