Modified lefWrite with the odd trick of adding a zero to prevent

fprint from printing "negative zeros", which routinely happens in
the ORIGIN output of LEF files with "lef write".
This commit is contained in:
Tim Edwards 2020-05-26 17:19:57 -04:00
parent 3203eec28c
commit da9c180670
1 changed files with 4 additions and 2 deletions

View File

@ -1043,10 +1043,12 @@ lefWriteMacro(def, f, scale, hide)
}
/* Write position and size information */
/* Note: Using "0.0 - X" prevents fprintf from generating "negative */
/* zeros" in the output. */
fprintf(f, IN0 "ORIGIN " POINT " ;\n",
-lc.oscale * (float)boundary.r_xbot,
-lc.oscale * (float)boundary.r_ybot);
0.0 - lc.oscale * (float)boundary.r_xbot,
0.0 - lc.oscale * (float)boundary.r_ybot);
fprintf(f, IN0 "SIZE " FP " BY " FP " ;\n",
lc.oscale * (float)(boundary.r_xtop - boundary.r_xbot),