From cd8ce32c0cbf46ad5909b8c545164cffce2a0b97 Mon Sep 17 00:00:00 2001 From: mgwoo Date: Wed, 12 Feb 2020 19:08:37 -0800 Subject: [PATCH] Critical bug fix on WA calculation This will improve HPWL by 20% --- src/nesterovBase.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nesterovBase.cpp b/src/nesterovBase.cpp index bc86d7b..bc9da26 100644 --- a/src/nesterovBase.cpp +++ b/src/nesterovBase.cpp @@ -1498,7 +1498,7 @@ NesterovBase::updateWireLengthForceWA( float expMinX = (gNet->lx() - gPin->cx()) * wlCoeffX; float expMaxX = (gPin->cx() - gNet->ux()) * wlCoeffX; float expMinY = (gNet->ly() - gPin->cy()) * wlCoeffY; - float expMaxY = (gPin->cy() - gNet->ly()) * wlCoeffY; + float expMaxY = (gPin->cy() - gNet->uy()) * wlCoeffY; // min x if(expMinX > nbVars_.minWireLengthForceBar) { @@ -1625,7 +1625,7 @@ NesterovBase::getWireLengthPreconditioner(GCell* gCell) { FloatCoordi NesterovBase::getDensityPreconditioner(GCell* gCell) { - float areaVal = 0.0001 * static_cast(gCell->dx()) + float areaVal = static_cast(gCell->dx()) * static_cast(gCell->dy()); return FloatCoordi(areaVal, areaVal); @@ -1648,8 +1648,8 @@ NesterovBase::getDensityGradient(GCell* gCell) { float overlapArea = getOverlapDensityArea(bin, gCell) * gCell->densityScale(); - electroForce.x += 0.0001 * overlapArea * bin->electroForceX(); - electroForce.y += 0.0001 * overlapArea * bin->electroForceY(); + electroForce.x += overlapArea * bin->electroForceX(); + electroForce.y += overlapArea * bin->electroForceY(); } } return electroForce;