Burak Aykenar
09/19/2023, 8:09 AMBurak Aykenar
09/19/2023, 8:37 AMMitch Bailey
09/19/2023, 11:22 AMscripts/odbpy/manual_macro_place.py
def manual_macro_place(reader, config, fixed):
"""
Places macros in positions and orientations specified by a config file
"""
db_units_per_micron = reader.block.getDbUnitsPerMicron()
# read config
macros = {}
with open(config, "r") as config_file:
for line in config_file:
# Discard comments and empty lines
line = line.split("#")[0].strip()
if not line:
continue
line = line.split()
macros[line[0]] = [
str(int(float(line[1]) * db_units_per_micron)),
str(int(float(line[2]) * db_units_per_micron)),
line[3],
]
print("Placing the following macros:")
print(macros)
So it looks like comments start with #
and are ignored along with blank lines.
It doesn’t look like variables or equations would be processed as you suggested.Burak Aykenar
09/19/2023, 11:44 AMMitch Bailey
09/19/2023, 1:28 PMm4
to create a placement file outside the flow.Burak Aykenar
09/20/2023, 2:03 PM