하드웨어 설계/Design Compiler User Guide

Chapter 7 Defining Design Constraints - Part 1

가카리 2012. 8. 31. 15:12
반응형

다음의 내용은 synopsis Design Compiler User guide를 번역해보았습니다..

 

 

Design Compiler User Guide_Version F-2011.09-SP2, December 2011.pdf

 

 

Chapter 7 Defining Design Constraints

 

목차

 

Design Compiler Constraint Types

Design Rule Constraints

Optimization Constraints

Managing Constraint Priorities

Reporting Constraints

Propagating Constraints in Hierarchical Designs

 

 

Design Compiler Constraint Types

 

Design Compiler가 최적화시 2가지 타입의 constraint를 쓴다.

 

 

 

 

 

 

1. Design rule constraints

     Design rule constraints ASIC vendor에 의해서 technology library에 정의되어있다.

     DRC를 버리거나 재정의 할 수 없다.

     DRC를 더욱 제한적으로 할 수 는 있다. 이것은 optimization에 도움이 된다.

     DRC design net에 관계가 있다.

DRC는 각 library 마다 다르다.

 

2. Optimization Constraints

     Optimization Constraints는 유저에 의해서 명확히 제한을 건다.

     디자인의 목표(area, timing)을 구체적으로 기술 할 수 있다.

     이러한 것은 현실적이어야 한다.

 

 

Design Rule Constraints

 

DRC는 다음 4가지로 구성된다.

 

     Maximum transition time

     Maximum fanout

     Minimum and Maximum capacitance

     Cell degradation

 

Maximum transition time, Maximum fanout, Minimum and maximum capacitance 속성은 없앨 수 없다. 그러나 좀더 제한적으로 set을 할 수 있다.

 

Design Rule Cost Function

 

Design Compiler design rule 위반을 고치는데 도움을 준다. 만약에 여러개의 위반이 있다면 Design Compiler는 가장 우선순위가 높은 위반 부터 수정하려고 시도한다. 가능하다면 design rule 위반을 줄이기위해서 양자택일의 방법을 선택하기도 한다.

 

 

 

Maximum Transition Time

 

 

 

 

value high에서 low로 바뀔 때나 low에서 high로 바뀔 때 걸리는 시간을 말한다. 이러한 maximum transition time을 제한을 둘 수 있다. 각각의 net max_transition 값보다 작아야한다.

이러한 net에 걸리는 transition time technology library에 있는 타이밍 데이터를 이용해서 계산 된다.

 

set_max_transition 명령어를 이용해서 constraint를 줄 수 있다.

 

example) adder 3.2 max transition 설정

dc_shell> set_max_transition 3.2 [get_designs adder]

 

이때 시간단위는 report_lib 를 하면 나오는 아래를 보면 알 수 있듯이 Time Unit 1ns이다.

 

 

 

 

다음과 같이 remove_attribute 를 하면 max_transition을 없앨 수 있다.

dc_shell> remove_attribute [get_designs adder] max_transition

 

Specifying Clock-Based Maximum Trainsition

 

max_transition 값은 동작하는 셀의 최대 주파수(최대 clock 주파수)를 바꿀 수 있다.

이때 최대 주파수 설정은 create_clock 명령어를 이용한다.

 

 

Design Compiler는 다음의 max_transition 값을 결정하기 위해서 다음의 룰을 따른다.

 

     디자인이나 포트 또는 clock group max_transition 속성이 적용되면 가장 큰 제한 값이 사용된다.

     multiple clocks이 같은 path에 걸리면 가장 큰 제한 값이 사용된다.

     만약 max_transition 속성이 이미 technology library에 사용됬다면 컴파일 하는 도중에 이 max_transition 값을 맞추려고 자동적으로 최적화한다.

 

예를들어 clock 그룹인 Clk max_transition time을 제한을 두려면 다음과 같이 한다.

dc_shell> set_max_transition 5 [get_clocks Clk]

 

Maximum Fanout

 

Maximum fanout 값을 라이브러리 전체나 아니면 개개의 셀의 핀에 제한을 둘 수 있다. 물론 이때 기존에 library에 제한된 값보다 더욱 더 좁게 제한을 해야 한다.

max_fanout 속성 적용 시 각 인풋의 fanout_load를 고려를 해줘야 한다.

만약 다음과 같은 경우를 고려하면

 

 

 

fanout_load 의 총합인 X max_fanout을 넘지말아야한다.

X max_fanout값을 넘었다면 Dedsign Compiler higher-drive component를 사용한다.

 

Maximum Fanout Calculation Example

 

 

 

만약 위의 예제에서

 

dc_shell> set_max_fanout 8 [get_designs ADDER]

 

을 한다면

 

 

을 충족시키므로 max_fanout으로 설정할 수 있다.

 

max_fannout 설정 해지방법 예제.

 

dc_shell> remove_attribute [get_ports port_name] max_fanout

dc_shell> remove_attribute [get_designs design_name] max_fanout

 

Defining Expected Fanout for Output Ports

set_fanout_load 명령어로 예상되는 fannout load 값을 output port에 넣을 수 있다.

물론 total load 값이 maximum fanout load 값보다 적어야한다.

 

fanout load 속성 해지방법도 다음과 같다.

 

dc_shell> remove_attribute port_name fanout_load

 

 

Example) 만약 라이브러리셀 libA에 있는 AND2 fanout load 값을 알고 싶다면

dc_shell> get_attribute "libA/AND2/i" fanout_load

 

Example) 만약 라이브러리셀 libA에 있는 default_fanout_load값을 알고 싶다면?

dc_shell> get_attribute libA default_fanout_load

 

 

Maximum Capacitance

 

maximum capacitance pin-level 속성으로 지정해두면 그 핀은 넷에 연결할 때 전체 capacitance 값이 지정한 maximum capacitance를 넘을 수 없다.

 

max_fanout max_transition net의 제한을 간접적으로 하지만 max_capacitance는 직접적으로 제한을 한다.

 

maximum capacitance 또한 각 셀의 동작 주파수를 변경 시킬 수 있으며 Design Compiler는 이보다 작은 값을 맞추려고 component를 바꿀 수도 있다.

 

max_capacitance 값은 set_max_capacitance 명령어로 정의한다.

 

Example) adder max_capacitance 3으로 지정한다 단위는. 다음에 나와있다.

 

 

 

 

dc_shell> set_max_capacitance 3 [get_designs adder]

다음과같이 remove_attribute 명령어를 통해서 max_capacitance를 없앨 수도 있다.

 

dc_shell> remove_attribute [get_designs adder] max_capacitance

 

Specifying Frequency-Based Maximum Capacitance

 

max_capacitance 값은 각 셀의 동작 주파수를 결정한다. compile_enable_dyn_max_cap 변수를 true로 두면 각 driver pin frequency-based maximum capacitance를 결정하게 된다.

이것을 쓰기 앞서서 library multiple 주파수에 관한 내용이 포함되있어야한다. 이것은 각 driver pin에 따른 maximum capacitance 값이 lookup table이란 곳에 써져있다.

 

Design Compiler 다음의 순서로 max_capacitance를 결정한다.

     각 셀의 최대 동작 주파수를 결정한다.

     technology library lookup table에 확인해서 max_capacitance값에 충족되는지 확인한다.

     driver pin에 적절한 max_capacitance 값을 정하고 이 값을 합성에 사용한다.

 

Minimum Capacitance

 

Minimum Capacitance 또한 design rule constraint이다. 몇몇 technology library에만 정의가 되있다. 이것은 load capacitance의 최소 값인데 Design Compiler Maximum capacitance 보다 먼저 이 값을 확인하게 된다. 만약에 이 값을 충족시키지 못하면 Design Compiler driver size를 변경함으로써 값에 맞춘다.

 

set_min_capacitance 명령어로 지정을 할 수 있다.

 

Example) minimum capacitance value 12.0 unit으로 지정함 포트 이름은 high_drive

 

dc_shell> set_min_capacitance 12.0 high_drive

 

report_constraint –min_capacitance 로 현재 지정된 minimum capacitance속성를 볼 수 있다.

 

만약 속성을 지우고 싶다면

 

remove_attribute 명령어를 이용하면 된다.

 

 

 

Cell Degradation

 

Cell degradation 또한 net design rule constraints이다. 몇몇 technology library cell degradation 테이블을 포함한다. 테이블은 cell transition의 함수에서 유도된 maximum capacitance 값이 들어있다.

 

이 값 또한 max_capacitance와 비슷하지만 max_capacitance가 우선순위가 더 높다. max_capacitance가 충족됬는지보고 그 다음 cell_degradation 값 보다 높은지 또 확인하게 된다.

만약 max_capacitance가 충족되면 cell_degradation값 또한 충족하게된다.

cell_degradation은 각 넷의 최대로 drive 할 수 있는 capacitance를 말한다.

 

오직 DC Ultra license에서만 사용가능하고 문법은 다음과 같다.

set_cell_degradation cell_deg_value object_list

 

Example) cell_degradation 값은 2 unit으로 포트이름은 late_riser

dc_shell> set_cell_degradation 2.0 late_riser

 

만약 이 속성을 지우고 싶다면 remove_attribute명령어를 쓰면 된다.

 

 

Design Rule Constraints 의 우선순위

 

1. Minimum capacitance

2. Maximum transition

3. Maximum fanout

4. Maximum capacitance

5. Cell degradation

 

만약 Maximum fanout이 조건을 충족시키지 못하면 maximum transition과 충돌이 났는지 확인해본다. 그러나 Design Compiler maximum fanout 조건 위반을 충족시키기위해서 transition time을 나쁘게 만드는 일은 하지 못한다.

 

Design Compiler transition time 라이브러리를 이용해서 계산하는 방법 2가지

1) 라이브러리에 CMOS delay model으로 driving cell drive resistance net capacitive load를 이용해서 transition time을 계산한다.

 

2) 라이브러리에 nonlinear delay model으로 table lookup interpolation을 이용해서 transition time을 계산한다. 이것은 output pin에서의 capacitance input transition time의 함수 이다.

 set_driving_cell set_drive 명령어는 technology library마다 다르게 행동 할 수 있다.

 

보간(interpolation)이란 사이값을 보충한다는 의미입니다. 이미 알고 있는 값을 사용해 사이에 있는 값을 추정적으로 간단히 계산하는것입니다.

 

set_drive is used to specify the driving strength of an output for ex: set_drive 0 for clocks and reset
set_driving_cell is set on inputs to specify the input side driving cell.

 

set_drive는 어떤 특정한 object의 저항이나 drive strength를 지정한다.(구체화된 라이브러리에 없는 top design 일때 그래서 이것은 set_driving_cell만큼 정확하지는 않다)

set_driving_cell technology library셀의 driving port/pin에 지정하게 된다.

만약 0을 지정하면 가장 큰 drive strength를 사용하게 된다.

                                                                                                     

1) 라이브러리가 CMOS delay model을 사용할 때는 drive resistance가 상수이다. 그래서 set_drive set_driving_cell이 같은 결과를 만든다.

 

2) 라이브러리가 nonlinear delay model을 사용할 때는 set_driving_cell 명령어가 table에 있는 load에 따라 transition time이 바뀌게 되고 set_drive명령어는 명령어가 실행될 때 table에 있는 load를 중간 범위에 있는 값을 가져다 쓴다.

 

set_drive set_driving_cell 모두 transition delay와 연관이 있다.

 

set_load 명령어는 포트나 net load값을 준다. 이것은 technology libray에 단위와 일치해야 하며 timing optimization을 하는동안 사용된다.(maximum fanout optimization이 아니라)

 

Design Rule Scenarios

 

set_max_fanout and set_max_transition commands

set_max_fanout and set_max_capacitance commands

 

technology library 는 일반적으로 max_transition 또는 max_capacitance default값이 정의되어있다. 둘 다는 아니다. 그래서 좋은 결과를 위해서는 max_transition max_capacitance를 혼용하지말자.

 

 

 

 

 

Disabling Design Rule Fixing on Special Nets

 

set_auto_disable_drc_nets 명령어는 design rule clock, constant, 또는 scan net에 고정한다. 명령어는 현재 디자인의 모든 net  내가 specify한 옵션에 대해서 clock net, constant net, scan net에 실행이 된다. 만약 auto_disable_drc_nets 속성이 적용되있는 net이 있다면 그 net design rule disable된다.

 

default로는 clock constant net design rule fixing disable 되있다.(-default 옵션을 쓴것과 같음), scan net 은 아니다

 

만약 –all 옵션을 쓴다면 모두 disable 시킬 수 있다. –clock, -constant, -scan 옵션을 써서 각각 독립적으로 true, false 할 수 있다.

-none 옵션을 쓰면 모두 enable 할 수 있다.

 

만약 set_auto_disable_drc_nets명령어로 clock net enable 시켜도 clock net의 이상적인 timing 특성을 바꾸지 못한다. 그래서 set_propagated_clock 명령어로 이상적인 clock net timing을 바꿀 수 있다.

 

You cannot use the set_auto_disable_drc_nets to override disabled design rule fixing on ideal networks marked with ideal network attributes. This command never overrides the settings specified by the set_ideal_net or the set_ideal_network command.

 

 

Summary of Design Rule Commands and Objects

 

 

 

Optimization Constraints

 

Optimization Constraints timing area 에 관한 디자인 목표이다. 디자인의 operation에 영향을 받지 않은 제한들이다.

 

그리고 timing 제한이 area 제한보다 우선순위가 더 높다.

 

Optimization Constraints의 구성

 

Timing constraints (performance and speed)

1. Input and output delays (synchronous paths)

2. Minimum and maximum delay (asynchronous paths)

Maximum area (number of gates)

 

Optimization Cost Function

 

mapping 할 때 Design Compiler optimization cost를 줄이기 위해서 노력한다.

 

cost를 개선시키기 위해서 고려해야 할 사항은 다음과 같다.

중요도순

1. Maximum delay cost

2. Minimum delay cost

3. Maximum area cost

 

Design Compiler는 위 요소를 각각 독립적으로 평가한 뒤 한 요소의 cost를 줄이고 다른 순위가 높은 cost를 올리는 것은 하지 않는다.

더 이상 개선할 수 없을 때까지 optimize를 하게 된다.

 

Timing Constraints

 

만약 디자인이 synchronous path create_clock 명령어로 clock을 명시한 뒤 set_input_delay 명령어와 set_output_delay명령어로 input/output port timing을 명시하게 된다.

 

Asynchronous path set_max_delay set_min_delay 명령어로 핀간의 delay값을 명시하게 된다.

 

 

 

Maximum Delay

 

Design Compiler static timing analyzer timing constraint를 분석하게 된다. critical path, 모든 timing path minimum, maximum delay를 계산한다. 이때 technology library에 있는 정보에 기초해서 계산을 하게 된다.

 

Cost Calculation

Maximum delay optimization cost function에서 가장 중요한 비율을 차지하는데 그 cost 함수는 다음과 같다.

 

 

 

 

 

Maximum delay target value clock waveform, skew, library setup times, external delays, multicycle 또는 false path specifications그리고 set_max_delay명령어를 고려한 뒤 계산된다. 이외에도 load, drive, operating conditions, wire load model그리고 다른 요소까지 고려될 수 있다.

 

그리고 Maximum delay cost group_path 명령어와 create_clock 명령어에 의해서 어떻게 path가 그룹화 됬는지에 따라 달라 질 수 있다.

 

1) 만약 오직 한 group path가 존재한다면 worst violation 값이 group weight 에 곱해질 것이다.

 

2) 만약 많은 group path가 존재한다면 모든 그룹에 대한 cost design maximum delay를 결정하는데 고려될 것이다.

 

Delta = max(delta(pin1), delta(pin2), ... delta(pinN))

 

Minimum Delay

 

Minimum Delay set_min_delay 명령어로 지정된다. 그리고 항상 target delay보다는 크게 지정해야 한다. Design Compiler는 만약 set_fix_hold 명령어가 사용될 때만 minimum delay cost를 사용한다.

 

이유는 Design Compiler는 오직 design rule violations fix 할 때만 minimum delay가 사용되기 때문이다.

 

그래서 만약에 fix_hold가 어떤 clock에서 사용되지 않았으면 minimum delay는 고려하지 않는다. fix_hold min_delay가 명시되있다면 minimum delay optimization cost에 두 번째로 고려하게된다(첫번째는 maximum delay)

 

set_min_delay 명령어

    디자인의 timing path minimum delay를 정의한다.

set_fix_hold

    컴파일 동안에 Design Compiler가 레지스터의 hold time violations fix하라고 정의한다. 그래서 set_false_path 또는 set_multicycle_path 명령어를 써서 set_fix_hold에 영향을 받는 pathdefault path delay를 재정의 할 수 있다.

 

다음은 set_false_path 명령어와 set_multicycle_path 명령어의 부연 설명이다.

 

set_false_path : Specifies a false-path exception, removing (or cutting) paths from

timing analysis.

 

set_multicycle_path : Specifies a multicycle exception for a given set of paths.
 
Multicycles can be specified relative to the source clock (-start) or destination clock (-end). This is useful when the source clock and destination clock are operating at different frequencies.  For example, if the source clock is twice as fast (half period) as the destination clock, a -start multicycle of 2 is usually required.

 

Cost Calculation

 

Mininum delay cost path group에 영향을 미치지 않는다. 그래서 다음식이 나온다.

 

 

 

minimum delay cost 함수는 single pin or port multiple pin or port나 같은 delta 값을 가진다.

Delta = min_delay - minimum delay(pin or port)

 

min_delay set_min_delay

 

 

Maximum Area

 

Maximum area optimization constraints이다. Maximum area는 게이트의 수로 표현이 된다.

일반적으로 timing optimization 이 끝난 후에 area를 위한 optimization이 수행된다.

 

set_max_area명령어는 허용가능한 최대 area를 지정해준다. Design Compiler net area 또한 고려한다.

 

하지만 다음 3가지는 area로 고려하지 않는다.

 

Unknown components

Components with unknown areas

Technology-independent generic cells(이부분 이상함)

 

Cost Calculation

 

cost = max(0, current area – max_area)

 

Defining Maximum Area

 

Examples

dc_shell> set_max_area 0

 

Area unit is defined by the library supplier

라이브러리에 없으므로  벤더에 요구해야한다.

 

2-input NAND gate단위인지 transistor 단위인지 mil^2 or mm^2 or um^2 단위인지 물어봐야 함

 

만약에 set_max_area값에 맞추지 못한다면 그래도 최대한 area를 최적화한다. 그러나 compiler 시간이 늘어날 것이다.

 

 

 

 

 

Managing Constraint Priorities

 

 

 

 

 

 

 

어떤 상황에서는 delay의 우선순위를 높게해야 될 수 도 있다.

 

그래서

 

set_cost_priority [-default] [-delay] cost_list 로 우선순위를 바꿀 수 있다.

 

-default

    Design Compiler는 위에 명시된 순서대로 우선순위를 둔다.

-delay

    max_delay 우선권이 최우선으로 된다.

cost list

명시한 순서대로 된다.

max_delay, min_delay, max_transition, max_fanout, max_capacitance, cell_degradation, and max_design_rules.

 

Examples To prioritize max_delay ahead of the maximum design rule constraints, enter dc_shell> set_cost_priority -delay

 

To assign top priority to max_capacitance, max_delay, and max_fanout—in that order— enter

 

dc_shell> set_cost_priority {max_capacitance max_delay max_fanout}

 

위처럼 max_capacitance max_delay, max_fanout만 쓰면 나머지는 자동적으로 우선권이 낮아진다.

 

Reporting Constraints

 

report_constraint 명령어는 constraint 값을 report한다.

 

1) 현재 디자인이 constraint가 만족됬는지 아닌지

2) 얼마나 많이 constraint가 만족되는지 아닌지

3) The design object that is the worst violator

4) maximum delay 정보, path group별로 cost를 보여줌. 이것은 레지스터 또는 port setup time 또는 output delay violations뿐만 아니라 set_min_delay violations까지 보여준다.

5) minimum delay cost, 레지스터 또는 port hold time violationsset_min_delay 명령어의 violation까지 보여준다.

 

-verbose 옵션을 주면 더욱 세밀한 정보를 얻을 수 있고

-all_violators 옵션을 주면 모든 constraint violators를 볼 수 있다.

 

 

반응형