Dynamic weighting Monte Carlo for constrained floorplan designs in mixed signal application

12
Dynamic Weighting Monte Carlo for Constrained Floorplan Designs in Mixed Signal Application Jason Cong, Tianming Kong, Dongmin Xu VLSI CAD LAB., Computer Science Department University of California, Los Angeles, CA 90095 cong, kongtm, dongmin @cs.ucla.edu Faming Liang, Jun S. Liu, Wing Hung Wong Department of Statistics University of California, Los Angeles, CA 90095 fmliang, junliu, whwong @stat.ucla.edu Abstract Simulated annealing has been one of the most popular stochastic optimization methods used in the VLSI CAD field in the past two decades for handling NP-hard optimization problems. Recently, a new Monte Carlo and optimization method, named dynamic weighting Monte Carlo [WL97], has been introduced and successfully applied to the traveling salesman problem, neural network training [WL97], and spin-glasses simulation [LW98]. In this paper, we have successfully applied dynamic weighting Monte Carlo algorithm to the constrained floorplan design with consideration of both area and wirelength minimization. Our application scenario is the constrained floorplan design for mixed signal MCMs, where we need to place all the analog modules together in groups so that they can share common power and ground planes, which are separate from those used by the digital modules. Our experiments indicate that the dynamic weighting Monte Carlo algorithm is very effective for constrained floorplan optimization. It outperforms the simulated annealing for a real mixed signal MCM design by in wirelength, while gets slight area improvement. This is the first work adopting the dynamic weighting Monte Carlo optimization method for solving VLSI CAD problems. We believe that this method has applications to many other VLSI CAD optimization problems. 1 Introduction Simulated annealing [KGJ83] has been one of the most popular stochastic optimization methods used in the VLSI CAD field in the past two decades. It has been applied to almost every step of the IC design process, including (but not limited to) scheduling, resource allocation, logic synthesis, partitioning, floorplanning, and placement. However, the efficiency of simulated annealing depends much on the energy landscape. If the global minimum solution has a small basin of attraction and is well separated by many local minima with high energy barriers, simulated annealing tends to be trapped in a local minimum solution and is not able to explore the solution space efficiently. The reason is that in practice, to assure reasonable runtime, the temperature cooling schedule used in the simulated annealing process is exponential cooling schedule [SS94], which is much faster than the logarithmic cooling schedule required by theory [GG84] for achieving optimality. In early 1990’s, simulated tempering [MP92, GT95] was introduced to overcome the drawbacks of simu- lated annealing by taking temperature as an additional random variable during the optimization process. It allows the temperature of the system to be closely involved in the optimization process, so as to provide a chance for the system to be warmed up frequently. As a result, the system can possibly escape from a lo- cal minimum that has been surrounded by high energy barriers. As a general Monte Carlo and optimization

Transcript of Dynamic weighting Monte Carlo for constrained floorplan designs in mixed signal application

Dynamic Weighting Monte Carlo for ConstrainedFloorplanDesignsin Mixed SignalApplication

JasonCong,TianmingKong,DongminXuVLSI CAD LAB., ComputerScienceDepartmentUniversityof California,LosAngeles,CA 90095�

cong,kongtm,dongmin� @cs.ucla.eduFamingLiang,JunS.Liu, Wing HungWong

Departmentof StatisticsUniversityof California,LosAngeles,CA 90095�

fmliang, junliu, whwong� @stat.ucla.edu

Abstract

Simulatedannealinghasbeenoneof themostpopularstochasticoptimizationmethodsusedin theVLSICAD field in the pasttwo decadesfor handlingNP-hardoptimizationproblems. Recently, a new MonteCarlo andoptimizationmethod,nameddynamicweightingMonteCarlo [WL97], hasbeenintroducedandsuccessfullyappliedto the traveling salesmanproblem,neuralnetwork training [WL97], andspin-glassessimulation[LW98]. In thispaper, wehave successfullyapplieddynamicweightingMonteCarlo algorithmtotheconstrainedfloorplandesignwith considerationof bothareaandwirelengthminimization.Ourapplicationscenariois theconstrainedfloorplandesignfor mixedsignalMCMs, wherewe needto placeall theanalogmodulestogetherin groupsso that they cansharecommonpower andgroundplanes,which areseparatefrom thoseusedby thedigital modules.Our experimentsindicatethat thedynamicweightingMonteCarloalgorithmis veryeffective for constrainedfloorplanoptimization.It outperformsthesimulatedannealingfora realmixedsignalMCM designby ������� in wirelength,while getsslightareaimprovement.This is thefirstwork adoptingthe dynamicweightingMonteCarlo optimizationmethodfor solving VLSI CAD problems.Webelieve thatthismethodhasapplicationsto many otherVLSI CAD optimizationproblems.

1 Intr oduction

Simulatedannealing[KGJ83] hasbeenoneof themostpopularstochasticoptimizationmethodsusedintheVLSI CAD field in thepasttwo decades.It hasbeenappliedto almosteverystepof theIC designprocess,including (but not limited to) scheduling,resourceallocation,logic synthesis,partitioning, floorplanning,andplacement.However, theefficiency of simulatedannealingdependsmuchontheenergy landscape.If theglobalminimumsolutionhasasmallbasinof attractionandis well separatedby many localminimawith highenergy barriers,simulatedannealingtendsto betrappedin alocalminimumsolutionandis notableto explorethe solutionspaceefficiently. The reasonis that in practice,to assurereasonableruntime,the temperaturecooling scheduleusedin the simulatedannealingprocessis exponentialcooling schedule[SS94],which ismuchfasterthanthelogarithmiccoolingschedulerequiredby theory[GG84] for achieving optimality.

In early1990’s, simulatedtempering[MP92,GT95] wasintroducedto overcomethedrawbacksof simu-latedannealingby taking temperatureasanadditionalrandomvariableduring theoptimizationprocess.Itallows the temperatureof the systemto be closelyinvolved in the optimizationprocess,so asto provide achancefor the systemto be warmedup frequently. As a result, the systemcanpossiblyescapefrom a lo-cal minimumthathasbeensurroundedby high energy barriers.As a generalMonteCarloandoptimization

method,simulatedtempering hasbeenappliedsuccessfullyto many scientificareas,suchasrandomfieldIsingmodel[MP92], spinglassmodel[KR94] andancestralgeneinference[GT95].

Althoughsimulatedtemperingcanhelpthesystemto jump out of local minimain theappearanceof highenergy barriers,it sometimessuffers from the seriousproblemthat the energy distribution of two adjacenttemperaturelevelscannotmix well, whichmeansthatthetemperaturelevelshave to beverycloselyspacedinorderto preserve smoothtemperaturetransition.As a result,too many temperaturelevelshave to beusedtoexplorea large temperaturerangeto samplegoodsolutions,which will resultin long computationtime. Anextensionof simulatedtempering, calleddynamicweightingMonteCarlo [WL97], in whichadynamicweightis employed to help thesystemjump betweenadjacenttemperaturelevels,hasbeensuccessfullyappliedtothe traveling salsmanproblem,neuralnetwork training [WL97], andspin-glassessimulation[LW98]. Theuseof weightasanadditionalrandomvariablecanhelpthesystemto jumpbetweentemperaturelevelsmuchmoreeasily, even if the temperatureladdersare further expanded.This meansthat the solutionsamplingcanbedoneat bothvery high andvery low temperatures.For two benchmarks(�� �������� and ����������� ) [Re95]of traveling salesmanproblem(with optimalvaluesof 50778and27686),dynamicweightingalgorithmhasobtainedthe solutionswhich are over the optimal valuesby ���������� and ��� ���!�� , respectively; while thesolutionsof simulatedannealingareover theoptimalvaluesby �"���#$�� and ���#$���� [Li97], respectively.

SincedynamicweightingMonteCarlo is a generaloptimizationmethod,it canbeusedto solve many op-timizationproblemsin general.In this paper, we have successfullyapplieddynamicweightingMonteCarloapproachto theoptimizationof slicing floorplandesigns.We choosefloorplandesignasthefirst applicationto demonstratetheeffectivenessof thisapproach,becausefloorplandesignis animportantstepin VLSI phys-ical design.It playsan increasinglyimportantrole in linking designplanning,RTL synthesis,andphysicaldesign.In ourapplication,weconsiderfloorplandesignfor mixedsignalmulti-chipmodules(MCM).Currentportableandwirelesssystemsareoften requiredto combinesignificantportionsof analogcircuitswith thedigital circuits.Combiningdigital circuitswith analogdeviceswith lower noisemargin thanCMOSlogic ona singleIC is a verydifficult task.To dealwith this problem,multi-chipmodule(MCM)designis consideredto bea low-costalternative to integrateanaloganddigital circuitsin separatediesonanMCM substrate.Theadvantagesof usingamixedsignalMCM includebothlow costandhighreliability, comparedwith integratingtheentiresystemin asingleIC. However, anumberof performanceandsignalintegrity issueshave to becon-sideredin mixedsignalMCM floorplandesigns.We have to placeall theanalogmodulestogetherin groupsso that they cansharecommonpower andgroundplanes,which areseparatefrom thoseusedby thedigitalmodules.Also, theclusteringof analogmodulesmakesit easyto provideshieldingfor theseanalogymodulesfor signalintegrity. In this paper, we applieddynamicweightingMonteCarlo methodto constrainedfloor-plandesignfor mixedsignalMCMs, basedon thePolishexpressionrepresentation.Our algorithmidentifiestheanalogmodulesin Polishexpressionandhandlesthemwith specialconstraintsto satisfytheconstrainedfloorplanrequirement.Sincetheconstrainedfloorplanproblemusuallyintroducesmany dramaticconfigura-tion changes,it resultsin moredeeplocal minima to trap simulatedannealingalgorithm. Our experimentsindicatethatthedynamicweightingMonteCarlo algorithmis especiallyeffective in theconstrainedfloorplandesigns.For a real mixed signalMCM designof a high speedwirelessmodem,dynamicweightingMonteCarlo basedapproachoutperformsthe simulatedannealingbasedapproachby ������� in wirelength,whilegetsslightareaimprovement.

Therestof this paperis organizedasfollows: Section2 reviews the formulationof slicing floorplanap-proach.Section3 describesthedynamicweightingMonteCarlo algorithm.Section4 discussesouralgorithmandapproachfor handlingtheconstraintfor mixedsignalMCM designs.Section5 shows theexperimentalresults.Section6 givestheconclusion.

Table1: A RealMixedSignalMCM of High SpeedWirelessModem

#nets #modules minimumarea(%'&)(+* ) maximumarea(%'&,(-* ) total area( %.&,(-* )analogmodule 111 2.25x /102* 5.2x /1043 2.21x /1025digital module

24522 1.33x /1023 2.56x /1025 5.65x /1025

2 Formulation of Slicing Floorplan Designs

2.1 ProblemFormulation

Thereare two approachesfor the floorplanproblem: slicing versusnon-slicing. Both slicing floorplan[St83,Ot83,WL89,CHMR91,YTK96,YW97] andnon-slicingfloorplanapproaches[KK88,DEKP89,WW90,PL93,MFNK95,NFMK96,MFK97] havebeeninvestigatedextensively. Thesolutionspacefor floorplanprob-lem is very large. Slicing floorplanapproachesallow the entirefloorplanto be decomposedrecursively byhorizontalandverticalcutlines.Suchrestrictionreducesthesolutionspacesignificantly, but with thepossi-ble missingof someoptimalsolutionswith non-slicingstructures.But non-slicingfloorplanalgorithmsareusuallyslower thantheslicingfloorplanalgorithms.For example,thetimecomplexity of recentlydevelopedsequence-pairbasednon-slicingfloorplanapproach[MFNK95] is between687:9<;�= and 6>7:9@?4= to constructafloorplanfrom its correspondingsequence-pairrepresentation,where 9 is thenumberof modulesin thecir-cuit. In contrast,thewell-known Polishexpressionbasedslicing floorplanapproach[WL89] requires6>7:9A=time to constructafloorplanfrom aPolishexpression.Comparingwith non-slicingfloorplanapproaches,theslicingfloorplanapproachis efficient,easyto implementandproducesevenbettersolutions[YTK96,YW97].In [YTK96], the slicing approachoutperformsthe non-slicingapproach[MFNK95] for an MCNC circuit��BDCE��� by 4.8%and23.0%in areaandwirelength,respectively. Therefore,in this work, we considerslicingfloorplanaswell.

In thispaper, we considertheslicingfloorplanfor rectangularmodules.For a givensetof modulesF = GBIH , B ; , ..., BDJ'K , eachmoduleBDL canberepresentedby a triplet ( MNL , O L , P�L ), whereMQL is theareaof moduleB L ( �>RSCNRT9 ), O L and P L specifythe limits of aspectratio with O LVU P L . If O LXW P L , thenmodule B L is saidto be rigid, otherwise,it is flexible. A floorplanfor the given 9 modulesconsistsof a boundingrectangle,partitionedby somehorizontalandverticalline segmentsinto 9 non-overlappingrectangularregions,denotedby Y�H , Y ; , ..., Y�J . Eachregion Y�L mustbelargeenoughto accommodateits moduleBDL . For themixedsignalMCM designs,the analogmodulesshouldbe put togetherin groups.The definition of the problemcanbestatedasfollows:

Definition 1: Givena setof modulesF , a subsetanalog modulesZ\[]F and an integer ^ ,computea slicingfloorplansuch thatall modulesin Z areclusteredin nomorethan ^ rectangularregions(called”analog regions”) andtheweightedsumof areaandwirelengthof thefloorplanisminimized.

Notethatthedigital modulesin F`_aZ shouldnotappearin theanalogregions.Fig. 1 illustratesa simplemixed signalMCM design. The dark blocks representsanalogmodules,while thesebig light blocksaredigital modules.Usually, a typical mixedsignalMCM designhasa lot of analogmodulesanda few digitalmodules. Table1 shows the detaileddataof a real mixed signalMCM designfor a high speedwirelessmodem. Thereare 111 analogmodulesversus22 digital modulesin this design. Table1 alsogives theminimumandmaximumareaof analoganddigital modules.The lastcolumnis the total areaof all analoganddigital modules.Sinceanalogmodulesarepassive elements,suchascapacitors,resistors,andinductors,wecanseethattheareaof digital modulesis usuallymuchlargerthanthatof analogmodules.

Analogregions

DigitalModules

Figure1: Illustrationof asimplemixedsignalMCM design

2.2 Review of Polish ExpressionRepresentation

Polish expressionrepresentationwas introducedto handlethe slicing floorplan problemin late 1980s[WL89]. A slicing floorplanis a floorplanwhich canbe obtainedby recursively partitioninga rectangularregion into two partseitherby a vertical line or a horizontalline. Theresultingareadissectioncorrespondsto a slicing tree,in which eachleaf representsa region Y�L ( �DRbCcRd9 ) andeachinternalnoderepresentsacut line. In [WL89], slicing floorplandesignis obtainedusingsimulatedannealingalgorithmbasedon nor-malizedpolishexpressionrepresentation:Let horizontalandverticalcut bedenotedby theoperator+ and*,respectively; andthemodulesbedenotedby operands.Thereexistsanone-to-onemappingfrom thesetofslicing treesto thesetof normalizedPolishexpressions.ThePolishexpressionassociatedwith a slicing treecanbeobtainedby a post-ordertraversalof theslicing tree. It is possiblethatonefloorplancanhave morethanonecorrespondingslicing treesor Polishexpressions.In [WL89], theskewedslicing treewasdefined.In a skewed slicing tree,no operatorof the sametypeappearsasthe right sonof anoperator. Thereexistsan one-to-onemappingfrom a skewed slicing treeto a normalizedPolishexpression.To explore differentfloorplanconfigurationsusingPolishexpressionapproach,threetypeof moves, Fe� , Ff� , Ff� , weredefinedin [WL89].

g Operation Fh� : swapstwo adjacentoperands.

g Operation Ff� : interchangestheoperators* and+ for achainof nonzerolengthof adjacentoperators.

g Operation Fi� : swapstwo adjacentoperandandoperator.

Supposethatafloorplanconfigurationis representedby j , andthattotalareaandtotalwirelengthof j aredenotedby M'7+jk= and le7+j8= , respectively. Thecostfunctiongivenin [WL89] is asfollows:

!m�n4�!7+jo= W Mp7+jo=<qsrtle7+j8= (1)

The simulatedannealing[KGJ83] algorithmwasusedto exploredifferentconfigurationswith operationFe� , Fi� and Fi� to selectagoodfloorplanresultusingcostfunctiondefinedby equation(1).

3 Dynamic Weighting Monte Carlo Algorithm

Simulatedannealing [KGJ83] is oneof themostpopularstochasticoptimizationmethods,andhasbeenappliedsuccessfullyto many optimizationproblemsin VLSI layoutarea[WL88]. This algorithmsimulatestheannealingprocess,in which thematerialis first heatedto ahigh temperaturenearmeltingpoint,andthenslowly cooleddown so that it will crystallizeinto a lower energy state.The time spentat eachtemperaturemustbesufficiently long for thesystemto reachequilibrium. However, the time requiredfor thesystemto

reachequilibriumat a giventemperatureis prohibitively long, thusthecoolingschedulehasto bevery slow.Onestandardcoolingschemeof theoreticalinterestis “logarithm” cooling,in whichthetemperatureonthe ^ -th trial is setto uwv$O:m2xt7,^y= for somefixedconstantu . Thiscoolingschedulewill guaranteethatthesimulationconvergesto theoptimalsolutionsetin probability[GG84],althoughthecoolingtime is likely to exceedthetimeneededto find anoptimalsolutionby exhaustive search.In practice,amorecommonlyusedtemperatureschemeis geometriccooling,in whichthetemperatureonthe ^ -th trial is setto zA{4|@} , where|@} is thestartingtemperature,z is a constantsmallerthanbut closeto 1, suchas0.90or 0.95. In this case,theconvergenceto theglobalminimumis no longerguaranteed.In [SS94],adynamicprogrammingapproachis suggestedtodeterminethetemperatureschemewhich is optimalfor somesimpleproblems.

To overcomethis difficulty, simulatedtemperingtreatsthe temperature� (which takesvaluefrom a finitesetof temperaturelevels G���H�~�� ; ~������4~�����K ) asa randomvariable,andthe Markov chainstateis augmentedas 7:��~���= . The dynamicchangeof temperatureprovidesa chancefor the systemto escapefrom somelocalminima to locateat otherlocal minimaor globalminimum. For the systemto move alongthe temperatureladderfreely, temperature��L shouldbechosensuchthat

� ��Yy7) �m�n4�!7:��� L � =�=���� ; W 6>7��4= (2)

where� ��Yy7���= denotesthe varianceoperator, !m�n���7:� � L � = denotesthe costof samplesat temperature��L , and� W �4v2��L �AH�_��4v2��L [MP92]. This is equivalentto requiringthat thehistogramof !m"n4��7:��= hasa considerable

overlapat � L and � L �AH . This schemewill resultin a temperatureladderwith many levels. The efficiency ofsimulatedtemperingdependson how freely canthesystemmove from oneendof thetemperatureladdertoanotherend. Even in the ideal situationwhenthesystembehaveslike a symmetricrandomwalk alongthetemperatureladder, the expectingtime for sucha transversalis of order B ; , where B is the numberof thetemperaturelevelsused.Soevenfor a modestB , say30, to obtaina completelynew solution,we alsoneed900temperaturetransitionsteps.Thisputsaseverelimit on theefficiency of thealgorithm.

Dynamicweighting[WL97] introducesanotherrandomvariable,which is theimportanceweightdenotedby � , to further augmentthe Markov chain stateas 7:��~���~��w= . A trade-off betweenthe waiting time andthe importanceweight is madeto facilitatethe system’s movementsalongthe temperature.With dynamicweighting,thesystemcanmove freely alongthetemperatureladderevenwhenit hasmuchsmallernumberof temperaturelevels thanthat requiredby simulatedtempering. This resultsin anefficient simulationandoptimizationalgorithmfor a largesystem,especiallyfor asystemwith multiple localminima.

Dynamicweightingworkson a temperatureladder � H.� � ; � ����� � � � , where B is finite andusuallyissmall.For eachtemperaturelevel ��L , thecorrespondingBoltzmanndistribution canbedefinedasfollows.

� L 7:�@= W z L2�!��� G�_N !m�n���7:��=�v2� L K�~ (3)

where !m�n���7:��= is the costfunctionof configuration� ; z�� is the normalizingconstant.Theseconstantscanbe preliminarily estimatedby an iterationprocedure[KR94]. The configurationis updatedby Metropolis-Hastingalgorithm[Ha70] or Gibbssampler[GG84] so that the configurationsat eachlevel ��L will be dis-tributedaccordingto Equation(3) atequilibrium.TheMetropolis-Hasings(M-H) algorithmis a fundamentalmethodfor simulatingasystemto reachits equilibriumata fixedtemperature.It servedasthebasicbuildingblock of all simulatedannealingschemes.Suppose��7:�@= W z �!��� G�_N �7:�@=�K is theequilibriumdistribution ofinterest. The Metropolis-Hastingalgorithmstartswith a randomconfiguration� anditeratesthe followingtwo steps:(a)proposea randomdisplacementof thesystem������� accordingto a probabilityrule |'7:��~���� = ,andcomputethechange� � W �7:��� = _s �7:��=¡q£¢¥¤�¦yG�|p7:�§�)~���=�v4|'7:�A~��§�-=�K (the logarithmtermdisappearsif |is symmetric;(b) generatea randomnumberP uniformly in (0,1); accepttheproposalandchangethecon-figurationto �§� if P U¨�!��� 7�_Q� � = , where �!��� 7�_Q� � = is usuallycalledMetropolis-Hasingsratio, andrejectthe proposalotherwise. After a long iterationof the M-H steps,the systemwill eventuallystablizeat itsequilibriumdistribution ��7:��= . TheGibbssamplerdiffersfrom theM-H algorithmin thatit proposesthenewconfiguration� � accordingto appropriateconditionaldistributionssothatno explicit rejectionrule is needed[GG84:pa].

Usually, we areonly interestedin the configurationssampledat the lowest temperature,becausebetterconfigurationsaremostlikely to appearat lower temperatures.Oneiterationof dynamicweightinginvolvesanupdateof thecurrentconfiguration� undertemperaturelevel C , followedby anupdateof temperaturelevelasexplainedbelow.

The temperaturelevels are updatedas follows: we start from one randomconfigurationat the highesttemperature�1H , andsetthe initial weight �©} W � . At eachtemperature��L , after theconfigurationis updatedby Metropolis-Hastingalgorithmor Gibbssampler, weproposeto changethetemperaturelevel from ��L to anadjacenttemperaturelevel �)� accordingto thetype-Rtransition[WL97], which is describedasfollows:

First,wecalculateMetropolis-Hastingsratio:

Y W z��zAL �!��� G�_N !m�n���7:��=!7��4v2�,�Q_ª�4v2��L,=�K�« ��¬ L

« L:¬ � ~ (4)

where « L­� is the proposalprobabilityof jumping from level C to level ® , andwe have « H�¬ ; W « �N¬ �©¯@H>W � ,« L:¬ L �AH W « L:¬ L:¯@H W ���� ( �°RdC±RdB ). Then,theproposalis acceptedwith probabilityminG��"~£²�³²�³ �AH K , where� is the weight of the currentstate. If the proposalis accepted,the next stateis setas 7:�A~��)��~��©´$= , where�©´ W �NY�q8� . Otherwise,theproposalis rejectedandthenext stateis setas 7:��~���L�~�� ³ = , where� ³ W �'7:�NY�q>�4= .

In thisway, theweightis self-adjustedby carryingtheratio Y whentheproposalis acceptedanddividing bytherejectionprobabilitywhentheproposalis rejected.Thus,theimportanceweightsfacilitatefasterapproachto equilibrium.Thealgorithmis shown in Figure2:

DWMC ()i = 1;while (stopcriterionis notsatisfied)

Updateconfiguration� by n stepsof Metropolis-Hastingstransitionor Gibbssampler;

Proposea transitionto anadjacenttemperatureaccordingto « L:¬ � ;CalculateTheMetropolis-Hastingsratio r;Acceptor rejecttheproposalaccordingto Type-Rtransition;

endwhile

Figure2: DynamicWeightMonteCarloAlgorithm: DWMC( )

Dynamicweightingalgorithmsatisfiesinvariancewith respectto importance-weighting[WL97], i.e.,sup-posex � }�� 7:��~���~��w= is acorrectlyweighteddensity,µ x � }�� 7:�A~��1~���=��Q¶��S· �¹¸ 7:��=1~ (5)

and x � H�� 7:��~���~��w= is thedensityafteronesteptransitionfrom thedensityx � }�� 7:�A~��1~���= , then x � H�� 7:�A~��1~���= is alsocorrectlyweighted, µ x � H�� 7:�A~��1~���=��Q¶��S· �¹¸ 7:��=1� (6)

Theproofcanbefoundin [LW98]. After thesystemreachesequilibrium,thesamplesof 7:��~���~��w= with � W � Lcanberegardedascorrelatedsamplesfrom thejoint densityxt7:�A~���L�~��w= , andµ xt7:��~�� L ~��w=��º¶��S· � L 7:�@=1� (7)

So the correspondingweightedaverage G$»d¼º7:���2=�� �"K$v�G$»b� ��K will converge to the expectationof ¼º7:�@=underthe target density

� L�7:�@= , andsignificantlocal minima of the cost function shouldbe sampledwhentemperatureis low.

After the dynamicweightingalgorithmDWMC ( ) is finished,oneusuallyselectsa numberof solutionsfrom low temperaturelevels to performrefinementby usingsimulatedannealing, andthenchoosesthebestresultasthefinal output.

4 Overview of Our Algorithm

We modifiedthe Polishexpressionrepresentationapproach[WL89] andappliedthe dynamicweightingMonteCarlo algorithmDWMC () for theslicing floorplanoptimization. Thenew operationsaredefinedasfollows:

g Operation Fh� � : swapsanytwo randomlyselectedoperands.

g Operation Ff� � : swapsany two randomlyselectedoperandandoperator, if the resultingPolishex-pressionis still normalized.

Theoriginal Fi� operationstaysthesame.By changingoperationFh� and Ff� to Fe� � and Fi� � , we canmake someglobalconfigurationchangeandspeedup thealgorithm.In our dynamicweightingMonteCarlofloorplanalgorithm,operationsare randomlyselectedfrom Fh� � , Fi� , and Fi� � with equalprobability togeneratea new configuration.Whetherthis new configurationwill berejectedor acceptedis decidedby thedynamicweightingMonteCarlo algorithm:DWMC ().

For theconstrainedfloorplanof mixedsignalMCM designs,supposethereis a digital or analogmoduleBDL>½fF , the correspondingoperandof module BDL in the Polishexpressionis denotedby m2L . If moduleBDL is ananalogmodule(i.e. BDLº½¾Z ), theanalogregion it belongsto is denotedby ¿>7:BDLE= . We definealltheoperandsof analogmodulesin region ¿>7:BDL,= to beananalogoperandgroup,denotedby xt7)m$L�= . Becausewe want to placeall analogmodulesin ¿>7:BDLE= together, we shouldlet the operandsin group xt7)m$LÀ= form asubtreein thewholeslicing tree.This subtreecanberepresentedby a consecutive subsequenceof operandsandoperators,denotedby n�7+x�7)m L =�= , in theentirePolishexpression.If theoriginal entirePolishexpressionisnormalized,thissubsequenceof Polishexpressionis still normalized.Thecorrespondingrectangleenclosingall modulesof thissubtreecanbeviewedasabig complex module.

In orderto handleconstrainedfloorplandesign,operationFh� � , Fi� , and Fi� � have to bemodified.Oper-ation Fe�!� involvesswappingtwo operands.Supposethetwo randomlyselectedoperandsare m$L and m�� . thevariationof Fe�!� operationfor theconstrainedfloorplandesigncanbedescribedasfollows:

g If bothoperandsarein thesameanaloggroupor not in any groups,perform Fe�!� operationasin theunconstrainedcase.

g If both operandsare in the different groups,perform Fe� � operationfor subsequencen�7+xt7)m$LE=�= andsequencen�7+xt7)m��"=�= .

g If oneoperandm$L (or m�� ) is in group xt7)m$LÀ= (or xt7)m��2= ), andanotheroneis not in any analoggroups,doFe�!� for subsequencen�7+xt7)m L =�= (or n�7+xt7)m � =�= ) andoperandm � (or m L ).OperationFf�$� involvesswappinganoperandandanoperator, which canbetreatedsimilarly asin opera-

tion Fh� � . OperationFi� staysthesamefor constrainedandunconstrainedcases.Supposethat a floorplanconfigurationis representedby j , andthat total areaandtotal wirelengthof j

aredenotedby Mp7+jk= and lh7+jk= respectively. The commonlyusedcost function is given in equation(1).However, two terms Mp7+jk= and le7+jk= in thecostfunction(1) maybeof very differentscale.Oneoftenhasto adjustcoefficient r for eachindividual floorplaninstanceto obtainresultwith bothsmall areaandshortwirelength.Wechooseto usethefollowing normalizedcostfunctionin thispaper.

!m�n���7+jo= W£Á M'7+jo=M ³�Â�à q�7��©_ Á = le7+jo=

l ³�Â�Ã�Ä 7)� UsÁIU �4= (8)

Table2: TestCircuits

circuit #modules # nets # pads

apte 9 97 73xerox 10 203 2

hp 11 83 45ami33 33 123 43ami49 49 408 22

playout.xlii 62 2506 192

whereÁ is a constantbetween0 and1; M ³�Â�à and l ³�Â�à arepre-calculatedby a very fastsimulatedannealingrun. If the areaandwirelengthareconsideredequally important,we canset Á to be ���� . In our currentimplementation,routingareais notconsidered.

5 Experimental Results

5.1 UnconstrainedFloorplan Results

We have implementedsimulatedannealinganddynamicweightingMonteCarlo (DWMC) algorithmsforbothunconstrainedandconstrainedmixedsignalfloorplandesigns.In our implementation,thecoefficient Áin thecostfunction(8) is setto be0.5,whichmeansthatbothareaandtotalwirelengthareequallyimportant.ForDWMC algorithm,thenumberof sampledsolutionsis setto be5. Thecircuitswetestedfor unconstrainedfloorplandesigns,aresix MCNC benchmarks,whicharelistedin Table2.

To show theeffectivenessof DWMC algorithm,wedesignedourexperimentsasfollows: Weransimulatedannealingalgorithm25 timesandreportedboth averageandminimum valuesof areaandwirelength. ForDWMC algorithm,we ranit 5 times,eachtime we pick thebestfive uncorrelatedsolutionsandsubjecteachto a refinementof simulatedannealingat low temperature.In this way, the total computationtime in thetwo methodsare roughly the same. The detailedcomparisonof averageandminimum valueson MCNCexamplesis shown in Table3 andTable4. CPUtimesweremeasuredonaSunULTRA SPARC II(168MHz)workstation.We usetheminimumboundingbox metric to estimatetotal wirelength.FromTable3, we canseethat theaverageareaandwirelengthareimprovedby up to �"��� and ������ , respectively, usingDWMCalgorithm,whencomparedwith thesimulatedannealingalgorithm.Table4 shows thattheminimumvaluesof areaandwirelengthare improved by up to ������ and ���­�� , respectively. Figure3 illustratesa typicaltemperatureversustime diagram,which wasobtainedfrom DWMC optimizationprocessfor circuit ami33.It is clearthat thesystemcanmove freely up anddown thetemperatureladders.Figure4 shows theslicingfloorplansolutionobtainedby usingDWMC algorithmfor circuit playout.xlii.

To furthervalidateour results,we compareour resultswith thosegeneratedby a commercialtool Timber-Wolf1.3.3 H . Wedid theexperimentin two ways.First,we turnedoff TimberWolf ’s routingspaceestimationability to let TimberWolf generatesolutionswithout routingspace,asour floorplantool currentlydo not re-serve routingspace; . Second,we allow TimberWolf to reserve routingspace,but we thenusea compactiontool to abut modulestogetherin orderto make a fair comparison.Table5 shows theminumumarearesultsandminimum wirelengthresultsby runningTimberWolf 5 times for all MCNC circuits. The runtimere-portedin Table5 is theaverageruntimeof 5 runs.Table5 shows thatDWMC resultsarebetterthanthoseofTimberWolf ’s by up to 15.7%and53.6%in areaandwirelength.Å

Thecommercialversion1.3.3of TimberWolf producesmuchbetterresultsthanTimberWolf 7.0from Universityof Washington[TW98].Æ

TimberWolf allows the overlapof modules,if the compactionandglobal routerare not activatedin a placementrefinementstage[SwS90,SuS95].In our test,wedid compaction/decompactionto removeany overlapsif they exist.

0

2

4

6

8

10

12

14

16

18

0 2000 4000 6000 8000 10000 12000Te

mpera

ture L

evelsÇ

Time

Moves

Time

Tem

pera

ture

Levels

Figure3: Temperaturevs. timediagramfor circuit ��BDC����

Table3: ComparisononAverageValuesfor UnconstrainedSlicingFloorplan

circuit SimulatedAnnealing DynamicWeightingMonteCarlo Improvement(%)area(ÈQÈ Æ

) wirelength(É�È ) time(sec) area(ÈºÈ Æ) wirelength(É�È ) time(sec) area wirelength

apte 48.52 234132 37.84 49.80 232625 25.21 -2.6 0.6xerox 21.31 467786 36.68 20.99 425514 34.49 1.5 9.0

hp 9.81 140447 41.36 9.87 133759 30.93 0.6 4.8ami33 1.32 48977 175.03 1.31 47507 121.41 0.8 3.0ami49 41.36 755635 334.38 40.58 753771 229.54 1.9 0.3

playout.xlii 98.03 5309046 1377.42 98.94 4963524 939.38 -0.9 6.5

5.2 ConstrainedFloorplan Results

Wealsotestedtherealhighspeedwirelessmodemin mixedsignalMCM design,characterizedin Table1.For theconstrainedfloorplandesigns,the parametersettingin our algorithmsis sameasthat in the uncon-strainedimplementation(i.e. coefficient Á is setto be0.5 andthenumberof sampledsolutionsis 5). In thetest,weassume equalto 2,whichmeansall the111analogmodulesareto beplacedinto two analogregions.Theexperimentalapproachwasdesignedexactly in thesamewayaswedid for MCNC circuits.As shown inTable6, theaverageareaandwirelengthareimprovedby ����� and �����#� , respectively. Table7 shows theminimumareaandwirelengthcomparisonwith theimprovementof wirelengthby ������� . By comparingtheexperimentalresultsof constrainedandunconstrainedfloorplandesigns,we canseethatDWMC algorithmis moreeffective to improve areaandwirelengthfor theconstrainedfloorplandesigns.Thereasonis thatthe

Table4: ComparisononMinimum Valuesfor UnconstrainedSlicingFloorplan

circuit SimulatedAnnealing DynamicWeightingMonteCarlo Improvement(%)area(ÈQÈ Æ

) wirelength(É�È ) time(sec) area(ÈºÈ Æ) wirelength(É�È ) time(sec) area wirelength

apte 48.50 222508 37.14 48.50 226412 27.88 0.0 1.8xerox 21.05 414467 38.56 20.43 383909 65.46 3.0 7.4

hp 9.85 113838 40.93 9.58 118472 44.60 2.7 -4.1ami33 1.29 44369 164.63 1.29 45923 180.21 0.0 -3.5ami49 40.31 688055 320.19 42.23 670845 259.32 -4.8 2.5

playout.xlii 95.70 4824202 1351.96 97.35 4575894 1150.04 -1.7 5.4

Figure4: A slicingfloorplanobtainedby usingdynamicweightingMonteCarlo for circuit playout.xlii

Table5: Minimum Valuesof TimberWolf Results

circuit TW with routingspace& compaction TW without routingspace DWMC

area(ÈQÈ Æ) WL( É�È ) time(sec) area(ÈºÈ Æ

) WL( É�È ) time(sec) area(ÈQÈ Æ) WL( É�È )

apte 49.74 525420 109.2 48.50 487710 66.0 48.50 226412xerox 21.04 640660 148.6 22.64 526920 101.2 20.43 383909

hp 9.44 194840 133.0 9.58 186760 91.4 9.58 118472ami33 1.33 62739 273.4 1.27 71800 221.0 1.29 45923ami49 40.20 755960 544.8 40.81 814200 472.8 42.23 670845

playout.xlii 118.88 5286300 2968.3 115.52 6220900 1599.2 97.35 4575894

Table6: AverageValuesfor theMixedSignalMCM Designof A High SpeedWirelessModem

circuit SimulatedAnnealing DynamicWeightingMonteCarlo Improvement(%)area(ȺÊ-Ë Æ ) wirelength(ȺÊ-Ë ) time(sec) area(ȺÊ-Ë Æ ) wirelength(ȺÊ-Ë ) time(sec) area wirelength

modem 9.563x Ì�Í�Î 7.010x Ì�Í�Ï 1419.27 9.283x Ì�Í�Î 6.266x Ì�Í�Ï 1286.08 2.9 10.6

constrainedfloorplanproblemusuallyintroducesmany dramaticconfigurationchangesduringtheoptimiza-tion process,which meansthatmorehigh energy barriersareintroduced.DynamicweightingMonteCarlois especiallysuitableto solve this kind of optimizationproblems. Instead,simulatedannealingis difficultto overcomethesehigh energy barriersasthe temperaturedescends.Figure5 shows the floorplansolutionobtainedby usingDWMC algorithmfor this realmixedsignalMCM design,wherethedarkblocksrepresentanalogmodulesandlight blocksrepresentdigital modules.

6 Conclusion

This paperpresentsa new applicationof dynamicweightingMonteCarlo algorithm in VLSI floorplandesigns.By introducingthe importanceweight asa dynamicvariable,this approachallows the systemtojump outof localminimamoreeasilyandthussamplebettersolutions.In this paper, we modifiedthePolishexpressionrepresentationapproach[WL89] to handlemixedsignalMCM floorplandesigns.Ourexperimentsindicatethat thedynamicweightingMonteCarlo algorithmis efficient andeffective for bothunconstrainedandconstrainedfloorplandesigns.This is thefirst work adoptingdynamicweightingMonteCarlo algorithmfor solvingoptimizationproblemsin theVLSI CAD field. We believe that this methodhasapplicationstomany otherVLSI CAD optimizationproblems.

Table7: Minimum Valuesfor theMixedSignalMCM Designof A High SpeedWirelessModem

circuit SimulatedAnnealing DynamicWeightingMonteCarlo Improvement(%)area(ȺÊ-Ë Æ ) wirelength(ȺÊ-Ë ) time(sec) area(ȺÊ-Ë Æ ) wirelength(ȺÊ-Ë ) time(sec) area wirelength

modem 9.314x Ì�Í�Î 6.481x Ì�Í�Ï 1388.12 9.312x Ì�Í�Î 5.219x Ì�Í�Ï 1721.02 0.0 19.5

Figure5: Floorplanresultfor a realmixedsignalMCM designobtainedby dynamicweightingMonteCarlo

References

[CHMR91] J.P. Cohoon,S.U.Hegde,W.N. Martin, andD.S. Richards, Distributedgeneticalgorithmsforthefloorplandesignproblem.In IEEETrans.onComputer-AidedDesign, pages483–492,1991.

[DEKP89] W. M. Dai, B. Eschermann,E. S.Kuh,andM. Pedram.Hierarchicalplacementandfloorplanningfor bear. In IEEETrans.onComputer-AidedDesign, pages1335–1349,1989.

[GG84] S.GemanandD. Geman.Stochasticrelaxation,GibbsdistributionsandtheBayesianrestorationofimages.In IEEETransactiononPatternAnalysisandMachineIntelligence, pages721-741,1984.

[GT95] C.J.GeyerandE.A. ThompsonAnnealingMarkov chainMonteCarlowith applicationsto ancestralinference.In Journalof theAmericanStatisticalAssociation, pages909-920,1995.

[Ha70] W.K. Hastings Monte Carlo samplingmethodsusing Markov chainsand their applications. InBiometrika, pages97-109,1970.

[KGJ83] S.Kirkpatrick, C. D. Gelatt,andM. P. VecchiJr. Optimizationby simulatedannealing.In Science,pages671–680,May 1983.

[KK88] K. A. Kozminski,andE. Kinnen. Rectangulardualizationandrectangulardissections. In IEEETrans.onComputer-AidedDesign, pages1401–1416,1988.

[KR94] W. KerlerandP. Rehberg. Simulatedtemperingprocedurefor spin-glasssimulations. In PhysicalReview E, pages4220-4225,1994.

[KW86] M.H. Kalos,P.A. Whitlock. MonteCarlomethodsIn New York : Wiley, 1986.

[Li97] F. Liang. WeightedMarkov chainMonte Carlo andoptimization. Ph.D. dissertation,the ChineseUniversity of HongKong, 1997

[LW98] Liang F. andWongW.H. Dynamicweightingin simulationsof spinsystems.In Technical Report,Departmentof Statistics,UCLA, 1998.

[MFNK95] H. Murata,K. Fujiyoshi,S.Nakatake, andY. Kajitani. Rectangle-packing-based moduleplace-ment. In Proc.of Int. Conf. onComputer-AidedDesign, pages472–479,1995.

[MFK97] H. Murata,K. Fujiyoshi,M. Kaneko. VLSI/PCBplacementwith obstaclesbasedonsequence-pair.In Proc.of Int. Symp.onPhysicalDesign, pages26–31,1997.

[MP92] E.Marinari,andG.Parisi.Simulatedtempering:anew MonteCarloscheme.In EurophysicsLetters,vol.19,(no.6),15July, 1992,pages451–455.

[NFMK96] S.Nakatake,K. Fujiyoshi,H. Murata,andY. Kajitani. ModuleplacementonBSG-structureandIC layoutapplications.In Proc.of Int. Conf. onComputer-AidedDesign, pages484-491,1996

[Ot83] R. Otten. Efficient floorplanoptimization. In Proc. of Int. Conf. on Computer-AidedDesign, pages499–502,1983.

[Re95] G. Reinelt.TSPLIB1995.In http://ftp.iwr.uni-heidelberg.de/pub/tsplib

[SS94] J. StanderandB.W. Silverman. Temperatureschedulesfor simulatedannealing. In StatisticsandComputing, pages21-32,1994.

[PL93] P. PanandC. L. Liu. Areaminimizationfor generalfloorplans.In Proc.of Int. Conf. on Computer-AidedDesign, pages606–609,1993.

[St83] L. Stockmeyer. Optimalorientationof cellsin slicing floorplandesigns.In InformationandControl,pages91–101,1983.

[SuS95] Wern-JiehSunandC. Sechen.Efficient andeffective placementfor very large circuits. In IEEETrans.onComputer-AidedDesign, pages349–359,March1995.

[SwS90] W. SwartzandC. Sechen.New algorithmsfor theplacementandroutingof macrocells. In Proc.of Int. Conf. onComputer-AidedDesign, pages336–339,1990.

[TW98] TimberWolf Systems,Inc. TimberWolf Placement& Global routing software package. Inhttp://www2.twolf.com/benchmark.htm

[WL88] D.F. Wong,H.W. Leong,andC. L. Liu. Simulatedannealingfor VLSI design. Kluwer AcademicPublishers, 1988.

[WL89] D.F. WongandC. L. Liu. Floorplandesignof VLSI circuits. In Algorithmica, pages263–291,1989.

[WL97] W. H. WongandF. Liang. Dynamicweightingin MonteCarloandoptimization.In Proc.NationalAcademicScience, USA, pages14220–14224,Dec1997.

[WW90] Ting-ChiWang,andD.F. Wong. An optimalalgorithmfor floorplanareaoptimization.In Proc.ofDesignAutomationConf., pages180–186,1990

[YTK96] T. Yamanouchi,K. Tamakashi,andT. Kambe.Hybrid floorplanningbasedonpartialclusteringandmodulerestructuring.In Proc.of Int. Conf. onComputer-AidedDesign, pages478–483,1996.

[YW97] F.Y. Young,andD.F. Wong. How goodareslicing floorplans. In Integration, the VLSI journal,pages61–73,1997.