Skip to main content
DFT Canvas
Difficulties in clock configuration when designing DFT

May 28, 2025

 

In test mode or DFT mode, it is common to control with an external GPIO (General Purpose Input/Output). However, there are restrictions on directly controlling the test mode or DFT mode with an external GPIO.
As the name suggests, GPIO is made for general purpose, so it does not support high-speed clocks. Therefore, if you conduct a test through GPIO, there are restrictions on the controllable speed. It varies by process, but it is usually difficult to achieve a speed higher than around 100MHz with GPIO. This means that the maximum clock speed that can be supplied externally is 100MHz.

However, CPUs operate at over 3GHz, and GPUs operate at over 1GHz. It is not possible to supply such a high speed by supplying a clock externally using GPIO.
However, we cannot not conduct a test. Can we test 3GHz using GPIO as it is? It is difficult to guarantee that it will operate at 3GHz just because it passed the 100MHz test. It is similar to guaranteeing that if you studied hard in elementary school, you will study hard in college.

Then, how can we supply a 3GHz clock to the test circuit with a GPIO whose limit is 100MHz?
We can do this by using a circuit that converts a low-speed clock to a high-speed clock, called a PLL.
In fact, PLL is a circuit that increases the stability of clocks coming directly from the outside, not just increasing the frequency, but also reducing fluctuations such as jitter, so it must be used when inputting a test clock through GPIO.
However, using PLL does not solve all the problems. When entering test mode, since software cannot be uploaded, the chip loses control authority, and in this state, the PLL must be made into a controllable structure.

Now, let’s take a closer look at how to control PLL. If PLL makes the test clock only 3GHz according to the CPU, in function mode, usually only about 10% of the entire circuits are activated at the same time, but in test mode, all circuits are forcibly turned on at the same time, and if a test is performed at 3GHz in this state, the chip may burn out. Therefore, both a fast clock made by PLL and a slow clock coming from GPIO are needed.

Now, what remains is the control to decide which of these two to use and when. You can choose which clock to use with a clock MUX, but it is not easy to safely control the clock switching timing, that is, when to change. This is implemented in the industry using an OCC (On Chip Clock Controller). The OCC switches fast and slow clocks at the necessary time according to the test flow. And if you specify this necessary time, the DFT commercial tool provided by EDA inserts the OCC.
The important part here is that you must know the switching point accurately, and in fact, this is one of the core parts of DFT design. To do this, the test clock path must be configured in advance. In this test mode, the clock path configuration is often different from the functional mode for convenience, but this reduces the accuracy of the test.

 The clock in DFT or test mode is much more complicated than this, but we looked at the operation of the clock system from the DFT perspective for easy understanding. In addition to the clock path difference between the functional mode and test mode mentioned above, all the clock system issues such as CDC, clock gating, and jitter mentioned in the Clock Canvas story must be solved simultaneously in test mode.


테스트 모드 혹은 DFT 모드에서는 외부 GPIO (General Purpose Input/Output)로 제어를 진행하는 것이 일반적입니다. 근데, 외부 GPIO로 테스트 모드나 DFT 모드를 직접 제어하는 것에는 제약이 있습니다.
GPIO는 이름에서 벌써 알 수 있듯이 General Purpose로 만들다 보니 고속 클럭에 대응이 안됩니다. 따라서 GPIO를 통해서 테스트를 진행하게 되면 제어할 수 있는 스피드에 제약이 생기게 됩니다. 공정마다 다르긴 한데, 보통 100MHz근처의 속도 이상은 GPIO에서 내기 어렵습니다. 이 얘기는 외부에서 공급할 수 있는 최대의 클럭 속도는 100MHz라는 얘기와 동일합니다.

그런데 CPU는 3GHz이상에서 동작하고, GPU는 1GHz이상에서 동작합니다. GPIO를 써서 외부에서 클럭을 공급하는 방식으로는 이렇게 높은 스피드를 공급할 수가 없습니다.
그렇다고 테스트를 진행하지 않을 수도 없죠. GPIO를 그대로 써서 3GHz를 테스트를 해도 될까요? 100MHz 테스트에서 통과했다고, 3GHz에서 동작한다고 보장하기는 어렵습니다. 마치 초등학교 때 공부를 잘했다고, 대학교 때 공부를 잘 한다고 보장하기는 어려운 것처럼요.

그럼 100MHz가 한계인 GPIO로 테스트 회로에 어떻게 3GHz 클럭을 공급할 수 있을까요?
저속 클럭을 고속으로 바꿔주는 회로, PLL을 쓰면 됩니다.
사실 PLL은 단순히 주파수만 올려주는 것이 아니라 Jitter 같은 흔들림도 줄여주기 때문에 외부에서 바로 들어오는 클럭의 안전성을 높여주는 회로로 GPIO를 통해 테스트 클럭을 넣을 때는 꼭 사용해야 합니다.
하지만, PLL을 쓴다고 문제가 다 해결된 것이 아닙니다. 테스트 모드로 진입하게 되면, 소프트웨어를 올릴 수 없기 때문에, 칩은 컨트롤 권한 주체가 사라진 상태가 되고, 이 상태에서 PLL을 제어 가능한 구조로 만들어야 합니다.

이제 PLL을 어떻게 제어할지 조금 더 자세히 살펴 보겠습니다.
CPU에 맞춰서 PLL이 테스트 클럭을 3GHz로만 만들어 준다고 하면,
기능 모드에서는 보통 전체 회로 중 많아야 10% 정도만 동시에 활성화되지만, 테스트 모드에서는 모든 회로를 강제로 한꺼번에 켜기도 하는데, 이 상태에서 3GHz로 테스트를 하게 되면 칩이 다 타버릴 수도 있습니다. 따라서 PLL로 만든 빠른 클럭과 GPIO로 들어오는 느린 클럭, 두 가지가 모두 필요합니다.

이제 남은건 이 두가지 중 어느 것을, 언제 사용할지를 정하는 제어입니다. 어느 클럭을 쓸지는 클럭 MUX로 고르면 되는데, 언제 바꿔야 하는지 즉 클럭 스위칭 타이밍을 안전하게 제어하는 것이 쉽지가 않습니다. 이것을 산업계에서는 OCC (On Chip Clock Controller)를 써서 구현했습니다. OCC는 테스트 흐름에 따라 빠른 클럭과 느린 클럭을 필요한 시점에 스위칭해줍니다. 그리고 이 필요한 시점을 지정해주면 EDA에서 제공하는 DFT 상용화 Tool이 OCC를 삽입해줍니다.
여기서 중요한 부분은 스위칭 포인트를 정확하게 알고 있어야 한다는 것인데, 사실 이 부분이 DFT 설계의 핵심 중 하나입니다. 이를 위해서는 테스트용 클럭 Path가 미리 구성되어 있어야 합니다. 이 테스트 모드에서의 clock path구성을 편의성 때문에, 기능 모드와 다르게 하는 경우가 많은데 이렇게 하면 테스트의 정확도는 떨어지게 되죠.

DFT나 테스트 모드에서의 클럭은 이것보다 훨씬 더 복잡하지만, 이해하기 쉽게 DFT 관점에서의 Clock System의 동작에 대해 살펴봤습니다.
위에서 얘기했던 기능 모드와 테스트 모드의 클럭 path difference 외에도 Clock Canvas 이야기에서 얘기했던 CDC, Clock Gating, Jitter 등의 Clock System의 모든 문제들을 테스트 모드에서도 동시에 해결해야 합니다.