转自EDA菜园子:
http://spaces.msn.com/EastDragon ... LAnZnHzLA!114.entry
! ~/ G- `/ q2 n) W( E9 D/ E- R3 ^1 {' T, _) ~# G' Y
How does a data-to-data check perform a setup check?
, [- A3 a, e# `' T+ K$ H
----------------------------------------------------
5 X3 E6 x9 U$ N; G( y/ R8 W
6 s2 R& u2 ~ X( f* lQuestion:
4 ~1 j a* o5 U4 t+ e2 u5 K% F+ z) _0 P
I have two data paths from register1 and register2 Q pins: one through a buffer
- L4 A* i6 q6 M: H* D+ P+ }and one through an inverter. They reach an OR gate A and B pins. I use a
$ T4 C2 Q) ^! R6 x( \data-to-data check in PrimeTime to check the timing between them. However, the
, B+ ?. A# {* P1 ]
edge relationship showed in the report_timing report seems incorrect. It is
, d$ s$ s* y: C. F' w+ M1 k" i8 C
supposed to be a zero-cycle check. In other words, it should check the capture
; |7 ]8 Q# S/ p; N2 ?/ z
edge with the closest previous launch edge. But PrimeTime seems to check the
5 J. e5 _; k: }( C/ P7 C3 \capture edge with closest NEXT launch edge. It seems to not make any sense in
2 N" ]$ S3 ~* u! F5 ]4 a2 Ia setup check. Please explain.
! ]: b0 A) S' J( V+ {
7 e0 o) A) J2 I& xVerilog file:
2 _$ U) x; t: A$ Q) gmodule test(A,B,d_clk,clk,OT);
) f4 n# b; t2 f" O- C
input A,d_clk,clk,B;
8 J0 R( T7 h8 ?$ O. }/ ^2 _
output OT;
5 G$ b5 |) f. N
FD1 my_reg1 (.D(A), .CP(d_clk), .Q(n1));
: E4 g, l5 Z- g- e5 `
IV my_inv (.A(n1), .Z(n2));
8 G6 s. ^, e+ U! M9 q# N9 y8 O1 U
IBUF1 my_buf (.A(b1), .Z(n3));
/ b1 V3 X" l4 d* {% h6 V- hOR2 my_gate (.A(n2), .B(n3), .Z(OT));
2 a' I) F, H: F, h6 c, Z# T
FD1 my_reg2 (.D(B), .CP(clk), .Q(b1));
0 H' S' x. V3 F& d7 }( M& n
endmodule
$ x; J. _( ?& }$ J3 K h
0 Y' l# r: t# J" @Script file :
- C! R: o$ [, @# c0 Y' \read_verilog test.v
. @4 Z |1 V qlink
/ E6 J, o1 P% \. Y8 m t1 hcreate_clock -p 20 -w {0 10} d_clk
9 i5 C. Q! O6 mcreate_clock -p 20 -w {5 15} clk
7 R# ]/ `# z3 W/ Z5 V) U. a, Q
set_data_check -rise_from my_gate/B -to my_gate/A -setup 0.66
+ u; f9 V: I- qreport_timing -delay max -to my_gate/A
, U) s1 r9 l- u: V b
, f) v: T% Z0 n- f# {3 T7 T1 |" E r. x4 U0 I ]2 d; a$ p
Timing report :
# v3 w& C* n& Q* [1 }( t' `3 c0 J
Startpoint: my_reg1 (rising edge-triggered flip-flop clocked by d_clk)
) p. P0 O7 ~3 F: y9 R7 r
Endpoint: my_gate (rising edge-triggered data to data check clocked by clk)
1 y9 ~+ d k9 W+ g9 }Path Group: clk
- \) A$ i) y5 Z8 PPath Type: max
( H& b t" J) K1 {: _
Point Incr Path
9 K1 S$ ]6 t4 C( U0 r
---------------------------------------------------------------
: J' x( b' a9 R0 |; wclock d_clk (rise edge) 20.00 20.00
+ x: q5 r' f: G" J! f, |7 m: A
clock network delay (ideal) 0.00 20.00
6 O K% p. u+ j) H
my_reg1/CP (FD1) 0.00 20.00 r
6 ^% B! Z! X& g! O1 I; Omy_reg1/Q (FD1) 1.44 21.44 f
& K1 P! y9 ]) m7 G# ~" y4 Lmy_inv/Z (IV) 0.58 22.02 r
. A" v( ?- ~, C( n' g
my_gate/A (OR2) 0.00 22.02 r
; r p$ l6 c% X; a8 c
data arrival time 22.02
# u' \% L) a3 o" L8 Z1 o: s
& P. C& p) B: V+ K. n. q
clock clk (rise edge) 5.00 5.00
, [7 {6 u& }3 ^clock network delay (ideal) 0.00 5.00
2 w- W* _, ]# [) kmy_reg2/CP (FD1) 0.00 5.00 r
$ C9 F* Y, ~( }# mmy_reg2/Q (FD1) 1.29 6.29 r
; N% c- Z" Y# Z! {% y% d, N" j rmy_buf/Z (IBUF1) 0.68 6.97 r
( \/ l# X' j# Qmy_gate/B (OR2) 0.00 6.97 r
h. h; Z, A [% ?" E$ R
my_gate/B (OR2) 6.97 r
8 q, U) p0 {5 w) x% Slibrary setup time -0.66 6.31
" [: U3 y& a3 {+ B5 P) O6 Odata required time 6.31
. n% S6 Q% S2 u; x---------------------------------------------------------------
; ]5 ^5 D9 r2 w/ \0 M8 ^3 t7 W
data required time 6.31
( ]1 K$ d& q0 B9 @3 i" Hdata arrival time -22.02
& }- x: k& Z3 L- T6 ]/ r9 O+ k% a! S2 {8 f% M; Y. V8 {) O
% E9 Z: B) H/ F! [/ J& D0 z9 B
! g& e7 k6 S8 K, j, ^1 r" `8 oAnswer:
1 N6 e+ |2 o% tThe selected setup edges are correct and as expected. The edge selection for
1 D0 F) j# k1 e/ X& Sdata checks follows the same principles as path-based setup/hold analysis in
; f+ ] Q6 x# }4 r& }PrimeTime, except that by default the check is zero cycles. Setup checks as
5 r6 }/ C6 N' S6 E( l
in this case, for a 1-cycle relation, are from the capture edge to the
; \# y! J5 P9 }, Jtightest previous launch edge:
. g/ ^4 x6 c7 b3 L# Q, l! h& m3 o# e
& S0 v) s( q# `- x! W7 |1-cycle setup = d_clk at 0 -> clk at 5
% E9 | Z( |# K3 a* @5 c; V! `7 i( K# z
The zero cycle check is (1-cycle check - 1 period of the capture clock)
$ |+ D. Z$ K# b0 S) }Subtraction in this context implies moving the capture edge 1 period back
; F. ]" X7 f$ R& ^
in time.
: r' Y c% ?+ E: a- N- `: W: t5 u e- Y& P, p2 q4 W- t2 d
0-cycle setup = d_clk at 0 -> clk at -15
' h0 R6 K# K& w( M2 ~3 K* r6 q% I6 w Q* Z& X
If we expand the by the base period it results in
+ q9 A! b1 U3 A
9 a7 k- e1 A" n: |0 l = d_clk at 20 -> clk at 5
$ ] J! G0 x' S$ ^; ]# O1 X; n
$ v- E/ F U/ C9 g6 M8 {) T/ q0 C! m0 QTo modify these relations, use set_multicycle path ON THE CONSTRAINED PATH
- X1 R0 F( U3 [7 M6 h(in this case, the path to my_gate/A) with the appropriate relation.
$ s5 T) |# ^# o7 ^$ `% `7 k8 a3 h* F) D. M6 X% h+ p7 t
set_multicycle_path 1 -to my_gate/A
2 Y& S U: G5 `! K, s$ k" n
$ e5 Y9 L4 ]4 x3 Z6 t6 aThis is the timing report after setting the multicycle_path:
! q% i& b/ P$ m* c. v- M8 x
Startpoint: my_reg1 (rising edge-triggered flip-flop clocked by d_clk)
, b" H- U2 ~( v5 `7 U% x* B0 M
Endpoint: my_gate (rising edge-triggered data to data check clocked by clk)
: Y) @/ s* J* fPath Group: clk
" L$ v: o( k% l
Path Type: max
! t# T$ F! O! F% J
Point Incr Path
6 Z, T" C4 @7 s---------------------------------------------------------------
_0 L2 y1 x0 K' V
clock d_clk (rise edge) 0.00 0.00
1 B; M* Y" b. Y) ^clock network delay (ideal) 0.00 0.00
' T9 K0 {/ f. `
my_reg1/CP (FD1) 0.00 0.00 r
$ F, X+ n+ E- k% Emy_reg1/Q (FD1) 1.44 1.44 f
' D3 C8 K" j3 x' M* F
my_inv/Z (IV) 0.58 2.02 r
* C6 w0 ?2 i! [/ u7 z
my_gate/A (OR2) 0.00 2.02 r
6 J( S* `6 n7 f" a" E
data arrival time 2.02
' \/ U! g; j# f1 \
( C8 \7 }' Z! ^
clock clk (rise edge) 5.00 5.00
1 A, e0 Y& w0 i! @8 A) g5 i) [clock network delay (ideal) 0.00 5.00
. d1 k i4 i% v. D+ C
my_reg2/CP (FD1) 0.00 5.00 r
7 O$ C7 @6 d5 X4 S: Z+ G
my_reg2/Q (FD1) 1.29 6.29 r
, J; O# {6 s: d4 N/ z n
my_buf/Z (IBUF1) 0.68 6.97 r
/ T3 d. }1 h6 ?( |; ~my_gate/B (OR2) 0.00 6.97 r
+ w3 O4 h5 `; {# E2 I0 o
my_gate/B (OR2) 6.97 r
X, o8 C+ W) d4 w% Wlibrary setup time -0.66 6.31
% B H% P8 \' K+ @data required time 6.31
. L; ], p( U- }! _/ a/ L
---------------------------------------------------------------
4 Z P5 {) m. [: T& A+ @ ddata required time 6.31
1 \' b( ^- ^5 udata arrival time -2.02
- V9 x+ P3 z( C/ O4 X
---------------------------------------------------------------
( K8 t8 ^0 \% A6 T9 F) vslack (MET) 4.29
1 Q N& i7 p" Y% B, \( v4 k
# e' }2 w- `3 h. q0 t h/ p6 s2 v; R# X/ C
Note: Currently the multicyle path applies to both the data-check constrained
/ D2 D5 N7 c1 o1 h9 o- D1 t' Q; F
path and the full path. An Enhancement Request (STAR 147028) has been made so
" @ ~0 n' i$ f; H3 J
that a multicycle path can be applied only to the data-check constrained path
+ V" y/ [- c- v( m* F/ M7 h
without applying it to the full path.
( t" k1 t- N* {; r' b0 e0 I7 K
4 w' \$ y/ ?4 q' ?6 W
% \; x; ?& X+ ~9 q' F##################################
) r. ]$ I& u8 C3 G9 S
if you want to get the detailed file, contact with me via
EastDragonInc@hotmail.com