vcs, verdi 등등 툴을 실행할 때 옵션에 따라서 딱 파일리스트만 변경이 되는 경우 활용할 스크립트 입니다.
#!/bin/csh
# Usage: scriptname [-dft]
# -dft: If this option is provided, use the dft_filelist.f file. Otherwise, use the non_dft_filelist.f file.
# Set default value
set dft = "false"
# Process options
foreach arg ($argv)
switch ($arg)
case "-dft":
set dft = "true"
breaksw
default:
echo "Unknown option: $arg"
echo "Usage: $0 [-dft]"
exit 1
endsw
end
# Set file list variable based on the option
if ("$dft" == "true") then
set filelist = "dft_filelist.f"
else
set filelist = "non_dft_filelist.f"
endif
# Execute the final command
echo "Running: vcs -f $filelist"
vcs -f $filelist
이 스크립트는 다음과 같은 동작을 합니다:
-dft옵션이 주어지면dft변수를true로 설정합니다.-dft옵션이 없으면dft변수는 기본값false로 유지됩니다.dft변수의 값에 따라 사용할 파일 리스트(filelist변수)를 설정합니다.- 최종적으로
vcs -f $filelist명령어를 실행합니다.
사용 방법은 스크립트 주석에 포함되어 있으며, -dft 옵션을 제공하지 않으면 기본 파일 리스트인 non_dft_filelist.f가 사용됩니다. -dft 옵션을 제공하면 dft_filelist.f가 사용됩니다.
'IT > ASIC | FPGA' 카테고리의 다른 글
| VCS delay zero 처리 - +delay_mode_zero +notimingcheck (0) | 2024.08.09 |
|---|---|
| Verilog mode 간단한 사용법 - Emacs verilog mode (0) | 2024.08.07 |
| Verdi 옵션 - kdb,fsdb 물고 실행 (0) | 2024.07.01 |
| tcl 멀티라인 지원 - 작성 내용이 너무 길어서 엔터치고 싶다! (0) | 2024.06.19 |
| 표준 RTL 코드 스타일 - 기본에서 출발하자 (0) | 2024.05.31 |