diff --git a/scripts/clean_modelsim.bat b/scripts/clean_modelsim.bat new file mode 100755 index 0000000..4b5a711 --- /dev/null +++ b/scripts/clean_modelsim.bat @@ -0,0 +1,20 @@ +@echo off +rem ------------------------------------------------------------------------------ +rem clean_quartus.bat +rem Konstantin Pavlov, pavlovconst@gmail.com +rem ------------------------------------------------------------------------------ + +rem Use this file as a boilerplate for your custom clean script +rem for Modelsim projects + +del /s /q .\transcript +del /s /q .\wave.do +del /s /q .\modelsim.ini +del /s /q .\start_time.txt +del /s /q .\vsim.wlf + +del /s /f /q .\work\* +rmdir /s /q .\work\ + +pause +goto :eof diff --git a/scripts/clean_quartus.bat b/scripts/clean_quartus.bat index bdfdae9..f9f81df 100644 --- a/scripts/clean_quartus.bat +++ b/scripts/clean_quartus.bat @@ -7,7 +7,7 @@ rem ---------------------------------------------------------------------------- rem Use this file as a boilerplate for your custom clean script rem for Quartus projects -SET PROJ=MY_PROJECT_NAME +SET PROJ=test rem Common junk files del /s /q .\%PROJ%.qws @@ -15,6 +15,7 @@ del /s /q .\c5_pin_model_dump.txt del /s /q .\%PROJ%.ipregen.rpt del /s /f /q .\.qsys_edit\* rmdir /s /q .\.qsys_edit\ +del /s /q .\%PROJ%_assignment_defaults.qdf rem Compilation databases del /s /f /q .\db\* @@ -25,8 +26,8 @@ del /s /f /q .\greybox_tmp\* rmdir /s /q .\greybox_tmp\ rem Output directory -del /s /f /q .\OUTPUT\* -rmdir /s /q .\OUTPUT\ +del /s /f /q .\out\* +rmdir /s /q .\out\ rem Design space explorer files del /s /f /q .\dse\* @@ -40,4 +41,4 @@ rem Early power estimator files del /s /q .\%PROJ%_early_pwr.csv pause -exit +goto :eof diff --git a/scripts/clean_recursively.bat b/scripts/clean_recursively.bat new file mode 100755 index 0000000..a65ca79 --- /dev/null +++ b/scripts/clean_recursively.bat @@ -0,0 +1,52 @@ +@echo off +rem ------------------------------------------------------------------------------ +rem clean_recursively.bat +rem Konstantin Pavlov, pavlovconst@gmail.com +rem ------------------------------------------------------------------------------ + +rem Use this script to walk through all subdirs and execute cleaning scripts +rem there. Place cleaning script in every sybdir that requires cleaning. +rem Supported subdirectory cleaning scripts +rem - clean.bat (custom one) +rem - clean_modelsim.bat (special script for modelsim testbench dirs) +rem - clean_quartus.bat (special script for quartus project dirs) + + +echo INFO: ===================================================================== +echo INFO: clean_recursively.bat +echo INFO: The script may sometimes take a long time to complete +for /R %%f in (*) do ( + echo %%f | findstr /C:".git" >nul & if ERRORLEVEL 1 ( + + echo %%f | findstr /C:"clean\.bat" >nul & if ERRORLEVEL 1 ( + rem + ) else ( + pushd %%~df%%~pf + echo %%~df%%~pf + @echo | call %%f + popd + ) + + echo %%f | findstr /C:"clean\_quartus\.bat" >nul & if ERRORLEVEL 1 ( + rem + ) else ( + pushd %%~df%%~pf + echo %%~df%%~pf + @echo | call %%f + popd + ) + + echo %%f | findstr /C:"clean\_modelsim\.bat" >nul & if ERRORLEVEL 1 ( + rem + ) else ( + pushd %%~df%%~pf + echo %%~df%%~pf + @echo | call %%f + popd + ) + ) +) + +pause +goto :eof + diff --git a/scripts/find_large_files.bat b/scripts/find_large_files.bat new file mode 100755 index 0000000..1dfc69b --- /dev/null +++ b/scripts/find_large_files.bat @@ -0,0 +1,10 @@ +@echo off +rem ------------------------------------------------------------------------------ +rem find_large_files.bat +rem Konstantin Pavlov, pavlovconst@gmail.com +rem ------------------------------------------------------------------------------ + +forfiles /s /c "cmd /c if @fsize GTR 1000000000 echo @path" + +pause +exit