Update temp.py

This commit is contained in:
bukehu 2024-03-05 03:11:13 +00:00
parent b06f7f6bc5
commit dfb598cb0e
1 changed files with 22 additions and 0 deletions

22
temp.py
View File

@ -0,0 +1,22 @@
dimension = 10
spacing_between_rows = 10
spacing_between_columns = 10
cell_starting_point = (30, 30)
limit_type = "guide"
f = open("output.txt", "w")
# f.write(f"create_{limit_type} -name guts/link_upstream -area {cell_starting_point[0]} {cell_starting_point[0]} {cell_starting_point[0] + 150} {cell_starting_point[1] - 5} \\n\n")
# f.write(f"create_{limit_type} -name guts/link_downstream -area {cell_starting_point[0] + 160} {cell_starting_point[0]} {cell_starting_point[0] + 160 + 500} {cell_starting_point[1] - 5} \\n\n")
f.write("")
f.close()
for i in range(32):
for j in range(32):
part_1 = f"create_{limit_type} -name guts/n[0].clnt.clnt/genblk1.cgol_inst/cell_array/gen_rows[{i}].gen_cols[{j}].life_cell -area "
lower_left = (cell_starting_point[0] + i * (dimension + spacing_between_rows), cell_starting_point[1] + j * (dimension + spacing_between_columns))
upper_right = (lower_left[0] + dimension, lower_left[1] + dimension)
part_2 = f"{lower_left[0]} {lower_left[1]} {upper_right[0]} {upper_right[1]} \\n\n"
f = open("output.txt", "a")
f.write(part_1 + part_2)
f.close()