ignore new fiels due to new verilator, run_compile can now run lint separately

This commit is contained in:
AngeloJacobo 2025-03-01 14:42:05 +08:00
parent 99eaa7d103
commit 4a71002cf8
2 changed files with 29 additions and 11 deletions

2
.gitignore vendored
View File

@ -1,4 +1,6 @@
formal/ddr3_multiconfig*prf*
formal/ddr3_multiconfig_default/
formal/ddr3_multiconfig_ecc/
formal/ecc/
formal/ddr3_singleconfig/
example_demo/nexys_video/build/

View File

@ -1,12 +1,24 @@
#!/bin/bash
# Function to run Verilator lint
run_lint() {
echo -e "\e[32mRun Verilator Lint:\e[0m"
verilator --lint-only rtl/ddr3_controller.v rtl/ecc/ecc_dec.sv rtl/ecc/ecc_enc.sv -Irtl/ -Wall
echo "DONE!"
}
# If the script is called with "lint", run only linting and exit
if [[ "$1" == "lint" ]]; then
run_lint
exit 0
fi
# Clean files
rm -rf formal/ddr3*prf*
rm -rf formal/ddr3_singleconfig
# run verilator lint
echo -e "\e[32mRun Verilator Lint:\e[0m"
verilator --lint-only rtl/ddr3_controller.v rtl/ecc/ecc_dec.sv rtl/ecc/ecc_enc.sv -Irtl/ -Wall
echo "DONE!"
# Run Verilator lint
run_lint
# run yosys compile
echo ""
@ -55,26 +67,30 @@ NC='\033[0m' # No Color
echo ""
echo ""
echo "Summary:"
# Excluded folders
excluded_folders=("formal/ddr3_multiconfig_default/" "formal/ddr3_multiconfig_ecc/")
# Iterate over folders starting with 'ddr3*'
for folder in formal/ddr3*/ ; do
# Check if the 'PASS' file exists in the folder
# Skip excluded folders
[[ " ${excluded_folders[*]} " =~ " ${folder} " ]] && continue
# Check for 'PASS' file
if [[ -e "${folder}PASS" ]]; then
# Print the folder name and 'PASS' in green
echo -e "${folder}: ${GREEN}PASS${NC}"
else
# Print the folder name and 'FAIL' in red
echo -e "${folder}: ${RED}FAIL${NC}"
fi
done
# Iterate over folders inside 'ecc/'
for folder in formal/ecc/ ; do
# Check if the 'PASS' file exists in the folder
[[ " ${excluded_folders[*]} " =~ " ${folder} " ]] && continue
if [[ -e "${folder}PASS" ]]; then
# Print the folder name and 'PASS' in green
echo -e "${folder}: ${GREEN}PASS${NC}"
else
# Print the folder name and 'FAIL' in red
echo -e "${folder}: ${RED}FAIL${NC}"
fi
done