WGL(Waveform Generation Language)과 STIL(Standard Test Interface Language)은 DFT에서 사용하는 test pattern 파일입니다. ATE(Automatic Test Equipment)가 chip을 테스트할 때 이 파일의 패턴을 인가합니다.
WGL(Waveform Generation Language)란?
ATE 회사들이가 지원하는 데이터 기술 언어(Data Description Language)다. WGL 파일은 디지털 파형 데이터를 ASCII 형식으로 표현하기 때문에 일반 텍스트 편집기로도 자유롭게 편집할 수 있다.
반도체 업계에서 WGL은 로직 시뮬레이터에서 생성된 디지털 테스트 패턴을 테스터 하드웨어로 변환하거나, 반대로 테스터에서 시뮬레이터로 역변환할 때 사용하는 Intermediate File Format으로도 널리 활용된다.
WGL의 가장 큰 장점은 호환성이다. WGL을 지원하는 디지털 계측 장비나 테스터라면, WGL을 지원하는 시뮬레이션 툴과 직접 연동하거나, 별도의 변환기(Translator) 혹은 필터를 거쳐 간접적으로 연결하는 것이 가능하다. 즉, 시뮬레이터와 테스터 하드웨어 사이의 공통 언어 역할을 한다는 점에서 반도체 테스트 생태계에서 중요한 위치를 차지한다.
WGL 파일 예제
// example_scan.wgl
waveform scan_test
signal clk : input [0];
signal rst_n : input [1];
signal scan_en : input [2];
signal scan_in : input [3];
signal scan_out : output [4];
timeplate tp_shift
clk := input [0ns:D, 10ns:U, 20ns:D]; // rise at 10ns
rst_n := input [0ns:S]; // stable
scan_en := input [0ns:S];
scan_in := input [0ns:D, 5ns:S]; // data at 5ns
scan_out := output [18ns:X, 19ns:H/L, 20ns:X]; // capture window
end;
timeplate tp_capture
clk := input [0ns:D, 10ns:U, 20ns:D];
rst_n := input [0ns:S];
scan_en := input [0ns:S];
scan_in := input [0ns:S];
scan_out := output [18ns:X, 19ns:H/L, 20ns:X];
end;
pattern scan_pattern_1
// Reset
V { rst_n=0; scan_en=0; scan_in=0; } C { tp_shift; } R 5;
V { rst_n=1; }
// Shift-in: load test pattern (8 bits)
V { scan_en=1; scan_in=1; } C { tp_shift; } // bit 7
V { scan_en=1; scan_in=0; } C { tp_shift; } // bit 6
V { scan_en=1; scan_in=1; } C { tp_shift; } // bit 5
V { scan_en=1; scan_in=1; } C { tp_shift; } // bit 4
V { scan_en=1; scan_in=0; } C { tp_shift; } // bit 3
V { scan_en=1; scan_in=0; } C { tp_shift; } // bit 2
V { scan_en=1; scan_in=1; } C { tp_shift; } // bit 1
V { scan_en=1; scan_in=0; } C { tp_shift; } // bit 0
// Capture: functional clock 1 cycle
V { scan_en=0; } C { tp_capture; }
// Shift-out: read response (8 bits)
V { scan_en=1; scan_in=0; } C { tp_shift; }
E { scan_out=H; } // expected: 1
V { scan_en=1; scan_in=0; } C { tp_shift; }
E { scan_out=L; } // expected: 0
// ... 나머지 6 bits
end;
WGL 주요 문법
signal은 test pin을 정의합니다. timeplate은 하나의 clock cycle 내에서 신호의 timing을 정의합니다. D=drive low, U=drive high, S=stable(유지), H/L=expected high/low, X=don't care입니다.
자세한 문법은 아래에서 참고하세요:

V(Vector)는 각 pin의 값을 설정합니다. C는 적용할 timeplate을 지정합니다. E(Expect)는 출력의 기대값을 정의합니다. R N은 이전 vector를 N번 반복합니다.
STIL 파일 예제
// example_scan.stil
STIL 1.0 {
Design 2005;
}
Header {
Title "Scan Test Patterns";
Date "2026-03-23";
Source "DFT Compiler";
}
Signals {
clk In;
rst_n In;
scan_en In;
scan_in In;
scan_out Out;
}
SignalGroups {
all_inputs = 'clk + rst_n + scan_en + scan_in';
all_outputs = 'scan_out';
}
Timing tp_shift {
WaveformTable {
Period '20ns';
Waveforms {
clk { 01 { '0ns' D; '10ns' U; }}
rst_n { 01 { '0ns' D/U; }}
scan_en { 01 { '0ns' D/U; }}
scan_in { 01 { '0ns' D/U; }}
scan_out { LH { '18ns' L/H; }}
scan_out { X { '0ns' X; }}
}
}
}
PatternBurst scan_burst {
PatList { scan_patterns; }
}
PatternExec {
PatternBurst scan_burst;
}
Pattern scan_patterns {
// Format: clk rst_n scan_en scan_in : scan_out
// Reset
V { all_inputs = 0000; all_outputs = X; } W tp_shift; C;
V { all_inputs = 0000; } C;
// ... shift and capture patterns
}
WGL vs STIL 비교
WGL은 간결한 문법으로 빠르게 작성할 수 있고, STIL은 IEEE 1450 표준으로 더 체계적인 구조를 가집니다. ATPG tool(TetraMAX, Modus 등)은 둘 다 출력할 수 있으며, ATE vendor에 따라 선호하는 format이 다릅니다. 최신 tool과 ATE는 STIL을 선호하는 추세입니다.
SCANDEF 파일
# scan.def (DEF 내 scan chain 정의)
SCANCHAINS 2 ;
- chain_0
+ PARTITION chain_part_0
+ START reg_0 / SD
+ FLOATING
reg_3 ( IN SD ) ( OUT Q )
reg_7 ( IN SD ) ( OUT Q )
+ STOP reg_15 / Q
+ ORDERED
reg_0 ( IN SD ) ( OUT Q )
reg_1 ( IN SD ) ( OUT Q )
reg_2 ( IN SD ) ( OUT Q )
;
- chain_1
+ START reg_16 / SD
+ STOP reg_31 / Q
;
END SCANCHAINS
SCANDEF는 scan chain의 연결 순서를 정의합니다. P&R tool이 scan chain reorder 시 이 정보를 사용하며, 물리적으로 가까운 flip-flop끼리 연결되도록 재배열합니다.
정리
WGL과 STIL은 ATE가 chip을 테스트하기 위한 pattern 파일입니다. Timeplate으로 신호 timing을, vector로 pin 값을 정의합니다. SCANDEF는 scan chain 연결을 정의하며 P&R의 scan reorder에 사용됩니다.