< '*ere p is any -ositive inte,er. *ese filters can t*en be o-erate0 'it* lo'er su--ly volta,e to re0uce -o'er consu+-tion. >a? W*at value of p or bloc( si:e s*oul0 be c*osen to obtain a circuit 'it* t*e least -o'er consu+-tionZ &alculate t*e su--ly volta,e an0 -o'er consu+-tion for t*is . >b? I! t*e ,oal is not to re0uce t*e -o'er% but to re0uce t*e area1-o'er -ro0uct% '*at value of p or bloc( si:e s*oul0 be c*osenZ &alculate t*e su--ly volta,e% -o'er consu+-tion% an0 area1-o'er -ro0uct
,,
PIPELINING AND PARALLEL PROCESSING
for t*is . or area calculation% assu+e t*at t*e cost of a00ers is ne,li,ible co+-are0 to t*e cost of +ulti-liers. 4. Pi-eline t*e circuit s*o'n in i,. =.48>c? by -lacin, latc*es at a--ro1 -riate fee01for'ar0 locations suc* t*at t*e critical -at* is re0uce0 by a factor of ; to 9 U.t. &onsi0er t*e ca-acitance of a circuit ele+ent to be -ro-ortional to its -at* len,t*. &alculate t*e -o'er consu+-tion of t*e circuit as a -ercenta,e of t*e ori,inal seuential circuit in i,. =.48>a?. >Use t*e sa+e -ara+eters as in E/a+-les =..; an0 =..=?. 4@. &onsi0er -o'er consu+-tion re0uction of a circuit at sa+e s-ee0 by use of -i-elinin, an0 -arallel -rocessin,. "et %o be t*e ori,inal su--ly volta,e of t*e seuential syste+. "et >= re-resent t*e su--ly volta,e re0uction factor of an "1-arallel M1Ievel -i-eline0 syste+% i.e.% t*is sys1 te+ is o-erate0 'it* su--ly volta,e *8% o) "et >=4 be t*e su--ly volta,e re0uction factor for an M 1level -i-eline0 syste+ o-erate0 at t*e sa+e s-ee0% i.e.% t*is syste+ is o-erate0 'it* su--ly volta,e >=4 %o) "et >84 be t*e su--ly volta,e re0uction factor of an "1-arallel syste+ o-eratin, at t*e sa+e s-ee0 as seuential circuit o-erate0 'it* su--ly volta,e >=4%o) S*o' t*at >= Q *8'>84)
REFERENCES
4. J. Hennessy an0 <. Patterson% Computer =rchitecture = [uantitati!e =pproach, nd ed)) Mor,an Kauf+ann Publis*ers% 4559. ;. [. H'an, an0 . A. Bri,,s% Computer =rchitecture and Parallel Processing) McLra'1Hill% 458. =. P. M. Ko,,e% The =rchitecture of Pipe lined Computers) McLra'1Hill% 4584. . H. . Kun,% GW*y systolic arc*itecturesZG --. =71@% Jan. 458;.
IQQQ Computers Maga4ine, vol. 4@%
@. U. Baneree et al.% Gi+e an0 -arallel -rocessor boun0s for fortran li(e loo-s%G IQQQ 'rans) on Computers, vol. ;8% --. 9961976% 4575. 9. !. Jou--i an0 <. Wall% GAvailable instruction level -arallelis+ for su-erscalar an0 su-er1-i-eline0 +ac*ines%G in Proc) of rd International Conference on =rchitectural &upport for Programming Languages and 1perating &ystems, >Boston?% --. ;7;1;8;% May 4585. 7. M. "a+% GSoft'are -i-elinin,C an effective sc*e0ulin, tec*niue for "IW +a1 c*ines%G in Proc) of the =CM &IBPL=$ Conference on Programming Language Design and Implementation, >Atlanta?% --. =481=;8% June 4588. 8. <. A. Pa0ua an0 M. J. Wolfe% GA0vance0 co+- iler or,ani:ations for su-erco+1 -uters%G Communications of the = CM, vol. ;5% --. 44814;64% 4589. 5. B. R. Rau et al.% GEfficient co0e ,eneration for *ori:ontal arc*itecturesC co+-iler tec*niues an0 arc*itectural su--ort%G in Proc) of th International &ymposium on Computer =rchitecture, 'S)
RQ7QRQ$CQ&
S
46. M. E. Wolf an0 M. S. "a+% GA loo- transfor+ation t*eory an0 an al,orit*+ to +a/i+i:e -arallelis+%G IQQQ Trans) on Parallel and Distributed &ysteffl8, vol. ;% --. @;174% 4554. 44. K. K. Par*i an0 <. L. Messersc*+itt% GPi-eline interleavin, an0 -arallelis+ in recursive 0i,ital filters1-art IC -i-elinin, usin, scattere0 loo(1a*ea0 an0 0eco+1 -osition%G IQQQ Trans) on =coustics, &peech, and &ignal Processing, vol. =7% no. 7% --. 465514447% July 4585. 4;. [. [. Par*i an0 <. L. Messersc*+itt% GPi-eline interleavin, an0 -arallelis+ in recursive 0i,ital filters1-art IIC -i-eline0 incre+ental bloc( filterin,%G IQQQ Trans) on =coustics, &peech, and &ignal Processing, vol. =7% no. 7% --. 4448144=@% July 4585. 4=. &. W. Wu an0 P. R. &a--ello% GA--lication1s-ecific &A< of"SI secon01or0er sections%G IQQQ Trans) on =coustics, &peech, and &ignal Processing, vol. =9% --. 84=18;@% 4588. 4. A. P. &*an0ra(asan% S. S*en,% an0 R. W. Bro0ersen% G"o'1-o'er &MS 0i,ital 0esi,n%G IQQQ Journal of &olid-&tate Circuits, vol. ;7% no. % --. 7=18=% A-ril 455;.
5
Retiming
!.1
INTRODUCTION
Reti+in, O4J is a transfor+ation tec*niue use0 to c*an,e t*e locations of 0elay ele+ents in a circuit 'it*out affectin, t*e in-utFout-ut c*aracteristics of t*e circuit. or e/a+-le% consi0er t*e IIR filter in i,. .4>a?. *is filter is 0escribe0 by 2*n+ ) y*n+
Q Q .
ay*n - 4? by*n - ;?
"*n+ ;? by*n
2*n - 2 ay*n -
- =?
"*n+)
*e filter in i,. .4>b? is 0escribe0 by 2l*n+ 2*n+ y*n+
Q Q Q Q
ay*n - 2 by*n - ;? Wl
2*n - 2 "*n+ ;? by*n - =? "*n+)
*n - 2
ay*n -
Alt*ou,* t*e filters in i,. .4>a? an0 i,. .4>b? *av 0elays at 0ifferent locations% t*ese filters *ave t*e sa+e in-utFout-ut c*aracteristics. *ese ; filters can be 0erive0 fro+ one anot*er usin, reti+in,. Reti+in, *as +any a--lications in sync*ronous circuit 0esi,n. *ese a--li1 cations inclu0e re0ucin, t*e cloc( -erio0 of t*e circuit% re0ucin, t*e nu+ber of re,isters in t*e circuit% re0ucin, t*e -o'er consu+-tion of t*e circuit% an0 54
>2
RETIMING
;@n
;@n
>a?
@%F
Fig.+.1 'o versionsof an IIR filter. *e co+-utation ti+es of t*e no0es are s*o'n in -arent*eses.
lo,ic synt*esis. *e to-ics of reti+in, to re0uce t*e cloc( -erio0 an0 to re1 0uce t*e nu+ber of re,isters are 0iscusse0 in 0etail in t*is c*a-ter. Reti+in, for lo,ic synt*esis is beyon0 t*e sco-e of t*is boo(. Reti+in, can be use0 to increase t*e cloc( rate o f a circuit by re0ucin, t*e co+-utation ti+e of t*e critical -at*. Recall t*at t*e critical -at* is 0efine0 to be t*e -at* 'it* t*e lon,est co+-utation ti+e a+on, all -at*s t*at contain :ero 0elays% an0 t*e co+-utation ti+e of t*e critical -at* is t*e lo'er boun0 on t*e cloc( -erio0 of t*e circuit. *e critical -at* of t*e filter in i,. .4>a? -asses t*rou,* 4 +ulti-lier an0 4 a00er an0 *as a co+-utation ti+e of = u.t.% so t*is filter cannot be cloc(e0 'it* a cloc( -erio0 of less t*an = u.t. *e reti+e0 filter in i,. .4>b? *as a critical -at* t*at -asses t*rou,* ; a00ers an0 *as a co+-utation ti+e of ; u.t.% so t*is filter can be cloc(e0 'it* a cloc( -erio0 of ; U.t. By reti+in, t*e filter in i,. .4>a? to obtain t*e filter in i,. .4>b?% t*e cloc( -erio0 *as been re0uce0 fro+ = u.t. to ; u.t.% or by ==Y. A -olyno+ial1ti+e al,orit*+ for reti+in, for cloc( -erio0 +ini+i:ation is 0escribe0 in Section ..;. Reti+in, can be use0 to 0ecrease t*e nu+ber of re,isters in a circuit. *e filter in i,. .4>a? uses re,isters '*ile t*e filter in i,. .4>b? uses @ re,isters. Since reti+in, can affect t*e cloc( -erio0 and t*e nu+ber of re,isters% it is so+eti+es 0esirable to ta(e bot* of t*ese -ara+eters into account. A -olyno+ial ti+e al,orit*+ for reti+in, to +ini+i:e t*e nu+ber of re,isters for a ,iven cloc( -erio0 is 0escribe0 in Section ..=. Reti+in, can be use0 to re0uce t*e -o'er consu+-tion of a circuit by re0ucin, s'itc*in,% '*ic* can lea0 to 0yna+ic -o'er 0issi-ation in static &MS circuits O;J. Placin, re,isters at t*e in-uts of no0es 'it* lar,e ca-ac1 itances can re0uce t*e s'itc*in, activities at t*ese no0es% '*ic* can lea0 to lo'1-o'er solutions >see Section 47.@.?. In Section .;% a +at*e+atical
0escri-tion of reti+in, is a00resse0 an0
DEFINITIONS AND PROPERTIES @IF
>3
@2F
<
>b?
>a? Fig. .;
B%3$
>a? A <L. >b? *e reti+e0 <L obtaine0 usin, B%l$ r> ? E 6.
Q 6% an0
E 6% B%2$
Q
4%
so+e -ro-erties of reti+in, are 0iscusse0. ec*niues for solvin, syste+s of ineualities are 0escribe0 in Section .=. *ese tec*niues are use0 in Sec1 tion .% '*ere al,orit*+s for reti+in, a circuit to ac*ieve various obectives% suc* as cloc( -erio0 +ini+i:ation% are 0escribe0.
!.2 !.2.1
DFINITIONS AND PROPRTIS 67a"titati8e Des)ri&ti$" $5 Retii"g
Reti+in, +a-s a circuit B to a reti+e0 circuit Br) In t*e conte/t of reti+in,% t*e ter+s circuit an0 ,ra-* an0 DFG are often use0 interc*an,eably% as t*ey are in t*is c*a-ter. A reti+in, solution is c*aracteri:e0 by a value B%$ for eac* no0e % in t*e ,ra-*. "et 2*e+ 0enote t*e 'ei,*t of t*e e0,e e in t*e ori,inal ,ra-* G) an0 let ui# %!$ 0enote t*e 'ei,*t of t*e e0,e ! in t*e reti+e0 ,ra-* Br) *e 'ei,*t of t*e e0,e V 1 % in t*e reti+e0 ,ra-* is co+-ute0 fro+ t*e 'ei,*t of t*e e0,e in t*e ori,inal ,ra-* usin, Ar*e+
Q 2*e+ D B%$
( B%U$.
>.4?
o 0e+onstrate so+e for+al reti+in, conce-ts% t*e filter in i,. .4>a? is re0ra'n in i,. .;>a?% an0 t*e reti+e0 filter in i,. .4>b? is re0ra'n in i,. .;>b?. *e reti+in, values B%1$ Q 6% B%2$ Q 4% B%3$ Q 6% an0 B%+$ Q can be use0 to obtain t*e reti+e0 <L in i,. .;>b? fro+ t*e <L in i,. .;>a?. or e/a+-le% t*e e0,e = 1 ; in t*e reti+e0 <L contains
C
r% 3+( ;?
Q
%3+( ;? D B%2$ ( B%3$
>+
RETIMING
Q 0elay% an0 t*e e0,e ;
A
6416Q4
4 contains
2
2r *<
Q
2*<
Q
4614Q6
2 r*l+ -
0elays. A reti+in, solution is feasible if 2r*e+ 6 6 *ol0s for all e0,es. W*ile t*e solution t*at +a-s i,. .;>a? to i,. .;>b? is feasible because all of t*e e0,es in i,. .;>b? *ave nonne,ative 'ei,*ts% t*e solution r*'+ Q 6% r*+ Q 14% r*8+ Q 6% an0 r*<+ Q 6 is infeasible because% for e/a+-le% t*e e0,e = t*e reti+e0 syste+ contains 2r *8<+
A
; in
;? r*+ - r*8+
E
2*8<
Q
6>14?16Q14
0elays.
4.2.2
Properties o$ 3etiming
Several -ro-erties ofreti+in, can be 0erive0 fro+ t*e reti+in, euation >.4?. Before consi0erin, t*ese% t*e conce-ts of -at*s an0 cycles are revie'e0. A ! ' ( 2 eD el eF 1 l ... -at * I.S a seuence 6 f e0 ,es an no 0 es %o -t %I -t - -- D - -- D '(:i 0 :i -l *e 'ei,*t of t*e -at* p is 2*P+ Q E 2*ei+ an0 t*e co+-utation ti+e of t*e -at* is t*p+ Q
EMQot*%i+)
A cycle is a close0 -at* %o 6 %I 6 ),)
e/
% - 1 el %o) *e 'ei,*t of t*e cycle c is 2*c+ Q 0elay of t*e cycle is t*c+ Q Et*%i+)
E2*ei+
Propert+ 4.2.1 The 2eight of the retimed path p is gi!en by 2r*P+ Q 2*p+ r*%+ - r*%o+)
Q
%o 6 %I 6 )))
*e reti+e0 -at* 'ei,*t is -l 2r*P+
Q
L 2r*ei+ iQ
-l G
L *2*ei+ r*%i9l+ - r*%i++ iQ
E
2*ei+
.
2*P+
*6r*%i9l+
r*%+
- r*%o+)
- 6
an0 t*e
r*%i++
el
%
SOLING SYSTEMS OF INEWUALITIES
>-
C-
or e/a+-le% t*e -at* ; ---D 4 ---D = in i,. .;>a? *as ; 0elays% an0 t*is -at* in t*e reti+e0 <L in i,. .;>b? *as ; r*8+ - r*+ Q ; 4 E 4 0elay. Propert+
4.2.2
Retiming does not change the number of delays in a cycle)
*is is a s-ecial case of Pro-erty .;.4 '*ere % Q %o) *e 'ei,*t of t*e reti+e0 cycle c is 2r*c+ Q 2*c+ r>o? 1 r*% o + Q 2*c+) In i,. .;% t*e cycle 4 ---D = ---D ; ---D 4 contains ; 0elays in t*e unreti+e0 an0 reti+e0 <Ls% an0 t*e cycle 4 ---D ---D ; ---D 4 contains = 0elays in t*e unreti+e0 an0 reti+e0 <Ls. Propert+
4.2.
Retiming does not alter the iteration bound in a D7B)
Propert+ 4.2.4 =dding the constant !alue to the retiming !alue of each node does not change the mapping from B to Br)
After re-lacin, re%+ 'it* re%+ for eac* no0e% t*e 'ei,*t of t*e reti+e0 e0,e U -5 in Gr is 2r*e+
Q 2ee+ *r*%+ ?
1 *r*V+ r*V+,
? Q 2ee+ r*%+
-
C
'*ic* is t*e sa+e for any value of W >inclu0in, W Q 6?. Recall t*at t*e reti+in, values r*l+ Q 6% r*+ E 4% r*8+ E 6% an0 r*<+ E 'ere use0 to obtain t*e reti+e0 <L in i,. .;>b? fro+ t*e unreti+e0 <L in i,. .;>a?. By a00in,% for e/a+-le% t*e constant 1=8 to t*ese reti+in, values% t*e reti+in, values r*l+ Q 1=8% r*+ Q 1=7% r*8+ Q 1=8% an0 r*<+ Q 1=8 can be use0 to obtain t*e reti+e0 <L in i,. .;>b? fro+ t*e <L in i,. .;>a?.
!.3
SOL9ING SYSTMS OF IN6UALITIS
Liven a set of M ineualities in N variables% '*ere eac* ineuality *as t*e for+ ri - BK S ' for inte,er values of ') one of t*e s*ortest -at* al,orit*+s in A--en0i/ A can be use0 to 0eter+ine if a solution e/ists an0 to fin0 a solution if one 0oes in0ee0 e/ist. *is is 0one usin, t*e follo'in, -roce0ure. 4.
Q 1)2) ...
)N.
4.
>c? or eac* ineuality B ( BK ') 0ra' t*e e0,e W ---D i fro+ no0e W to no0e i 'it* len,t* '. >0? or eac* no0e i, i E 4%;% ... % n, 0ra' t*e e0,e N t*e no0e N 4 to t*e no0e i Wit* len,t* 6.
4 ---D
i fro+
>
RETIMING
o
o
Fig. .=
*e constraint ,ra-* for E/a+-le A.=.4.
;. Solve usin, a s*ortest -at* al,orit*+.
>a? *e syste+ of ineualities *as a solution if an0 only if t*e constraint ,ra-* contains no ne,ative cycles. >b? I! a solution e/ists% one solution is '*ere ri is t*e +ini+u+1len,t* -at* fro+ t*e no0e $ 4 to t*e no0e i,
"ample 4..1 In this e"ample 2e demonstrate ho2 shortest path algorithms can be used to sol!e a system of M Q @ ine(ualities r 1 r; r= 1 r rA 1 r rA 1 r= r= 1 r;
@ 14 ;.
C
in $ E !ariables) The 'st step is to dra2 the constraint graph, 2hich is sho2n in 7ig) +.>. Vsing the ellman-7ord algorithm *described in &ection =) of =ppendi" =+, 2here the origin V is the node @% 2e find that there are no negati!e cycles, so the solution can be found by e"amining r*<+*%+) 7rom r*<+ >4? Q 6% r*<+*+ Q 6% r*<+*8+ Q 6% r*<+*<+ Q 14% and r*<+*H+ Q 6% a solution to the system of ine(ualities is determined to be r Q 6% r; Q 6% r= Q 6% and rA Q 14.