SDC(.sdc) 파일이란 무엇인가요?

SDC(.sdc) 파일이란 무엇인가요?
Photo by Veri Ivanova / Unsplash

SDC(Synopsys Design Constraints)는 timing constraint를 기술하는 업계 표준 파일입니다. Clock 정의, IO timing, design rule 등을 TCL 문법으로 작성하며, synthesis부터 STA sign-off까지 동일한 SDC를 사용합니다. SDC의 정확성이 설계 품질을 결정합니다.

아래 책을 추천드립니다.

Constraining Designs for Synthesis and Timing Analysis: A Practical Guide to Synopsys Design Constraints (SDC): Gangadharan, Sridhar, Churiwala, Sanjay: 9781461432685: Amazon.com: Books
Constraining Designs for Synthesis and Timing Analysis: A Practical Guide to Synopsys Design Constraints (SDC) [Gangadharan, Sridhar, Churiwala, Sanjay] on Amazon.com. *FREE* shipping on qualifying offers. Constraining Designs for Synthesis and Timing Analysis: A Practical Guide to Synopsys Design Constraints (SDC)

SDC 파일의 기본 구조

# top_design.sdc

# ============================================
# 1. Clock 정의
# ============================================
# Primary clock: 500MHz (2ns period)
create_clock -name clk_main -period 2.0 [get_ports clk]

# PLL 출력 clock: 250MHz (clk_main의 1/2)
create_generated_clock -name clk_div2 \
    -source [get_ports clk] \
    -divide_by 2 \
    [get_pins pll_inst/clk_out]

# ============================================
# 2. Clock Uncertainty
# ============================================
# Pre-CTS: skew + jitter 포함
set_clock_uncertainty -setup 0.3 [get_clocks clk_main]
set_clock_uncertainty -hold  0.1 [get_clocks clk_main]

# ============================================
# 3. IO Constraints
# ============================================
set_input_delay  -clock clk_main -max 0.8 [get_ports data_in*]
set_input_delay  -clock clk_main -min 0.2 [get_ports data_in*]
set_output_delay -clock clk_main -max 0.6 [get_ports data_out*]
set_output_delay -clock clk_main -min 0.1 [get_ports data_out*]

# IO driving/load
set_driving_cell -lib_cell BUF_X4 [get_ports data_in*]
set_load 0.05 [get_ports data_out*]

# ============================================
# 4. Timing Exceptions
# ============================================
# CDC path: false path
set_false_path -from [get_clocks clk_main] \
               -to   [get_clocks clk_div2]

# Multicycle path: 2-cycle data path
set_multicycle_path -setup 2 \
    -from [get_pins slow_reg_*/Q] \
    -to   [get_pins result_reg_*/D]
set_multicycle_path -hold 1 \
    -from [get_pins slow_reg_*/Q] \
    -to   [get_pins result_reg_*/D]

# ============================================
# 5. Design Rules
# ============================================
set_max_transition 0.25 [current_design]
set_max_capacitance 0.1 [current_design]
set_max_fanout 20 [current_design]

Clock 정의 상세

create_clock은 primary clock을 정의합니다. -period는 ns 단위의 주기, -waveform으로 rise/fall edge를 지정합니다. Waveform을 생략하면 {0, period/2}가 기본값입니다(duty cycle 50%).

# 비대칭 waveform: rise at 0ns, fall at 1.5ns (75% duty)
create_clock -name clk_asym -period 2.0 \
    -waveform {0 1.5} [get_ports clk]

create_generated_clock은 PLL, divider, MUX 등에서 파생된 clock을 정의합니다. -source로 원래 clock과의 관계를 명시합니다. Tool은 이 관계를 통해 generated clock의 waveform을 자동 계산합니다.

# Clock MUX 출력
create_generated_clock -name clk_mux \
    -source [get_pins clk_mux_inst/A] \
    -combinational \
    [get_pins clk_mux_inst/Y]

set_input_delay / set_output_delay 이해하기

이 constraint는 chip 외부의 timing 환경을 모델링합니다.

set_input_delay -max 0.8은 "외부 데이터가 clock edge 이후 최대 0.8ns에 도착한다"는 의미입니다. Clock period가 2ns이면, chip 내부에서 사용할 수 있는 시간은 2.0 - 0.8 = 1.2ns입니다.

set_output_delay -max 0.6은 "외부에서 데이터가 clock edge 전 0.6ns에 안정되어야 한다"는 의미입니다. Chip 내부에서 출력을 만들어야 하는 시간은 2.0 - 0.6 = 1.4ns입니다.

# Multi-clock IO: 양쪽 edge에서 동작하는 DDR 인터페이스
set_input_delay -clock clk_ddr -max 0.5 \
    -rise [get_ports ddr_dq*]
set_input_delay -clock clk_ddr -max 0.5 \
    -fall -add_delay [get_ports ddr_dq*]

Timing Exception 주의사항

set_false_path는 해당 경로를 timing 분석에서 완전히 제외합니다. 잘못 적용하면 실제 timing violation을 놓치게 됩니다. CDC 경로, test-only 경로, static configuration register 등 확실히 비활성인 경로에만 적용해야 합니다.

set_multicycle_path의 -setup N은 setup check를 N번째 capture edge로 이동시킵니다. 이때 hold check도 함께 N-1만큼 이동하므로, 원래 위치로 되돌리려면 -hold N-1을 반드시 함께 지정해야 합니다.

Flow별 SDC 활용

동일한 SDC를 flow 전체에서 사용하지만, 단계별로 일부 값이 달라질 수 있습니다. Pre-CTS에서는 clock_uncertainty에 예상 skew를 포함하고, post-CTS에서는 실제 skew가 tree에 반영되므로 uncertainty를 jitter만으로 줄입니다. 이를 위해 SDC를 단계별로 분리하거나, conditional constraint를 사용합니다.

정리

SDC는 clock, IO timing, design rule, timing exception을 TCL 문법으로 기술하는 표준 constraint 파일입니다. Synthesis, P&R, STA에서 동일한 SDC를 사용하며, constraint의 정확성이 설계 결과를 결정합니다.

Enjoyed this article?

Get deep-dive semiconductor analysis and career insights delivered weekly. Free forever — no paywall, no upsell. Funded by sponsorships with a strict editorial firewall (Editorial Standards).

Work with me

Consulting · Collaboration · Support

Paid 1:1 technical consulting, speaker invitations, collaboration proposals, or just want to say thanks — all welcome.

View options →
VLSI Korea Free forever · No paywall · Weekly semiconductor insights from practicing engineers
Support