29 lines
1005 B
Bash
Executable File
29 lines
1005 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
repo_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
|
sim_dir="$repo_dir/build/common/questa"
|
|
mkdir -p "$sim_dir"
|
|
if [[ -d "$sim_dir/work" ]]; then
|
|
vdel -lib "$sim_dir/work" -all >/dev/null
|
|
fi
|
|
vlib "$sim_dir/work"
|
|
|
|
vlog -work "$sim_dir/work" -sv \
|
|
"$repo_dir/rtl/common/async_fifo_gray.sv" \
|
|
"$repo_dir/rtl/common/max2771_capture.sv" \
|
|
"$repo_dir/rtl/common/ethernet_crc32.sv" \
|
|
"$repo_dir/rtl/common/ethernet_packetizer.sv" \
|
|
"$repo_dir/rtl/common/ethernet_tx_mac.sv" \
|
|
"$repo_dir/tb/common/tb_ethernet_crc32.sv" \
|
|
"$repo_dir/tb/common/tb_ethernet_tx_mac.sv" \
|
|
"$repo_dir/tb/common/tb_async_fifo_gray.sv" \
|
|
"$repo_dir/tb/common/tb_recorder_stream.sv" \
|
|
"$repo_dir/tb/common/tb_capture_overflow.sv"
|
|
|
|
for test in tb_ethernet_crc32 tb_ethernet_tx_mac tb_async_fifo_gray \
|
|
tb_recorder_stream tb_capture_overflow; do
|
|
echo "== $test =="
|
|
vsim -c -lib "$sim_dir/work" "$test" -do 'run -all; quit -f'
|
|
done
|