Analysis and Evaluation of Address Arithmetic Capabilities in Custom DSP Architectures

Similar documents
Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

MAT3707. Tutorial letter 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/201/1/2017

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms

A Simple Code Generator. Code generation Algorithm. Register and Address Descriptors. Example 3/31/2008. Code Generation

COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS

Present state Next state Q + M N

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

OpenMx Matrices and Operators

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

The University of Sydney MATH2969/2069. Graph Theory Tutorial 5 (Week 12) Solutions 2008

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

Constructive Geometric Constraint Solving

Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013

Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1.

Register Allocation. How to assign variables to finitely many registers? What to do when it can t be done? How to do so efficiently?

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

CS553 Lecture Register Allocation 1

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

Tangram Fractions Overview: Students will analyze standard and nonstandard

CSC Design and Analysis of Algorithms. Example: Change-Making Problem

d e c b a d c b a d e c b a a c a d c c e b

Trees as operads. Lecture A formalism of trees

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem)

Math 166 Week in Review 2 Sections 1.1b, 1.2, 1.3, & 1.4

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs

Complete Solutions for MATH 3012 Quiz 2, October 25, 2011, WTT

5/1/2018. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees

New challenges on Independent Gate FinFET Transistor Network Generation

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

Designing A Concrete Arch Bridge

Register Allocation. Register Allocation. Principle Phases. Principle Phases. Example: Build. Spills 11/14/2012

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs

BASIC CAGE DETAILS SHOWN 3D MODEL: PSM ASY INNER WALL TABS ARE COINED OVER BASE AND COVER FOR RIGIDITY SPRING FINGERS CLOSED TOP

0.1. Exercise 1: the distances between four points in a graph

16.unified Introduction to Computers and Programming. SOLUTIONS to Examination 4/30/04 9:05am - 10:00am

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas

BASIC CAGE DETAILS D C SHOWN CLOSED TOP SPRING FINGERS INNER WALL TABS ARE COINED OVER BASE AND COVER FOR RIGIDITY

Outline. Binary Tree

THE EFFECT OF SEED AND SOIL APPLIED SYSTEMIC INSECTICIDES ON APHIDS IN SORGHUM. Texas Agricultural Experiment Station, Nueces County, 2000

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

CS 461, Lecture 17. Today s Outline. Example Run

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

Similarity Search. The Binary Branch Distance. Nikolaus Augsten.

Lecture 20: Minimum Spanning Trees (CLRS 23)

QUESTIONS BEGIN HERE!

STRUCTURAL GENERAL NOTES

Register Saturation in Superscalar and VLIW Codes

Planar Upward Drawings

Computational Biology, Phylogenetic Trees. Consensus methods

Register Allocation and Binding for Low Power. Jui-Ming Chang and Massoud Pedram. function of signal statistics and correlations, and hence is

Graph Contraction and Connectivity

QUESTIONS BEGIN HERE!

Weighted Graphs. Weighted graphs may be either directed or undirected.

Problem solving by search

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1

CS553 Lecture Register Allocation I 3

CS150 Sp 98 R. Newton & K. Pister 1

CS 241 Analysis of Algorithms

Edge-Triggered D Flip-flop. Formal Analysis. Fundamental-Mode Sequential Circuits. D latch: How do flip-flops work?

Grade 7/8 Math Circles March 4/5, Graph Theory I- Solutions

1 Introduction to Modulo 7 Arithmetic

Experiment # 3 Introduction to Digital Logic Simulation and Xilinx Schematic Editor

Seven-Segment Display Driver

The University of Sydney MATH 2009

GREEDY TECHNIQUE. Greedy method vs. Dynamic programming method:

Module 2 Motion Instructions

Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk

CSCI Compiler Design

NP-Completeness. CS3230 (Algorithm) Traveling Salesperson Problem. What s the Big Deal? Given a Problem. What s the Big Deal? What s the Big Deal?

Properties of Hexagonal Tile local and XYZ-local Series

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths.

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

PASAP: Power Aware Structured ASIC Placement

Graph Algorithms and Combinatorial Optimization Presenters: Benjamin Ferrell and K. Alex Mills May 7th, 2014

Solutions to Homework 5

EE1000 Project 4 Digital Volt Meter

CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality:

(4, 2)-choosability of planar graphs with forbidden structures

A 4-state solution to the Firing Squad Synchronization Problem based on hybrid rule 60 and 102 cellular automata

An Effective Heuristic for Simple Offset Assignment with Variable Coalescing

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1

VLSI Testing Assignment 2

CS 103 BFS Alorithm. Mark Redekopp

An Efficient FPGA Implementation of the Advanced Encryption Standard Algorithm G. Mohan 1 K. Rambabu 2

Garnir Polynomial and their Properties

Problem Set 3 Solutions

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari

Jonathan Turner Exam 2-10/28/03

Indices. Indices. Curriculum Ready ACMNA: 209, 210, 212,

Physics 222 Midterm, Form: A

Self-Adjusting Top Trees

Greedy Algorithms, Activity Selection, Minimum Spanning Trees Scribes: Logan Short (2015), Virginia Date: May 18, 2016

ECE 407 Computer Aided Design for Electronic Systems. Circuit Modeling and Basic Graph Concepts/Algorithms. Instructor: Maria K. Michael.

Announcements. Programming Project 4 due Saturday, August 18 at 11:30AM

Layout Decomposition for Triple Patterning Lithography

Transcription:

Anlysis n Evlution o Arss Aritmti Cpilitis in Custom DSP Aritturs Aso Sursnm Stn Lio Srinivs Dvs Dprtmnt o Eltril Enginring Avn Tnology Group Dprtmnt o EECS Printon Univrsity Synopsys, In. MIT Astrt Mny pplition-spii ritturs provi inirt rssing mos wit uto-inrmnt/rmnt ritmti. Sin ts ritturs gnrlly o not tur n inx rssing mo, st-llot vrils must ss y lloting rss rgistrs n prorming rss ritmti. Susuming rss ritmti into uto-inrmnt/rmnt ritmti improvs ot t prormn n siz o t gnrt o. Our ojtiv in tis ppr is to provi mto or omprnsivly nlyzing t prormn nits n rwr ost u to n uto-inrmnt/rmnt tur tt vris rom,l to +l, n llowing ss to rss rgistrs in n rss gnrtor. W provi tis mto vi prmtrizl optimiztion lgoritm tt oprts on prour-wis sis. Hn, t optimiztion tniqus in ompilr n us not only to gnrt iint or ompt o, ut lso to lp t signr o ustom DSP rittur m isions on rss ritmti turs. W prsnt two sts o xprimntl rsults s on slt nmr progrms: () t vlus o l n yon wi tr is littl or no improvmnt in prormn, n () t vlus o l n wi rsult in minimum o r. I. INTRODUCTION Miroprossors su s miroontrollrs n ix-point igitl signl prossors (DSPs) r inrsingly ing m into mny ltroni prouts. Two min trns in t sign o m systms r oming lr: () t mount o m sotwr is growing inrsingly lrgr n mor omplx, n () ll t ltronis miroprossor, RAM, ROM, n ASICs r ing inorport into singl intgrt iruit. Sin progrm o rsis in on-ip ROM, t siz o tis o trnslts irtly into silion r n ost. It is tror n importnt prolm to minimiz t siz o t progrm o, wil simultnously optimizing prormn. Howvr, urrnt ompilrs or miroontrollrs n ix-point DSPs gnrt o tt is xtrmly unstistory wit rspt to o siz n prormn [8] tus, progrmming in ig-lvl lngug n inur pnltis on o siz n prormn. W liv tt gnrting t st o or m prossors will rquir not only tritionl optimiztion tniqus (.g., []), ut lso nw tniqus tt t vntg o spil ritturl turs tt rs o siz. Our rnt orts Prmission to m igitl/r opy o ll or prt o tis wor or prsonl or lssroom us is grnt witout provi tt opis r not m or istriut or proit or ommril vntg, t opyrigt noti, t titl o t pulition n its t ppr, n noti is givn tt opying is y prmission o ACM, In. To opy otrwis, to rpulis, to post on srvrs or to ristriut to lists, rquirs prior spii prmission n/or. DAC 97, Anim, Cliorni 997 ACM 0-8979-90-/97/06..$.50 in tis irtion r summriz in [7]. Mny ritturs, su s t VAX, Txs Instrumnts TMS0C5, n most m ontrollrs, provi inirt rssing mos wit uto-inrmnt/rmnt ritmti. Ts turs llow or iint squntil ss o mmory n inrs o nsity, sin ty susum rss ritmti instrutions n rsult in sortr instrutions in vril-lngt instrution ritturs. In prtiulr, DSPs n m ontrollrs r sign ssuming tt sotwr tt runs on tm woul m vy us o uto-inrmnt rssing. In mny ss, DSPs n ontrollrs o not provi n rssing mo or inxing wit onstnt ost. Tus, utomti vrils (tos vrils tt r ynmilly llot on t st rm) must ss y lloting rss rgistrs n prorming rss ritmti. Susuming rss ritmti into uto-inrmnt ritmti improvs ot t siz n prormn o t gnrt o. Dtrmining t storg ssignmnt o utomti vrils so s to mximiz t us o uto-inrmnt ritmti s riv mu rnt ttntion. Brtly [] ws t irst to rss simpl vrsion o t ost ssignmnt prolm,n prsnt n ppro s on ining mximum-wigt Hmiltonin pt o n ss grp. Ost ssignmnt prolms or unit inrmnts on multipl rss rgistrs v n rss y Lio t l. [6] n Luprs [5]. Wil tiv lgoritms v n propos, t min mol in ts wors is quit rstritiv n os not rlt t rss ritmti pilitis o som o t mor vn DSP ritturs. For instn, t prlll prossor in t Txs Instrumnts TMS0C80 turs igt rss rgistrs n llows or inrmnts rnging rom,7 to +7. In tis ppr, w xtn prvious wor y prmitting multipl rss rgistrs wit ritrrily-lrg inrmnts. T motivtion or tis ppr is s on t ollowing snrio: suppos tt signr o ustom DSP rittur, givn st o pplitions, wiss to trmin t numr o rss rgistrs n t rng o uto-inrmnt or t rss gnrtion unit. Inrsing t numr o rss rgistrs my improv t xution sp n/or stti instrution ount. Furtrmor, nlrging t rng o inrmnt [,l, l] my lso ru t numr o xpliit rss ritmti instrutions. Howvr, inrsing itr or l my inrs t numr o its rquir to no t instrution wor. Our ojtiv in tis ppr is to provi mto or omprnsivly nlyzing t prormn nits n rwr ost (in trms o o r) u to n uto-inrmnt tur tt vris rom,l to +l, n llowing ss to rss rgistrs in n rss gnrtor (w us t trm o r to mpsiz t t tt t ovrll o siz pns not only on t numr o instrutions, ut lso t wit o t instrution Hnort, inrmnt will us to rprsnt ot inrmnt n rmnt.

wor). W provi tis mto vi prmtrizl optimiztion lgoritm tt oprts on prour-wis sis. Tus, w illustrt t importnt rol n optimizing ompilr plys in rittur sign. To tis n, w prsnt gnrliz ormultion o t storg ssignmnt prolm, prmtriz y t mximum llowl inrmnt l n t numr o rss rgistrs. Tis ppr is orgniz s ollows: in S. II, w giv n xmpl illustrting t simpl ost ssignmnt prolm wit inrmnt rng [,l, l] (wi w ll l-soa); in S. III, w prsnt gnrliztion o t SOA lgoritm givn in [6] or l-soa; in S. IV, w rily gnrliz t gnrl ost ssignmnt prolm wit inrmnt rng [,l, l] (wi w ll (l, )-GOA); in S. V, w sri ow n ost ssignmnt or n ntir prour my trmin; S. VI provis xprimntl rsults two igligtso ts rsults r () t vlus o l n yon wi tr is littl or no improvmnt in prormn, n () t vlus o l n wi rsult in minimum totl o r; w inlly prsnt our onlusions in S. VII. II. EXAMPLE W ssum tt t rr is milir wit t simpl ost ssignmnt (SOA) prolm prsnt in [6]. In tis stion, w prsnt n xtnsion o t SOA prolm tt ts into ount t pility o inrmnts rnging rom,l to +l, or ritrry l. Altoug our optimiztions r ppli on prour-wis sis, w ous on si los in tis stion. Fig. sows n xmpl o squn n Fig. sows t optiml ost ssignmnt or t vrils in tis squn, ssuming tt singl rss rgistr wit unit uto-inrmnt is us. Arss rgistr AR0 is us to rss t vrils; ADAR (SBAR) s onstnt to (sutrts onstnt rom) AR0; LDAR los AR0 wit n rss; inlly, *(AR0)+ n *(AR0)- not uto-inrmnt n uto-rmnt y on, rsptivly, o AR0. T instrutions w intn to minimiz r prisly t xpliit rss ritmti instrutions, nmly ADAR n SBAR. As igligt in Fig. (), six su instrutions r rquir, givn t ost ssignmnt o Fig.. Now i l =, tn vrils tt r sprt y istn o t most two my ss in squn witout rquiring n xpliit rss ritmti instrution. Fig. n Fig. () sow t optiml ost ssignmnt n ssmly o, rsptivly, orrsponing to t o squn o Fig.. Hr, t nottion *(AR0)+j nots uto-inrmnt o AR0 y j. Not tt t itionl pility or y inrsing l rus t numr o ADAR n SBAR instrutions, sin jnt sss to vrils tt r istn-l prt in t ost ssignmnt inur no pnlty. III. SIMPLE OFFSET ASSIGNMENT PROBLEM In tis stion, w ssum tt singl rss rgistr is vill to rss t utomti vrils o prour. W trm tis t l-simpl ost ssignmnt (l-soa) prolm. W irst rviw t ormultion o [6] or t l = s, n tn xtn it to t s wr l>. W will susquntly rr to tis ormultion s t -SOA prolm, n t mor gnrl ormultion s t l-soa prolm. A. Ass Squn n Ass Grp Givn o squn or si lo, w n uniquly in n ss squn or tis lo. For n oprtion z = x op y, t ss squn is xyz. T ss squn or = + ; = + g; = + + ; = ; = + ; AR0 g LDAR AR0,& + ADAR AR0, ADD *(AR0) SBAR AR0, STOR *(AR0) SBAR AR0, ADAR AR0,5 ADD *(AR0) SBAR AR0,6 + STOR *(AR0)+ SBAR AR0, STOR *(AR0) () ; ; g ; ; ; Fig.. Co squn Optiml ost ssignmnt or l = () Assmly o n orr st o oprtions is simply t ontnt ss squns or oprtion in t pproprit orr. T ss squn or t si lo o Fig. is sown in Fig.. Givn t notion o n ss squn, it n sn tt wn l =, t ost o n ssignmnt is qul to t numr o jnt sss o vrils tt r not ssign to jnt st lotions. For instn, six rss ritmti instrutions r rquir or t ost ssignmnt o Fig., sin t ollowing six two-symol sustrings o t ss squn rr to vrils ssign to non-jnt st lotions: g, g,,,,n. T ss grp GV, Ei is riv rom n ss squn s ollows: no v V orrspons to uniqu vril, n g u, vi E xists wit wigt w() ivrils u n v r jnt to otr w() tims in t ss squn. T ss grp or t si lo o Fig. is sown in Fig.. Wit rspt to t ss grp, i l =, tn t ost o n ssignmnt is qul to t sum o t wigts o ll gs tt onnt vrilsssign tonon-jnt st lotions. For t xmpl o Fig.,, gi,, i,, i, n,i r su gs, n ts v totl wigt o 6. T otr gs onnt vrils tt v n ssign to jnt st lotions n tus, inur no ost. B. -SOA n t MWPC Prolm Dinition : A isjoint pt ovr (nort ovr) o wigt grp GV, Ei is sugrp CV, E 0 i o G su tt: or v V, g(v) (gr onstrint); tr r no yls in C (yl onstrint). Not tt t gs in C orm st o isjoint pts (som o wi my ontin no gs), n t nm. Dinition : T wigt o grp G is t sum o t wigts o ll gs in G. T ost o ovr C o G is t sum o t wigts o ll gs in G, ut not in C, i.., ost(c)

= + ; = + g; = + + ; = ; = + ; AR0 g LDAR AR0,& + + ADD *(AR0) SBAR AR0, + STOR *(AR0)+ ADD *(AR0) STOR *(AR0) () ; ; g ; ; ; Fig.. Co squn Optiml ost ssignmnt or l = () Assmly o g Fig.. Ass squn Ass grp = wigt(g) - wigt(c). Dinition (MWPC) Givn n ss grp G, in ovr C wit mximum wigt. Not tt ovr wit mximum wigt is quivlnt to ovr wit minimum ost. It s n sown in [6] tt solving t MWPC prolm is quivlnt to solving t -SOA prolm. Sin MWPC is NP-omplt, uristi lgoritm or -SOA is propos. C. l-soa T min inquy o t -SOA ormultion is tt wn l>, som gs o t ss grp will v n tiv zro ost, vn i ty r not inlu in t ovr. In Fig., i l =, tn, i (wi ontriut ost o on in t l = s) ontriuts zro ost sin n r istn- prt g g 0 g 0 Inu gs Covr o ss grp Fig. 4. A ovr n its inu gs, or l =. wit rspt to t inl ost ssignmnt (sown in Fig. ). Wn loing, AR0 n uto-inrmnt y so tt it points to t lotion or. Tus, w n to rin t wigt o ovr to t into onsirtion tos gs wos osts r susum y virtu o l. Not tt t g-sltion ritri or isjoint pt ovr o not ng, us our gol rmins to in linr orring o vrils; owvr, irnt ost untion must now minimiz. To omplis tis gol, w must now onsir omplt grps, rtr tn grps onsisting o only positiv-wigt gs. T rson or tis is s ollows: wn l =, inluing zro-wigt gs in t ovr ors no nit, n inluing su gs in t ss grp only ms t optimiztion pross lss iint; owvr, wn l>, slting zro-wigt g my inu notr positiv-wigt g to om tivly ost-lss, vn toug t lttr oul not itsl slt u to t yl n gr onstrints. To prisly sri wi gs v tivly zro ost, w introu t notion o inu (l +)-liqus: Dinition 4: Lt GV, Ei omplt grp, n C ovr o G. A sugrp QV Q, E Q i o G onsisting o (l +) nos n gs onnting ts nos is si to n inu (l+)-liqu o C i V Q r nos o som supt in C o lngt l. Dinition 5: An g o G is si to inu y ovr C i it is not in C ut longs to som inu (l + )-liqu o C. Intuitivly, i nos u n v long to n inu (l +)- liqu, tn tir istn rom otr, wit rspt to gs o C, istmostl. Sin t rss gnrtion unit n uto-inrmnt yt most l, tgu,vi inurs no ost. W in t l-inu wigt o ovr s ollows: Dinition 6: T l-inu wigt o ovr C o omplt, wigt grp G ist totlwigt o tgs in Cn tos gs inu y C. Tl-inu ost o C is t sum o t wigts o gs tt r nitr prt o C nor inu y C. Dinition 7 (l-soa) T l-soa prolm onsists o ining ovr o n ss grp G wit minimum l-inu ost. Fig. 4 sows n xmpl o ovr n its inu (l +)- liqus, or l =. T inu (l + )-liqus r: g,,,,, n, n t positiv-wigt inu

SOLVE-l-SOA(L) /* L = ss squn or si lo or tr */ 4 GV, Ei ACCESS-GRAPH(L) 5 F list o gs in E 6 CV 0, E 0 i : V 0 V, E 0 g 7 wil ( je 0 j < jvj,nfnot mpty ) 8 or g in F 9 Comput t totl wigt, z(), o tos 0 gs tt woul om inu i wr inlu in C g Slt g wi mximizs z()+w() 4 E 0 E 0 [ 5 Rmov rom F tos gs m inligil 6 u to yl n gr onstrints 7 g 8 /* Construt n ssignmnt rom E 0 */ 9 rturn CONSTRUCT-ASSIGNMENT(E 0 ) 0 g Fig. 5. Huristi lgoritm or l-soa. gs r, gi,, i,n,i (or lrity, gs wit zro wigt r not sown unlss ty r prt o t ovr). In tis xmpl,, i is t only g or wi w v to py t ost o xpliit rss ritmti instrutions. Doutlss, t l-soa prolm is NP-r. As wit -SOA, w propos uristi prour, sown in Fig. 5 to solv l- SOA: in itrtion o t g-sltion pross, w omput t wigt ligil g woul ontriut y summing up t wigts o ll gs tt woul om inu i wr inlu in t urrnt prtil solution. T g wit t lrgst ontriution is slt. IV. GENERAL OFFSET ASSIGNMENT PROBLEM W rily gnrliz t l-ost ssignmnt prolm to t s wr rss rgistrs, AR0 troug AR(, ), r vill. Sin tis ormultion involvs two inpnnt prmtrs, w nm it t (l, )-gnrl ost ssignmnt ((l, )- GOA) prolm. In tis ormultion, w ssum tt () tr is ix stup ost o introuing t us o n rss rgistr n () rss rgistr is us to point to isjoint sust o vrils. Dinition 8: Lt L t ss squn o si lo, n V t st o vrils in L. Tss susqun gnrt y W V is t susqun o L onsisting o tos vrils only in W. Dinition 9 ((l,)-goa) Givn n ss squn L, t st o vrils V, n tnumr o rss rgistrs,in prtition o V, Π = P, P,..., P m g, m, in wi t totl ost o t optiml l-soa o t orrsponing ss susquns plus t stup osts or using m rgistrsisminimum. Sin trmining t optiml vril prtition is NPomplt, vrious prtitioning uristis r propos in [6]. On uristi prtitions t st o vrils into susts o rinlity two, sin t ost o prorming l-soa on n ss susqun onsisting o two uniqu vrils is zro. V. l-soa FOR PROCEDURES In tis stion, w sri ow our rss ssignmnt mtos my ppli to ntir prours. W irst isuss som pr-prossing stps tt not only ru t tmmory rquirmnts o t pplition progrm, ut my lso improv t qulity o t inl ost ssignmnt. W tn sri t pross o onstruting n ss grp or prour. A. Minimizing Storg Rquirmnts W irst prorm oloring o prour s utomti vrils, su tt intilly-olor vrils r llot to t sm st lotion. Tis optimiztion signiintly rus t run-tim t-mmory rquirmnts o t progrm, wi is o xtrm importn in m systms sign. It is lso possil tt ruing t siz o t st rm my rsult in n ost ssignmnt o lowr ost. T oloring pross pros s ollows: irst, livnss nlysis [] is prorm on ll vrils so s to trmin tirliv rngs tlivrngo vrilv spiis tos rgions o t progrm wr v is tiv. Sonly, n intrrn grp is onstrut in wi vrtx xists or vril, n g i, ji xists i n only i t liv rngs o vrils i n j ovrlp. Tis g spiis tt i n j must olor irntly, or nlogously, ty must llot to irnt st lotions. Finlly, w pply Briggs uristi [] to tis grp in orr to in oloring tt stisis ll intrrn onstrints. In orr to ru t numr o gs in t intrrn grp n n, possily rs t numr o rquir olors, w prorm rnming o ll vril uss n initions prior to onstruting tis grp. Tis tniqu is nlogous to t rgistr rnming rwr sm mploy in igprormn prossors [4]. Vril rnming rus t li-tims o vrils n n, possily rus t numr o ovrlpping liv rngs. B. Construting Prourl Ass Grp W n onstrut prourl ss grp on wi t l-soa lgoritm oprts, tus llowing us to otin n ost ssignmnt or t ntir prour. Tis is iv y mrging t ss grps o si lo in t prour, n ing wigts to t gs o t rsulting ss grp so s to ount or vril sss long ontrol-low gs. Howvr, pning on t optimiztion ojtiv, it my nssry to wigt t ss grp o si lo irntly: or optimiztion o stti instrution ount, w simply wigt si lo qully; or optimiztion o ynmi instrution ount, w wigt si lo oring to its xpt xution rquny. T xpt xution rqunis o si los n trmin sttilly or troug t us o proiling t. Altoug proil-rivn stimtions r gnrlly mor urt, t qulity o stti stimtions is improving. W v implmnt t stti stimtion mto o [9] to stimt si lo rqunis. W rily outlin t stps involv in tis lgoritm: irst, t typ o ontrol-low g (i.., orwr or wr) is trmin troug t us o omintor nlysis [], wi is omput itrtivly; w tn lssiy t typ o g i, ji s ollows: i no j omints no i, tni,ji is wr g, otrwis it is orwr g; using vrious uristis outlin in [9], proility is ssign to g s on its typ; systm o linr qutions is st up,in wi t vrils

orrspon to si los, n t oiints r t trmin g rqunis; solution to ts qutions is oun using linr progrmming solvr tis solution spiis t xution rquny o si lo. VI. EXPERIMENTS AND RESULTS W prsnt two sts o xprimntl rsults tt monstrt t vrition in ynmi instrution ount n o r ross irnt vlus o l n. All msurmnts wr otin y running our prmtrizl ost ssignmnt lgoritm using vrious uristis to prtition t vrils, n slting t st rsults. For t irst st o xprimnts (ynmi instrution ount), t si los wr wigt oring to tir stimt rqunis, wrs or t son st, ty wr wigt qully. It is importnt to not tt si lo wigting n t two xprimnts r ortogonl. In otr wors, givn prtiulr wigting, ot xprimnts soul prorm n t t ollt rom ts xprimnts srv irnt purposs. T ojtivs r summriz in Tl I. For instn, i our primry gol is to optimiz or prormn, w wigt t si los oring to rquny, n w us t t st rom t son xprimnt to vlut t impt on totl r. Tus, t xprimntl rsults givn in tis stion only rprsnt ss () n (4) in Tl I. W prorm our xprimnts on or routins rom t ollowing progrms: t img-prossing progrm xv, n implmnttion o t JPEG nor/or, t omprssion progrm gzip, n t DES n RSA ryptosystms. W group ts routins into tr sts s on t totl numr o utomti vrils prsnt (inluing ront-n-gnrt tmporris): tr wr smll xmpls wit wr tn 0 vrils, mium xmpls wit 0 60 vrils, n 4 lrg xmpls wit mor tn 60 vrils. A. Arss Aritmti Instrution Count W prsnt in Fig. 6, Fig. 6, n Fig. 6() rsults initing rss ritmti (i.., ADAR, SBAR, nldar) instrution ounts or t smll, mium n lrg xmpls, rsptivly. In plot, w giv t minimum vlus o l n nssry to ru rss ritmti instrution ount to lss tn %, 5%, n 0% o t l = 0, = s in tis s, n ADAR or SBAR is rquir or mmory ss. For instn, or t smll xmpls, to ru t numr o rss ritmti instrutions to 5% or lss, t pir (l, ) s to qul or x on o t ollowing points: (,), (,), or (4,). Similrly, or t lrg xmpls, to ru t rss ritmti ount to % or lss, (l, ) s to grtr tn or qul to itr (4,5) or (5,). It is intrsting to not tt t lrgst rution in t numr o rss ritmti instrutions u to n inrs in ours t t trnsition rom = to=. Byon tt, w osrv iminising rturns, lrgly u to t stup osts rquir or using itionl rss rgistrs. For instn, in Fig. 6 or t l = s, it is not possil to otin mu urtr improvmnt y inrsing yon. Howvr, i =, w n r % y inrsing l to 5. B. Ovrll Co Ar Ruing t numr o rss ritmti instrutions y inrsing n l inurs ost: mor its r rquir in t instrution wor to no wi rss rgistr to us n t inrmnt mount. W prsnt in Tl II, Tl II, 6 5 4 6 5 4 6 5 4 4 5 6 4 5 6 4 5 6 () l l l < % < 5% < 0% < % < 5% < 0% < % < 5% < 0% Fig. 6. Dynmi rss ritmti instrution ount or smll, miumsiz, n () lrg xmpls. n Tl II() rsults initing totl o r or t smll, mium n lrg xmpls, rsptivly. T lultions wr prorm s ollows: w ssum 0-it s instrution wor, n or ny (l,) pir, w omput t it-wit o t instrution wor s 0 + log (l +) +log. For (l, ) pir in st o xmpls, t totl numr o instrutions ws omput y ing t numr o non-adar/sbar instrutions to t numr o rss ritmti instrutions. Tis numr is multipli y t instrution it-wit to otin t o r. For t smll xmpls, t minimum o r vlus our

Dynmi instrution ount Totl o r Frquny-wigt Optimiz or prormn () Evlut impt on r () Eqully-wigt Evlut impt on prormn () Optimiz or r (4) TABLE I ONE EXPERIMENT IS USED TO OPTIMIZE FOR AN OBJECTIVE (PERFORMANCE OR AREA), WHILE THE OTHER IS USED TO EVALUATE IMPACT ON THE OTHER OBJECTIVE (AREA OR PERFORMANCE). FOR INSTANCE, IF OUR PRIMARY OBJECTIVE IS TOTAL CODE AREA (4), WE WOULD CONSTRUCT THE PROCEDURAL ACCESS GRAPH BY WEIGHTING THE BASIC BLOCKS EQUALLY, AND THE MEASUREMENTS OBTAINED IN () WOULD THEN BE USED AS A GUIDE FOR TRADE-OFFS IN PERFORMANCE. l 4 5 6.97.57.670.647.85.85.786.659.86.86.04.04.59.6.8.8.00.00 4.054.8.00.00.98.98 5.670.8.00.00.98.98 6.650.8.00.00.98.98 0 4 l 4 5 6.5.0.87.00.07.055.9.070.07.049.4.4.64.0.047.044.. 4.86.058.4..8.8 5.44.047...8.8 6.06.045...8.8 0 5 l 4 5 6.69.75.4.080.4.74.679.7.7..8.85.544.055..078.66.64 4.69.80.9.66.466.466 5.588.6.70.56.460.460 6.499.7.64.5.456.456 () 0 4 TABLE II OVERALL CODE AREA (IN BITS) FOR (A) SMALL,(B) MEDIUM-SIZED, AND (C) LARGE EXAMPLES. THE HIGHLIGHTED NUMBERS SHOW THE BEST RESULTS. t t ollowing (l, ) points: (,), (,), (,), n (,4) ts rs r witin % o otr. For ot t mium n lrg xmpls, t minimum o r vlus our t t ollowing (l, ) points: (,), (,4), n (,4) ts rs r witin % o otr. Tror, w onlu tt l =, = nl=, = 4 r t st options or wi rng o xmpls. Our ssumption out t s instrution wor is rlisti or DSPs vrying t s wit twn 8 n 6 its s miniml impt (qulittivly) on t rsults. VII. CONCLUSIONS W v prsnt mtoology or t nlysis n vlution o t impt on prormn n o r u to vrious rss gnrtion unit pilitis. Spiilly, w v xmin two prmtrs: t numr o rss rgistrs n t rng o uto-inrmnt. Wil inrsing itr o ts prmtrs my rsult in potntil o siz or prormn gins, oing so rquirs inrsing t instrution wor wit. W v intii, troug t us o prmtrizl optimiztion lgoritm on wi rng o xmpls, t optiml vlus or ts two prmtrs wit rspt to prormn n o r. Our xprimntl rsults r prtiulrly vlul to signrs o ustom DSP ritturs, wo must i wi turs to inorport into t rss gnrtion unit. Our mtoology my lso ppli to wir or mor nrrow st o nmrs, so s to otin t st prmtrs or t pplitions or wi t rittur is intn. ACKNOWLEDGMENTS Tis rsr ws support in prt y t Avn Rsr Projts Agny unr ontrt DABT6-94-C-005 n in prt y NSF ontrt MIP-966. REFERENCES [] A. Ao, R. Sti, n J. Ullmn. Compilrs Prinipls, Tniqus n Tools. Aison-Wsly, 986. [] D. H. Brtly. Optimizing St Frm Asss or Prossors wit Rstrit Arssing Mos. Sotwr Prti n Exprin, (), Frury 99. [] P. Briggs, K.D. Coopr, n L. Torzon. Improvmnts to grp oloring rgistr llotion. ACM Trnstions on Progrmming Lngugs n Systms, 6(), 994. [4] R.M. Kllr. Loo-A Prossors. Computing Survys, 7(4), Dmr 975. [5] R. Luprs n P. Mrwl. Algoritms or Arss Assignmnt in DSP Co Gnrtion. In Proings o Intrntionl Conrn on Computr-Ai Dsign, 996. [6] S. Lio, S. Dvs, K. Kutzr, S. Tjing, n A. Wng. Storg Assignmnt to Drs Co Siz. In ACM Trnstions on Progrmming Lngugs n Systms, volum 8, My 996. [7] S. Lio, S. Dvs, K. Kutzr, S. Tjing, A. Wng, G. Arujo, A. Sursnm, S. Mli, V. Živojnović, n H. Myr. Co Gnrtion n Optimiztion Tniqus or Em Digitl Signl Prossors. In G. D Mili n M. Smi, itors, Hrwr/Sotwr Co- Dsign. Kluwr Ami Pulisrs, 996. Pro. o t NATO Avn Stuy Institut on Hrwr/Sotwr Co-Dsign. [8] V. Živojnović, J. Mrtínz Vlr, n C. Slägr. DSPston: A DSP-orint Bnmring Mtoology. In Pro. o t 5t Int l Con. on Signl Prossing Applitions n Tnology, Otor 994. [9] T.A. Wgnr, V. Mvri, S.L. Grm, n M.A. Hrrison. Aurt Stti Estimtors or Progrm Optimiztion. In Proings o t ACM SIGPLAN 94 Conrn on Progrmming Lngug Dsign n Implmnttion, Jun 994.