TCL(.tcl) 파일이란 무엇인가요?

TCL(Tool Command Language)은 EDA tool의 스크립팅 언어입니다. Synopsys, Cadence, Siemens의 주요 tool이 모두 TCL 기반 인터페이스를 제공하며, 설계 flow를 자동화하는 데 사용됩니다. .tcl 파일 자체가 설계 데이터는...

TCL(.tcl) 파일이란 무엇인가요?
Photo by Davi Diório Mendes / Unsplash

TCL(Tool Command Language)은 EDA tool의 스크립팅 언어입니다. Synopsys, Cadence, Siemens의 주요 tool이 모두 TCL 기반 인터페이스를 제공하며, 설계 flow를 자동화하는 데 사용됩니다. .tcl 파일 자체가 설계 데이터는 아니지만, RTL-to-GDS flow를 구동하는 핵심 파일입니다.

자세한 문법은 아래를 참고하세요:

https://www.yes24.com/product/goods/172510976

Synthesis Script 예제

# syn_run.tcl (Design Compiler)

# ============================================
# Setup
# ============================================
set TOP_MODULE   "top_design"
set RTL_PATH     "./rtl"
set LIB_PATH     "./lib"
set RESULT_PATH  "./results"

# Library 설정
set_app_var target_library \
    "${LIB_PATH}/ss_0p75v_125c.db"
set_app_var link_library \
    "* ${LIB_PATH}/ss_0p75v_125c.db"

# ============================================
# Read Design
# ============================================
analyze -format sverilog [glob ${RTL_PATH}/*.sv]
elaborate ${TOP_MODULE}
link

# ============================================
# Constraints
# ============================================
source ./constraints/${TOP_MODULE}.sdc

# ============================================
# Synthesis
# ============================================
# Compile with optimization
compile_ultra -no_autoungroup -gate_clock

# ============================================
# Reports
# ============================================
report_timing -max_paths 10 \
    > ${RESULT_PATH}/timing.rpt
report_area -hierarchy \
    > ${RESULT_PATH}/area.rpt
report_power \
    > ${RESULT_PATH}/power.rpt
report_constraint -all_violators \
    > ${RESULT_PATH}/constraint.rpt

# ============================================
# Output
# ============================================
write -format verilog \
    -output ${RESULT_PATH}/${TOP_MODULE}.v
write -format ddc \
    -output ${RESULT_PATH}/${TOP_MODULE}.ddc
write_sdc \
    ${RESULT_PATH}/${TOP_MODULE}.sdc

P&R Script 예제

# pnr_run.tcl (Innovus)

# ============================================
# Design Import
# ============================================
set init_verilog "./results/top_design.v"
set init_design_settop "top_design"
set init_top_cell "top_design"
set init_lef_file [list \
    "./lib/tech.lef" \
    "./lib/cells.lef" \
    "./lib/sram.lef"  \
]
set init_mmmc_file "./scripts/mmmc.tcl"

init_design

# ============================================
# Floorplan
# ============================================
source ./scripts/floorplan.tcl

# ============================================
# Placement
# ============================================
setPlaceMode -place_detail_legalization_inst_gap 1
place_opt_design

# ============================================
# CTS
# ============================================
set_ccopt_property target_max_trans 0.15
set_ccopt_property target_skew 0.05
ccopt_design

# ============================================
# Route
# ============================================
setNanoRouteMode -routeWithTimingDriven true
setNanoRouteMode -routeWithSiDriven true
routeDesign

# ============================================
# Post-Route Optimization
# ============================================
optDesign -postRoute -hold

# ============================================
# Output
# ============================================
saveDesign ./results/top_design.enc
defOut ./results/top_design.def
saveNetlist ./results/top_design_routed.v

TCL 활용 팁

변수와 리스트를 활용하면 재사용 가능한 script를 만들 수 있습니다. proc로 함수를 정의하여 반복 작업을 자동화합니다. foreach로 여러 corner나 module에 대해 반복 실행합니다. Flow를 단계별 script로 분리하여 관리합니다(floorplan.tcl, placement.tcl, cts.tcl, route.tcl).

정리

TCL은 EDA tool을 구동하는 스크립팅 언어이며, synthesis, P&R, STA의 전 과정을 자동화합니다. Design import, constraint 적용, optimization, report, output을 script로 기술하며, MMMC 설정도 TCL로 관리합니다.

글 참여 도구

공유하기 토론 참여
이 글이 어떤 도움을 줬나요? 공개 숫자 없이 품질 개선 신호로만 사용합니다.

비공개 제보

오류나 추가 설명이 필요한가요?

공개 토론 대신 편집자에게 직접 보낼 수정·질문·다음 글 요청을 남겨주세요.

VLSI Korea

비공개 제보 보내기

작성한 내용은 [email protected]로 전달됩니다.

어떻게 받을까요?

익명 모드는 이름과 이메일을 보내지 않습니다. 다만 전송 서비스가 IP 등 기술 정보를 처리할 수 있어 절대적인 익명성을 보장하지는 않습니다.

ENGINEER DISCUSSION

현장에서는 어떻게 보고 계신가요?

동의, 반론, 보완 자료와 현업 경험을 남겨주세요. 답글 알림이 다시 토론으로 연결됩니다.

VLSI KOREA BRIEFING

매일, 중요한 신호만.

반도체 설계와 산업의 변화를 현직 엔지니어 관점에서 정리합니다. 무료이며 페이월이 없습니다.

FOR BUSINESS

이런 기술 콘텐츠가 필요하신가요?

기업용 기술 콘텐츠, 스폰서드 딥다이브, 사내 브리핑을 명확한 범위와 가격으로 진행합니다.

협업 방식·가격 보기 →
VLSI Korea Free forever · No paywall · Weekly semiconductor insights from practicing engineers
MY VLSI

내 읽기 보관함

저장한 글과 읽던 글을 한곳에서 이어보세요.