mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
fix(precheck): support integers (without '.' decimal separator) in LEF (#171)
This commit is contained in:
@@ -95,8 +95,11 @@ def canonicalize_rectangles(
|
|||||||
def parse_fp3(value: str):
|
def parse_fp3(value: str):
|
||||||
# parse fixed-point numbers with 3 digits after the decimal point
|
# parse fixed-point numbers with 3 digits after the decimal point
|
||||||
# e.g. '20.470' to 20470
|
# e.g. '20.470' to 20470
|
||||||
|
if "." in value:
|
||||||
ip, fp = value.split(".")
|
ip, fp = value.split(".")
|
||||||
mul = ip + fp[:3].ljust(3, "0")
|
mul = ip + fp[:3].ljust(3, "0")
|
||||||
|
else:
|
||||||
|
mul = value + "000"
|
||||||
return int(mul)
|
return int(mul)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user