우선 setup violation / hold violation에 대해 알아야, 이것들을 어떻게 해결할 것인지에 대해 이야기할 수 있겠다. Setup/Hold time에 관련된 문서를 아래에 첨부 하였다.
First of all, before I show how to solve setup/hold time violations, I'd like to explain what setup/hold time violation is. I attach related document about setup/hold violation in this article.
digital logic은 sequential logic과 combinational logic으로 구성된다. 설계자는 logic이 의도한대로 설계되었는지 확인하기 위해 function simulation과 timing analysis를 수행하게된다. timing analysis는 STA(static timing analysis)와 DTA(dynamic timing analysis)로 나누게 되는데, flip-flop to flip-flop의 timing analysis를 수행하는 것을 STA라고 한다. DTA는 STA가 걸러내지 못하는 asynchronous logic을 test pattern을 이용해 걸러내는 것을 말한다.
Digitial logic is consisted of sequential and combinational logic. Designers perform function simulation and timing analysis to check whether their logic is designed as they want. Time analysis is divided into STA(static timing analysis) and DTA(dynamic timing analysis). STA is to analyze time budget between start point flip-flop and end point flip-flop. STA lacks the analysis of asynchronous path. The asynchronous logic is checked by DTA with test patterns.
STA는 설계자가 사용하는 standard cell library와 design constraint를 가지고 F/F과 F/F 사이의 timing analysis를 한다. 이 때 생길 수 있는 violation이 setup time violation과 hold time violation이다.
setup time violation은 본문에 첨부한 문서에 기술되었다시피, start point F/F에서 end point F/F까지 우리가 원하는 시간안에 signal이 도착하지 않을 때 생기는 violation이다. 따라서 해결 방법으로는
(1) combination logic 사이에 F/F을 삽입하여 timing을 확보하는 방법이 있다. 대신 이 방법을 사용하면 1 cycle delay가 추가적으로 생기게 된다.
(2) 혹 과도한 contraint로 발생한 setup time violation이라면 적당한 수준으로 clock period를 늘림으로서 violation을 없앨 수 있다.
(3) 만약 F/F과 F/F 사이의 combination logic을 줄일 수 있다면 setup time violation을 해결하는데 도움이 될 것이다.
hold time violation 역시 본문에 첨부한 문서에 기술되어 있다. setup time은 capture edge를 기준으로 analysis하는 반면 hold time은 launch edge를 기준에서 확인한다. hold time은 datapath에 buffer를 추가함으로써 해결하는데, 보통은 front-end해서 해결하지 않고 back-end에서 해결한다. P&R후 wire delay등이 추가되어 hold time이 없어질 수 있기 때문이다. P&R후에도 hold violation이 존재한다면 buffer insertion을 통해 해결할 수 있다.